diff --git a/tags/Site antigo e SIPRPSoft/.classpath b/tags/Site antigo e SIPRPSoft/.classpath new file mode 100644 index 00000000..988de3b2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/.classpath @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/.project b/tags/Site antigo e SIPRPSoft/.project new file mode 100644 index 00000000..200965fb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/.project @@ -0,0 +1,17 @@ + + + SIPRP + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/build.xml b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/build.xml new file mode 100644 index 00000000..877e9124 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/build.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + Builds, tests, and runs the project AnaliseAcidentesTrabalho. + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/catalog.xml b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/catalog.xml new file mode 100644 index 00000000..e69de29b diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/activation.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/activation.jar new file mode 100755 index 00000000..589b6749 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/activation.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/avalon-framework-4.2.0.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/avalon-framework-4.2.0.jar new file mode 100644 index 00000000..b1aa6d7c Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/avalon-framework-4.2.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/batik-all-1.7.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/batik-all-1.7.jar new file mode 100644 index 00000000..58932858 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/batik-all-1.7.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/commons-collections-3.1.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/commons-collections-3.1.jar new file mode 100644 index 00000000..41e230fe Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/commons-collections-3.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/commons-io-1.4.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/commons-io-1.4.jar new file mode 100644 index 00000000..133dc6cb Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/commons-io-1.4.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/commons-lang-2.1.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/commons-lang-2.1.jar new file mode 100644 index 00000000..87b80ab5 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/commons-lang-2.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/commons-logging-1.1.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/commons-logging-1.1.jar new file mode 100644 index 00000000..2ff9bbd9 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/commons-logging-1.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/commons-validator-1.3.1.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/commons-validator-1.3.1.jar new file mode 100644 index 00000000..55b12b1a Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/commons-validator-1.3.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/evologger.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/evologger.jar new file mode 100644 index 00000000..07b8a8ec Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/evologger.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/evolute.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/evolute.jar new file mode 100644 index 00000000..4ae1de1b Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/evolute.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/fop.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/fop.jar new file mode 100644 index 00000000..3e640f9c Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/fop.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/iText-2.0.8.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/iText-2.0.8.jar new file mode 100644 index 00000000..aaf6296a Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/iText-2.0.8.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/jai_imageio.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/jai_imageio.jar new file mode 100644 index 00000000..359551eb Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/jai_imageio.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/jakarta-oro-2.0.8.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/jakarta-oro-2.0.8.jar new file mode 100644 index 00000000..23488d26 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/jakarta-oro-2.0.8.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/jdom.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/jdom.jar new file mode 100644 index 00000000..288e64cb Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/jdom.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/log4j-1.2.15.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/log4j-1.2.15.jar new file mode 100644 index 00000000..c930a6ab Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/log4j-1.2.15.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/mail.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/mail.jar new file mode 100755 index 00000000..e6f70832 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/mail.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/poi-3.5-beta6-20090622.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/poi-3.5-beta6-20090622.jar new file mode 100644 index 00000000..64182229 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/poi-3.5-beta6-20090622.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/poi-ooxml-3.5-beta6-20090622.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/poi-ooxml-3.5-beta6-20090622.jar new file mode 100644 index 00000000..206d9920 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/poi-ooxml-3.5-beta6-20090622.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/postgresql-8.4-701.jdbc4.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/postgresql-8.4-701.jdbc4.jar new file mode 100644 index 00000000..e21beec5 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/postgresql-8.4-701.jdbc4.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/serializer-2.7.0.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/serializer-2.7.0.jar new file mode 100644 index 00000000..7cd80696 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/serializer-2.7.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/shst.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/shst.jar new file mode 100644 index 00000000..da44ffec Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/shst.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/xalan-2.7.0.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/xalan-2.7.0.jar new file mode 100644 index 00000000..979ee761 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/xalan-2.7.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/xercesImpl-2.7.1.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/xercesImpl-2.7.1.jar new file mode 100644 index 00000000..eac75ae8 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/xercesImpl-2.7.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/xml-apis-1.3.04.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/xml-apis-1.3.04.jar new file mode 100644 index 00000000..d42c0ea6 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/xml-apis-1.3.04.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/xml-apis-ext-1.3.04.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/xml-apis-ext-1.3.04.jar new file mode 100644 index 00000000..a7869d68 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/xml-apis-ext-1.3.04.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/xmlgraphics-commons-1.3.1.jar b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/xmlgraphics-commons-1.3.1.jar new file mode 100644 index 00000000..81a485dc Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/lib/xmlgraphics-commons-1.3.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/ant-deploy.xml b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/ant-deploy.xml new file mode 100644 index 00000000..a6f1480c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/ant-deploy.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/build-impl.xml b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/build-impl.xml new file mode 100644 index 00000000..8d9722de --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/build-impl.xml @@ -0,0 +1,925 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set build.web.dir + Must set build.generated.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.war + +The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file) +or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +The libs.CopyLibs.classpath property is not set up. +This property must point to +org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part +of NetBeans IDE installation and is usually located at +<netbeans_installation>/java<version>/ant/extra folder. +Either open the project in the IDE and make sure CopyLibs library +exists or setup the property manually. For example like this: + ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.jsp.includes + + + + + + + + + + + + + + + + + + + + + + + Must select a file in the IDE or set jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. + + + Launching ${browse.url} + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/faces-config.NavData b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/faces-config.NavData new file mode 100644 index 00000000..7560b1b0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/faces-config.NavData @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/genfiles.properties b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/genfiles.properties new file mode 100644 index 00000000..c500c6cb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=8edae352 +build.xml.script.CRC32=97b5d0ef +build.xml.stylesheet.CRC32=c0ebde35@1.15.2.1 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=8edae352 +nbproject/build-impl.xml.script.CRC32=44c2e1c7 +nbproject/build-impl.xml.stylesheet.CRC32=8ab4467e@1.15.2.1 diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/managed-beans.NavData b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/managed-beans.NavData new file mode 100644 index 00000000..12aef59e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/managed-beans.NavData @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/navigation.NavData b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/navigation.NavData new file mode 100644 index 00000000..73a9c770 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/navigation.NavData @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/project.properties b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/project.properties new file mode 100644 index 00000000..2004df2a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/project.properties @@ -0,0 +1,141 @@ +build.classes.dir=${build.web.dir}/WEB-INF/classes +build.classes.excludes=**/*.java,**/*.form +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +build.web.dir=${build.dir}/web +build.web.excludes=${build.classes.excludes} +client.urlPart= +compile.jsps=false +conf.dir=${source.root}/conf +creator=3.0 +debug.classpath=${javac.classpath}:${build.classes.dir} +debug.test.classpath=\ + ${run.test.classpath} +display.browser=true +dist.dir=dist +dist.ear.war=${dist.dir}/${war.ear.name} +dist.javadoc.dir=${dist.dir}/javadoc +dist.war=${dist.dir}/${war.name} +excludes= +file.reference.activation.jar=lib/activation.jar +file.reference.avalon-framework-4.2.0.jar=lib/avalon-framework-4.2.0.jar +file.reference.batik-all-1.7.jar=lib/batik-all-1.7.jar +file.reference.commons-collections-3.1.jar=lib/commons-collections-3.1.jar +file.reference.commons-io-1.4.jar=lib/commons-io-1.4.jar +file.reference.commons-lang-2.1.jar=lib/commons-lang-2.1.jar +file.reference.commons-logging-1.1.jar=lib/commons-logging-1.1.jar +file.reference.commons-validator-1.3.1.jar=lib/commons-validator-1.3.1.jar +file.reference.evologger.jar=lib/evologger.jar +file.reference.evolute.jar=lib/evolute.jar +file.reference.fop.jar=lib/fop.jar +file.reference.iText-2.0.8.jar=lib/iText-2.0.8.jar +file.reference.jai_imageio.jar=lib/jai_imageio.jar +file.reference.jakarta-oro-2.0.8.jar=lib/jakarta-oro-2.0.8.jar +file.reference.jdom.jar=lib/jdom.jar +file.reference.log4j-1.2.15.jar=lib/log4j-1.2.15.jar +file.reference.mail.jar=lib/mail.jar +file.reference.poi-3.5-beta6-20090622.jar=lib/poi-3.5-beta6-20090622.jar +file.reference.poi-ooxml-3.5-beta6-20090622.jar=lib/poi-ooxml-3.5-beta6-20090622.jar +file.reference.postgresql-8.4-701.jdbc4.jar=lib/postgresql-8.4-701.jdbc4.jar +file.reference.serializer-2.7.0.jar=lib/serializer-2.7.0.jar +file.reference.shst.jar=lib/shst.jar +file.reference.xalan-2.7.0.jar=lib/xalan-2.7.0.jar +file.reference.xercesImpl-2.7.1.jar=lib/xercesImpl-2.7.1.jar +file.reference.xml-apis-1.3.04.jar=lib/xml-apis-1.3.04.jar +file.reference.xml-apis-ext-1.3.04.jar=lib/xml-apis-ext-1.3.04.jar +file.reference.xmlgraphics-commons-1.3.1.jar=lib/xmlgraphics-commons-1.3.1.jar +includes=** +j2ee.deploy.on.save=false +j2ee.platform=1.4 +j2ee.server.type=Tomcat60 +jar.compress=false +javac.classpath=\ + ${libs.jsf-designtime.classpath}:\ + ${libs.jsfsupport-designtime.classpath}:\ + ${libs.webui-designtime.classpath}:\ + ${libs.jdbcsupport-designtime.classpath}:\ + ${libs.theme-default.classpath}:\ + ${libs.jstl11.classpath}:\ + ${libs.rowset-ri.classpath}:\ + ${file.reference.activation.jar}:\ + ${file.reference.avalon-framework-4.2.0.jar}:\ + ${file.reference.iText-2.0.8.jar}:\ + ${file.reference.batik-all-1.7.jar}:\ + ${file.reference.fop.jar}:\ + ${file.reference.xmlgraphics-commons-1.3.1.jar}:\ + ${file.reference.jai_imageio.jar}:\ + ${file.reference.jdom.jar}:\ + ${file.reference.mail.jar}:\ + ${file.reference.evolute.jar}:\ + ${file.reference.postgresql-8.4-701.jdbc4.jar}:\ + ${file.reference.evologger.jar}:\ + ${file.reference.poi-3.5-beta6-20090622.jar}:\ + ${file.reference.poi-ooxml-3.5-beta6-20090622.jar}:\ + ${file.reference.xalan-2.7.0.jar}:\ + ${file.reference.commons-io-1.4.jar}:\ + ${file.reference.commons-logging-1.1.jar}:\ + ${file.reference.log4j-1.2.15.jar}:\ + ${file.reference.xercesImpl-2.7.1.jar}:\ + ${file.reference.xml-apis-1.3.04.jar}:\ + ${file.reference.xml-apis-ext-1.3.04.jar}:\ + ${file.reference.serializer-2.7.0.jar}:\ + ${file.reference.commons-collections-3.1.jar}:\ + ${file.reference.commons-lang-2.1.jar}:\ + ${file.reference.commons-validator-1.3.1.jar}:\ + ${file.reference.jakarta-oro-2.0.8.jar}:\ + ${file.reference.shst.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.debug=true +javac.deprecation=false +javac.source=1.6 +javac.target=1.6 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir}:\ + ${libs.junit.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding= +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.preview=true +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +jspcompilation.classpath=${jspc.classpath}:${javac.classpath} +lib.dir=${web.docbase.dir}/WEB-INF/lib +# Property libs.rowset-ri.classpath is set here just to make sharing of project simpler. +# The library definition has always preference over this property. +libs.rowset-ri.classpath=../../../../.netbeans/6.0/modules/ext/rowset-1.0.1.jar +persistence.xml.dir=${conf.dir} +platform.active=default_platform +resource.dir=setup +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +# Space-separated list of JVM arguments used when running class with main method +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): +runmain.jvmargs= +source.root=src +src.dir=${source.root}/java +test.src.dir=test +war.content.additional=\ + ${libs.jsf-runtime.classpath}:\ + ${libs.jsfsupport-runtime.classpath}:\ + ${libs.webui-runtime.classpath}:\ + ${libs.jdbcsupport-runtime.classpath}:\ + ${libs.exceptionhandler-runtime.classpath}:\ + ${libs.theme-default.classpath}:\ + ${libs.jstl11.classpath} +war.ear.name=AnaliseAcidentesTrabalho.war +war.name=AnaliseAcidentesTrabalho.war +war.package=true +web.docbase.dir=web +webinf.dir=web/WEB-INF diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/project.xml b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/project.xml new file mode 100644 index 00000000..b4396323 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/nbproject/project.xml @@ -0,0 +1,185 @@ + + + org.netbeans.modules.web.project + + + + AnaliseAcidentesTrabalho + 1.6 + + + ${libs.jsf-designtime.classpath} + WEB-INF/lib + + + ${libs.jsfsupport-designtime.classpath} + WEB-INF/lib + + + ${libs.webui-designtime.classpath} + WEB-INF/lib + + + ${libs.jdbcsupport-designtime.classpath} + WEB-INF/lib + + + ${libs.theme-default.classpath} + WEB-INF/lib + + + ${libs.jstl11.classpath} + WEB-INF/lib + + + ${libs.rowset-ri.classpath} + WEB-INF/lib + + + ${file.reference.activation.jar} + WEB-INF/lib + + + ${file.reference.avalon-framework-4.2.0.jar} + WEB-INF/lib + + + ${file.reference.iText-2.0.8.jar} + WEB-INF/lib + + + ${file.reference.batik-all-1.7.jar} + WEB-INF/lib + + + ${file.reference.fop.jar} + WEB-INF/lib + + + ${file.reference.xmlgraphics-commons-1.3.1.jar} + WEB-INF/lib + + + ${file.reference.jai_imageio.jar} + WEB-INF/lib + + + ${file.reference.jdom.jar} + WEB-INF/lib + + + ${file.reference.mail.jar} + WEB-INF/lib + + + ${file.reference.evolute.jar} + WEB-INF/lib + + + ${file.reference.postgresql-8.4-701.jdbc4.jar} + WEB-INF/lib + + + ${file.reference.evologger.jar} + WEB-INF/lib + + + ${file.reference.poi-3.5-beta6-20090622.jar} + WEB-INF/lib + + + ${file.reference.poi-ooxml-3.5-beta6-20090622.jar} + WEB-INF/lib + + + ${file.reference.xalan-2.7.0.jar} + WEB-INF/lib + + + ${file.reference.commons-io-1.4.jar} + WEB-INF/lib + + + ${file.reference.commons-logging-1.1.jar} + WEB-INF/lib + + + ${file.reference.log4j-1.2.15.jar} + WEB-INF/lib + + + ${file.reference.xercesImpl-2.7.1.jar} + WEB-INF/lib + + + ${file.reference.xml-apis-1.3.04.jar} + WEB-INF/lib + + + ${file.reference.xml-apis-ext-1.3.04.jar} + WEB-INF/lib + + + ${file.reference.serializer-2.7.0.jar} + WEB-INF/lib + + + ${file.reference.commons-collections-3.1.jar} + WEB-INF/lib + + + ${file.reference.commons-lang-2.1.jar} + WEB-INF/lib + + + ${file.reference.commons-validator-1.3.1.jar} + WEB-INF/lib + + + ${file.reference.jakarta-oro-2.0.8.jar} + WEB-INF/lib + + + ${file.reference.shst.jar} + WEB-INF/lib + + + + + ${libs.jsf-runtime.classpath} + WEB-INF/lib + + + ${libs.jsfsupport-runtime.classpath} + WEB-INF/lib + + + ${libs.webui-runtime.classpath} + WEB-INF/lib + + + ${libs.jdbcsupport-runtime.classpath} + WEB-INF/lib + + + ${libs.exceptionhandler-runtime.classpath} + WEB-INF/lib + + + ${libs.theme-default.classpath} + WEB-INF/lib + + + ${libs.jstl11.classpath} + WEB-INF/lib + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/conf/MANIFEST.MF b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/conf/MANIFEST.MF new file mode 100644 index 00000000..59499bce --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Acesso.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Acesso.java new file mode 100644 index 00000000..bd241ce0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Acesso.java @@ -0,0 +1,339 @@ +/* + * Acesso.java + * + * Created on Oct 15, 2008, 9:49:21 AM + */ + +package analiseacidentestrabalho; + +import beans.Utilizador; +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.DropDown; +import com.sun.rave.web.ui.component.StaticText; +import db.providers.AnalisesDataProvider; +import db.providers.UtilizadoresDataProvider; +import global.Global; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import javax.faces.context.FacesContext; +import utils.JSFUtils; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ * + * @author lluis + */ +public class Acesso extends AbstractPageBean { + // + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + private StaticText stWelcome = new StaticText(); + + public StaticText getStWelcome() { + return stWelcome; + } + + public void setStWelcome(StaticText st) { + this.stWelcome = st; + } + private DropDown drpEstabelecimentos = new DropDown(); + + public DropDown getDrpEstabelecimentos() { + return drpEstabelecimentos; + } + + public void setDrpEstabelecimentos(DropDown dd) { + this.drpEstabelecimentos = dd; + } + private HtmlPanelGrid gridEstabelecimento = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridEstabelecimento() { + return gridEstabelecimento; + } + + public void setGridEstabelecimento(HtmlPanelGrid hpg) { + this.gridEstabelecimento = hpg; + } + + //
+ + /** + *

Construct a new Page bean instance.

+ */ + public Acesso() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + @Override + public void init() + { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("Acesso Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + @Override + public void preprocess() + { + + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + @Override + public void prerender() + { + Utilizador u = getSessionBean1().getCurrentUser(); + //String nomeUnicode = Utils.textToUnicode(u.getNome()); + //System.out.println("NOME UNICODE : " + nomeUnicode); + String nomeHtml = Utils.unicodeToHTML( u.getNome() ); + stWelcome.setText("Bem vindo(a) " + nomeHtml); + + if(u.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR) + { + initializeEstabelecimentos(); + } + else + { + gridEstabelecimento.setRendered(false); + } + + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ * + */ + @Override + public void destroy() + { + + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + + + public String lnkAnalisesAcidente_action() { + // TODO: Replace with your code + return null; + } + + public String lnkNewUser_action() { + // TODO: Replace with your code + return null; + } + + public String lnkEditUser_action() { + // TODO: Replace with your code + return null; + } + + public String lnkAjuda_action() { + // TODO: Replace with your code + return null; + } + + public String lnkLogout_action() + { + FacesContext fc = getFacesContext(); + try + { + JSFUtils.logout( fc, false ); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + return "login"; + } + + public String lnkAnalises_action() + { + String page = "gestor"; + + Utilizador u = getSessionBean1().getCurrentUser(); + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + + Integer permissao = udp.getPermissionCode( u.getId() ); + if ( permissao != null ) + { + switch ( permissao.intValue() ) + { + case 1: //seguranca + page = "form_seguranca"; + break; + case 2: //rh + page = "form_rh"; + break; + case 3: //hs + page = "form_hs"; + break; + case 6: //gestor + Integer estabelecimento = null; + if(u.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR) + { + estabelecimento = (Integer) drpEstabelecimentos.getSelected(); + u.setEstabelecimento_gestor( estabelecimento ); + } + page = "form_gestor"; + break; + case 7: //dir ger rh + page = "form_dir_ger_rh"; + break; + case 8: //dir_siprp + page = "form_dir_siprp"; + break; + default: + page = "gestor"; + break; + } + } + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + page = "gestor"; + } + + return page; + } + + public String lnkPlanos_action() + { + Utilizador u = getSessionBean1().getCurrentUser(); +// String curUser = "?user=" + u.getId().toString(); + FacesContext fc = getFacesContext().getCurrentInstance(); + + Integer estabelecimento = null; + if(u.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR) + { + estabelecimento = (Integer) drpEstabelecimentos.getSelected(); +// if(estabelecimento.intValue() == -1) +// { +// getSessionBean1().setMsg("Falta estabelecimento!"); +// return null; +// } +// else +// { +// u.setEstabelecimento(estabelecimento_outro); + u.setEstabelecimento_gestor(estabelecimento); + } + + + Global.redirectToPlanos(fc, u); + +// FacesContext fc = getFacesContext().getCurrentInstance(); +// Utilizador u = getSessionBean1().getCurrentUser(); +// String curUser = "?user=" + u.getId().toString(); +// try +// { +// JSFUtils.redirect(fc, Global.PLANOS_ACTUACAO_URL + curUser); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + + return null; + } + + private void initializeEstabelecimentos() + { + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + com.sun.rave.web.ui.model.Option[] listGestorOptions = adp.getEstabelecimentosGestorList( getSessionBean1().getCurrentUser().getEmpresa_id(), new Boolean(true)); + //listGestorOptions[0].setLabel("-Seleccionar-"); + + getSessionBean1().setEstabelecimentosGestorOptions( listGestorOptions ); + drpEstabelecimentos.setSelected(new Integer(0)); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/AnaliseAcidenteTrabalho.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/AnaliseAcidenteTrabalho.java new file mode 100644 index 00000000..9c929897 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/AnaliseAcidenteTrabalho.java @@ -0,0 +1,15054 @@ +/* + * AnaliseAcidenteTrabalho.java + * + * Created on September 28, 2007, 3:56 PM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import beans.Estabelecimento; +import beans.Recomendacao; +import beans.Seccao; +import beans.Causa; +import beans.Medico; +import beans.Medida; +import beans.Trabalhador; +import beans.Utilizador; +import beans.Acidentado; +import beans.AnaliseAcidente; +import com.evolute.utils.error.ErrorLogger; +import com.sun.data.provider.RowKey; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Button; +import com.sun.rave.web.ui.component.Checkbox; +import com.sun.rave.web.ui.component.DropDown; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.HiddenField; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.Hyperlink; +import com.sun.rave.web.ui.component.ImageComponent; +import com.sun.rave.web.ui.component.ImageHyperlink; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.component.PanelGroup; +import com.sun.rave.web.ui.component.RadioButton; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.Table; +import com.sun.rave.web.ui.component.TableColumn; +import com.sun.rave.web.ui.component.TableRowGroup; +import com.sun.rave.web.ui.component.TextArea; +import com.sun.rave.web.ui.component.TextField; +import com.sun.rave.web.ui.model.DefaultTableDataProvider; +import com.sun.rave.web.ui.model.SingleSelectOptionsList; +import db.providers.AnalisesDataProvider; +import db.providers.TrabalhadoresListDataProvider; +import db.providers.UtilizadoresDataProvider; +import global.Global; +import java.io.File; +import java.sql.Time; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.ListIterator; +import java.util.Properties; +import javax.activation.DataHandler; +import javax.faces.FacesException; +import javax.faces.FactoryFinder; +import javax.faces.application.ApplicationFactory; +import javax.faces.component.html.HtmlPanelGrid; +import javax.faces.el.MethodBinding; +import javax.faces.event.ActionEvent; +import javax.faces.event.ValueChangeEvent; +import javax.mail.internet.InternetAddress; +import javax.mail.internet.MimeBodyPart; +import javax.mail.internet.MimeMessage; +import javax.mail.internet.MimeMultipart; +import javax.mail.*; +import javax.mail.util.ByteArrayDataSource; +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; +import org.apache.commons.validator.EmailValidator; +import pagestate.AnaliseAcidenteTrabalhoState; +import pdf.PdfGenerator; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class AnaliseAcidenteTrabalho extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridBase1() { + return gridBase1; + } + + public void setGridBase1(HtmlPanelGrid hpg) { + this.gridBase1 = hpg; + } + + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayout1() { + return gridLayout1; + } + + public void setGridLayout1(HtmlPanelGrid hpg) { + this.gridLayout1 = hpg; + } + + private HtmlPanelGrid gridMsg = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMsg() { + return gridMsg; + } + + public void setGridMsg(HtmlPanelGrid hpg) { + this.gridMsg = hpg; + } + + private StaticText txtMsg = new StaticText(); + + public StaticText getTxtMsg() { + return txtMsg; + } + + public void setTxtMsg(StaticText st) { + this.txtMsg = st; + } + + private HtmlPanelGrid gridCabecalho = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridCabecalho() { + return gridCabecalho; + } + + public void setGridCabecalho(HtmlPanelGrid hpg) { + this.gridCabecalho = hpg; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private StaticText lblEmpresa1 = new StaticText(); + + public StaticText getLblEmpresa1() { + return lblEmpresa1; + } + + public void setLblEmpresa1(StaticText st) { + this.lblEmpresa1 = st; + } + + private StaticText txtEmpresa = new StaticText(); + + public StaticText getTxtEmpresa() { + return txtEmpresa; + } + + public void setTxtEmpresa(StaticText st) { + this.txtEmpresa = st; + } + + private StaticText staticText4 = new StaticText(); + + public StaticText getStaticText4() { + return staticText4; + } + + public void setStaticText4(StaticText st) { + this.staticText4 = st; + } + + private StaticText txtEstabelecimento = new StaticText(); + + public StaticText getTxtEstabelecimento() { + return txtEstabelecimento; + } + + public void setTxtEstabelecimento(StaticText st) { + this.txtEstabelecimento = st; + } + + private StaticText txtTrabalhador = new StaticText(); + + public StaticText getTxtTrabalhador() { + return txtTrabalhador; + } + + public void setTxtTrabalhador(StaticText st) { + this.txtTrabalhador = st; + } + + private HtmlPanelGrid gridTrabalhadores = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridTrabalhadores() { + return gridTrabalhadores; + } + + public void setGridTrabalhadores(HtmlPanelGrid hpg) { + this.gridTrabalhadores = hpg; + } + + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel3() { + return gridPanel3; + } + + public void setGridPanel3(HtmlPanelGrid hpg) { + this.gridPanel3 = hpg; + } + + private StaticText staticText5 = new StaticText(); + + public StaticText getStaticText5() { + return staticText5; + } + + public void setStaticText5(StaticText st) { + this.staticText5 = st; + } + + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel4() { + return gridPanel4; + } + + public void setGridPanel4(HtmlPanelGrid hpg) { + this.gridPanel4 = hpg; + } + + private StaticText txtSearchMsg = new StaticText(); + + public StaticText getTxtSearchMsg() { + return txtSearchMsg; + } + + public void setTxtSearchMsg(StaticText st) { + this.txtSearchMsg = st; + } + + private HtmlPanelGrid gridSiprp = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridSiprp() { + return gridSiprp; + } + + public void setGridSiprp(HtmlPanelGrid hpg) { + this.gridSiprp = hpg; + } + + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel5() { + return gridPanel5; + } + + public void setGridPanel5(HtmlPanelGrid hpg) { + this.gridPanel5 = hpg; + } + + private StaticText staticText6 = new StaticText(); + + public StaticText getStaticText6() { + return staticText6; + } + + public void setStaticText6(StaticText st) { + this.staticText6 = st; + } + + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel6() { + return gridPanel6; + } + + public void setGridPanel6(HtmlPanelGrid hpg) { + this.gridPanel6 = hpg; + } + + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel7() { + return gridPanel7; + } + + public void setGridPanel7(HtmlPanelGrid hpg) { + this.gridPanel7 = hpg; + } + + private StaticText staticText9 = new StaticText(); + + public StaticText getStaticText9() { + return staticText9; + } + + public void setStaticText9(StaticText st) { + this.staticText9 = st; + } + + private PanelGroup groupPanel3 = new PanelGroup(); + + public PanelGroup getGroupPanel3() { + return groupPanel3; + } + + public void setGroupPanel3(PanelGroup pg) { + this.groupPanel3 = pg; + } + + private StaticText staticText10 = new StaticText(); + + public StaticText getStaticText10() { + return staticText10; + } + + public void setStaticText10(StaticText st) { + this.staticText10 = st; + } + + private StaticText txtCap = new StaticText(); + + public StaticText getTxtCap() { + return txtCap; + } + + public void setTxtCap(StaticText st) { + this.txtCap = st; + } + + //
+ //private String IMAGE_URL = "/resources/images"; + +// private final static int ESTADO_SEG = 1; +// private final static int ESTADO_RH1 = 2; +// private final static int ESTADO_HS = 3; +// private final static int ESTADO_RH2 = 4; +// private final static int ESTADO_MEDICO = 5; +// private final static int ESTADO_ASSINATURAS = 6; +// private final static int ESTADO_IMPRESSAO = 7; +// private final static int ESTADO_FECHAR = 8; +// private final static int ESTADO_CONCLUIDO = 9; + + + private final static int ESTADO_ASSINATURA_1 = 1; + private final static int ESTADO_ASSINATURA_2 = 2; + private final static int ESTADO_ASSINATURA_3 = 3; + +// private final static int ESTADO_ASSINATURA_RESP_SEG = 1; +// private final static int ESTADO_ASSINATURA_SEG = 2; +// private final static int ESTADO_ASSINATURA_HS = 3; +// private final static int ESTADO_ASSINATURA_MED = 4; +// private final static int ESTADO_ASSINATURA_RH = 5; +// private final static int ESTADO_ASSINATURA_RESP_RH = 6; + + private final static int IMAGE_WIDTH = 48; + private final static int IMAGE_HEIGHT = 48; + + private static final String PDFS_FOLDER_URL = "/resources/pdfs"; + + private Hyperlink lnkLblTrabalhador = new Hyperlink(); + + public Hyperlink getLnkLblTrabalhador() { + return lnkLblTrabalhador; + } + + public void setLnkLblTrabalhador(Hyperlink h) { + this.lnkLblTrabalhador = h; + } + + private HtmlPanelGrid gridAcidentado = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridAcidentado() { + return gridAcidentado; + } + + public void setGridAcidentado(HtmlPanelGrid hpg) { + this.gridAcidentado = hpg; + } + + private HtmlPanelGrid gridPanel23 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel23() { + return gridPanel23; + } + + public void setGridPanel23(HtmlPanelGrid hpg) { + this.gridPanel23 = hpg; + } + + private StaticText staticText29 = new StaticText(); + + public StaticText getStaticText29() { + return staticText29; + } + + public void setStaticText29(StaticText st) { + this.staticText29 = st; + } + + private HtmlPanelGrid gridPanel24 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel24() { + return gridPanel24; + } + + public void setGridPanel24(HtmlPanelGrid hpg) { + this.gridPanel24 = hpg; + } + + private HtmlPanelGrid gridPanel25 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel25() { + return gridPanel25; + } + + public void setGridPanel25(HtmlPanelGrid hpg) { + this.gridPanel25 = hpg; + } + + private StaticText staticText30 = new StaticText(); + + public StaticText getStaticText30() { + return staticText30; + } + + public void setStaticText30(StaticText st) { + this.staticText30 = st; + } + + private StaticText txtNomeAcidentado = new StaticText(); + + public StaticText getTxtNomeAcidentado() { + return txtNomeAcidentado; + } + + public void setTxtNomeAcidentado(StaticText st) { + this.txtNomeAcidentado = st; + } + + private StaticText staticText31 = new StaticText(); + + public StaticText getStaticText31() { + return staticText31; + } + + public void setStaticText31(StaticText st) { + this.staticText31 = st; + } + + private StaticText txtDataNascimento = new StaticText(); + + public StaticText getTxtDataNascimento() { + return txtDataNascimento; + } + + public void setTxtDataNascimento(StaticText st) { + this.txtDataNascimento = st; + } + + private StaticText staticText32 = new StaticText(); + + public StaticText getStaticText32() { + return staticText32; + } + + public void setStaticText32(StaticText st) { + this.staticText32 = st; + } + + private TextField txtBI = new TextField(); + + public TextField getTxtBI() { + return txtBI; + } + + public void setTxtBI(TextField tf) { + this.txtBI = tf; + } + + private StaticText staticText33 = new StaticText(); + + public StaticText getStaticText33() { + return staticText33; + } + + public void setStaticText33(StaticText st) { + this.staticText33 = st; + } + + private TextField txtMorada = new TextField(); + + public TextField getTxtMorada() { + return txtMorada; + } + + public void setTxtMorada(TextField tf) { + this.txtMorada = tf; + } + + private StaticText staticText34 = new StaticText(); + + public StaticText getStaticText34() { + return staticText34; + } + + public void setStaticText34(StaticText st) { + this.staticText34 = st; + } + + private PanelGroup groupPanel6 = new PanelGroup(); + + public PanelGroup getGroupPanel6() { + return groupPanel6; + } + + public void setGroupPanel6(PanelGroup pg) { + this.groupPanel6 = pg; + } + + private TextField txtCodPostal1 = new TextField(); + + public TextField getTxtCodPostal1() { + return txtCodPostal1; + } + + public void setTxtCodPostal1(TextField tf) { + this.txtCodPostal1 = tf; + } + + private StaticText staticText35 = new StaticText(); + + public StaticText getStaticText35() { + return staticText35; + } + + public void setStaticText35(StaticText st) { + this.staticText35 = st; + } + + private TextField txtCodPostal2 = new TextField(); + + public TextField getTxtCodPostal2() { + return txtCodPostal2; + } + + public void setTxtCodPostal2(TextField tf) { + this.txtCodPostal2 = tf; + } + + private StaticText staticText36 = new StaticText(); + + public StaticText getStaticText36() { + return staticText36; + } + + public void setStaticText36(StaticText st) { + this.staticText36 = st; + } + + private TextField txtLocalidade = new TextField(); + + public TextField getTxtLocalidade() { + return txtLocalidade; + } + + public void setTxtLocalidade(TextField tf) { + this.txtLocalidade = tf; + } + + private StaticText staticText37 = new StaticText(); + + public StaticText getStaticText37() { + return staticText37; + } + + public void setStaticText37(StaticText st) { + this.staticText37 = st; + } + + private TextField txtContactoTelefonico = new TextField(); + + public TextField getTxtContactoTelefonico() { + return txtContactoTelefonico; + } + + public void setTxtContactoTelefonico(TextField tf) { + this.txtContactoTelefonico = tf; + } + + private StaticText staticText38 = new StaticText(); + + public StaticText getStaticText38() { + return staticText38; + } + + public void setStaticText38(StaticText st) { + this.staticText38 = st; + } + + private StaticText stDataAdmissao = new StaticText(); + + public StaticText getStDataAdmissao() { + return stDataAdmissao; + } + + public void setStDataAdmissao(StaticText st) { + this.stDataAdmissao = st; + } + + private StaticText staticText39 = new StaticText(); + + public StaticText getStaticText39() { + return staticText39; + } + + public void setStaticText39(StaticText st) { + this.staticText39 = st; + } + + private StaticText stFuncao = new StaticText(); + + public StaticText getStFuncao() { + return stFuncao; + } + + public void setStFuncao(StaticText st) { + this.stFuncao = st; + } + + private StaticText staticText40 = new StaticText(); + + public StaticText getStaticText40() { + return staticText40; + } + + public void setStaticText40(StaticText st) { + this.staticText40 = st; + } + + private HtmlPanelGrid gridDadosAcidenteSeg = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridDadosAcidenteSeg() { + return gridDadosAcidenteSeg; + } + + public void setGridDadosAcidenteSeg(HtmlPanelGrid hpg) { + this.gridDadosAcidenteSeg = hpg; + } + + private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel8() { + return gridPanel8; + } + + public void setGridPanel8(HtmlPanelGrid hpg) { + this.gridPanel8 = hpg; + } + + private StaticText staticText13 = new StaticText(); + + public StaticText getStaticText13() { + return staticText13; + } + + public void setStaticText13(StaticText st) { + this.staticText13 = st; + } + + private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel9() { + return gridPanel9; + } + + public void setGridPanel9(HtmlPanelGrid hpg) { + this.gridPanel9 = hpg; + } + + private HtmlPanelGrid gridPanel11 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel11() { + return gridPanel11; + } + + public void setGridPanel11(HtmlPanelGrid hpg) { + this.gridPanel11 = hpg; + } + + private PanelGroup groupPanel10 = new PanelGroup(); + + public PanelGroup getGroupPanel10() { + return groupPanel10; + } + + public void setGroupPanel10(PanelGroup pg) { + this.groupPanel10 = pg; + } + + private StaticText staticText17 = new StaticText(); + + public StaticText getStaticText17() { + return staticText17; + } + + public void setStaticText17(StaticText st) { + this.staticText17 = st; + } + + private PanelGroup groupPanel11 = new PanelGroup(); + + public PanelGroup getGroupPanel11() { + return groupPanel11; + } + + public void setGroupPanel11(PanelGroup pg) { + this.groupPanel11 = pg; + } + + private StaticText staticText18 = new StaticText(); + + public StaticText getStaticText18() { + return staticText18; + } + + public void setStaticText18(StaticText st) { + this.staticText18 = st; + } + + private TextField txtLocal = new TextField(); + + public TextField getTxtLocal() { + return txtLocal; + } + + public void setTxtLocal(TextField tf) { + this.txtLocal = tf; + } + + private HtmlPanelGrid gridPanel12 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel12() { + return gridPanel12; + } + + public void setGridPanel12(HtmlPanelGrid hpg) { + this.gridPanel12 = hpg; + } + + private StaticText staticText19 = new StaticText(); + + public StaticText getStaticText19() { + return staticText19; + } + + public void setStaticText19(StaticText st) { + this.staticText19 = st; + } + + private TextField txtTarefa = new TextField(); + + public TextField getTxtTarefa() { + return txtTarefa; + } + + public void setTxtTarefa(TextField tf) { + this.txtTarefa = tf; + } + + private HtmlPanelGrid gridPanel13 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel13() { + return gridPanel13; + } + + public void setGridPanel13(HtmlPanelGrid hpg) { + this.gridPanel13 = hpg; + } + + private StaticText staticText20 = new StaticText(); + + public StaticText getStaticText20() { + return staticText20; + } + + public void setStaticText20(StaticText st) { + this.staticText20 = st; + } + + private TextField txtSubstancias = new TextField(); + + public TextField getTxtSubstancias() { + return txtSubstancias; + } + + public void setTxtSubstancias(TextField tf) { + this.txtSubstancias = tf; + } + + private HtmlPanelGrid gridPanel15 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel15() { + return gridPanel15; + } + + public void setGridPanel15(HtmlPanelGrid hpg) { + this.gridPanel15 = hpg; + } + + private StaticText staticText22 = new StaticText(); + + public StaticText getStaticText22() { + return staticText22; + } + + public void setStaticText22(StaticText st) { + this.staticText22 = st; + } + + private TextField txtCondicoes = new TextField(); + + public TextField getTxtCondicoes() { + return txtCondicoes; + } + + public void setTxtCondicoes(TextField tf) { + this.txtCondicoes = tf; + } + + private HtmlPanelGrid gridPanel16 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel16() { + return gridPanel16; + } + + public void setGridPanel16(HtmlPanelGrid hpg) { + this.gridPanel16 = hpg; + } + + private StaticText staticText23 = new StaticText(); + + public StaticText getStaticText23() { + return staticText23; + } + + public void setStaticText23(StaticText st) { + this.staticText23 = st; + } + + private TextField txtTestemunhas = new TextField(); + + public TextField getTxtTestemunhas() { + return txtTestemunhas; + } + + public void setTxtTestemunhas(TextField tf) { + this.txtTestemunhas = tf; + } + + private HtmlPanelGrid gridPanel17 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel17() { + return gridPanel17; + } + + public void setGridPanel17(HtmlPanelGrid hpg) { + this.gridPanel17 = hpg; + } + + private StaticText staticText24 = new StaticText(); + + public StaticText getStaticText24() { + return staticText24; + } + + public void setStaticText24(StaticText st) { + this.staticText24 = st; + } + + private HtmlPanelGrid gridPanel18 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel18() { + return gridPanel18; + } + + public void setGridPanel18(HtmlPanelGrid hpg) { + this.gridPanel18 = hpg; + } + + private StaticText staticText25 = new StaticText(); + + public StaticText getStaticText25() { + return staticText25; + } + + public void setStaticText25(StaticText st) { + this.staticText25 = st; + } + + private TextField txtDescricao = new TextField(); + + public TextField getTxtDescricao() { + return txtDescricao; + } + + public void setTxtDescricao(TextField tf) { + this.txtDescricao = tf; + } + + private HtmlPanelGrid gridPanel19 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel19() { + return gridPanel19; + } + + public void setGridPanel19(HtmlPanelGrid hpg) { + this.gridPanel19 = hpg; + } + + private HtmlPanelGrid gridPanel20 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel20() { + return gridPanel20; + } + + public void setGridPanel20(HtmlPanelGrid hpg) { + this.gridPanel20 = hpg; + } + + private StaticText staticText26 = new StaticText(); + + public StaticText getStaticText26() { + return staticText26; + } + + public void setStaticText26(StaticText st) { + this.staticText26 = st; + } + + private Button butImagem = new Button(); + + public Button getButImagem() { + return butImagem; + } + + public void setButImagem(Button b) { + this.butImagem = b; + } + + private HtmlPanelGrid gridImages = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridImages() { + return gridImages; + } + + public void setGridImages(HtmlPanelGrid hpg) { + this.gridImages = hpg; + } + + private HtmlPanelGrid gridPanel21 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel21() { + return gridPanel21; + } + + public void setGridPanel21(HtmlPanelGrid hpg) { + this.gridPanel21 = hpg; + } + + private StaticText staticText27 = new StaticText(); + + public StaticText getStaticText27() { + return staticText27; + } + + public void setStaticText27(StaticText st) { + this.staticText27 = st; + } + + private TextArea txtConclusoes = new TextArea(); + + public TextArea getTxtConclusoes() { + return txtConclusoes; + } + + public void setTxtConclusoes(TextArea ta) { + this.txtConclusoes = ta; + } + + private HtmlPanelGrid gridPanel26 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel26() { + return gridPanel26; + } + + public void setGridPanel26(HtmlPanelGrid hpg) { + this.gridPanel26 = hpg; + } + + private StaticText staticText28 = new StaticText(); + + public StaticText getStaticText28() { + return staticText28; + } + + public void setStaticText28(StaticText st) { + this.staticText28 = st; + } + + private TextArea txtAccoes = new TextArea(); + + public TextArea getTxtAccoes() { + return txtAccoes; + } + + public void setTxtAccoes(TextArea ta) { + this.txtAccoes = ta; + } + + private HtmlPanelGrid gridDadosAcidenteRh = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridDadosAcidenteRh() { + return gridDadosAcidenteRh; + } + + public void setGridDadosAcidenteRh(HtmlPanelGrid hpg) { + this.gridDadosAcidenteRh = hpg; + } + + private HtmlPanelGrid gridPanel27 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel27() { + return gridPanel27; + } + + public void setGridPanel27(HtmlPanelGrid hpg) { + this.gridPanel27 = hpg; + } + + private StaticText staticText46 = new StaticText(); + + public StaticText getStaticText46() { + return staticText46; + } + + public void setStaticText46(StaticText st) { + this.staticText46 = st; + } + + private HtmlPanelGrid gridPanel28 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel28() { + return gridPanel28; + } + + public void setGridPanel28(HtmlPanelGrid hpg) { + this.gridPanel28 = hpg; + } + + private HtmlPanelGrid gridPanel29 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel29() { + return gridPanel29; + } + + public void setGridPanel29(HtmlPanelGrid hpg) { + this.gridPanel29 = hpg; + } + + private StaticText staticText47 = new StaticText(); + + public StaticText getStaticText47() { + return staticText47; + } + + public void setStaticText47(StaticText st) { + this.staticText47 = st; + } + + private HtmlPanelGrid gridPanel30 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel30() { + return gridPanel30; + } + + public void setGridPanel30(HtmlPanelGrid hpg) { + this.gridPanel30 = hpg; + } + + private StaticText staticText48 = new StaticText(); + + public StaticText getStaticText48() { + return staticText48; + } + + public void setStaticText48(StaticText st) { + this.staticText48 = st; + } + + private HtmlPanelGrid gridPanel31 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel31() { + return gridPanel31; + } + + public void setGridPanel31(HtmlPanelGrid hpg) { + this.gridPanel31 = hpg; + } + + private RadioButton rbFormacaoSHSTY = new RadioButton(); + + public RadioButton getRbFormacaoSHSTY() { + return rbFormacaoSHSTY; + } + + public void setRbFormacaoSHSTY(RadioButton rb) { + this.rbFormacaoSHSTY = rb; + } + + private StaticText staticText49 = new StaticText(); + + public StaticText getStaticText49() { + return staticText49; + } + + public void setStaticText49(StaticText st) { + this.staticText49 = st; + } + + private HtmlPanelGrid gridPanel32 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel32() { + return gridPanel32; + } + + public void setGridPanel32(HtmlPanelGrid hpg) { + this.gridPanel32 = hpg; + } + + private StaticText staticText50 = new StaticText(); + + public StaticText getStaticText50() { + return staticText50; + } + + public void setStaticText50(StaticText st) { + this.staticText50 = st; + } + + private HtmlPanelGrid gridPanel33 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel33() { + return gridPanel33; + } + + public void setGridPanel33(HtmlPanelGrid hpg) { + this.gridPanel33 = hpg; + } + + private RadioButton rbFormacaoSHSTN = new RadioButton(); + + public RadioButton getRbFormacaoSHSTN() { + return rbFormacaoSHSTN; + } + + public void setRbFormacaoSHSTN(RadioButton rb) { + this.rbFormacaoSHSTN = rb; + } + + private StaticText stFormacaoDummy = new StaticText(); + + public StaticText getStFormacaoDummy() { + return stFormacaoDummy; + } + + public void setStFormacaoDummy(StaticText st) { + this.stFormacaoDummy = st; + } + + private PanelGroup groupPanel12 = new PanelGroup(); + + public PanelGroup getGroupPanel12() { + return groupPanel12; + } + + public void setGroupPanel12(PanelGroup pg) { + this.groupPanel12 = pg; + } + + private StaticText lblFormacaoSHSTNWhy = new StaticText(); + + public StaticText getLblFormacaoSHSTNWhy() { + return lblFormacaoSHSTNWhy; + } + + public void setLblFormacaoSHSTNWhy(StaticText st) { + this.lblFormacaoSHSTNWhy = st; + } + + private TextField txtFormacaoSHSTNWhy = new TextField(); + + public TextField getTxtFormacaoSHSTNWhy() { + return txtFormacaoSHSTNWhy; + } + + public void setTxtFormacaoSHSTNWhy(TextField tf) { + this.txtFormacaoSHSTNWhy = tf; + } + + private HtmlPanelGrid gridPanel34 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel34() { + return gridPanel34; + } + + public void setGridPanel34(HtmlPanelGrid hpg) { + this.gridPanel34 = hpg; + } + + private StaticText staticText53 = new StaticText(); + + public StaticText getStaticText53() { + return staticText53; + } + + public void setStaticText53(StaticText st) { + this.staticText53 = st; + } + + private HtmlPanelGrid gridPanel35 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel35() { + return gridPanel35; + } + + public void setGridPanel35(HtmlPanelGrid hpg) { + this.gridPanel35 = hpg; + } + + private StaticText staticText54 = new StaticText(); + + public StaticText getStaticText54() { + return staticText54; + } + + public void setStaticText54(StaticText st) { + this.staticText54 = st; + } + + private HtmlPanelGrid gridPanel36 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel36() { + return gridPanel36; + } + + public void setGridPanel36(HtmlPanelGrid hpg) { + this.gridPanel36 = hpg; + } + + private RadioButton rbAcidentesColaboradorY = new RadioButton(); + + public RadioButton getRbAcidentesColaboradorY() { + return rbAcidentesColaboradorY; + } + + public void setRbAcidentesColaboradorY(RadioButton rb) { + this.rbAcidentesColaboradorY = rb; + } + + private StaticText staticText55 = new StaticText(); + + public StaticText getStaticText55() { + return staticText55; + } + + public void setStaticText55(StaticText st) { + this.staticText55 = st; + } + + private PanelGroup groupPanel13 = new PanelGroup(); + + public PanelGroup getGroupPanel13() { + return groupPanel13; + } + + public void setGroupPanel13(PanelGroup pg) { + this.groupPanel13 = pg; + } + + private StaticText staticText56 = new StaticText(); + + public StaticText getStaticText56() { + return staticText56; + } + + public void setStaticText56(StaticText st) { + this.staticText56 = st; + } + + private TextField txtNrAcidentesColaborador = new TextField(); + + public TextField getTxtNrAcidentesColaborador() { + return txtNrAcidentesColaborador; + } + + public void setTxtNrAcidentesColaborador(TextField tf) { + this.txtNrAcidentesColaborador = tf; + } + + private HtmlPanelGrid gridPanel37 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel37() { + return gridPanel37; + } + + public void setGridPanel37(HtmlPanelGrid hpg) { + this.gridPanel37 = hpg; + } + + private StaticText staticText57 = new StaticText(); + + public StaticText getStaticText57() { + return staticText57; + } + + public void setStaticText57(StaticText st) { + this.staticText57 = st; + } + + private TextField txtNrRelatorioAcidentesColaborador1 = new TextField(); + + public TextField getTxtNrRelatorioAcidentesColaborador1() { + return txtNrRelatorioAcidentesColaborador1; + } + + public void setTxtNrRelatorioAcidentesColaborador1(TextField tf) { + this.txtNrRelatorioAcidentesColaborador1 = tf; + } + + private TextField txtNrRelatorioAcidentesColaborador2 = new TextField(); + + public TextField getTxtNrRelatorioAcidentesColaborador2() { + return txtNrRelatorioAcidentesColaborador2; + } + + public void setTxtNrRelatorioAcidentesColaborador2(TextField tf) { + this.txtNrRelatorioAcidentesColaborador2 = tf; + } + + private TextField txtNrRelatorioAcidentesColaborador3 = new TextField(); + + public TextField getTxtNrRelatorioAcidentesColaborador3() { + return txtNrRelatorioAcidentesColaborador3; + } + + public void setTxtNrRelatorioAcidentesColaborador3(TextField tf) { + this.txtNrRelatorioAcidentesColaborador3 = tf; + } + + private TextField txtNrRelatorioAcidentesColaborador4 = new TextField(); + + public TextField getTxtNrRelatorioAcidentesColaborador4() { + return txtNrRelatorioAcidentesColaborador4; + } + + public void setTxtNrRelatorioAcidentesColaborador4(TextField tf) { + this.txtNrRelatorioAcidentesColaborador4 = tf; + } + + private HtmlPanelGrid gridPanel38 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel38() { + return gridPanel38; + } + + public void setGridPanel38(HtmlPanelGrid hpg) { + this.gridPanel38 = hpg; + } + + private StaticText staticText58 = new StaticText(); + + public StaticText getStaticText58() { + return staticText58; + } + + public void setStaticText58(StaticText st) { + this.staticText58 = st; + } + + private HtmlPanelGrid gridPanel39 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel39() { + return gridPanel39; + } + + public void setGridPanel39(HtmlPanelGrid hpg) { + this.gridPanel39 = hpg; + } + + private RadioButton rbAcidentesColaboradorN = new RadioButton(); + + public RadioButton getRbAcidentesColaboradorN() { + return rbAcidentesColaboradorN; + } + + public void setRbAcidentesColaboradorN(RadioButton rb) { + this.rbAcidentesColaboradorN = rb; + } + + private StaticText staticText59 = new StaticText(); + + public StaticText getStaticText59() { + return staticText59; + } + + public void setStaticText59(StaticText st) { + this.staticText59 = st; + } + + private HtmlPanelGrid gridPanel40 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel40() { + return gridPanel40; + } + + public void setGridPanel40(HtmlPanelGrid hpg) { + this.gridPanel40 = hpg; + } + + private StaticText staticText60 = new StaticText(); + + public StaticText getStaticText60() { + return staticText60; + } + + public void setStaticText60(StaticText st) { + this.staticText60 = st; + } + + private HtmlPanelGrid gridPanel41 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel41() { + return gridPanel41; + } + + public void setGridPanel41(HtmlPanelGrid hpg) { + this.gridPanel41 = hpg; + } + + private StaticText staticText61 = new StaticText(); + + public StaticText getStaticText61() { + return staticText61; + } + + public void setStaticText61(StaticText st) { + this.staticText61 = st; + } + + private HtmlPanelGrid gridPanel42 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel42() { + return gridPanel42; + } + + public void setGridPanel42(HtmlPanelGrid hpg) { + this.gridPanel42 = hpg; + } + + private RadioButton rbAcidentesColaboradoresY = new RadioButton(); + + public RadioButton getRbAcidentesColaboradoresY() { + return rbAcidentesColaboradoresY; + } + + public void setRbAcidentesColaboradoresY(RadioButton rb) { + this.rbAcidentesColaboradoresY = rb; + } + + private StaticText staticText62 = new StaticText(); + + public StaticText getStaticText62() { + return staticText62; + } + + public void setStaticText62(StaticText st) { + this.staticText62 = st; + } + + private PanelGroup groupPanel14 = new PanelGroup(); + + public PanelGroup getGroupPanel14() { + return groupPanel14; + } + + public void setGroupPanel14(PanelGroup pg) { + this.groupPanel14 = pg; + } + + private StaticText staticText63 = new StaticText(); + + public StaticText getStaticText63() { + return staticText63; + } + + public void setStaticText63(StaticText st) { + this.staticText63 = st; + } + + private TextField txtNrAcidentesColaboradores = new TextField(); + + public TextField getTxtNrAcidentesColaboradores() { + return txtNrAcidentesColaboradores; + } + + public void setTxtNrAcidentesColaboradores(TextField tf) { + this.txtNrAcidentesColaboradores = tf; + } + + private HtmlPanelGrid gridPanel43 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel43() { + return gridPanel43; + } + + public void setGridPanel43(HtmlPanelGrid hpg) { + this.gridPanel43 = hpg; + } + + private StaticText staticText64 = new StaticText(); + + public StaticText getStaticText64() { + return staticText64; + } + + public void setStaticText64(StaticText st) { + this.staticText64 = st; + } + + private TextField txtNrRelatorioAcidentesColaboradores1 = new TextField(); + + public TextField getTxtNrRelatorioAcidentesColaboradores1() { + return txtNrRelatorioAcidentesColaboradores1; + } + + public void setTxtNrRelatorioAcidentesColaboradores1(TextField tf) { + this.txtNrRelatorioAcidentesColaboradores1 = tf; + } + + private TextField txtNrRelatorioAcidentesColaboradores2 = new TextField(); + + public TextField getTxtNrRelatorioAcidentesColaboradores2() { + return txtNrRelatorioAcidentesColaboradores2; + } + + public void setTxtNrRelatorioAcidentesColaboradores2(TextField tf) { + this.txtNrRelatorioAcidentesColaboradores2 = tf; + } + + private TextField txtNrRelatorioAcidentesColaboradores3 = new TextField(); + + public TextField getTxtNrRelatorioAcidentesColaboradores3() { + return txtNrRelatorioAcidentesColaboradores3; + } + + public void setTxtNrRelatorioAcidentesColaboradores3(TextField tf) { + this.txtNrRelatorioAcidentesColaboradores3 = tf; + } + + private TextField txtNrRelatorioAcidentesColaboradores4 = new TextField(); + + public TextField getTxtNrRelatorioAcidentesColaboradores4() { + return txtNrRelatorioAcidentesColaboradores4; + } + + public void setTxtNrRelatorioAcidentesColaboradores4(TextField tf) { + this.txtNrRelatorioAcidentesColaboradores4 = tf; + } + + private HtmlPanelGrid gridPanel44 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel44() { + return gridPanel44; + } + + public void setGridPanel44(HtmlPanelGrid hpg) { + this.gridPanel44 = hpg; + } + + private StaticText staticText65 = new StaticText(); + + public StaticText getStaticText65() { + return staticText65; + } + + public void setStaticText65(StaticText st) { + this.staticText65 = st; + } + + private HtmlPanelGrid gridPanel45 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel45() { + return gridPanel45; + } + + public void setGridPanel45(HtmlPanelGrid hpg) { + this.gridPanel45 = hpg; + } + + private RadioButton rbAcidentesColaboradoresN = new RadioButton(); + + public RadioButton getRbAcidentesColaboradoresN() { + return rbAcidentesColaboradoresN; + } + + public void setRbAcidentesColaboradoresN(RadioButton rb) { + this.rbAcidentesColaboradoresN = rb; + } + + private StaticText staticText66 = new StaticText(); + + public StaticText getStaticText66() { + return staticText66; + } + + public void setStaticText66(StaticText st) { + this.staticText66 = st; + } + + private HtmlPanelGrid gridRecomendacoesHS = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridRecomendacoesHS() { + return gridRecomendacoesHS; + } + + public void setGridRecomendacoesHS(HtmlPanelGrid hpg) { + this.gridRecomendacoesHS = hpg; + } + + private HtmlPanelGrid gridPanel46 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel46() { + return gridPanel46; + } + + public void setGridPanel46(HtmlPanelGrid hpg) { + this.gridPanel46 = hpg; + } + + private StaticText staticText67 = new StaticText(); + + public StaticText getStaticText67() { + return staticText67; + } + + public void setStaticText67(StaticText st) { + this.staticText67 = st; + } + + private HtmlPanelGrid gridRecomendacoes = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridRecomendacoes() { + return gridRecomendacoes; + } + + public void setGridRecomendacoes(HtmlPanelGrid hpg) { + this.gridRecomendacoes = hpg; + } + + private HtmlPanelGrid gridPanel48 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel48() { + return gridPanel48; + } + + public void setGridPanel48(HtmlPanelGrid hpg) { + this.gridPanel48 = hpg; + } + + private StaticText stNrRecomendacao1 = new StaticText(); + + public StaticText getStNrRecomendacao1() { + return stNrRecomendacao1; + } + + public void setStNrRecomendacao1(StaticText st) { + this.stNrRecomendacao1 = st; + } + + private ImageHyperlink lnkMoreRec1 = new ImageHyperlink(); + + public ImageHyperlink getLnkMoreRec1() { + return lnkMoreRec1; + } + + public void setLnkMoreRec1(ImageHyperlink ih) { + this.lnkMoreRec1 = ih; + } + + private Hyperlink lnkDelImageTmp = new Hyperlink(); + + public Hyperlink getLnkDelImageTmp() { + return lnkDelImageTmp; + } + + public void setLnkDelImageTmp(Hyperlink lnkDelImageTmp) { + this.lnkDelImageTmp = lnkDelImageTmp; + } + + private HtmlPanelGrid gridSiprpView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridSiprpView() { + return gridSiprpView; + } + + public void setGridSiprpView(HtmlPanelGrid hpg) { + this.gridSiprpView = hpg; + } + + private HtmlPanelGrid gridPanel49 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel49() { + return gridPanel49; + } + + public void setGridPanel49(HtmlPanelGrid hpg) { + this.gridPanel49 = hpg; + } + + private StaticText staticText69 = new StaticText(); + + public StaticText getStaticText69() { + return staticText69; + } + + public void setStaticText69(StaticText st) { + this.staticText69 = st; + } + + private HtmlPanelGrid gridPanel50 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel50() { + return gridPanel50; + } + + public void setGridPanel50(HtmlPanelGrid hpg) { + this.gridPanel50 = hpg; + } + + private HtmlPanelGrid gridPanel51 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel51() { + return gridPanel51; + } + + public void setGridPanel51(HtmlPanelGrid hpg) { + this.gridPanel51 = hpg; + } + + private HtmlPanelGrid gridAcidentadoView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridAcidentadoView() { + return gridAcidentadoView; + } + + public void setGridAcidentadoView(HtmlPanelGrid hpg) { + this.gridAcidentadoView = hpg; + } + + private HtmlPanelGrid gridPanel52 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel52() { + return gridPanel52; + } + + public void setGridPanel52(HtmlPanelGrid hpg) { + this.gridPanel52 = hpg; + } + + private StaticText staticText78 = new StaticText(); + + public StaticText getStaticText78() { + return staticText78; + } + + public void setStaticText78(StaticText st) { + this.staticText78 = st; + } + + private HtmlPanelGrid gridPanel53 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel53() { + return gridPanel53; + } + + public void setGridPanel53(HtmlPanelGrid hpg) { + this.gridPanel53 = hpg; + } + + private HtmlPanelGrid gridPanel54 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel54() { + return gridPanel54; + } + + public void setGridPanel54(HtmlPanelGrid hpg) { + this.gridPanel54 = hpg; + } + + private HtmlPanelGrid gridDadosAcidenteRhView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridDadosAcidenteRhView() { + return gridDadosAcidenteRhView; + } + + public void setGridDadosAcidenteRhView(HtmlPanelGrid hpg) { + this.gridDadosAcidenteRhView = hpg; + } + + private HtmlPanelGrid gridPanel55 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel55() { + return gridPanel55; + } + + public void setGridPanel55(HtmlPanelGrid hpg) { + this.gridPanel55 = hpg; + } + + private StaticText staticText88 = new StaticText(); + + public StaticText getStaticText88() { + return staticText88; + } + + public void setStaticText88(StaticText st) { + this.staticText88 = st; + } + + private HtmlPanelGrid gridPanel56 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel56() { + return gridPanel56; + } + + public void setGridPanel56(HtmlPanelGrid hpg) { + this.gridPanel56 = hpg; + } + + private HtmlPanelGrid gridSHST = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridSHST() { + return gridSHST; + } + + public void setGridSHST(HtmlPanelGrid hpg) { + this.gridSHST = hpg; + } + + private HtmlPanelGrid gridColaborador = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridColaborador() { + return gridColaborador; + } + + public void setGridColaborador(HtmlPanelGrid hpg) { + this.gridColaborador = hpg; + } + + private HtmlPanelGrid gridColaboradores = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridColaboradores() { + return gridColaboradores; + } + + public void setGridColaboradores(HtmlPanelGrid hpg) { + this.gridColaboradores = hpg; + } + + private SingleSelectOptionsList drpHoursDefaultOptions = new SingleSelectOptionsList(); + + public SingleSelectOptionsList getDrpHoursDefaultOptions() { + return drpHoursDefaultOptions; + } + + public void setDrpHoursDefaultOptions(SingleSelectOptionsList ssol) { + this.drpHoursDefaultOptions = ssol; + } + + private SingleSelectOptionsList drpMinutesDefaultOptions = new SingleSelectOptionsList(); + + public SingleSelectOptionsList getDrpMinutesDefaultOptions() { + return drpMinutesDefaultOptions; + } + + public void setDrpMinutesDefaultOptions(SingleSelectOptionsList ssol) { + this.drpMinutesDefaultOptions = ssol; + } + + private TextArea txtRecomendacao1 = new TextArea(); + + public TextArea getTxtRecomendacao1() { + return txtRecomendacao1; + } + + public void setTxtRecomendacao1(TextArea ta) { + this.txtRecomendacao1 = ta; + } + + private HtmlPanelGrid gridRecomendacoesViewHS = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridRecomendacoesViewHS() { + return gridRecomendacoesViewHS; + } + + public void setGridRecomendacoesViewHS(HtmlPanelGrid hpg) { + this.gridRecomendacoesViewHS = hpg; + } + + private HtmlPanelGrid gridPanel47 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel47() { + return gridPanel47; + } + + public void setGridPanel47(HtmlPanelGrid hpg) { + this.gridPanel47 = hpg; + } + + private StaticText staticText51 = new StaticText(); + + public StaticText getStaticText51() { + return staticText51; + } + + public void setStaticText51(StaticText st) { + this.staticText51 = st; + } + + private HtmlPanelGrid gridRecomendacoesView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridRecomendacoesView() { + return gridRecomendacoesView; + } + + public void setGridRecomendacoesView(HtmlPanelGrid hpg) { + this.gridRecomendacoesView = hpg; + } + + private HtmlPanelGrid gridMedidasRH = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMedidasRH() { + return gridMedidasRH; + } + + public void setGridMedidasRH(HtmlPanelGrid hpg) { + this.gridMedidasRH = hpg; + } + + private HtmlPanelGrid gridPanel57 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel57() { + return gridPanel57; + } + + public void setGridPanel57(HtmlPanelGrid hpg) { + this.gridPanel57 = hpg; + } + + private StaticText staticText68 = new StaticText(); + + public StaticText getStaticText68() { + return staticText68; + } + + public void setStaticText68(StaticText st) { + this.staticText68 = st; + } + + private HtmlPanelGrid gridMedidas = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMedidas() { + return gridMedidas; + } + + public void setGridMedidas(HtmlPanelGrid hpg) { + this.gridMedidas = hpg; + } + + private HtmlPanelGrid gridPanel58 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel58() { + return gridPanel58; + } + + public void setGridPanel58(HtmlPanelGrid hpg) { + this.gridPanel58 = hpg; + } + + private StaticText stNrMedida1 = new StaticText(); + + public StaticText getStNrMedida1() { + return stNrMedida1; + } + + public void setStNrMedida1(StaticText st) { + this.stNrMedida1 = st; + } + + private TextArea txtMedida1 = new TextArea(); + + public TextArea getTxtMedida1() { + return txtMedida1; + } + + public void setTxtMedida1(TextArea ta) { + this.txtMedida1 = ta; + } + + private ImageHyperlink lnkMoreMed1 = new ImageHyperlink(); + + public ImageHyperlink getLnkMoreMed1() { + return lnkMoreMed1; + } + + public void setLnkMoreMed1(ImageHyperlink ih) { + this.lnkMoreMed1 = ih; + } + + private HtmlPanelGrid gridMedidasViewRH = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMedidasViewRH() { + return gridMedidasViewRH; + } + + public void setGridMedidasViewRH(HtmlPanelGrid hpg) { + this.gridMedidasViewRH = hpg; + } + + private HtmlPanelGrid gridPanel59 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel59() { + return gridPanel59; + } + + public void setGridPanel59(HtmlPanelGrid hpg) { + this.gridPanel59 = hpg; + } + + private StaticText staticText89 = new StaticText(); + + public StaticText getStaticText89() { + return staticText89; + } + + public void setStaticText89(StaticText st) { + this.staticText89 = st; + } + + private HtmlPanelGrid gridMedidasView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMedidasView() { + return gridMedidasView; + } + + public void setGridMedidasView(HtmlPanelGrid hpg) { + this.gridMedidasView = hpg; + } + + private HtmlPanelGrid gridMedico = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMedico() { + return gridMedico; + } + + public void setGridMedico(HtmlPanelGrid hpg) { + this.gridMedico = hpg; + } + + private HtmlPanelGrid gridPanel60 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel60() { + return gridPanel60; + } + + public void setGridPanel60(HtmlPanelGrid hpg) { + this.gridPanel60 = hpg; + } + + private StaticText staticText90 = new StaticText(); + + public StaticText getStaticText90() { + return staticText90; + } + + public void setStaticText90(StaticText st) { + this.staticText90 = st; + } + + private HtmlPanelGrid gridLesao1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLesao1() { + return gridLesao1; + } + + public void setGridLesao1(HtmlPanelGrid hpg) { + this.gridLesao1 = hpg; + } + + private StaticText staticText91 = new StaticText(); + + public StaticText getStaticText91() { + return staticText91; + } + + public void setStaticText91(StaticText st) { + this.staticText91 = st; + } + + private HtmlPanelGrid gridPanel61 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel61() { + return gridPanel61; + } + + public void setGridPanel61(HtmlPanelGrid hpg) { + this.gridPanel61 = hpg; + } + + private PanelGroup groupPanel17 = new PanelGroup(); + + public PanelGroup getGroupPanel17() { + return groupPanel17; + } + + public void setGroupPanel17(PanelGroup pg) { + this.groupPanel17 = pg; + } + + private Checkbox chkCabeca = new Checkbox(); + + public Checkbox getChkCabeca() { + return chkCabeca; + } + + public void setChkCabeca(Checkbox c) { + this.chkCabeca = c; + } + + private StaticText staticText93 = new StaticText(); + + public StaticText getStaticText93() { + return staticText93; + } + + public void setStaticText93(StaticText st) { + this.staticText93 = st; + } + + private PanelGroup groupPanel18 = new PanelGroup(); + + public PanelGroup getGroupPanel18() { + return groupPanel18; + } + + public void setGroupPanel18(PanelGroup pg) { + this.groupPanel18 = pg; + } + + private Checkbox chkMembroSupDir = new Checkbox(); + + public Checkbox getChkMembroSupDir() { + return chkMembroSupDir; + } + + public void setChkMembroSupDir(Checkbox c) { + this.chkMembroSupDir = c; + } + + private StaticText staticText94 = new StaticText(); + + public StaticText getStaticText94() { + return staticText94; + } + + public void setStaticText94(StaticText st) { + this.staticText94 = st; + } + + private HtmlPanelGrid gridPanel62 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel62() { + return gridPanel62; + } + + public void setGridPanel62(HtmlPanelGrid hpg) { + this.gridPanel62 = hpg; + } + + private StaticText lblEspecif1 = new StaticText(); + + public StaticText getLblEspecif1() { + return lblEspecif1; + } + + public void setLblEspecif1(StaticText st) { + this.lblEspecif1 = st; + } + + private TextField txtEspecif1 = new TextField(); + + public TextField getTxtEspecif1() { + return txtEspecif1; + } + + public void setTxtEspecif1(TextField tf) { + this.txtEspecif1 = tf; + } + + private PanelGroup groupPanel19 = new PanelGroup(); + + public PanelGroup getGroupPanel19() { + return groupPanel19; + } + + public void setGroupPanel19(PanelGroup pg) { + this.groupPanel19 = pg; + } + + private Checkbox chkPescoco = new Checkbox(); + + public Checkbox getChkPescoco() { + return chkPescoco; + } + + public void setChkPescoco(Checkbox c) { + this.chkPescoco = c; + } + + private StaticText staticText96 = new StaticText(); + + public StaticText getStaticText96() { + return staticText96; + } + + public void setStaticText96(StaticText st) { + this.staticText96 = st; + } + + private PanelGroup groupPanel20 = new PanelGroup(); + + public PanelGroup getGroupPanel20() { + return groupPanel20; + } + + public void setGroupPanel20(PanelGroup pg) { + this.groupPanel20 = pg; + } + + private Checkbox chkMembroSupEsq = new Checkbox(); + + public Checkbox getChkMembroSupEsq() { + return chkMembroSupEsq; + } + + public void setChkMembroSupEsq(Checkbox c) { + this.chkMembroSupEsq = c; + } + + private StaticText staticText97 = new StaticText(); + + public StaticText getStaticText97() { + return staticText97; + } + + public void setStaticText97(StaticText st) { + this.staticText97 = st; + } + + private HtmlPanelGrid gridPanel63 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel63() { + return gridPanel63; + } + + public void setGridPanel63(HtmlPanelGrid hpg) { + this.gridPanel63 = hpg; + } + + private StaticText lblEspecif2 = new StaticText(); + + public StaticText getLblEspecif2() { + return lblEspecif2; + } + + public void setLblEspecif2(StaticText st) { + this.lblEspecif2 = st; + } + + private TextField txtEspecif2 = new TextField(); + + public TextField getTxtEspecif2() { + return txtEspecif2; + } + + public void setTxtEspecif2(TextField tf) { + this.txtEspecif2 = tf; + } + + private PanelGroup groupPanel21 = new PanelGroup(); + + public PanelGroup getGroupPanel21() { + return groupPanel21; + } + + public void setGroupPanel21(PanelGroup pg) { + this.groupPanel21 = pg; + } + + private Checkbox chkTronco = new Checkbox(); + + public Checkbox getChkTronco() { + return chkTronco; + } + + public void setChkTronco(Checkbox c) { + this.chkTronco = c; + } + + private StaticText staticText99 = new StaticText(); + + public StaticText getStaticText99() { + return staticText99; + } + + public void setStaticText99(StaticText st) { + this.staticText99 = st; + } + + private PanelGroup groupPanel22 = new PanelGroup(); + + public PanelGroup getGroupPanel22() { + return groupPanel22; + } + + public void setGroupPanel22(PanelGroup pg) { + this.groupPanel22 = pg; + } + + private Checkbox chkMembroInfDir = new Checkbox(); + + public Checkbox getChkMembroInfDir() { + return chkMembroInfDir; + } + + public void setChkMembroInfDir(Checkbox c) { + this.chkMembroInfDir = c; + } + + private StaticText staticText100 = new StaticText(); + + public StaticText getStaticText100() { + return staticText100; + } + + public void setStaticText100(StaticText st) { + this.staticText100 = st; + } + + private HtmlPanelGrid gridPanel64 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel64() { + return gridPanel64; + } + + public void setGridPanel64(HtmlPanelGrid hpg) { + this.gridPanel64 = hpg; + } + + private StaticText lblEspecif3 = new StaticText(); + + public StaticText getLblEspecif3() { + return lblEspecif3; + } + + public void setLblEspecif3(StaticText st) { + this.lblEspecif3 = st; + } + + private TextField txtEspecif3 = new TextField(); + + public TextField getTxtEspecif3() { + return txtEspecif3; + } + + public void setTxtEspecif3(TextField tf) { + this.txtEspecif3 = tf; + } + + private StaticText staticText102 = new StaticText(); + + public StaticText getStaticText102() { + return staticText102; + } + + public void setStaticText102(StaticText st) { + this.staticText102 = st; + } + + private PanelGroup groupPanel23 = new PanelGroup(); + + public PanelGroup getGroupPanel23() { + return groupPanel23; + } + + public void setGroupPanel23(PanelGroup pg) { + this.groupPanel23 = pg; + } + + private Checkbox chkMembroInfEsq = new Checkbox(); + + public Checkbox getChkMembroInfEsq() { + return chkMembroInfEsq; + } + + public void setChkMembroInfEsq(Checkbox c) { + this.chkMembroInfEsq = c; + } + + private StaticText staticText103 = new StaticText(); + + public StaticText getStaticText103() { + return staticText103; + } + + public void setStaticText103(StaticText st) { + this.staticText103 = st; + } + + private HtmlPanelGrid gridPanel65 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel65() { + return gridPanel65; + } + + public void setGridPanel65(HtmlPanelGrid hpg) { + this.gridPanel65 = hpg; + } + + private StaticText lblEspecif4 = new StaticText(); + + public StaticText getLblEspecif4() { + return lblEspecif4; + } + + public void setLblEspecif4(StaticText st) { + this.lblEspecif4 = st; + } + + private TextField txtEspecif4 = new TextField(); + + public TextField getTxtEspecif4() { + return txtEspecif4; + } + + public void setTxtEspecif4(TextField tf) { + this.txtEspecif4 = tf; + } + + private HtmlPanelGrid gridPanel66 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel66() { + return gridPanel66; + } + + public void setGridPanel66(HtmlPanelGrid hpg) { + this.gridPanel66 = hpg; + } + + private StaticText staticText105 = new StaticText(); + + public StaticText getStaticText105() { + return staticText105; + } + + public void setStaticText105(StaticText st) { + this.staticText105 = st; + } + + private TextField txtTipoLesao = new TextField(); + + public TextField getTxtTipoLesao() { + return txtTipoLesao; + } + + public void setTxtTipoLesao(TextField tf) { + this.txtTipoLesao = tf; + } + + private HtmlPanelGrid gridPanel67 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel67() { + return gridPanel67; + } + + public void setGridPanel67(HtmlPanelGrid hpg) { + this.gridPanel67 = hpg; + } + + private StaticText staticText106 = new StaticText(); + + public StaticText getStaticText106() { + return staticText106; + } + + public void setStaticText106(StaticText st) { + this.staticText106 = st; + } + + private HtmlPanelGrid gridIncapacidade1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridIncapacidade1() { + return gridIncapacidade1; + } + + public void setGridIncapacidade1(HtmlPanelGrid hpg) { + this.gridIncapacidade1 = hpg; + } + + private HtmlPanelGrid gridPanel68 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel68() { + return gridPanel68; + } + + public void setGridPanel68(HtmlPanelGrid hpg) { + this.gridPanel68 = hpg; + } + + private PanelGroup groupPanel24 = new PanelGroup(); + + public PanelGroup getGroupPanel24() { + return groupPanel24; + } + + public void setGroupPanel24(PanelGroup pg) { + this.groupPanel24 = pg; + } + + private StaticText staticText107 = new StaticText(); + + public StaticText getStaticText107() { + return staticText107; + } + + public void setStaticText107(StaticText st) { + this.staticText107 = st; + } + + private RadioButton rbIncapacidadeNone = new RadioButton(); + + public RadioButton getRbIncapacidadeNone() { + return rbIncapacidadeNone; + } + + public void setRbIncapacidadeNone(RadioButton rb) { + this.rbIncapacidadeNone = rb; + } + + private StaticText staticText108 = new StaticText(); + + public StaticText getStaticText108() { + return staticText108; + } + + public void setStaticText108(StaticText st) { + this.staticText108 = st; + } + + private RadioButton rbIncapacidadeTemp = new RadioButton(); + + public RadioButton getRbIncapacidadeTemp() { + return rbIncapacidadeTemp; + } + + public void setRbIncapacidadeTemp(RadioButton rb) { + this.rbIncapacidadeTemp = rb; + } + + private StaticText staticText109 = new StaticText(); + + public StaticText getStaticText109() { + return staticText109; + } + + public void setStaticText109(StaticText st) { + this.staticText109 = st; + } + + private PanelGroup groupPanel25 = new PanelGroup(); + + public PanelGroup getGroupPanel25() { + return groupPanel25; + } + + public void setGroupPanel25(PanelGroup pg) { + this.groupPanel25 = pg; + } + + private StaticText staticText110 = new StaticText(); + + public StaticText getStaticText110() { + return staticText110; + } + + public void setStaticText110(StaticText st) { + this.staticText110 = st; + } + + private TextField txtCoefIncapacidade = new TextField(); + + public TextField getTxtCoefIncapacidade() { + return txtCoefIncapacidade; + } + + public void setTxtCoefIncapacidade(TextField tf) { + this.txtCoefIncapacidade = tf; + } + + private StaticText staticText111 = new StaticText(); + + public StaticText getStaticText111() { + return staticText111; + } + + public void setStaticText111(StaticText st) { + this.staticText111 = st; + } + + private HtmlPanelGrid gridPanel69 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel69() { + return gridPanel69; + } + + public void setGridPanel69(HtmlPanelGrid hpg) { + this.gridPanel69 = hpg; + } + + private StaticText staticText112 = new StaticText(); + + public StaticText getStaticText112() { + return staticText112; + } + + public void setStaticText112(StaticText st) { + this.staticText112 = st; + } + + private com.sun.rave.web.ui.component.Calendar calAvaliacaoIncap = new com.sun.rave.web.ui.component.Calendar(); + + public com.sun.rave.web.ui.component.Calendar getCalAvaliacaoIncap() { + return calAvaliacaoIncap; + } + + public void setCalAvaliacaoIncap(com.sun.rave.web.ui.component.Calendar c) { + this.calAvaliacaoIncap = c; + } + + private StaticText staticText113 = new StaticText(); + + public StaticText getStaticText113() { + return staticText113; + } + + public void setStaticText113(StaticText st) { + this.staticText113 = st; + } + + private com.sun.rave.web.ui.component.Calendar calRevisaoIncap = new com.sun.rave.web.ui.component.Calendar(); + + public com.sun.rave.web.ui.component.Calendar getCalRevisaoIncap() { + return calRevisaoIncap; + } + + public void setCalRevisaoIncap(com.sun.rave.web.ui.component.Calendar c) { + this.calRevisaoIncap = c; + } + + private HtmlPanelGrid gridPanel70 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel70() { + return gridPanel70; + } + + public void setGridPanel70(HtmlPanelGrid hpg) { + this.gridPanel70 = hpg; + } + + private StaticText staticText114 = new StaticText(); + + public StaticText getStaticText114() { + return staticText114; + } + + public void setStaticText114(StaticText st) { + this.staticText114 = st; + } + + private com.sun.rave.web.ui.component.Calendar calPeridoIncapDe = new com.sun.rave.web.ui.component.Calendar(); + + public com.sun.rave.web.ui.component.Calendar getCalPeridoIncapDe() { + return calPeridoIncapDe; + } + + public void setCalPeridoIncapDe(com.sun.rave.web.ui.component.Calendar c) { + this.calPeridoIncapDe = c; + } + + private StaticText staticText115 = new StaticText(); + + public StaticText getStaticText115() { + return staticText115; + } + + public void setStaticText115(StaticText st) { + this.staticText115 = st; + } + + private com.sun.rave.web.ui.component.Calendar calPeriodoIncapA = new com.sun.rave.web.ui.component.Calendar(); + + public com.sun.rave.web.ui.component.Calendar getCalPeriodoIncapA() { + return calPeriodoIncapA; + } + + public void setCalPeriodoIncapA(com.sun.rave.web.ui.component.Calendar c) { + this.calPeriodoIncapA = c; + } + + private HtmlPanelGrid gridPanel71 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel71() { + return gridPanel71; + } + + public void setGridPanel71(HtmlPanelGrid hpg) { + this.gridPanel71 = hpg; + } + + private StaticText staticText116 = new StaticText(); + + public StaticText getStaticText116() { + return staticText116; + } + + public void setStaticText116(StaticText st) { + this.staticText116 = st; + } + + private HtmlPanelGrid gridRestricoes = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridRestricoes() { + return gridRestricoes; + } + + public void setGridRestricoes(HtmlPanelGrid hpg) { + this.gridRestricoes = hpg; + } + + private HtmlPanelGrid gridPanel72 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel72() { + return gridPanel72; + } + + public void setGridPanel72(HtmlPanelGrid hpg) { + this.gridPanel72 = hpg; + } + + private HtmlPanelGrid gridPanel73 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel73() { + return gridPanel73; + } + + public void setGridPanel73(HtmlPanelGrid hpg) { + this.gridPanel73 = hpg; + } + + private HtmlPanelGrid gridPanel74 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel74() { + return gridPanel74; + } + + public void setGridPanel74(HtmlPanelGrid hpg) { + this.gridPanel74 = hpg; + } + + private HtmlPanelGrid gridPanel75 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel75() { + return gridPanel75; + } + + public void setGridPanel75(HtmlPanelGrid hpg) { + this.gridPanel75 = hpg; + } + + private ImageComponent image3 = new ImageComponent(); + + public ImageComponent getImage3() { + return image3; + } + + public void setImage3(ImageComponent ic) { + this.image3 = ic; + } + + private ImageComponent image4 = new ImageComponent(); + + public ImageComponent getImage4() { + return image4; + } + + public void setImage4(ImageComponent ic) { + this.image4 = ic; + } + + private ImageComponent image5 = new ImageComponent(); + + public ImageComponent getImage5() { + return image5; + } + + public void setImage5(ImageComponent ic) { + this.image5 = ic; + } + + private PanelGroup groupPanel26 = new PanelGroup(); + + public PanelGroup getGroupPanel26() { + return groupPanel26; + } + + public void setGroupPanel26(PanelGroup pg) { + this.groupPanel26 = pg; + } + + private StaticText staticText117 = new StaticText(); + + public StaticText getStaticText117() { + return staticText117; + } + + public void setStaticText117(StaticText st) { + this.staticText117 = st; + } + + private Checkbox chkImgFlexao = new Checkbox(); + + public Checkbox getChkImgFlexao() { + return chkImgFlexao; + } + + public void setChkImgFlexao(Checkbox c) { + this.chkImgFlexao = c; + } + + private HtmlPanelGrid gridPanel76 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel76() { + return gridPanel76; + } + + public void setGridPanel76(HtmlPanelGrid hpg) { + this.gridPanel76 = hpg; + } + + private ImageComponent image6 = new ImageComponent(); + + public ImageComponent getImage6() { + return image6; + } + + public void setImage6(ImageComponent ic) { + this.image6 = ic; + } + + private HtmlPanelGrid gridPanel77 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel77() { + return gridPanel77; + } + + public void setGridPanel77(HtmlPanelGrid hpg) { + this.gridPanel77 = hpg; + } + + private ImageComponent image7 = new ImageComponent(); + + public ImageComponent getImage7() { + return image7; + } + + public void setImage7(ImageComponent ic) { + this.image7 = ic; + } + + private ImageComponent image8 = new ImageComponent(); + + public ImageComponent getImage8() { + return image8; + } + + public void setImage8(ImageComponent ic) { + this.image8 = ic; + } + + private PanelGroup groupPanel27 = new PanelGroup(); + + public PanelGroup getGroupPanel27() { + return groupPanel27; + } + + public void setGroupPanel27(PanelGroup pg) { + this.groupPanel27 = pg; + } + + private StaticText staticText118 = new StaticText(); + + public StaticText getStaticText118() { + return staticText118; + } + + public void setStaticText118(StaticText st) { + this.staticText118 = st; + } + + private Checkbox chkImgExt1 = new Checkbox(); + + public Checkbox getChkImgExt1() { + return chkImgExt1; + } + + public void setChkImgExt1(Checkbox c) { + this.chkImgExt1 = c; + } + + private PanelGroup groupPanel28 = new PanelGroup(); + + public PanelGroup getGroupPanel28() { + return groupPanel28; + } + + public void setGroupPanel28(PanelGroup pg) { + this.groupPanel28 = pg; + } + + private StaticText staticText119 = new StaticText(); + + public StaticText getStaticText119() { + return staticText119; + } + + public void setStaticText119(StaticText st) { + this.staticText119 = st; + } + + private Checkbox chkImgExt2 = new Checkbox(); + + public Checkbox getChkImgExt2() { + return chkImgExt2; + } + + public void setChkImgExt2(Checkbox c) { + this.chkImgExt2 = c; + } + + private HtmlPanelGrid gridPanel78 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel78() { + return gridPanel78; + } + + public void setGridPanel78(HtmlPanelGrid hpg) { + this.gridPanel78 = hpg; + } + + private ImageComponent image9 = new ImageComponent(); + + public ImageComponent getImage9() { + return image9; + } + + public void setImage9(ImageComponent ic) { + this.image9 = ic; + } + + private ImageComponent image10 = new ImageComponent(); + + public ImageComponent getImage10() { + return image10; + } + + public void setImage10(ImageComponent ic) { + this.image10 = ic; + } + + private PanelGroup groupPanel29 = new PanelGroup(); + + public PanelGroup getGroupPanel29() { + return groupPanel29; + } + + public void setGroupPanel29(PanelGroup pg) { + this.groupPanel29 = pg; + } + + private StaticText staticText120 = new StaticText(); + + public StaticText getStaticText120() { + return staticText120; + } + + public void setStaticText120(StaticText st) { + this.staticText120 = st; + } + + private Checkbox chkImgCab2 = new Checkbox(); + + public Checkbox getChkImgCab2() { + return chkImgCab2; + } + + public void setChkImgCab2(Checkbox c) { + this.chkImgCab2 = c; + } + + private PanelGroup groupPanel30 = new PanelGroup(); + + public PanelGroup getGroupPanel30() { + return groupPanel30; + } + + public void setGroupPanel30(PanelGroup pg) { + this.groupPanel30 = pg; + } + + private StaticText staticText121 = new StaticText(); + + public StaticText getStaticText121() { + return staticText121; + } + + public void setStaticText121(StaticText st) { + this.staticText121 = st; + } + + private Checkbox chkImgCab3 = new Checkbox(); + + public Checkbox getChkImgCab3() { + return chkImgCab3; + } + + public void setChkImgCab3(Checkbox c) { + this.chkImgCab3 = c; + } + + private HtmlPanelGrid gridPanel79 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel79() { + return gridPanel79; + } + + public void setGridPanel79(HtmlPanelGrid hpg) { + this.gridPanel79 = hpg; + } + + private ImageComponent image12 = new ImageComponent(); + + public ImageComponent getImage12() { + return image12; + } + + public void setImage12(ImageComponent ic) { + this.image12 = ic; + } + + private ImageComponent image13 = new ImageComponent(); + + public ImageComponent getImage13() { + return image13; + } + + public void setImage13(ImageComponent ic) { + this.image13 = ic; + } + + private ImageComponent image14 = new ImageComponent(); + + public ImageComponent getImage14() { + return image14; + } + + public void setImage14(ImageComponent ic) { + this.image14 = ic; + } + + private PanelGroup groupPanel31 = new PanelGroup(); + + public PanelGroup getGroupPanel31() { + return groupPanel31; + } + + public void setGroupPanel31(PanelGroup pg) { + this.groupPanel31 = pg; + } + + private StaticText staticText122 = new StaticText(); + + public StaticText getStaticText122() { + return staticText122; + } + + public void setStaticText122(StaticText st) { + this.staticText122 = st; + } + + private Checkbox chkImgMa2 = new Checkbox(); + + public Checkbox getChkImgMa2() { + return chkImgMa2; + } + + public void setChkImgMa2(Checkbox c) { + this.chkImgMa2 = c; + } + + private PanelGroup groupPanel32 = new PanelGroup(); + + public PanelGroup getGroupPanel32() { + return groupPanel32; + } + + public void setGroupPanel32(PanelGroup pg) { + this.groupPanel32 = pg; + } + + private StaticText staticText123 = new StaticText(); + + public StaticText getStaticText123() { + return staticText123; + } + + public void setStaticText123(StaticText st) { + this.staticText123 = st; + } + + private Checkbox chkImgMa3 = new Checkbox(); + + public Checkbox getChkImgMa3() { + return chkImgMa3; + } + + public void setChkImgMa3(Checkbox c) { + this.chkImgMa3 = c; + } + + private PanelGroup groupPanel33 = new PanelGroup(); + + public PanelGroup getGroupPanel33() { + return groupPanel33; + } + + public void setGroupPanel33(PanelGroup pg) { + this.groupPanel33 = pg; + } + + private StaticText staticText124 = new StaticText(); + + public StaticText getStaticText124() { + return staticText124; + } + + public void setStaticText124(StaticText st) { + this.staticText124 = st; + } + + private Checkbox chkImgMa5 = new Checkbox(); + + public Checkbox getChkImgMa5() { + return chkImgMa5; + } + + public void setChkImgMa5(Checkbox c) { + this.chkImgMa5 = c; + } + + private PanelGroup groupPanel34 = new PanelGroup(); + + public PanelGroup getGroupPanel34() { + return groupPanel34; + } + + public void setGroupPanel34(PanelGroup pg) { + this.groupPanel34 = pg; + } + + private StaticText staticText125 = new StaticText(); + + public StaticText getStaticText125() { + return staticText125; + } + + public void setStaticText125(StaticText st) { + this.staticText125 = st; + } + + private Checkbox chkImgMa6 = new Checkbox(); + + public Checkbox getChkImgMa6() { + return chkImgMa6; + } + + public void setChkImgMa6(Checkbox c) { + this.chkImgMa6 = c; + } + + private HtmlPanelGrid gridPanel80 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel80() { + return gridPanel80; + } + + public void setGridPanel80(HtmlPanelGrid hpg) { + this.gridPanel80 = hpg; + } + + private ImageComponent image15 = new ImageComponent(); + + public ImageComponent getImage15() { + return image15; + } + + public void setImage15(ImageComponent ic) { + this.image15 = ic; + } + + private ImageComponent image16 = new ImageComponent(); + + public ImageComponent getImage16() { + return image16; + } + + public void setImage16(ImageComponent ic) { + this.image16 = ic; + } + + private PanelGroup groupPanel35 = new PanelGroup(); + + public PanelGroup getGroupPanel35() { + return groupPanel35; + } + + public void setGroupPanel35(PanelGroup pg) { + this.groupPanel35 = pg; + } + + private StaticText staticText126 = new StaticText(); + + public StaticText getStaticText126() { + return staticText126; + } + + public void setStaticText126(StaticText st) { + this.staticText126 = st; + } + + private Checkbox chkImgMa8 = new Checkbox(); + + public Checkbox getChkImgMa8() { + return chkImgMa8; + } + + public void setChkImgMa8(Checkbox c) { + this.chkImgMa8 = c; + } + + private PanelGroup groupPanel36 = new PanelGroup(); + + public PanelGroup getGroupPanel36() { + return groupPanel36; + } + + public void setGroupPanel36(PanelGroup pg) { + this.groupPanel36 = pg; + } + + private StaticText staticText127 = new StaticText(); + + public StaticText getStaticText127() { + return staticText127; + } + + public void setStaticText127(StaticText st) { + this.staticText127 = st; + } + + private Checkbox chkImgMa10 = new Checkbox(); + + public Checkbox getChkImgMa10() { + return chkImgMa10; + } + + public void setChkImgMa10(Checkbox c) { + this.chkImgMa10 = c; + } + + private HtmlPanelGrid gridPanel81 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel81() { + return gridPanel81; + } + + public void setGridPanel81(HtmlPanelGrid hpg) { + this.gridPanel81 = hpg; + } + + private StaticText staticText128 = new StaticText(); + + public StaticText getStaticText128() { + return staticText128; + } + + public void setStaticText128(StaticText st) { + this.staticText128 = st; + } + + private PanelGroup groupPanel37 = new PanelGroup(); + + public PanelGroup getGroupPanel37() { + return groupPanel37; + } + + public void setGroupPanel37(PanelGroup pg) { + this.groupPanel37 = pg; + } + + private Checkbox chkRestricaoCargas = new Checkbox(); + + public Checkbox getChkRestricaoCargas() { + return chkRestricaoCargas; + } + + public void setChkRestricaoCargas(Checkbox c) { + this.chkRestricaoCargas = c; + } + + private StaticText staticText129 = new StaticText(); + + public StaticText getStaticText129() { + return staticText129; + } + + public void setStaticText129(StaticText st) { + this.staticText129 = st; + } + + private RadioButton rbKgs2 = new RadioButton(); + + public RadioButton getRbKgs2() { + return rbKgs2; + } + + public void setRbKgs2(RadioButton rb) { + this.rbKgs2 = rb; + } + + private StaticText stKgs2 = new StaticText(); + + public StaticText getStKgs2() { + return stKgs2; + } + + public void setStKgs2(StaticText st) { + this.stKgs2 = st; + } + + private RadioButton rbKgs5 = new RadioButton(); + + public RadioButton getRbKgs5() { + return rbKgs5; + } + + public void setRbKgs5(RadioButton rb) { + this.rbKgs5 = rb; + } + + private StaticText stKgs5 = new StaticText(); + + public StaticText getStKgs5() { + return stKgs5; + } + + public void setStKgs5(StaticText st) { + this.stKgs5 = st; + } + + private RadioButton rbKgs10 = new RadioButton(); + + public RadioButton getRbKgs10() { + return rbKgs10; + } + + public void setRbKgs10(RadioButton rb) { + this.rbKgs10 = rb; + } + + private StaticText stKgs10 = new StaticText(); + + public StaticText getStKgs10() { + return stKgs10; + } + + public void setStKgs10(StaticText st) { + this.stKgs10 = st; + } + + private RadioButton rbKgs15 = new RadioButton(); + + public RadioButton getRbKgs15() { + return rbKgs15; + } + + public void setRbKgs15(RadioButton rb) { + this.rbKgs15 = rb; + } + + private StaticText stKgs15 = new StaticText(); + + public StaticText getStKgs15() { + return stKgs15; + } + + public void setStKgs15(StaticText st) { + this.stKgs15 = st; + } + + private RadioButton rbKgsOutro = new RadioButton(); + + public RadioButton getRbKgsOutro() { + return rbKgsOutro; + } + + public void setRbKgsOutro(RadioButton rb) { + this.rbKgsOutro = rb; + } + + private StaticText stKgsOutro = new StaticText(); + + public StaticText getStKgsOutro() { + return stKgsOutro; + } + + public void setStKgsOutro(StaticText st) { + this.stKgsOutro = st; + } + + private TextField txtKgs = new TextField(); + + public TextField getTxtKgs() { + return txtKgs; + } + + public void setTxtKgs(TextField tf) { + this.txtKgs = tf; + } + + private StaticText stKg = new StaticText(); + + public StaticText getStKg() { + return stKg; + } + + public void setStKg(StaticText st) { + this.stKg = st; + } + + private PanelGroup groupPanel38 = new PanelGroup(); + + public PanelGroup getGroupPanel38() { + return groupPanel38; + } + + public void setGroupPanel38(PanelGroup pg) { + this.groupPanel38 = pg; + } + + private Checkbox chkRestricaoMotricidade = new Checkbox(); + + public Checkbox getChkRestricaoMotricidade() { + return chkRestricaoMotricidade; + } + + public void setChkRestricaoMotricidade(Checkbox c) { + this.chkRestricaoMotricidade = c; + } + + private StaticText staticText136 = new StaticText(); + + public StaticText getStaticText136() { + return staticText136; + } + + public void setStaticText136(StaticText st) { + this.staticText136 = st; + } + + private PanelGroup groupPanel39 = new PanelGroup(); + + public PanelGroup getGroupPanel39() { + return groupPanel39; + } + + public void setGroupPanel39(PanelGroup pg) { + this.groupPanel39 = pg; + } + + private Checkbox chkRestricaoConducao = new Checkbox(); + + public Checkbox getChkRestricaoConducao() { + return chkRestricaoConducao; + } + + public void setChkRestricaoConducao(Checkbox c) { + this.chkRestricaoConducao = c; + } + + private StaticText staticText137 = new StaticText(); + + public StaticText getStaticText137() { + return staticText137; + } + + public void setStaticText137(StaticText st) { + this.staticText137 = st; + } + + private PanelGroup groupPanel40 = new PanelGroup(); + + public PanelGroup getGroupPanel40() { + return groupPanel40; + } + + public void setGroupPanel40(PanelGroup pg) { + this.groupPanel40 = pg; + } + + private Checkbox chkRestricaoVibracoes = new Checkbox(); + + public Checkbox getChkRestricaoVibracoes() { + return chkRestricaoVibracoes; + } + + public void setChkRestricaoVibracoes(Checkbox c) { + this.chkRestricaoVibracoes = c; + } + + private StaticText staticText138 = new StaticText(); + + public StaticText getStaticText138() { + return staticText138; + } + + public void setStaticText138(StaticText st) { + this.staticText138 = st; + } + + private HtmlPanelGrid gridPanel82 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel82() { + return gridPanel82; + } + + public void setGridPanel82(HtmlPanelGrid hpg) { + this.gridPanel82 = hpg; + } + + private PanelGroup groupPanel41 = new PanelGroup(); + + public PanelGroup getGroupPanel41() { + return groupPanel41; + } + + public void setGroupPanel41(PanelGroup pg) { + this.groupPanel41 = pg; + } + + private Checkbox chkRestricaoOutras = new Checkbox(); + + public Checkbox getChkRestricaoOutras() { + return chkRestricaoOutras; + } + + public void setChkRestricaoOutras(Checkbox c) { + this.chkRestricaoOutras = c; + } + + private StaticText staticText139 = new StaticText(); + + public StaticText getStaticText139() { + return staticText139; + } + + public void setStaticText139(StaticText st) { + this.staticText139 = st; + } + + private TextField txtRestricaoOutras = new TextField(); + + public TextField getTxtRestricaoOutras() { + return txtRestricaoOutras; + } + + public void setTxtRestricaoOutras(TextField tf) { + this.txtRestricaoOutras = tf; + } + + private HtmlPanelGrid gridPanel83 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel83() { + return gridPanel83; + } + + public void setGridPanel83(HtmlPanelGrid hpg) { + this.gridPanel83 = hpg; + } + + private StaticText staticText140 = new StaticText(); + + public StaticText getStaticText140() { + return staticText140; + } + + public void setStaticText140(StaticText st) { + this.staticText140 = st; + } + + private TextField txtObservacoes = new TextField(); + + public TextField getTxtObservacoes() { + return txtObservacoes; + } + + public void setTxtObservacoes(TextField tf) { + this.txtObservacoes = tf; + } + + private RadioButton rbIncapacidadePerm = new RadioButton(); + + public RadioButton getRbIncapacidadePerm() { + return rbIncapacidadePerm; + } + + public void setRbIncapacidadePerm(RadioButton rb) { + this.rbIncapacidadePerm = rb; + } + + private StaticText staticText141 = new StaticText(); + + public StaticText getStaticText141() { + return staticText141; + } + + public void setStaticText141(StaticText st) { + this.staticText141 = st; + } + + private ImageComponent image17 = new ImageComponent(); + + public ImageComponent getImage17() { + return image17; + } + + public void setImage17(ImageComponent ic) { + this.image17 = ic; + } + + private ImageComponent image18 = new ImageComponent(); + + public ImageComponent getImage18() { + return image18; + } + + public void setImage18(ImageComponent ic) { + this.image18 = ic; + } + + private HtmlPanelGrid gridPanel84 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel84() { + return gridPanel84; + } + + public void setGridPanel84(HtmlPanelGrid hpg) { + this.gridPanel84 = hpg; + } + + private ImageComponent image19 = new ImageComponent(); + + public ImageComponent getImage19() { + return image19; + } + + public void setImage19(ImageComponent ic) { + this.image19 = ic; + } + + private ImageComponent image20 = new ImageComponent(); + + public ImageComponent getImage20() { + return image20; + } + + public void setImage20(ImageComponent ic) { + this.image20 = ic; + } + + private PanelGroup groupPanel42 = new PanelGroup(); + + public PanelGroup getGroupPanel42() { + return groupPanel42; + } + + public void setGroupPanel42(PanelGroup pg) { + this.groupPanel42 = pg; + } + + private StaticText staticText142 = new StaticText(); + + public StaticText getStaticText142() { + return staticText142; + } + + public void setStaticText142(StaticText st) { + this.staticText142 = st; + } + + private Checkbox chkImgRot1 = new Checkbox(); + + public Checkbox getChkImgRot1() { + return chkImgRot1; + } + + public void setChkImgRot1(Checkbox c) { + this.chkImgRot1 = c; + } + + private PanelGroup groupPanel43 = new PanelGroup(); + + public PanelGroup getGroupPanel43() { + return groupPanel43; + } + + public void setGroupPanel43(PanelGroup pg) { + this.groupPanel43 = pg; + } + + private StaticText staticText143 = new StaticText(); + + public StaticText getStaticText143() { + return staticText143; + } + + public void setStaticText143(StaticText st) { + this.staticText143 = st; + } + + private Checkbox chkImgRot2 = new Checkbox(); + + public Checkbox getChkImgRot2() { + return chkImgRot2; + } + + public void setChkImgRot2(Checkbox c) { + this.chkImgRot2 = c; + } + + private ImageComponent image21 = new ImageComponent(); + + public ImageComponent getImage21() { + return image21; + } + + public void setImage21(ImageComponent ic) { + this.image21 = ic; + } + + private ImageComponent image11 = new ImageComponent(); + + public ImageComponent getImage11() { + return image11; + } + + public void setImage11(ImageComponent ic) { + this.image11 = ic; + } + + private PanelGroup groupPanel44 = new PanelGroup(); + + public PanelGroup getGroupPanel44() { + return groupPanel44; + } + + public void setGroupPanel44(PanelGroup pg) { + this.groupPanel44 = pg; + } + + private StaticText staticText144 = new StaticText(); + + public StaticText getStaticText144() { + return staticText144; + } + + public void setStaticText144(StaticText st) { + this.staticText144 = st; + } + + private Checkbox chkImgCab1 = new Checkbox(); + + public Checkbox getChkImgCab1() { + return chkImgCab1; + } + + public void setChkImgCab1(Checkbox c) { + this.chkImgCab1 = c; + } + + private PanelGroup groupPanel45 = new PanelGroup(); + + public PanelGroup getGroupPanel45() { + return groupPanel45; + } + + public void setGroupPanel45(PanelGroup pg) { + this.groupPanel45 = pg; + } + + private StaticText staticText145 = new StaticText(); + + public StaticText getStaticText145() { + return staticText145; + } + + public void setStaticText145(StaticText st) { + this.staticText145 = st; + } + + private Checkbox chkImgCab4 = new Checkbox(); + + public Checkbox getChkImgCab4() { + return chkImgCab4; + } + + public void setChkImgCab4(Checkbox c) { + this.chkImgCab4 = c; + } + + private ImageComponent image22 = new ImageComponent(); + + public ImageComponent getImage22() { + return image22; + } + + public void setImage22(ImageComponent ic) { + this.image22 = ic; + } + + private ImageComponent image23 = new ImageComponent(); + + public ImageComponent getImage23() { + return image23; + } + + public void setImage23(ImageComponent ic) { + this.image23 = ic; + } + + private ImageComponent image24 = new ImageComponent(); + + public ImageComponent getImage24() { + return image24; + } + + public void setImage24(ImageComponent ic) { + this.image24 = ic; + } + + private PanelGroup groupPanel46 = new PanelGroup(); + + public PanelGroup getGroupPanel46() { + return groupPanel46; + } + + public void setGroupPanel46(PanelGroup pg) { + this.groupPanel46 = pg; + } + + private StaticText staticText146 = new StaticText(); + + public StaticText getStaticText146() { + return staticText146; + } + + public void setStaticText146(StaticText st) { + this.staticText146 = st; + } + + private Checkbox chkImgMa1 = new Checkbox(); + + public Checkbox getChkImgMa1() { + return chkImgMa1; + } + + public void setChkImgMa1(Checkbox c) { + this.chkImgMa1 = c; + } + + private PanelGroup groupPanel47 = new PanelGroup(); + + public PanelGroup getGroupPanel47() { + return groupPanel47; + } + + public void setGroupPanel47(PanelGroup pg) { + this.groupPanel47 = pg; + } + + private StaticText staticText147 = new StaticText(); + + public StaticText getStaticText147() { + return staticText147; + } + + public void setStaticText147(StaticText st) { + this.staticText147 = st; + } + + private Checkbox chkImgMa4 = new Checkbox(); + + public Checkbox getChkImgMa4() { + return chkImgMa4; + } + + public void setChkImgMa4(Checkbox c) { + this.chkImgMa4 = c; + } + + private ImageComponent image25 = new ImageComponent(); + + public ImageComponent getImage25() { + return image25; + } + + public void setImage25(ImageComponent ic) { + this.image25 = ic; + } + + private ImageComponent image26 = new ImageComponent(); + + public ImageComponent getImage26() { + return image26; + } + + public void setImage26(ImageComponent ic) { + this.image26 = ic; + } + + private PanelGroup groupPanel48 = new PanelGroup(); + + public PanelGroup getGroupPanel48() { + return groupPanel48; + } + + public void setGroupPanel48(PanelGroup pg) { + this.groupPanel48 = pg; + } + + private StaticText staticText148 = new StaticText(); + + public StaticText getStaticText148() { + return staticText148; + } + + public void setStaticText148(StaticText st) { + this.staticText148 = st; + } + + private Checkbox chkImgMa7 = new Checkbox(); + + public Checkbox getChkImgMa7() { + return chkImgMa7; + } + + public void setChkImgMa7(Checkbox c) { + this.chkImgMa7 = c; + } + + private PanelGroup groupPanel49 = new PanelGroup(); + + public PanelGroup getGroupPanel49() { + return groupPanel49; + } + + public void setGroupPanel49(PanelGroup pg) { + this.groupPanel49 = pg; + } + + private StaticText staticText149 = new StaticText(); + + public StaticText getStaticText149() { + return staticText149; + } + + public void setStaticText149(StaticText st) { + this.staticText149 = st; + } + + private Checkbox chkImgMa9 = new Checkbox(); + + public Checkbox getChkImgMa9() { + return chkImgMa9; + } + + public void setChkImgMa9(Checkbox c) { + this.chkImgMa9 = c; + } + + private HtmlPanelGrid gridMedicoView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMedicoView() { + return gridMedicoView; + } + + public void setGridMedicoView(HtmlPanelGrid hpg) { + this.gridMedicoView = hpg; + } + + private HtmlPanelGrid gridPanel85 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel85() { + return gridPanel85; + } + + public void setGridPanel85(HtmlPanelGrid hpg) { + this.gridPanel85 = hpg; + } + + private StaticText staticText150 = new StaticText(); + + public StaticText getStaticText150() { + return staticText150; + } + + public void setStaticText150(StaticText st) { + this.staticText150 = st; + } + + private HtmlPanelGrid gridLesao = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLesao() { + return gridLesao; + } + + public void setGridLesao(HtmlPanelGrid hpg) { + this.gridLesao = hpg; + } + + private StaticText staticText151 = new StaticText(); + + public StaticText getStaticText151() { + return staticText151; + } + + public void setStaticText151(StaticText st) { + this.staticText151 = st; + } + + private HtmlPanelGrid gridPanel86 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel86() { + return gridPanel86; + } + + public void setGridPanel86(HtmlPanelGrid hpg) { + this.gridPanel86 = hpg; + } + + private StaticText staticText152 = new StaticText(); + + public StaticText getStaticText152() { + return staticText152; + } + + public void setStaticText152(StaticText st) { + this.staticText152 = st; + } + + private HtmlPanelGrid gridIncapacidade2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridIncapacidade2() { + return gridIncapacidade2; + } + + public void setGridIncapacidade2(HtmlPanelGrid hpg) { + this.gridIncapacidade2 = hpg; + } + + private HtmlPanelGrid gridPanel87 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel87() { + return gridPanel87; + } + + public void setGridPanel87(HtmlPanelGrid hpg) { + this.gridPanel87 = hpg; + } + + private StaticText staticText153 = new StaticText(); + + public StaticText getStaticText153() { + return staticText153; + } + + public void setStaticText153(StaticText st) { + this.staticText153 = st; + } + + private HtmlPanelGrid gridRestricoes1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridRestricoes1() { + return gridRestricoes1; + } + + public void setGridRestricoes1(HtmlPanelGrid hpg) { + this.gridRestricoes1 = hpg; + } + + private HtmlPanelGrid gridPanel88 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel88() { + return gridPanel88; + } + + public void setGridPanel88(HtmlPanelGrid hpg) { + this.gridPanel88 = hpg; + } + + private HtmlPanelGrid gridImagesRestricoes = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridImagesRestricoes() { + return gridImagesRestricoes; + } + + public void setGridImagesRestricoes(HtmlPanelGrid hpg) { + this.gridImagesRestricoes = hpg; + } + + private HtmlPanelGrid gridOutrasRestricoes = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridOutrasRestricoes() { + return gridOutrasRestricoes; + } + + public void setGridOutrasRestricoes(HtmlPanelGrid hpg) { + this.gridOutrasRestricoes = hpg; + } + + private StaticText staticText154 = new StaticText(); + + public StaticText getStaticText154() { + return staticText154; + } + + public void setStaticText154(StaticText st) { + this.staticText154 = st; + } + + private HtmlPanelGrid gridPanel90 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel90() { + return gridPanel90; + } + + public void setGridPanel90(HtmlPanelGrid hpg) { + this.gridPanel90 = hpg; + } + + private StaticText staticText155 = new StaticText(); + + public StaticText getStaticText155() { + return staticText155; + } + + public void setStaticText155(StaticText st) { + this.staticText155 = st; + } + + private StaticText stObservacoes = new StaticText(); + + public StaticText getStObservacoes() { + return stObservacoes; + } + + public void setStObservacoes(StaticText st) { + this.stObservacoes = st; + } + + private HtmlPanelGrid gridHeader1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridHeader1() { + return gridHeader1; + } + + public void setGridHeader1(HtmlPanelGrid hpg) { + this.gridHeader1 = hpg; + } + + private HtmlPanelGrid gridPanel114 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel114() { + return gridPanel114; + } + + public void setGridPanel114(HtmlPanelGrid hpg) { + this.gridPanel114 = hpg; + } + + private PanelGroup groupPanel57 = new PanelGroup(); + + public PanelGroup getGroupPanel57() { + return groupPanel57; + } + + public void setGroupPanel57(PanelGroup pg) { + this.groupPanel57 = pg; + } + + private ImageComponent image27 = new ImageComponent(); + + public ImageComponent getImage27() { + return image27; + } + + public void setImage27(ImageComponent ic) { + this.image27 = ic; + } + + private HtmlPanelGrid gridPanel115 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel115() { + return gridPanel115; + } + + public void setGridPanel115(HtmlPanelGrid hpg) { + this.gridPanel115 = hpg; + } + + private StaticText staticText168 = new StaticText(); + + public StaticText getStaticText168() { + return staticText168; + } + + public void setStaticText168(StaticText st) { + this.staticText168 = st; + } + + private HtmlPanelGrid gridPanel116 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel116() { + return gridPanel116; + } + + public void setGridPanel116(HtmlPanelGrid hpg) { + this.gridPanel116 = hpg; + } + + private PanelGroup groupPanel58 = new PanelGroup(); + + public PanelGroup getGroupPanel58() { + return groupPanel58; + } + + public void setGroupPanel58(PanelGroup pg) { + this.groupPanel58 = pg; + } + + private StaticText staticText169 = new StaticText(); + + public StaticText getStaticText169() { + return staticText169; + } + + public void setStaticText169(StaticText st) { + this.staticText169 = st; + } + + private StaticText stHeaderNr = new StaticText(); + + public StaticText getStHeaderNr() { + return stHeaderNr; + } + + public void setStHeaderNr(StaticText st) { + this.stHeaderNr = st; + } + + private PanelGroup groupPanel59 = new PanelGroup(); + + public PanelGroup getGroupPanel59() { + return groupPanel59; + } + + public void setGroupPanel59(PanelGroup pg) { + this.groupPanel59 = pg; + } + + private StaticText staticText170 = new StaticText(); + + public StaticText getStaticText170() { + return staticText170; + } + + public void setStaticText170(StaticText st) { + this.staticText170 = st; + } + + private StaticText stHeaderDate = new StaticText(); + + public StaticText getStHeaderDate() { + return stHeaderDate; + } + + public void setStHeaderDate(StaticText st) { + this.stHeaderDate = st; + } + + private ImageComponent image28 = new ImageComponent(); + + public ImageComponent getImage28() { + return image28; + } + + public void setImage28(ImageComponent ic) { + this.image28 = ic; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private RadioButton rbTurnoManha = new RadioButton(); + + public RadioButton getRbTurnoManha() { + return rbTurnoManha; + } + + public void setRbTurnoManha(RadioButton rb) { + this.rbTurnoManha = rb; + } + + private StaticText staticText1 = new StaticText(); + + public StaticText getStaticText1() { + return staticText1; + } + + public void setStaticText1(StaticText st) { + this.staticText1 = st; + } + + private StaticText staticText2 = new StaticText(); + + public StaticText getStaticText2() { + return staticText2; + } + + public void setStaticText2(StaticText st) { + this.staticText2 = st; + } + + private RadioButton rbTurnoTarde = new RadioButton(); + + public RadioButton getRbTurnoTarde() { + return rbTurnoTarde; + } + + public void setRbTurnoTarde(RadioButton rb) { + this.rbTurnoTarde = rb; + } + + private StaticText staticText3 = new StaticText(); + + public StaticText getStaticText3() { + return staticText3; + } + + public void setStaticText3(StaticText st) { + this.staticText3 = st; + } + + private StaticText staticText41 = new StaticText(); + + public StaticText getStaticText41() { + return staticText41; + } + + public void setStaticText41(StaticText st) { + this.staticText41 = st; + } + + private RadioButton rbTurnoNoite = new RadioButton(); + + public RadioButton getRbTurnoNoite() { + return rbTurnoNoite; + } + + public void setRbTurnoNoite(RadioButton rb) { + this.rbTurnoNoite = rb; + } + + private StaticText staticText42 = new StaticText(); + + public StaticText getStaticText42() { + return staticText42; + } + + public void setStaticText42(StaticText st) { + this.staticText42 = st; + } + + private HiddenField hidDisableEnviar = new HiddenField(); + + public HiddenField getHidDisableEnviar() { + return hidDisableEnviar; + } + + public void setHidDisableEnviar(HiddenField hf) { + this.hidDisableEnviar = hf; + } + + private PanelGroup groupPanel2 = new PanelGroup(); + + public PanelGroup getGroupPanel2() { + return groupPanel2; + } + + public void setGroupPanel2(PanelGroup pg) { + this.groupPanel2 = pg; + } + + private StaticText staticText43 = new StaticText(); + + public StaticText getStaticText43() { + return staticText43; + } + + public void setStaticText43(StaticText st) { + this.staticText43 = st; + } + + private TextField txtNrMecanografico = new TextField(); + + public TextField getTxtNrMecanografico() { + return txtNrMecanografico; + } + + public void setTxtNrMecanografico(TextField tf) { + this.txtNrMecanografico = tf; + } + + private StaticText staticText44 = new StaticText(); + + public StaticText getStaticText44() { + return staticText44; + } + + public void setStaticText44(StaticText st) { + this.staticText44 = st; + } + + private TextField txtNomeTrabalhador = new TextField(); + + public TextField getTxtNomeTrabalhador() { + return txtNomeTrabalhador; + } + + public void setTxtNomeTrabalhador(TextField tf) { + this.txtNomeTrabalhador = tf; + } + + private StaticText staticText45 = new StaticText(); + + public StaticText getStaticText45() { + return staticText45; + } + + public void setStaticText45(StaticText st) { + this.staticText45 = st; + } + + private Button butProcurarTrab = new Button(); + + public Button getButProcurarTrab() { + return butProcurarTrab; + } + + public void setButProcurarTrab(Button b) { + this.butProcurarTrab = b; + } + + private Table tblTrabalhadores = new Table(); + + public Table getTblTrabalhadores() { + return tblTrabalhadores; + } + + public void setTblTrabalhadores(Table t) { + this.tblTrabalhadores = t; + } + + private TableRowGroup tableRowGroup1 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup1() { + return tableRowGroup1; + } + + public void setTableRowGroup1(TableRowGroup trg) { + this.tableRowGroup1 = trg; + } + + private TableColumn tableColumn1 = new TableColumn(); + + public TableColumn getTableColumn1() { + return tableColumn1; + } + + public void setTableColumn1(TableColumn tc) { + this.tableColumn1 = tc; + } + + private TableColumn tableColumn2 = new TableColumn(); + + public TableColumn getTableColumn2() { + return tableColumn2; + } + + public void setTableColumn2(TableColumn tc) { + this.tableColumn2 = tc; + } + + private TableColumn tableColumn3 = new TableColumn(); + + public TableColumn getTableColumn3() { + return tableColumn3; + } + + public void setTableColumn3(TableColumn tc) { + this.tableColumn3 = tc; + } + + private DefaultTableDataProvider defaultTableDataProvider = new DefaultTableDataProvider(); + + public DefaultTableDataProvider getDefaultTableDataProvider() { + return defaultTableDataProvider; + } + + public void setDefaultTableDataProvider(DefaultTableDataProvider dtdp) { + this.defaultTableDataProvider = dtdp; + } + + private Hyperlink lnkPOR = new Hyperlink(); + + public Hyperlink getLnkPOR() { + return lnkPOR; + } + + public void setLnkPOR(Hyperlink h) { + this.lnkPOR = h; + } + + private Hyperlink lnkNomeTrabalhador = new Hyperlink(); + + public Hyperlink getLnkNomeTrabalhador() { + return lnkNomeTrabalhador; + } + + public void setLnkNomeTrabalhador(Hyperlink h) { + this.lnkNomeTrabalhador = h; + } + + private Hyperlink lnkEstabelecimentoTrabalhador = new Hyperlink(); + + public Hyperlink getLnkEstabelecimentoTrabalhador() { + return lnkEstabelecimentoTrabalhador; + } + + public void setLnkEstabelecimentoTrabalhador(Hyperlink h) { + this.lnkEstabelecimentoTrabalhador = h; + } + + private StaticText stTecnicoNomeEdit = new StaticText(); + + public StaticText getStTecnicoNomeEdit() { + return stTecnicoNomeEdit; + } + + public void setStTecnicoNomeEdit(StaticText st) { + this.stTecnicoNomeEdit = st; + } + + private HtmlPanelGrid gridDadosAcidenteSegView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridDadosAcidenteSegView() { + return gridDadosAcidenteSegView; + } + + public void setGridDadosAcidenteSegView(HtmlPanelGrid hpg) { + this.gridDadosAcidenteSegView = hpg; + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private StaticText staticText95 = new StaticText(); + + public StaticText getStaticText95() { + return staticText95; + } + + public void setStaticText95(StaticText st) { + this.staticText95 = st; + } + + private HtmlPanelGrid gridPanel117 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel117() { + return gridPanel117; + } + + public void setGridPanel117(HtmlPanelGrid hpg) { + this.gridPanel117 = hpg; + } + + private HtmlPanelGrid gridTurnoSeccaoLocal = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridTurnoSeccaoLocal() { + return gridTurnoSeccaoLocal; + } + + public void setGridTurnoSeccaoLocal(HtmlPanelGrid hpg) { + this.gridTurnoSeccaoLocal = hpg; + } + + private StaticText lblHorasTurno = new StaticText(); + + public StaticText getLblHorasTurno() { + return lblHorasTurno; + } + + public void setLblHorasTurno(StaticText st) { + this.lblHorasTurno = st; + } + + private StaticText txtHorasTurno2 = new StaticText(); + + public StaticText getTxtHorasTurno2() { + return txtHorasTurno2; + } + + public void setTxtHorasTurno2(StaticText st) { + this.txtHorasTurno2 = st; + } + + private StaticText lblSeccao = new StaticText(); + + public StaticText getLblSeccao() { + return lblSeccao; + } + + public void setLblSeccao(StaticText st) { + this.lblSeccao = st; + } + + private StaticText txtSeccao1 = new StaticText(); + + public StaticText getTxtSeccao1() { + return txtSeccao1; + } + + public void setTxtSeccao1(StaticText st) { + this.txtSeccao1 = st; + } + + private StaticText lblLocal = new StaticText(); + + public StaticText getLblLocal() { + return lblLocal; + } + + public void setLblLocal(StaticText st) { + this.lblLocal = st; + } + + private StaticText txtLocal1 = new StaticText(); + + public StaticText getTxtLocal1() { + return txtLocal1; + } + + public void setTxtLocal1(StaticText st) { + this.txtLocal1 = st; + } + + private HtmlPanelGrid gridTarefa = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridTarefa() { + return gridTarefa; + } + + public void setGridTarefa(HtmlPanelGrid hpg) { + this.gridTarefa = hpg; + } + + private StaticText lblTarefa = new StaticText(); + + public StaticText getLblTarefa() { + return lblTarefa; + } + + public void setLblTarefa(StaticText st) { + this.lblTarefa = st; + } + + private StaticText txtTarefa1 = new StaticText(); + + public StaticText getTxtTarefa1() { + return txtTarefa1; + } + + public void setTxtTarefa1(StaticText st) { + this.txtTarefa1 = st; + } + + private HtmlPanelGrid gridSubstancias = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridSubstancias() { + return gridSubstancias; + } + + public void setGridSubstancias(HtmlPanelGrid hpg) { + this.gridSubstancias = hpg; + } + + private StaticText lblSubstancias = new StaticText(); + + public StaticText getLblSubstancias() { + return lblSubstancias; + } + + public void setLblSubstancias(StaticText st) { + this.lblSubstancias = st; + } + + private StaticText txtSubstancias1 = new StaticText(); + + public StaticText getTxtSubstancias1() { + return txtSubstancias1; + } + + public void setTxtSubstancias1(StaticText st) { + this.txtSubstancias1 = st; + } + + private HtmlPanelGrid gridCondicoes = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridCondicoes() { + return gridCondicoes; + } + + public void setGridCondicoes(HtmlPanelGrid hpg) { + this.gridCondicoes = hpg; + } + + private StaticText lblCondicoes = new StaticText(); + + public StaticText getLblCondicoes() { + return lblCondicoes; + } + + public void setLblCondicoes(StaticText st) { + this.lblCondicoes = st; + } + + private StaticText txtCondicoes1 = new StaticText(); + + public StaticText getTxtCondicoes1() { + return txtCondicoes1; + } + + public void setTxtCondicoes1(StaticText st) { + this.txtCondicoes1 = st; + } + + private HtmlPanelGrid gridTestemunhas = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridTestemunhas() { + return gridTestemunhas; + } + + public void setGridTestemunhas(HtmlPanelGrid hpg) { + this.gridTestemunhas = hpg; + } + + private StaticText lblTestemunhas = new StaticText(); + + public StaticText getLblTestemunhas() { + return lblTestemunhas; + } + + public void setLblTestemunhas(StaticText st) { + this.lblTestemunhas = st; + } + + private StaticText txtTestemunhas1 = new StaticText(); + + public StaticText getTxtTestemunhas1() { + return txtTestemunhas1; + } + + public void setTxtTestemunhas1(StaticText st) { + this.txtTestemunhas1 = st; + } + + private HtmlPanelGrid gridCausas = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridCausas() { + return gridCausas; + } + + public void setGridCausas(HtmlPanelGrid hpg) { + this.gridCausas = hpg; + } + + private StaticText lblCausas = new StaticText(); + + public StaticText getLblCausas() { + return lblCausas; + } + + public void setLblCausas(StaticText st) { + this.lblCausas = st; + } + + private StaticText txtCausas1 = new StaticText(); + + public StaticText getTxtCausas1() { + return txtCausas1; + } + + public void setTxtCausas1(StaticText st) { + this.txtCausas1 = st; + } + + private HtmlPanelGrid gridDescricao = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridDescricao() { + return gridDescricao; + } + + public void setGridDescricao(HtmlPanelGrid hpg) { + this.gridDescricao = hpg; + } + + private StaticText lblDescricao = new StaticText(); + + public StaticText getLblDescricao() { + return lblDescricao; + } + + public void setLblDescricao(StaticText st) { + this.lblDescricao = st; + } + + private StaticText txtDescricao1 = new StaticText(); + + public StaticText getTxtDescricao1() { + return txtDescricao1; + } + + public void setTxtDescricao1(StaticText st) { + this.txtDescricao1 = st; + } + + private HtmlPanelGrid gridFotografias = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridFotografias() { + return gridFotografias; + } + + public void setGridFotografias(HtmlPanelGrid hpg) { + this.gridFotografias = hpg; + } + + private HtmlPanelGrid gridPanel127 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel127() { + return gridPanel127; + } + + public void setGridPanel127(HtmlPanelGrid hpg) { + this.gridPanel127 = hpg; + } + + private StaticText lblFotografias = new StaticText(); + + public StaticText getLblFotografias() { + return lblFotografias; + } + + public void setLblFotografias(StaticText st) { + this.lblFotografias = st; + } + + private HtmlPanelGrid gridImages1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridImages1() { + return gridImages1; + } + + public void setGridImages1(HtmlPanelGrid hpg) { + this.gridImages1 = hpg; + } + + private HtmlPanelGrid gridConclusoes = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridConclusoes() { + return gridConclusoes; + } + + public void setGridConclusoes(HtmlPanelGrid hpg) { + this.gridConclusoes = hpg; + } + + private StaticText lblConclusoes = new StaticText(); + + public StaticText getLblConclusoes() { + return lblConclusoes; + } + + public void setLblConclusoes(StaticText st) { + this.lblConclusoes = st; + } + + private StaticText txtConclusoes1 = new StaticText(); + + public StaticText getTxtConclusoes1() { + return txtConclusoes1; + } + + public void setTxtConclusoes1(StaticText st) { + this.txtConclusoes1 = st; + } + + private HtmlPanelGrid gridAccoes = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridAccoes() { + return gridAccoes; + } + + public void setGridAccoes(HtmlPanelGrid hpg) { + this.gridAccoes = hpg; + } + + private StaticText lblAccoes = new StaticText(); + + public StaticText getLblAccoes() { + return lblAccoes; + } + + public void setLblAccoes(StaticText st) { + this.lblAccoes = st; + } + + private StaticText txtAccoes1 = new StaticText(); + + public StaticText getTxtAccoes1() { + return txtAccoes1; + } + + public void setTxtAccoes1(StaticText st) { + this.txtAccoes1 = st; + } + + private HtmlPanelGrid gridDataHora = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridDataHora() { + return gridDataHora; + } + + public void setGridDataHora(HtmlPanelGrid hpg) { + this.gridDataHora = hpg; + } + + private PanelGroup groupPanel7 = new PanelGroup(); + + public PanelGroup getGroupPanel7() { + return groupPanel7; + } + + public void setGroupPanel7(PanelGroup pg) { + this.groupPanel7 = pg; + } + + private StaticText lblDataAcidente = new StaticText(); + + public StaticText getLblDataAcidente() { + return lblDataAcidente; + } + + public void setLblDataAcidente(StaticText st) { + this.lblDataAcidente = st; + } + + private StaticText stDataAcidente1 = new StaticText(); + + public StaticText getStDataAcidente1() { + return stDataAcidente1; + } + + public void setStDataAcidente1(StaticText st) { + this.stDataAcidente1 = st; + } + + private PanelGroup groupPanel60 = new PanelGroup(); + + public PanelGroup getGroupPanel60() { + return groupPanel60; + } + + public void setGroupPanel60(PanelGroup pg) { + this.groupPanel60 = pg; + } + + private StaticText lblHoraAcidente = new StaticText(); + + public StaticText getLblHoraAcidente() { + return lblHoraAcidente; + } + + public void setLblHoraAcidente(StaticText st) { + this.lblHoraAcidente = st; + } + + private StaticText stHoraAcidente1 = new StaticText(); + + public StaticText getStHoraAcidente1() { + return stHoraAcidente1; + } + + public void setStHoraAcidente1(StaticText st) { + this.stHoraAcidente1 = st; + } + + private HtmlPanelGrid gridVerificacao = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridVerificacao() { + return gridVerificacao; + } + + public void setGridVerificacao(HtmlPanelGrid hpg) { + this.gridVerificacao = hpg; + } + + private HtmlPanelGrid gridPanel131 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel131() { + return gridPanel131; + } + + public void setGridPanel131(HtmlPanelGrid hpg) { + this.gridPanel131 = hpg; + } + + private StaticText staticText52 = new StaticText(); + + public StaticText getStaticText52() { + return staticText52; + } + + public void setStaticText52(StaticText st) { + this.staticText52 = st; + } + + private HtmlPanelGrid gridPanel132 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel132() { + return gridPanel132; + } + + public void setGridPanel132(HtmlPanelGrid hpg) { + this.gridPanel132 = hpg; + } + + private HtmlPanelGrid gridPanel133 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel133() { + return gridPanel133; + } + + public void setGridPanel133(HtmlPanelGrid hpg) { + this.gridPanel133 = hpg; + } + + private PanelGroup grpVerHs = new PanelGroup(); + + public PanelGroup getGrpVerHs() { + return grpVerHs; + } + + public void setGrpVerHs(PanelGroup pg) { + this.grpVerHs = pg; + } + + private Checkbox chkVerHs = new Checkbox(); + + public Checkbox getChkVerHs() { + return chkVerHs; + } + + public void setChkVerHs(Checkbox c) { + this.chkVerHs = c; + } + + private StaticText stVerHs = new StaticText(); + + public StaticText getStVerHs() { + return stVerHs; + } + + public void setStVerHs(StaticText st) { + this.stVerHs = st; + } + + private PanelGroup grpVerRespSeg = new PanelGroup(); + + public PanelGroup getGrpVerRespSeg() { + return grpVerRespSeg; + } + + public void setGrpVerRespSeg(PanelGroup pg) { + this.grpVerRespSeg = pg; + } + + private Checkbox chkVerRespSeg = new Checkbox(); + + public Checkbox getChkVerRespSeg() { + return chkVerRespSeg; + } + + public void setChkVerRespSeg(Checkbox c) { + this.chkVerRespSeg = c; + } + + private StaticText stVerRespSeg = new StaticText(); + + public StaticText getStVerRespSeg() { + return stVerRespSeg; + } + + public void setStVerRespSeg(StaticText st) { + this.stVerRespSeg = st; + } + + private PanelGroup grpVerRespRh = new PanelGroup(); + + public PanelGroup getGrpVerRespRh() { + return grpVerRespRh; + } + + public void setGrpVerRespRh(PanelGroup pg) { + this.grpVerRespRh = pg; + } + + private Checkbox chkVerRespRh = new Checkbox(); + + public Checkbox getChkVerRespRh() { + return chkVerRespRh; + } + + public void setChkVerRespRh(Checkbox c) { + this.chkVerRespRh = c; + } + + private StaticText stVerRespRh = new StaticText(); + + public StaticText getStVerRespRh() { + return stVerRespRh; + } + + public void setStVerRespRh(StaticText st) { + this.stVerRespRh = st; + } + + private HtmlPanelGrid gridVerificacaoView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridVerificacaoView() { + return gridVerificacaoView; + } + + public void setGridVerificacaoView(HtmlPanelGrid hpg) { + this.gridVerificacaoView = hpg; + } + + private HtmlPanelGrid gridPanel134 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel134() { + return gridPanel134; + } + + public void setGridPanel134(HtmlPanelGrid hpg) { + this.gridPanel134 = hpg; + } + + private StaticText staticText187 = new StaticText(); + + public StaticText getStaticText187() { + return staticText187; + } + + public void setStaticText187(StaticText st) { + this.staticText187 = st; + } + + private HtmlPanelGrid gridPanel135 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel135() { + return gridPanel135; + } + + public void setGridPanel135(HtmlPanelGrid hpg) { + this.gridPanel135 = hpg; + } + + private HtmlPanelGrid gridAssinaturasView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridAssinaturasView() { + return gridAssinaturasView; + } + + public void setGridAssinaturasView(HtmlPanelGrid hpg) { + this.gridAssinaturasView = hpg; + } + + private DropDown drpCausas = new DropDown(); + + public DropDown getDrpCausas() { + return drpCausas; + } + + public void setDrpCausas(DropDown dd) { + this.drpCausas = dd; + } + + private StaticText stObservacoesCorr = new StaticText(); + + public StaticText getStObservacoesCorr() { + return stObservacoesCorr; + } + + public void setStObservacoesCorr(StaticText st) { + this.stObservacoesCorr = st; + } + + private HtmlPanelGrid gridImpressao = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridImpressao() { + return gridImpressao; + } + + public void setGridImpressao(HtmlPanelGrid hpg) { + this.gridImpressao = hpg; + } + + private HtmlPanelGrid gridPanel89 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel89() { + return gridPanel89; + } + + public void setGridPanel89(HtmlPanelGrid hpg) { + this.gridPanel89 = hpg; + } + + private StaticText staticText73 = new StaticText(); + + public StaticText getStaticText73() { + return staticText73; + } + + public void setStaticText73(StaticText st) { + this.staticText73 = st; + } + + private HtmlPanelGrid gridPanel91 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel91() { + return gridPanel91; + } + + public void setGridPanel91(HtmlPanelGrid hpg) { + this.gridPanel91 = hpg; + } + + private HtmlPanelGrid gridPanel92 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel92() { + return gridPanel92; + } + + public void setGridPanel92(HtmlPanelGrid hpg) { + this.gridPanel92 = hpg; + } + + private PanelGroup grpAssSup = new PanelGroup(); + + public PanelGroup getGrpAssSup() { + return grpAssSup; + } + + public void setGrpAssSup(PanelGroup pg) { + this.grpAssSup = pg; + } + + private Checkbox chkAssSup = new Checkbox(); + + public Checkbox getChkAssSup() { + return chkAssSup; + } + + public void setChkAssSup(Checkbox c) { + this.chkAssSup = c; + } + + private StaticText stAssSup1 = new StaticText(); + + public StaticText getStAssSup1() { + return stAssSup1; + } + + public void setStAssSup1(StaticText st) { + this.stAssSup1 = st; + } + + private HtmlPanelGrid gridImpressaoView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridImpressaoView() { + return gridImpressaoView; + } + + public void setGridImpressaoView(HtmlPanelGrid hpg) { + this.gridImpressaoView = hpg; + } + + private HtmlPanelGrid gridPanel93 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel93() { + return gridPanel93; + } + + public void setGridPanel93(HtmlPanelGrid hpg) { + this.gridPanel93 = hpg; + } + + private StaticText staticText76 = new StaticText(); + + public StaticText getStaticText76() { + return staticText76; + } + + public void setStaticText76(StaticText st) { + this.staticText76 = st; + } + + private HtmlPanelGrid gridPanel94 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel94() { + return gridPanel94; + } + + public void setGridPanel94(HtmlPanelGrid hpg) { + this.gridPanel94 = hpg; + } + + private HtmlPanelGrid gridAssSupView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridAssSupView() { + return gridAssSupView; + } + + public void setGridAssSupView(HtmlPanelGrid hpg) { + this.gridAssSupView = hpg; + } + + private HtmlPanelGrid gridPanel22 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel22() { + return gridPanel22; + } + + public void setGridPanel22(HtmlPanelGrid hpg) { + this.gridPanel22 = hpg; + } + + private Button butCancelar = new Button(); + + public Button getButCancelar() { + return butCancelar; + } + + public void setButCancelar(Button b) { + this.butCancelar = b; + } + + private PanelGroup groupPanel5 = new PanelGroup(); + + public PanelGroup getGroupPanel5() { + return groupPanel5; + } + + public void setGroupPanel5(PanelGroup pg) { + this.groupPanel5 = pg; + } + + private Button butImprimir = new Button(); + + public Button getButImprimir() { + return butImprimir; + } + + public void setButImprimir(Button b) { + this.butImprimir = b; + } + + private Button butGravar = new Button(); + + public Button getButGravar() { + return butGravar; + } + + public void setButGravar(Button b) { + this.butGravar = b; + } + + private Button butCorrecao = new Button(); + + public Button getButCorrecao() { + return butCorrecao; + } + + public void setButCorrecao(Button b) { + this.butCorrecao = b; + } + + private Button butEnviar = new Button(); + + public Button getButEnviar() { + return butEnviar; + } + + public void setButEnviar(Button b) { + this.butEnviar = b; + } + + private TextField txtAssSup = new TextField(); + + public TextField getTxtAssSup() { + return txtAssSup; + } + + public void setTxtAssSup(TextField tf) { + this.txtAssSup = tf; + } + + private StaticText stAssSup2 = new StaticText(); + + public StaticText getStAssSup2() { + return stAssSup2; + } + + public void setStAssSup2(StaticText st) { + this.stAssSup2 = st; + } + + private HtmlPanelGrid gridPanel95 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel95() { + return gridPanel95; + } + + public void setGridPanel95(HtmlPanelGrid hpg) { + this.gridPanel95 = hpg; + } + + private PanelGroup groupPanel50 = new PanelGroup(); + + public PanelGroup getGroupPanel50() { + return groupPanel50; + } + + public void setGroupPanel50(PanelGroup pg) { + this.groupPanel50 = pg; + } + + private StaticText staticText98 = new StaticText(); + + public StaticText getStaticText98() { + return staticText98; + } + + public void setStaticText98(StaticText st) { + this.staticText98 = st; + } + + private TextField txtAveriguador = new TextField(); + + public TextField getTxtAveriguador() { + return txtAveriguador; + } + + public void setTxtAveriguador(TextField tf) { + this.txtAveriguador = tf; + } + + private HtmlPanelGrid gridPanel96 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel96() { + return gridPanel96; + } + + public void setGridPanel96(HtmlPanelGrid hpg) { + this.gridPanel96 = hpg; + } + + private PanelGroup groupPanel51 = new PanelGroup(); + + public PanelGroup getGroupPanel51() { + return groupPanel51; + } + + public void setGroupPanel51(PanelGroup pg) { + this.groupPanel51 = pg; + } + + private StaticText staticText101 = new StaticText(); + + public StaticText getStaticText101() { + return staticText101; + } + + public void setStaticText101(StaticText st) { + this.staticText101 = st; + } + + private StaticText stAveriguador = new StaticText(); + + public StaticText getStAveriguador() { + return stAveriguador; + } + + public void setStAveriguador(StaticText st) { + this.stAveriguador = st; + } + + private HtmlPanelGrid gridPanel97 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel97() { + return gridPanel97; + } + + public void setGridPanel97(HtmlPanelGrid hpg) { + this.gridPanel97 = hpg; + } + + private PanelGroup groupPanel52 = new PanelGroup(); + + public PanelGroup getGroupPanel52() { + return groupPanel52; + } + + public void setGroupPanel52(PanelGroup pg) { + this.groupPanel52 = pg; + } + + private Checkbox chkAveriguacaoPosterior = new Checkbox(); + + public Checkbox getChkAveriguacaoPosterior() { + return chkAveriguacaoPosterior; + } + + public void setChkAveriguacaoPosterior(Checkbox c) { + this.chkAveriguacaoPosterior = c; + } + + private StaticText staticText132 = new StaticText(); + + public StaticText getStaticText132() { + return staticText132; + } + + public void setStaticText132(StaticText st) { + this.staticText132 = st; + } + + private HtmlPanelGrid gridPanel98 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel98() { + return gridPanel98; + } + + public void setGridPanel98(HtmlPanelGrid hpg) { + this.gridPanel98 = hpg; + } + + private StaticText staticText104 = new StaticText(); + + public StaticText getStaticText104() { + return staticText104; + } + + public void setStaticText104(StaticText st) { + this.staticText104 = st; + } + + private HtmlPanelGrid gridPanel99 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel99() { + return gridPanel99; + } + + public void setGridPanel99(HtmlPanelGrid hpg) { + this.gridPanel99 = hpg; + } + + private StaticText staticText131 = new StaticText(); + + public StaticText getStaticText131() { + return staticText131; + } + + public void setStaticText131(StaticText st) { + this.staticText131 = st; + } + + private TextArea txtAveriguacaoObs = new TextArea(); + + public TextArea getTxtAveriguacaoObs() { + return txtAveriguacaoObs; + } + + public void setTxtAveriguacaoObs(TextArea ta) { + this.txtAveriguacaoObs = ta; + } + + private HtmlPanelGrid gridAveriguacaoPosterior = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridAveriguacaoPosterior() { + return gridAveriguacaoPosterior; + } + + public void setGridAveriguacaoPosterior(HtmlPanelGrid hpg) { + this.gridAveriguacaoPosterior = hpg; + } + + private StaticText lblAveriguacaoPosterior = new StaticText(); + + public StaticText getLblAveriguacaoPosterior() { + return lblAveriguacaoPosterior; + } + + public void setLblAveriguacaoPosterior(StaticText st) { + this.lblAveriguacaoPosterior = st; + } + + private StaticText txtAveriguacaoPosterior = new StaticText(); + + public StaticText getTxtAveriguacaoPosterior() { + return txtAveriguacaoPosterior; + } + + public void setTxtAveriguacaoPosterior(StaticText st) { + this.txtAveriguacaoPosterior = st; + } + + private HtmlPanelGrid gridAveriguacaoPosterior1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridAveriguacaoPosterior1() { + return gridAveriguacaoPosterior1; + } + + public void setGridAveriguacaoPosterior1(HtmlPanelGrid hpg) { + this.gridAveriguacaoPosterior1 = hpg; + } + + private HtmlPanelGrid gridPanel101 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel101() { + return gridPanel101; + } + + public void setGridPanel101(HtmlPanelGrid hpg) { + this.gridPanel101 = hpg; + } + + private StaticText staticText134 = new StaticText(); + + public StaticText getStaticText134() { + return staticText134; + } + + public void setStaticText134(StaticText st) { + this.staticText134 = st; + } + + private HtmlPanelGrid gridPanel102 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel102() { + return gridPanel102; + } + + public void setGridPanel102(HtmlPanelGrid hpg) { + this.gridPanel102 = hpg; + } + + private StaticText staticText135 = new StaticText(); + + public StaticText getStaticText135() { + return staticText135; + } + + public void setStaticText135(StaticText st) { + this.staticText135 = st; + } + + private TextArea txtAveriguacaoObs1 = new TextArea(); + + public TextArea getTxtAveriguacaoObs1() { + return txtAveriguacaoObs1; + } + + public void setTxtAveriguacaoObs1(TextArea ta) { + this.txtAveriguacaoObs1 = ta; + } + + private StaticText staticText130 = new StaticText(); + + public StaticText getStaticText130() { + return staticText130; + } + + public void setStaticText130(StaticText st) { + this.staticText130 = st; + } + + private StaticText stEstabelecimentoOrigem = new StaticText(); + + public StaticText getStEstabelecimentoOrigem() { + return stEstabelecimentoOrigem; + } + + public void setStEstabelecimentoOrigem(StaticText st) { + this.stEstabelecimentoOrigem = st; + } + + private HtmlPanelGrid gridPanel100 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel100() { + return gridPanel100; + } + + public void setGridPanel100(HtmlPanelGrid hpg) { + this.gridPanel100 = hpg; + } + + private StaticText staticText156 = new StaticText(); + + public StaticText getStaticText156() { + return staticText156; + } + + public void setStaticText156(StaticText st) { + this.staticText156 = st; + } + + private HtmlPanelGrid gridPanel103 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel103() { + return gridPanel103; + } + + public void setGridPanel103(HtmlPanelGrid hpg) { + this.gridPanel103 = hpg; + } + + private PanelGroup groupPanel53 = new PanelGroup(); + + public PanelGroup getGroupPanel53() { + return groupPanel53; + } + + public void setGroupPanel53(PanelGroup pg) { + this.groupPanel53 = pg; + } + + private StaticText staticText157 = new StaticText(); + + public StaticText getStaticText157() { + return staticText157; + } + + public void setStaticText157(StaticText st) { + this.staticText157 = st; + } + + private TextField txtNomeSuperior = new TextField(); + + public TextField getTxtNomeSuperior() { + return txtNomeSuperior; + } + + public void setTxtNomeSuperior(TextField tf) { + this.txtNomeSuperior = tf; + } + + private PanelGroup groupPanel54 = new PanelGroup(); + + public PanelGroup getGroupPanel54() { + return groupPanel54; + } + + public void setGroupPanel54(PanelGroup pg) { + this.groupPanel54 = pg; + } + + private StaticText staticText158 = new StaticText(); + + public StaticText getStaticText158() { + return staticText158; + } + + public void setStaticText158(StaticText st) { + this.staticText158 = st; + } + + private TextField txtEmailSuperior = new TextField(); + + public TextField getTxtEmailSuperior() { + return txtEmailSuperior; + } + + public void setTxtEmailSuperior(TextField tf) { + this.txtEmailSuperior = tf; + } + + private HtmlPanelGrid gridPanel104 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel104() { + return gridPanel104; + } + + public void setGridPanel104(HtmlPanelGrid hpg) { + this.gridPanel104 = hpg; + } + + private StaticText staticText159 = new StaticText(); + + public StaticText getStaticText159() { + return staticText159; + } + + public void setStaticText159(StaticText st) { + this.staticText159 = st; + } + + private HtmlPanelGrid gridPanel105 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel105() { + return gridPanel105; + } + + public void setGridPanel105(HtmlPanelGrid hpg) { + this.gridPanel105 = hpg; + } + + private PanelGroup groupPanel55 = new PanelGroup(); + + public PanelGroup getGroupPanel55() { + return groupPanel55; + } + + public void setGroupPanel55(PanelGroup pg) { + this.groupPanel55 = pg; + } + + private StaticText staticText160 = new StaticText(); + + public StaticText getStaticText160() { + return staticText160; + } + + public void setStaticText160(StaticText st) { + this.staticText160 = st; + } + + private StaticText stNomeSuperior = new StaticText(); + + public StaticText getStNomeSuperior() { + return stNomeSuperior; + } + + public void setStNomeSuperior(StaticText st) { + this.stNomeSuperior = st; + } + + private PanelGroup groupPanel61 = new PanelGroup(); + + public PanelGroup getGroupPanel61() { + return groupPanel61; + } + + public void setGroupPanel61(PanelGroup pg) { + this.groupPanel61 = pg; + } + + private StaticText staticText162 = new StaticText(); + + public StaticText getStaticText162() { + return staticText162; + } + + public void setStaticText162(StaticText st) { + this.staticText162 = st; + } + + private StaticText stEmailSuperior = new StaticText(); + + public StaticText getStEmailSuperior() { + return stEmailSuperior; + } + + public void setStEmailSuperior(StaticText st) { + this.stEmailSuperior = st; + } + + private HiddenField hidDisableImprimir = new HiddenField(); + + public HiddenField getHidDisableImprimir() { + return hidDisableImprimir; + } + + public void setHidDisableImprimir(HiddenField hf) { + this.hidDisableImprimir = hf; + } + + private DropDown drpSeccao = new DropDown(); + + public DropDown getDrpSeccao() { + return drpSeccao; + } + + public void setDrpSeccao(DropDown dd) { + this.drpSeccao = dd; + } + + private StaticText staticText163 = new StaticText(); + + public StaticText getStaticText163() { + return staticText163; + } + + public void setStaticText163(StaticText st) { + this.staticText163 = st; + } + + private DropDown drpDepartamento = new DropDown(); + + public DropDown getDrpDepartamento() { + return drpDepartamento; + } + + public void setDrpDepartamento(DropDown dd) { + this.drpDepartamento = dd; + } + + private HiddenField hidAnchor = new HiddenField(); + + public HiddenField getHidAnchor() { + return hidAnchor; + } + + public void setHidAnchor(HiddenField hf) { + this.hidAnchor = hf; + } + + private PanelGroup groupPanel62 = new PanelGroup(); + + public PanelGroup getGroupPanel62() { + return groupPanel62; + } + + public void setGroupPanel62(PanelGroup pg) { + this.groupPanel62 = pg; + } + + private StaticText staticText164 = new StaticText(); + + public StaticText getStaticText164() { + return staticText164; + } + + public void setStaticText164(StaticText st) { + this.staticText164 = st; + } + + private StaticText staticText167 = new StaticText(); + + public StaticText getStaticText167() { + return staticText167; + } + + public void setStaticText167(StaticText st) { + this.staticText167 = st; + } + + private PanelGroup groupPanel63 = new PanelGroup(); + + public PanelGroup getGroupPanel63() { + return groupPanel63; + } + + public void setGroupPanel63(PanelGroup pg) { + this.groupPanel63 = pg; + } + + private StaticText staticText171 = new StaticText(); + + public StaticText getStaticText171() { + return staticText171; + } + + public void setStaticText171(StaticText st) { + this.staticText171 = st; + } + + private StaticText stTecnicoNome = new StaticText(); + + public StaticText getStTecnicoNome() { + return stTecnicoNome; + } + + public void setStTecnicoNome(StaticText st) { + this.stTecnicoNome = st; + } + + private StaticText staticText172 = new StaticText(); + + public StaticText getStaticText172() { + return staticText172; + } + + public void setStaticText172(StaticText st) { + this.staticText172 = st; + } + + private StaticText staticText173 = new StaticText(); + + public StaticText getStaticText173() { + return staticText173; + } + + public void setStaticText173(StaticText st) { + this.staticText173 = st; + } + + private StaticText txtCap1 = new StaticText(); + + public StaticText getTxtCap1() { + return txtCap1; + } + + public void setTxtCap1(StaticText st) { + this.txtCap1 = st; + } + + private PanelGroup groupPanel64 = new PanelGroup(); + + public PanelGroup getGroupPanel64() { + return groupPanel64; + } + + public void setGroupPanel64(PanelGroup pg) { + this.groupPanel64 = pg; + } + + private StaticText staticText174 = new StaticText(); + + public StaticText getStaticText174() { + return staticText174; + } + + public void setStaticText174(StaticText st) { + this.staticText174 = st; + } + + private StaticText stMedicoNome = new StaticText(); + + public StaticText getStMedicoNome() { + return stMedicoNome; + } + + public void setStMedicoNome(StaticText st) { + this.stMedicoNome = st; + } + + private StaticText staticText175 = new StaticText(); + + public StaticText getStaticText175() { + return staticText175; + } + + public void setStaticText175(StaticText st) { + this.staticText175 = st; + } + + private StaticText staticText176 = new StaticText(); + + public StaticText getStaticText176() { + return staticText176; + } + + public void setStaticText176(StaticText st) { + this.staticText176 = st; + } + + private StaticText txtCedula1 = new StaticText(); + + public StaticText getTxtCedula1() { + return txtCedula1; + } + + public void setTxtCedula1(StaticText st) { + this.txtCedula1 = st; + } + + private HtmlPanelGrid gridPanel14 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel14() { + return gridPanel14; + } + + public void setGridPanel14(HtmlPanelGrid hpg) { + this.gridPanel14 = hpg; + } + + private StaticText staticText15 = new StaticText(); + + public StaticText getStaticText15() { + return staticText15; + } + + public void setStaticText15(StaticText st) { + this.staticText15 = st; + } + + private com.sun.rave.web.ui.component.Calendar calDataOcorrencia = new com.sun.rave.web.ui.component.Calendar(); + + public com.sun.rave.web.ui.component.Calendar getCalDataOcorrencia() { + return calDataOcorrencia; + } + + public void setCalDataOcorrencia(com.sun.rave.web.ui.component.Calendar c) { + this.calDataOcorrencia = c; + } + + private PanelGroup groupPanel9 = new PanelGroup(); + + public PanelGroup getGroupPanel9() { + return groupPanel9; + } + + public void setGroupPanel9(PanelGroup pg) { + this.groupPanel9 = pg; + } + + private StaticText staticText71 = new StaticText(); + + public StaticText getStaticText71() { + return staticText71; + } + + public void setStaticText71(StaticText st) { + this.staticText71 = st; + } + + private DropDown drpHours = new DropDown(); + + public DropDown getDrpHours() { + return drpHours; + } + + public void setDrpHours(DropDown dd) { + this.drpHours = dd; + } + + private StaticText staticText72 = new StaticText(); + + public StaticText getStaticText72() { + return staticText72; + } + + public void setStaticText72(StaticText st) { + this.staticText72 = st; + } + + private DropDown drpMinutes = new DropDown(); + + public DropDown getDrpMinutes() { + return drpMinutes; + } + + public void setDrpMinutes(DropDown dd) { + this.drpMinutes = dd; + } + + private PanelGroup groupPanel8 = new PanelGroup(); + + public PanelGroup getGroupPanel8() { + return groupPanel8; + } + + public void setGroupPanel8(PanelGroup pg) { + this.groupPanel8 = pg; + } + + private StaticText staticText14 = new StaticText(); + + public StaticText getStaticText14() { + return staticText14; + } + + public void setStaticText14(StaticText st) { + this.staticText14 = st; + } + + private StaticText stNomeAcidentado = new StaticText(); + + public StaticText getStNomeAcidentado() { + return stNomeAcidentado; + } + + public void setStNomeAcidentado(StaticText st) { + this.stNomeAcidentado = st; + } + + private PanelGroup groupPanel15 = new PanelGroup(); + + public PanelGroup getGroupPanel15() { + return groupPanel15; + } + + public void setGroupPanel15(PanelGroup pg) { + this.groupPanel15 = pg; + } + + private StaticText staticText70 = new StaticText(); + + public StaticText getStaticText70() { + return staticText70; + } + + public void setStaticText70(StaticText st) { + this.staticText70 = st; + } + + private StaticText stEstabelecimentoOrigem1 = new StaticText(); + + public StaticText getStEstabelecimentoOrigem1() { + return stEstabelecimentoOrigem1; + } + + public void setStEstabelecimentoOrigem1(StaticText st) { + this.stEstabelecimentoOrigem1 = st; + } + + private PanelGroup groupPanel16 = new PanelGroup(); + + public PanelGroup getGroupPanel16() { + return groupPanel16; + } + + public void setGroupPanel16(PanelGroup pg) { + this.groupPanel16 = pg; + } + + private StaticText staticText74 = new StaticText(); + + public StaticText getStaticText74() { + return staticText74; + } + + public void setStaticText74(StaticText st) { + this.staticText74 = st; + } + + private StaticText stDataNascimento = new StaticText(); + + public StaticText getStDataNascimento() { + return stDataNascimento; + } + + public void setStDataNascimento(StaticText st) { + this.stDataNascimento = st; + } + + private PanelGroup groupPanel65 = new PanelGroup(); + + public PanelGroup getGroupPanel65() { + return groupPanel65; + } + + public void setGroupPanel65(PanelGroup pg) { + this.groupPanel65 = pg; + } + + private StaticText staticText75 = new StaticText(); + + public StaticText getStaticText75() { + return staticText75; + } + + public void setStaticText75(StaticText st) { + this.staticText75 = st; + } + + private StaticText stBI = new StaticText(); + + public StaticText getStBI() { + return stBI; + } + + public void setStBI(StaticText st) { + this.stBI = st; + } + + private PanelGroup groupPanel66 = new PanelGroup(); + + public PanelGroup getGroupPanel66() { + return groupPanel66; + } + + public void setGroupPanel66(PanelGroup pg) { + this.groupPanel66 = pg; + } + + private StaticText staticText77 = new StaticText(); + + public StaticText getStaticText77() { + return staticText77; + } + + public void setStaticText77(StaticText st) { + this.staticText77 = st; + } + + private StaticText stMorada = new StaticText(); + + public StaticText getStMorada() { + return stMorada; + } + + public void setStMorada(StaticText st) { + this.stMorada = st; + } + + private StaticText staticText79 = new StaticText(); + + public StaticText getStaticText79() { + return staticText79; + } + + public void setStaticText79(StaticText st) { + this.staticText79 = st; + } + + private StaticText stCodPostal = new StaticText(); + + public StaticText getStCodPostal() { + return stCodPostal; + } + + public void setStCodPostal(StaticText st) { + this.stCodPostal = st; + } + + private PanelGroup groupPanel67 = new PanelGroup(); + + public PanelGroup getGroupPanel67() { + return groupPanel67; + } + + public void setGroupPanel67(PanelGroup pg) { + this.groupPanel67 = pg; + } + + private StaticText staticText80 = new StaticText(); + + public StaticText getStaticText80() { + return staticText80; + } + + public void setStaticText80(StaticText st) { + this.staticText80 = st; + } + + private StaticText stContactoTelefonico = new StaticText(); + + public StaticText getStContactoTelefonico() { + return stContactoTelefonico; + } + + public void setStContactoTelefonico(StaticText st) { + this.stContactoTelefonico = st; + } + + private PanelGroup groupPanel68 = new PanelGroup(); + + public PanelGroup getGroupPanel68() { + return groupPanel68; + } + + public void setGroupPanel68(PanelGroup pg) { + this.groupPanel68 = pg; + } + + private StaticText staticText81 = new StaticText(); + + public StaticText getStaticText81() { + return staticText81; + } + + public void setStaticText81(StaticText st) { + this.staticText81 = st; + } + + private StaticText stDataAdmissao1 = new StaticText(); + + public StaticText getStDataAdmissao1() { + return stDataAdmissao1; + } + + public void setStDataAdmissao1(StaticText st) { + this.stDataAdmissao1 = st; + } + + private PanelGroup groupPanel69 = new PanelGroup(); + + public PanelGroup getGroupPanel69() { + return groupPanel69; + } + + public void setGroupPanel69(PanelGroup pg) { + this.groupPanel69 = pg; + } + + private StaticText staticText82 = new StaticText(); + + public StaticText getStaticText82() { + return staticText82; + } + + public void setStaticText82(StaticText st) { + this.staticText82 = st; + } + + private StaticText stFuncao1 = new StaticText(); + + public StaticText getStFuncao1() { + return stFuncao1; + } + + public void setStFuncao1(StaticText st) { + this.stFuncao1 = st; + } + + private PanelGroup groupPanel70 = new PanelGroup(); + + public PanelGroup getGroupPanel70() { + return groupPanel70; + } + + public void setGroupPanel70(PanelGroup pg) { + this.groupPanel70 = pg; + } + + private StaticText staticText83 = new StaticText(); + + public StaticText getStaticText83() { + return staticText83; + } + + public void setStaticText83(StaticText st) { + this.staticText83 = st; + } + + private StaticText stTurno = new StaticText(); + + public StaticText getStTurno() { + return stTurno; + } + + public void setStTurno(StaticText st) { + this.stTurno = st; + } + + private PanelGroup groupPanel71 = new PanelGroup(); + + public PanelGroup getGroupPanel71() { + return groupPanel71; + } + + public void setGroupPanel71(PanelGroup pg) { + this.groupPanel71 = pg; + } + + private StaticText staticText84 = new StaticText(); + + public StaticText getStaticText84() { + return staticText84; + } + + public void setStaticText84(StaticText st) { + this.staticText84 = st; + } + + private StaticText staticText85 = new StaticText(); + + public StaticText getStaticText85() { + return staticText85; + } + + public void setStaticText85(StaticText st) { + this.staticText85 = st; + } + + private PanelGroup groupPanel72 = new PanelGroup(); + + public PanelGroup getGroupPanel72() { + return groupPanel72; + } + + public void setGroupPanel72(PanelGroup pg) { + this.groupPanel72 = pg; + } + + private StaticText staticText86 = new StaticText(); + + public StaticText getStaticText86() { + return staticText86; + } + + public void setStaticText86(StaticText st) { + this.staticText86 = st; + } + + private StaticText stMedico = new StaticText(); + + public StaticText getStMedico() { + return stMedico; + } + + public void setStMedico(StaticText st) { + this.stMedico = st; + } + + private StaticText staticText87 = new StaticText(); + + public StaticText getStaticText87() { + return staticText87; + } + + public void setStaticText87(StaticText st) { + this.staticText87 = st; + } + + private StaticText staticText92 = new StaticText(); + + public StaticText getStaticText92() { + return staticText92; + } + + public void setStaticText92(StaticText st) { + this.staticText92 = st; + } + + private StaticText txtCedula = new StaticText(); + + public StaticText getTxtCedula() { + return txtCedula; + } + + public void setTxtCedula(StaticText st) { + this.txtCedula = st; + } + + private PanelGroup groupPanel4 = new PanelGroup(); + + public PanelGroup getGroupPanel4() { + return groupPanel4; + } + + public void setGroupPanel4(PanelGroup pg) { + this.groupPanel4 = pg; + } + + private StaticText staticText7 = new StaticText(); + + public StaticText getStaticText7() { + return staticText7; + } + + public void setStaticText7(StaticText st) { + this.staticText7 = st; + } + + private TextField txtHorasTurno = new TextField(); + + public TextField getTxtHorasTurno() { + return txtHorasTurno; + } + + public void setTxtHorasTurno(TextField tf) { + this.txtHorasTurno = tf; + } + + private HiddenField hidConfEnviar = new HiddenField(); + + public HiddenField getHidConfEnviar() { + return hidConfEnviar; + } + + public void setHidConfEnviar(HiddenField hf) { + this.hidConfEnviar = hf; + } + private StaticText lblUser = new StaticText(); + + public StaticText getLblUser() { + return lblUser; + } + + public void setLblUser(StaticText st) { + this.lblUser = st; + } + /** + *

Construct a new Page bean instance.

+ */ + public AnaliseAcidenteTrabalho() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + @Override + public void init() + { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("AnaliseAcidenteTrabalho Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + + if (!getSessionBean1().isLoggedIn()) { + try { + getExternalContext().redirect("Login.jsp"); + } catch(Exception e) { + // . . . handle exception . . . + } + } + else + { + + initCalendars(); + + HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom(referer); + if(!pageFrom.matches("AnaliseAcidenteTrabalho.jsp")) + { + if(pageFrom.matches("LoadImage.jsp")) + { + restorePageState(); + //if(getSessionBean1().getImageName() != null) + //{ + fillImages(); + //} + } + else + { + String tmpImageFolder = Global.IMAGE_FOLDER + "/tmp" + getSessionBean1().getCurrentUser().getLogin(); + File tmpFolder = new File(tmpImageFolder); + if(tmpFolder.exists()) + { + Global global = new Global(); + global.deleteFolderFiles(tmpFolder); + tmpFolder.delete(); + } + + lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); + getSessionBean1().setGravado(false); + getSessionBean1().setSubmetido(false); + getSessionBean1().setIeBug(false); + //drpTecnicos.setSelected(new Integer(0)); + //drpMedicos.setSelected(new Integer(0)); + if(getSessionBean1().getCurrentAnalise() == null) // new analise + { + getSessionBean1().setAcidentado(null); // Here ????? + lnkLblTrabalhador.setDisabled(true); + lnkLblTrabalhador.setStyleClass(""); + initializePage(); + } + else // edit analise + { + lnkLblTrabalhador.setDisabled(false); + lnkLblTrabalhador.setStyleClass("labelTrabalhador"); + gridTrabalhadores.setRendered(false); + + fillPage(); + } + + } + } + + } + + + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + @Override + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + @Override + public void prerender() { + txtMsg.setText(getSessionBean1().getMsg()); + getSessionBean1().setMsg(""); + + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + @Override + public void destroy() { + + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + public String lnkLogout_action() + { + getSessionBean1().setIeBug( true ); + Utils.doLogout( getExternalContext(), true ); + + return null; + } + + + private void initializePage() + { + hidAnchor.setValue("none"); + butCorrecao.setRendered(false); + butGravar.setText("Gravar"); + butEnviar.setText("Enviar a RH"); + gridSiprp.setRendered(false); + //gridAcidentadoView.setRendered(false); + gridSiprpView.setRendered(false); + gridAcidentadoView.setRendered(false); + gridDadosAcidenteRh.setRendered(false); + gridDadosAcidenteRhView.setRendered(false); + gridRecomendacoesHS.setRendered(false); + gridRecomendacoesViewHS.setRendered(false); + gridMedidasRH.setRendered(false); + gridMedidasViewRH.setRendered(false); + gridMedico.setRendered(false); + gridMedicoView.setRendered(false); + gridVerificacao.setRendered(false); + gridVerificacaoView.setRendered(false); + gridImpressao.setRendered(false); + gridImpressaoView.setRendered(false); + + tblTrabalhadores.setRendered(false); + gridAcidentado.setRendered(false); + gridDadosAcidenteSeg.setRendered(false); + gridDadosAcidenteSegView.setRendered(false); + + butImprimir.setRendered(false); + +// AnalisesDataProvider adp = new AnalisesDataProvider(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + String nome_empresa = adp.getEmpresaNome(getSessionBean1().getCurrentUser().getEmpresa_id()); + txtEmpresa.setText(utils.Utils.unicodeToHTML(nome_empresa)); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + txtEstabelecimento.setText(adp.getEstabelecimentoNome(getSessionBean1().getCurrentUser().getEstabelecimento_id())); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + + drpDepartamento.setSelected(new Integer(0)); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + getSessionBean1().setSeccaoOptions(adp.getSeccoesList(null)); + drpSeccao.setSelected(new Integer(0)); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + +// fillTrabalhadoresTable(); + +// Calendar c = Calendar.getInstance(); +// SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd"); +// stDataAcidente.setText(dateFormat.format(c.getTime())); + txtAveriguador.setText( getSessionBean1().getCurrentUser().getNome() ); + java.util.Date today = + new java.util.Date(); + calDataOcorrencia.setValue(today); + + //drpMedicos.setSelected(new Integer(0)); +// UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + Medico m = udp.getMedico( getSessionBean1().getCurrentUser().getEstabelecimento_id() ); + getSessionBean1().setMedico( m ); + if(m != null) + { + stMedico.setText(m.getNome() + "  "); + txtCedula.setText(m.getNumero_cedula()); + } + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + drpHours.setSelected(new Integer(-1)); + drpMinutes.setSelected(new Integer(-1)); + drpDepartamento.setSelected(new Integer(0)); + drpSeccao.setSelected(new Integer(0)); + drpCausas.setSelected(new Integer(0)); + } + +// private void fillTrabalhadoresTable() +// { +// AnalisesDataProvider adp = new AnalisesDataProvider(); +// try +// { +// //lblActivos.setRendered(true); +// table1.setRendered(true); +// +// ArrayList trabalhadoresList = adp.getTrabalhadoresListByEstabelecimento(getSessionBean1().getCurrentUser().getEstabelecimento_id()); +// getSessionBean1().getTrabalhadoresListDataProvider().setList(trabalhadoresList); +// } +// catch(Exception ex) +// { +// //lblActivos.setRendered(false); +// table1.setRendered(false); +// ErrorLogger.logException( ex ); +// } +// } + + private String fillPage() + { + AnaliseAcidente a = getSessionBean1().getCurrentAnalise(); + + //correcao + if(a.getCorrecao().matches("y")) + { + stObservacoesCorr.setText(a.getObservacoes_correcao()); + } + else + { + stObservacoesCorr.setRendered(false); + } + + + stHeaderNr.setText(a.getAnalise_nr()); + try + { + java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime()); + stHeaderDate.setText(utils.Utils.dateToYYYYMMDD(ddate)); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } +// AnalisesDataProvider adp = new AnalisesDataProvider(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + String nome_empresa = adp.getEmpresaNome(a.getEmpresa_id()); + txtEmpresa.setText(utils.Utils.unicodeToHTML(nome_empresa)); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + txtEstabelecimento.setText(adp.getEstabelecimentoNome(a.getEstabelecimento_id())); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + Acidentado ac = null; + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //Trabalhador t = adp.getTrabalhador(a.getTrabalhador_id()); + //txtDataNascimento.setText(t.getData_nascimento()); + ac = adp.getAcidentado(a.getAcidentado_id()); + txtTrabalhador.setText(ac.getNome()); + getSessionBean1().setAcidentado(ac); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + + int estado_documento = a.getEstado().intValue(); +// if(estado_documento != Global.ESTADO_IMPRESSAO) +//// if(estado_documento != Global.ESTADO_ASSINATURAS || (estado_documento == Global.ESTADO_ASSINATURAS && getSessionBean1().getCurrentUser().getTipo().intValue() != Global.TIPO_UTILIZADOR_RH)) +//// { +//// butImprimir.setRendered(false); +//// } +//// else +//// { +//// butGravar.setRendered(false); +//// } + butImprimir.setRendered(false); + + if(estado_documento > Global.ESTADO_SEG && getSessionBean1().getCurrentUser().getTipo().intValue() == 1 && a.getAveriguacao_posterior().matches("y")) + { + boolean booAveriguacao = false; + if(a.getAveriguacao_obs() == null) + { + booAveriguacao = true; + } + else if(a.getAveriguacao_obs().trim().length() == 0) + { + booAveriguacao = true; + } + if(booAveriguacao) + { + butCorrecao.setRendered(false); + butGravar.setText("Gravar"); + butEnviar.setRendered(false); + gridSiprp.setRendered(false); + //gridSiprpView.setRendered(false); + gridAcidentado.setRendered(false); //19/11/2007 + gridAcidentadoView.setRendered(false); //19/11/2007 + gridDadosAcidenteSeg.setRendered(false); //19/11/2007 + //gridDadosAcidenteSegView.setRendered(false); //19/11/2007 + gridDadosAcidenteRh.setRendered(false); + gridDadosAcidenteRhView.setRendered(false); + gridRecomendacoesHS.setRendered(false); + gridRecomendacoesViewHS.setRendered(false); + gridMedidasRH.setRendered(false); + gridMedidasViewRH.setRendered(false); + gridMedico.setRendered(false); + gridMedicoView.setRendered(false); + gridVerificacao.setRendered(false); + gridVerificacaoView.setRendered(false); + gridImpressao.setRendered(false); + gridImpressaoView.setRendered(false); + + // fillSiprp(a); + // fillDadosAcidenteSegView(a); + fillSiprpView(a); + if(ac != null) + { + fillAcidentadoView(ac); + } + fillDadosAcidenteSegView(a); + + return null; + } + + } + + + switch(estado_documento) + { + case Global.ESTADO_SEG: + butCorrecao.setRendered(false); + butGravar.setText("Gravar"); + if(a.getCorrecao().matches("y")) + { + butEnviar.setText("Enviar a Recomendações SHST"); + } + else + { + butEnviar.setText("Enviar a Acompanhamento RH"); + } + gridSiprpView.setRendered(false); + gridAcidentado.setRendered(false); //19/11/2007 + //gridAcidentadoView.setRendered(false); //19/11/2007 + gridDadosAcidenteSegView.setRendered(false); //19/11/2007 + gridDadosAcidenteRh.setRendered(false); + gridDadosAcidenteRhView.setRendered(false); + gridRecomendacoesHS.setRendered(false); + gridRecomendacoesViewHS.setRendered(false); + gridMedidasRH.setRendered(false); + gridMedidasViewRH.setRendered(false); + gridMedico.setRendered(false); + gridMedicoView.setRendered(false); + gridVerificacao.setRendered(false); + gridVerificacaoView.setRendered(false); + gridImpressao.setRendered(false); + gridImpressaoView.setRendered(false); + + fillSiprp(a); + fillAcidentadoView(ac); + fillDadosAcidenteSeg(a); + break; + case Global.ESTADO_RH1: + butCorrecao.setRendered(false); + butGravar.setText("Gravar"); + butEnviar.setText("Enviar a Recomendações SHST"); + gridSiprpView.setRendered(false); + gridAcidentadoView.setRendered(false); + gridDadosAcidenteSeg.setRendered(false); //19/11/2007 + gridDadosAcidenteRhView.setRendered(false); + gridRecomendacoesHS.setRendered(false); + gridRecomendacoesViewHS.setRendered(false); + gridMedidasRH.setRendered(false); + gridMedidasViewRH.setRendered(false); + gridMedico.setRendered(false); + gridMedicoView.setRendered(false); + gridVerificacao.setRendered(false); + gridVerificacaoView.setRendered(false); + gridImpressao.setRendered(false); + gridImpressaoView.setRendered(false); + + if(ac != null) + { + fillAcidentado(ac); + } + fillSiprp(a); + fillDadosAcidenteSegView(a); + fillDadosAcidenteRh(a); + break; + case Global.ESTADO_HS: + butGravar.setText("Gravar"); + butEnviar.setText("Enviar a Medidas RH"); + //gridSiprpView.setRendered(false); + gridSiprp.setRendered(false); + gridAcidentado.setRendered(false); + //gridAcidentadoView.setRendered(false); + gridDadosAcidenteSeg.setRendered(false); + gridDadosAcidenteRh.setRendered(false); + gridRecomendacoesViewHS.setRendered(false); + gridMedidasRH.setRendered(false); + gridMedidasViewRH.setRendered(false); + gridMedico.setRendered(false); + gridMedicoView.setRendered(false); + gridVerificacao.setRendered(false); + gridVerificacaoView.setRendered(false); + gridImpressao.setRendered(false); + gridImpressaoView.setRendered(false); + + fillSiprpView(a); + if(ac != null) + { + fillAcidentadoView(ac); + } + fillDadosAcidenteSegView(a); + fillDadosAcidenteRhView(a); + fillRecomendacoesHs(a); + //gridDadosAcidenteRhView.setRendered(false); + //gridRecomendacoesHS.setRendered(false); + break; + case Global.ESTADO_RH2: + butCorrecao.setRendered(false); + butGravar.setText("Gravar"); + //butEnviar.setText("Enviar a Médico"); +// if(a.getCorrecao().matches("y")) +// { +// butEnviar.setText("Enviar a Consolidação"); +// } +// else +// { +// butEnviar.setText("Enviar a Medicina"); +// } + butEnviar.setText("Enviar a Consolidação"); + + //butEnviar.setText("Enviar a Medicina"); + //gridSiprpView.setRendered(false); + gridSiprp.setRendered(false); + gridAcidentado.setRendered(false); + //gridAcidentadoView.setRendered(false); + gridDadosAcidenteSeg.setRendered(false); + gridDadosAcidenteRh.setRendered(false); + gridRecomendacoesHS.setRendered(false); + //gridRecomendacoesViewHS.setRendered(false); + gridMedidasViewRH.setRendered(false); + //gridMedico.setRendered(false); + gridMedicoView.setRendered(false); + gridVerificacao.setRendered(false); + gridVerificacaoView.setRendered(false); + gridImpressao.setRendered(false); + gridImpressaoView.setRendered(false); + + fillSiprpView(a); + if(ac != null) + { + fillAcidentadoView(ac); + } + fillDadosAcidenteSegView(a); + fillDadosAcidenteRhView(a); + fillRecomendacoesViewHs(a); + //fillMedico(a); //19/11/2007 + fillMedidasRh(a); + fillMedico(a); //23/11/2007 + break; +// case Global.ESTADO_MEDICINA: +// butCorrecao.setRendered(false); +// butGravar.setText("Gravar"); +// butEnviar.setText("Enviar a Consolidação"); +// //gridSiprpView.setRendered(false); +// gridSiprp.setRendered(false); +// gridAcidentado.setRendered(false); +// //gridAcidentadoView.setRendered(false); +// gridDadosAcidenteSeg.setRendered(false); +// gridDadosAcidenteRh.setRendered(false); +// gridRecomendacoesHS.setRendered(false); +// //gridRecomendacoesViewHS.setRendered(false); +// gridMedidasRH.setRendered(false); +// //gridMedidasViewRH.setRendered(false); +// //gridMedico.setRendered(false); +// gridMedicoView.setRendered(false); +// gridVerificacao.setRendered(false); +// gridVerificacaoView.setRendered(false); +// gridImpressao.setRendered(false); +// gridImpressaoView.setRendered(false); +// +// fillSiprpView(a); +// if(ac != null) +// { +// fillAcidentadoView(ac); +// } +// fillDadosAcidenteSegView(a); +// fillDadosAcidenteRhView(a); +// fillRecomendacoesViewHs(a); +// fillMedidasViewRh(a); +// fillMedico(a); //23/11/2007 +// break; + case Global.ESTADO_CONSOLIDACAO: + //butGravar.setText("Gravar"); + butGravar.setRendered(false); + butEnviar.setText("Enviar a Verificação"); + hidDisableEnviar.setValue("n"); +// boolean booAveriguacao = false; +// if(a.getAveriguacao_posterior().matches("y")) +// { +// if(a.getAveriguacao_obs() == null) +// { +// booAveriguacao = true; +// } +// else if(a.getAveriguacao_obs().trim().length() == 0) +// { +// booAveriguacao = true; +// } +// if(booAveriguacao) +// { +// hidDisableEnviar.setValue("y"); +// } +// +// } + gridSiprp.setRendered(false); + gridAcidentado.setRendered(false); + //gridAcidentadoView.setRendered(false); + gridDadosAcidenteSeg.setRendered(false); + gridDadosAcidenteRh.setRendered(false); + gridRecomendacoesHS.setRendered(false); + //gridRecomendacoesViewHS.setRendered(false); + gridMedidasRH.setRendered(false); + //gridMedidasViewRH.setRendered(false); + gridMedico.setRendered(false); + //gridMedicoView.setRendered(false); + //gridVerificacao.setRendered(false); + java.util.Date ddate = new java.util.Date(); + stVerHs.setText("Tomei conhecimento a " + utils.Utils.dateToYYYYMMDD(ddate)); + grpVerRespSeg.setRendered(false); + grpVerRespRh.setRendered(false); + butGravar.setDisabled(true); + butEnviar.setDisabled(true); + gridVerificacaoView.setRendered(false); + gridImpressao.setRendered(false); + gridImpressaoView.setRendered(false); + + fillSiprpView(a); + if(ac != null) + { + fillAcidentadoView(ac); + } + fillDadosAcidenteSegView(a); + fillDadosAcidenteRhView(a); + fillRecomendacoesViewHs(a); + fillMedidasViewRh(a); + fillMedicoView(a); //23/11/2007 + break; + case Global.ESTADO_ASSINATURA_SEG: + butImprimir.setRendered(false); + butCorrecao.setRendered(false); + butEnviar.setText("Enviar a RH"); + //butGravar.setText("Enviar"); + butGravar.setRendered(false); + gridSiprp.setRendered(false); + gridAcidentado.setRendered(false); + gridDadosAcidenteSeg.setRendered(false); + gridDadosAcidenteRh.setRendered(false); + gridRecomendacoesHS.setRendered(false); + gridRecomendacoesViewHS.setRendered(false); + gridMedidasRH.setRendered(false); + //gridMedidasViewRH.setRendered(false); + gridMedico.setRendered(false); + //gridMedicoView.setRendered(false); + //gridVerificacaoView.setRendered(false); + gridImpressao.setRendered(false); + gridImpressaoView.setRendered(false); + grpVerRespSeg.setRendered(true); + grpVerHs.setRendered(false); + grpVerRespRh.setRendered(false); + //chkVerRespRh.setDisabled(true); + ddate = new java.util.Date(); + stVerRespSeg.setText("Tomei conhecimento a " + utils.Utils.dateToYYYYMMDD(ddate)); + + fillSiprpView(a); + if(ac != null) + { + fillAcidentadoView(ac); + } + fillDadosAcidenteSegView(a); + fillDadosAcidenteRhView(a); + fillMedidasViewRh(a); + fillMedicoView(a); + fillVerificacaoView(a); + fillVerificacao(a); + + break; + case Global.ESTADO_ASSINATURA_RH: + butGravar.setRendered(false); + //butGravar.setText("Imprimir"); + butCorrecao.setRendered(false); + butImprimir.setRendered(false); + butEnviar.setText("Enviar a Conclusão"); + gridSiprp.setRendered(false); + gridAcidentado.setRendered(false); + gridDadosAcidenteSeg.setRendered(false); + gridDadosAcidenteRh.setRendered(false); + gridRecomendacoesHS.setRendered(false); + gridMedidasRH.setRendered(false); + gridMedico.setRendered(false); + //gridMedicoView.setRendered(false); + //gridVerificacaoView.setRendered(false); + gridImpressao.setRendered(false); + gridImpressaoView.setRendered(false); + grpVerRespRh.setRendered(true); + grpVerHs.setRendered(false); + grpVerRespSeg.setRendered(false); + //chkVerRespSeg.setDisabled(true); + ddate = new java.util.Date(); + stVerRespRh.setText("Tomei conhecimento a " + utils.Utils.dateToYYYYMMDD(ddate)); + + fillSiprpView(a); + if(ac != null) + { + fillAcidentadoView(ac); + } + fillDadosAcidenteSegView(a); + fillDadosAcidenteRhView(a); + fillRecomendacoesViewHs(a); + fillMedidasViewRh(a); + fillMedicoView(a); + fillVerificacaoView(a); + fillVerificacao(a); + break; + + case Global.ESTADO_FECHAR: + butCorrecao.setRendered(false); + butGravar.setRendered(false); + butGravar.setText("Gravar"); + butEnviar.setText("Fechar"); + gridSiprp.setRendered(false); + gridAcidentado.setRendered(false); + gridDadosAcidenteSeg.setRendered(false); + gridDadosAcidenteRh.setRendered(false); + gridRecomendacoesHS.setRendered(false); + gridMedidasRH.setRendered(false); + gridMedico.setRendered(false); + gridVerificacao.setRendered(false); + gridImpressao.setRendered(false); + gridImpressaoView.setRendered(false); + fillSiprpView(a); + if(ac != null) + { + fillAcidentadoView(ac); + } + fillDadosAcidenteSegView(a); + fillDadosAcidenteRhView(a); + fillRecomendacoesViewHs(a); + fillMedidasViewRh(a); + //fillMedico(a); + fillMedicoView(a); + fillVerificacaoView(a); + //fillImpressaoView(a); + break; + case Global.ESTADO_CONCLUIDO: + } + + return null; + } + + private void fillSiprp(AnaliseAcidente a) + { + //drpTecnicos.setSelected(a.getTecnico_saude_id()); + //drpMedicos.setSelected(a.getMedico_id()); +// UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + Utilizador u = udp.getUtilizador(a.getTecnico_saude_id()); + txtCap.setText(u.getCap()); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + Utilizador u = udp.getUtilizador( a.getMedico_id() ); + stMedico.setText(u.getNome() + "  "); + txtCedula.setText( u.getNumero_cedula() ); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + } + + private void fillSiprpView(AnaliseAcidente a) + { + if(a.getEstado().intValue() == Global.ESTADO_HS) + { + if(a.getTecnico_saude_id().equals(new Integer(0))) + { + a.setTecnico_saude_id( getSessionBean1().getCurrentUser().getId()); + } + } + + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + + Utilizador u = udp.getUtilizador(a.getTecnico_saude_id()); + stTecnicoNome.setText(Utils.unicodeToHTML(u.getNome())); + txtCap1.setText(u.getCap()); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + + Utilizador u = udp.getUtilizador(a.getMedico_id()); + stMedicoNome.setText(Utils.unicodeToHTML(u.getNome())); + txtCedula1.setText(u.getNumero_cedula()); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + + private void fillAcidentado(Acidentado a) + { + txtNomeAcidentado.setText(a.getNome()); + stEstabelecimentoOrigem.setText(a.getEstabelecimento_origem()); + //txtDataNascimento.setText(a.getData_nascimento()); + try + { + java.util.Date ddate = new java.util.Date(a.getData_nascimento().getTime()); + txtDataNascimento.setText(utils.Utils.dateToYYYYMMDD(ddate)); + } + catch(Exception ex) + { + + } + txtBI.setText(a.getBilhete_identidade()); + txtMorada.setText(a.getMorada()); + String cod_postal1 = ""; + String cod_postal2 = ""; + try + { + cod_postal1 = a.getCod_postal().substring(0, 4); + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + try + { + cod_postal2 = a.getCod_postal().substring(5, 8); + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + + + txtCodPostal1.setText(cod_postal1); + txtCodPostal2.setText(cod_postal2); + txtLocalidade.setText(a.getLocalidade()); + txtContactoTelefonico.setText(a.getContacto_telefonico()); + try + { + java.util.Date ddate = new java.util.Date(a.getData_admissao().getTime()); + stDataAdmissao.setText(utils.Utils.dateToYYYYMMDD(ddate)); + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + + stFuncao.setText(a.getFuncao()); + rbTurnoManha.setSelected(null); + rbTurnoTarde.setSelected(null); + rbTurnoNoite.setSelected(null); + if(a.getTurno().matches("m")) + { + rbTurnoManha.setSelected(new Boolean(true)); + } + else if(a.getTurno().matches("t")) + { + rbTurnoTarde.setSelected(new Boolean(true)); + } + else if(a.getTurno().matches("n")) + { + rbTurnoNoite.setSelected(new Boolean(true)); + } + + txtNomeSuperior.setText(a.getNome_superior_hierarquico()); + txtEmailSuperior.setText(a.getEmail_superior_hierarquico()); + + } + + private void fillAcidentadoView(Acidentado a) + { + stNomeAcidentado.setText(a.getNome()); + stEstabelecimentoOrigem1.setText(a.getEstabelecimento_origem()); + //stDataNascimento.setText(a.getData_nascimento()); + try + { + java.util.Date ddate = new java.util.Date( a.getData_nascimento().getTime() ); + stDataNascimento.setText( utils.Utils.dateToYYYYMMDD( ddate ) ); + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + stBI.setText(a.getBilhete_identidade()); + stMorada.setText(a.getMorada()); + String cod_postal1 = ""; + String cod_postal2 = ""; + try + { + cod_postal1 = a.getCod_postal().substring(0, 4); + } + catch(Exception ex) + { + cod_postal1 = ""; + } + try + { + cod_postal2 = a.getCod_postal().substring(5, 8); + } + catch(Exception ex) + { + cod_postal2 = ""; + } + + //String cod_postal1 = a.getCod_postal().substring(0, 4); + //String cod_postal2 = a.getCod_postal().substring(5, 8); + if(a.getLocalidade() == null) + { + a.setLocalidade(""); + } + String cod_postal = cod_postal1 + "-" + cod_postal2 + " " + a.getLocalidade(); + stCodPostal.setText(cod_postal); + stContactoTelefonico.setText(a.getContacto_telefonico()); + //stDataAdmissao1.setText(a.getData_admissao()); + + try + { + java.util.Date ddate = new java.util.Date( a.getData_admissao().getTime() ); + stDataAdmissao1.setText( utils.Utils.dateToYYYYMMDD( ddate ) ); + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + + stFuncao1.setText(a.getFuncao()); + String turno_str = ""; + if(a.getTurno() != null) + { + if(a.getTurno().matches("m")) + { + turno_str = "manhã"; + } + else if(a.getTurno().matches("t")) + { + turno_str += "tarde "; + } + else if(a.getTurno().matches("n")) + { + turno_str += "noite"; + } + } + + stTurno.setText(turno_str); + stNomeSuperior.setText(a.getNome_superior_hierarquico()); + stEmailSuperior.setText(a.getEmail_superior_hierarquico()); + } + + private void fillDadosAcidenteSeg(AnaliseAcidente a) + { + //stDataAcidente.setText(a.getData_acidente()); +// try +// { +// java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime()); +// stDataAcidente.setText(utils.Utils.dateToYYYYMMDD(ddate)); +// } +// catch(Exception ex){}; + if(a.getAveriguador() == null) + { + txtAveriguador.setText(getSessionBean1().getCurrentUser().getNome()); + } + else + { + txtAveriguador.setText(a.getAveriguador()); + } + + if(a.getData_acidente() != null) + { + java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime()); + calDataOcorrencia.setValue( ddate ); + } + + Calendar cal = Calendar.getInstance(); + + // set the calendar to have your time + try + { + cal.setTimeInMillis(a.getHora_acidente().getTime()); + + int hour = cal.get(Calendar.HOUR_OF_DAY); + int minutes = cal.get(Calendar.MINUTE); + drpHours.setSelected(new Integer(hour)); + drpMinutes.setSelected(new Integer(minutes)); + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + + if(a.getHoras_turno() != null) + { + txtHorasTurno.setText(a.getHoras_turno().toString()); + } + + ////txtSeccao.setText(a.getSeccao()); + +// AnalisesDataProvider adp = new AnalisesDataProvider(); + drpDepartamento.setSelected(a.getDepartamento_id()); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + if(a.getDepartamento_id().intValue() == 0) + { + getSessionBean1().setSeccaoOptions(adp.getSeccoesList(null)); + drpSeccao.setSelected(new Integer(0)); + } + else + { + getSessionBean1().setSeccaoOptions(adp.getSeccoesList(a.getDepartamento_id())); + drpSeccao.setSelected(a.getSeccao_id()); + } + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + + txtLocal.setText(a.getLocal_trabalho()); + txtTarefa.setText(a.getTarefa()); + txtSubstancias.setText(a.getSubstancias()); +// txtSuperior.setText(a.getSuperior_hierarquico()); + txtCondicoes.setText(a.getCondicoes()); + txtTestemunhas.setText(a.getTestemunhas()); +// txtCausas.setText(a.getCausas()); + + drpCausas.setSelected(a.getCausas()); + txtDescricao.setText(a.getDescricao()); + txtConclusoes.setText(a.getConclusoes()); + txtAccoes.setText(a.getAccoes()); + + if(a.getAveriguacao_posterior().matches("y")) + { + chkAveriguacaoPosterior.setSelected(new Boolean(true)); + } + + txtAveriguacaoObs.setText(a.getAveriguacao_obs()); + + //fill images + if(gridImages.getChildren().size() > 0) + { + gridImages.getChildren().clear(); + } + String folderName = getSessionBean1().getCurrentAnalise().getAnalise_nr().substring(0,2) + getSessionBean1().getCurrentAnalise().getAnalise_nr().substring(3); + ServletContext theApplicationsServletContext = + (ServletContext) this.getExternalContext().getContext(); + + File apacheAnaliseFolder = new File(theApplicationsServletContext.getRealPath( Global.RESOURCES_IMAGE_FOLDER ) + "/analises/" + folderName); + if(apacheAnaliseFolder.exists()) + { + Global global = new Global(); + global.deleteFolderFiles(apacheAnaliseFolder); + } + else + { + apacheAnaliseFolder.mkdir(); + } + + +// String imageFileFolder = theApplicationsServletContext.getRealPath(Global.IMAGE_FOLDER + "/" + folderName); + String imageFileFolder = Global.IMAGE_FOLDER + "/" + folderName; + try + { + File f = new File(imageFileFolder); + + if(f.exists()) + { + File images[] = f.listFiles(); + Arrays.sort(images); + for(int i=0;i 0) + { + gridImages.getChildren().clear(); + } + String folderName = a.getAnalise_nr().substring(0,2) + a.getAnalise_nr().substring(3); + ServletContext theApplicationsServletContext = + (ServletContext) this.getExternalContext().getContext(); +// String imageFileFolder = theApplicationsServletContext.getRealPath(Global.IMAGE_FOLDER + "/" + folderName); + + File apacheAnaliseFolder = new File(theApplicationsServletContext.getRealPath( Global.RESOURCES_IMAGE_FOLDER ) + "/analises/" + folderName); + if(apacheAnaliseFolder.exists()) + { + Global global = new Global(); + global.deleteFolderFiles(apacheAnaliseFolder); + System.out.println("FILES DELETED"); + } + else + { + apacheAnaliseFolder.mkdir(); + } + + + String imageFileFolder = Global.IMAGE_FOLDER + "/" + folderName; + try + { + File f = new File(imageFileFolder); + + if(f.exists()) + { + File images[] = f.listFiles(); + Arrays.sort(images); + for(int i=0;i 0) + { + s = new StaticText(); + s.setId("s103"); + s.setEscape(false); + s.setText(a.getNr_relatorio_acidente_colaborador1()); + pg.getChildren().add(s); + } + } + if(a.getNr_relatorio_acidente_colaborador2() != null) + { + if(a.getNr_relatorio_acidente_colaborador2().intValue() > 0) + { + s = new StaticText(); + s.setId("s104"); + s.setEscape(false); + s.setText("  " + a.getNr_relatorio_acidente_colaborador2()); + pg.getChildren().add(s); + } + + } + if(a.getNr_relatorio_acidente_colaborador3() != null) + { + if(a.getNr_relatorio_acidente_colaborador3().intValue() > 0) + { + s = new StaticText(); + s.setId("s105"); + s.setEscape(false); + s.setText("  " + a.getNr_relatorio_acidente_colaborador3()); + pg.getChildren().add(s); + } + } + if(a.getNr_relatorio_acidente_colaborador4() != null) + { + if(a.getNr_relatorio_acidente_colaborador4().intValue() > 0) + { + s = new StaticText(); + s.setId("s106"); + s.setEscape(false); + s.setText("  " + a.getNr_relatorio_acidente_colaborador4()); + pg.getChildren().add(s); + } + } + grd.getChildren().add(pg); + } + gridColaborador.getChildren().add(grd); + } + + } + else if( a.getOutros_acidentes_com_colaborador().matches("n") ) + { + st1.setText("Não se verificaram outras ocorrências/incidências no mesmo posto de trabalho com o colaborador acidentado."); + gridColaborador.getChildren().add(st1); + } + else //t + { + gridColaborador.setRendered(false); + } + + if(a.getAcidentes_outros_colaboradores().matches("y")) + { + st2.setText("Verificaram-se ocorrências/incidentes semelhantes com outros colaboradores."); + gridColaboradores.getChildren().add(st2); + boolean booShow = false; + boolean booShow1 = false; + boolean booShow2 = false; + if(a.getNr_acidentes_outros_colaboradores() != null) + { + booShow = true; + booShow1 = true; + } + if(a.getNr_relatorio_acidente_outros_colaboradores1() != null || a.getNr_relatorio_acidente_outros_colaboradores2() != null || a.getNr_relatorio_acidente_outros_colaboradores3() != null || a.getNr_relatorio_acidente_outros_colaboradores4() != null) + { + booShow = true; + booShow2 = true; + } + + if(booShow) + { + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setId("grdColaboradoresS"); + grd.setColumns(2); + grd.setColumnClasses("gridColLeft15, gridColLeft85"); + if(booShow1) + { + PanelGroup pg = new PanelGroup(); + StaticText s = new StaticText(); + s.setId("s200"); + s.setEscape(false); + s.setText("Total:  "); + pg.getChildren().add(s); + s = new StaticText(); + s.setId("s201"); + s.setEscape(false); + s.setText(a.getNr_acidentes_outros_colaboradores()); + pg.getChildren().add(s); + grd.getChildren().add(pg); + } + if(booShow2) + { + PanelGroup pg = new PanelGroup(); + StaticText s = new StaticText(); + s.setId("s202"); + s.setEscape(false); + s.setText("Relatórios de acidente nº:  "); + pg.getChildren().add(s); + if(a.getNr_relatorio_acidente_outros_colaboradores1() != null) + { + if(a.getNr_relatorio_acidente_outros_colaboradores1().intValue() > 0) + { + s = new StaticText(); + s.setId("s203"); + s.setEscape(false); + s.setText(a.getNr_relatorio_acidente_outros_colaboradores1()); + pg.getChildren().add(s); + } + } + if(a.getNr_relatorio_acidente_outros_colaboradores2() != null) + { + if(a.getNr_relatorio_acidente_outros_colaboradores2().intValue() > 0) + { + s = new StaticText(); + s.setId("s204"); + s.setEscape(false); + s.setText("  " + a.getNr_relatorio_acidente_outros_colaboradores2()); + pg.getChildren().add(s); + } + } + if(a.getNr_relatorio_acidente_outros_colaboradores3() != null) + { + if(a.getNr_relatorio_acidente_outros_colaboradores3().intValue() > 0) + { + s = new StaticText(); + s.setId("s205"); + s.setEscape(false); + s.setText("  " + a.getNr_relatorio_acidente_outros_colaboradores3()); + pg.getChildren().add(s); + } + } + if(a.getNr_relatorio_acidente_outros_colaboradores4() != null) + { + if(a.getNr_relatorio_acidente_outros_colaboradores4().intValue() > 0) + { + s = new StaticText(); + s.setId("s206"); + s.setEscape(false); + s.setText("  " + a.getNr_relatorio_acidente_outros_colaboradores4()); + pg.getChildren().add(s); + } + } + grd.getChildren().add(pg); + } + gridColaboradores.getChildren().add(grd); + } + } + else if( a.getAcidentes_outros_colaboradores().matches("n") ) + { + st2.setText("Não se verificaram ocorrências/incidentes com outros colaboradores."); + gridColaboradores.getChildren().add(st2); + } + else //t + { + gridColaboradores.setRendered(false); + } + } + + private void fillRecomendacoesHs(AnaliseAcidente a) + { +// AnalisesDataProvider adp = new AnalisesDataProvider(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + ArrayList list = adp.getRecomendacoesByAnalise(a.getId()); + ListIterator iter = list.listIterator(); + int seq = 1; + while(iter.hasNext()) + { + Recomendacao r = (Recomendacao) iter.next(); + if(seq==1) + { + txtRecomendacao1.setText(r.getRecomendacao()); + } + else + { + + //int seq = gridRecomendacoes.getChildren().size(); + //seq++; + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setId("grd" + seq); + grd.setColumns(3); + grd.setColumnClasses("gridColLeft5, gridColLeft90,gridColLeft5"); + grd.setStyle("width: 100%"); + + StaticText st = new StaticText(); + st.setId("st" + seq); + st.setText(seq + " ."); + st.setStyle("width: 24px"); + grd.getChildren().add(st); + + TextArea ta = new TextArea(); + ta.setId("ta" + seq); + ta.setStyle("height: 24px; width: 98%"); + ta.setText(r.getRecomendacao()); + grd.getChildren().add(ta); + + ImageHyperlink ln = new ImageHyperlink(); + ln.setId("ln" + seq); + ln.setWidth(9); + ln.setHeight(9); + ln.setImageURL("/resources/plus_more.gif"); + MethodBinding mbAction = this.getApplication().createMethodBinding("#{AnaliseAcidenteTrabalho.lnkMoreRec1_action}", null); + ln.setAction(mbAction); + + grd.getChildren().add(ln); + + gridRecomendacoes.getChildren().add(grd); + + } + seq++; + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + + private void fillRecomendacoesViewHs(AnaliseAcidente a) + { +// AnalisesDataProvider adp = new AnalisesDataProvider(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList list = adp.getRecomendacoesByAnalise(a.getId()); + ListIterator iter = list.listIterator(); + int seq = 1; + while(iter.hasNext()) + { + Recomendacao r = (Recomendacao) iter.next(); + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setId("grdRecomendacaoView" + seq); + grd.setColumns(2); + grd.setColumnClasses("gridColLeft5, gridColLeft95"); + grd.setStyle("width: 100%"); + + StaticText st = new StaticText(); + st.setId("stNrRecomendacaoView" + seq); + st.setText(seq + " ."); + st.setStyle("width: 24px"); + grd.getChildren().add(st); + + st = new StaticText(); + st.setId("stRecomendacaoView" + seq); + st.setText(r.getRecomendacao()); + //st.setStyle("width: 24px"); + grd.getChildren().add(st); + + gridRecomendacoesView.getChildren().add(grd); + seq++; + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + + private void fillMedidasRh(AnaliseAcidente a) + { +// AnalisesDataProvider adp = new AnalisesDataProvider(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList list = adp.getMedidasByAnalise(a.getId()); + ListIterator iter = list.listIterator(); + int seq = 1; + while(iter.hasNext()) + { + Medida m = (Medida) iter.next(); + if(seq==1) + { + txtMedida1.setText(m.getMedida()); + } + else + { + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setId("grdMedida" + seq); + grd.setColumns(3); + grd.setColumnClasses("gridColLeft5, gridColLeft90,gridColLeft5"); + grd.setStyle("width: 100%"); + + StaticText st = new StaticText(); + st.setId("stNrMedida" + seq); + st.setText(seq + " ."); + st.setStyle("width: 24px"); + grd.getChildren().add(st); + + TextArea ta = new TextArea(); + ta.setId("taMedida" + seq); + ta.setStyle("height: 24px; width: 98%"); + ta.setText(m.getMedida()); + grd.getChildren().add(ta); + + ImageHyperlink ln = new ImageHyperlink(); + ln.setId("lnMedidaMore" + seq); + ln.setWidth(9); + ln.setHeight(9); + ln.setImageURL("/resources/plus_more.gif"); + MethodBinding mbAction = this.getApplication().createMethodBinding("#{AnaliseAcidenteTrabalho.lnkMoreMed_action}", null); + ln.setAction(mbAction); + + grd.getChildren().add(ln); + + gridMedidas.getChildren().add(grd); + } + seq++; + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + + private void fillMedidasViewRh(AnaliseAcidente a) + { + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList list = adp.getMedidasByAnalise(a.getId()); + ListIterator iter = list.listIterator(); + int seq = 1; + while(iter.hasNext()) + { + Medida m = (Medida) iter.next(); + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setId("grdMedidaView" + seq); + grd.setColumns(2); + grd.setColumnClasses("gridColLeft5, gridColLeft95"); + grd.setStyle("width: 100%"); + + StaticText st = new StaticText(); + st.setId("stNrMedidaView" + seq); + st.setText(seq + " ."); + st.setStyle("width: 24px"); + grd.getChildren().add(st); + + st = new StaticText(); + st.setId("stMedidaView" + seq); + st.setText(m.getMedida()); + //st.setStyle("width: 24px"); + grd.getChildren().add(st); + + gridMedidasView.getChildren().add(grd); + seq++; + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + + private void fillMedico(AnaliseAcidente a) + { + + if(a.getLesao_cabeca().matches("y")) + { + chkCabeca.setSelected( new Boolean(true) ); + } + + if(a.getLesao_pescoco().matches("y")) + { + chkPescoco.setSelected(new Boolean(true)); + } + + if(a.getLesao_tronco().matches("y")) + { + chkTronco.setSelected(new Boolean(true)); + } + + if(a.getLesao_membro_sup_dir().matches("y")) + { + chkMembroSupDir.setSelected(new Boolean(true)); + //lblEspecif1.setRendered(true); + //txtEspecif1.setRendered(true); + lblEspecif1.setVisible(true); + txtEspecif1.setVisible(true); + + txtEspecif1.setText(a.getEspecif1()); + } + else + { + //lblEspecif1.setRendered(false); + //txtEspecif1.setRendered(false); + lblEspecif1.setVisible(false); + txtEspecif1.setVisible(false); + + } + + if(a.getLesao_membro_sup_esq().matches("y")) + { + chkMembroSupEsq.setSelected(new Boolean(true)); +// lblEspecif2.setRendered(true); +// txtEspecif2.setRendered(true); + lblEspecif2.setVisible(true); + txtEspecif2.setVisible(true); + txtEspecif2.setText(a.getEspecif2()); + } + else + { + lblEspecif2.setVisible(false); + txtEspecif2.setVisible(false); + } + + if(a.getLesao_membro_inf_dir().matches("y")) + { + chkMembroInfDir.setSelected(new Boolean(true)); + lblEspecif3.setVisible(true); + txtEspecif3.setVisible(true); + txtEspecif3.setText(a.getEspecif3()); + } + else + { + lblEspecif3.setVisible(false); + txtEspecif3.setVisible(false); + } + + if(a.getLesao_membro_inf_esq().matches("y")) + { + chkMembroInfEsq.setSelected(new Boolean(true)); + lblEspecif4.setVisible(true); + txtEspecif4.setVisible(true); + txtEspecif4.setText(a.getEspecif4()); + } + else + { + lblEspecif4.setVisible(false); + txtEspecif4.setVisible(false); + } + + txtTipoLesao.setText(a.getTipo_lesao()); + if(a.getTipo_incapacidade().matches("n")) + { + rbIncapacidadeNone.setSelected(new Boolean(true)); + } + else if(a.getTipo_incapacidade().matches("t")) + { + rbIncapacidadeTemp.setSelected(new Boolean(true)); + } + else if(a.getTipo_incapacidade().matches("p")) + { + rbIncapacidadePerm.setSelected(new Boolean(true)); + } + else + { + rbIncapacidadeNone.setSelected(null); + rbIncapacidadeTemp.setSelected(null); + rbIncapacidadePerm.setSelected(null); + } + + if(a.getCoef_incapacidade() == null) + { + txtCoefIncapacidade.setText(""); + } + else + { + txtCoefIncapacidade.setText(a.getCoef_incapacidade()); + } + + + if(a.getData_aval_incapacidade() != null) + { + java.util.Date ddate = new java.util.Date(a.getData_aval_incapacidade().getTime()); + calAvaliacaoIncap.setValue(ddate); + } + + if(a.getData_rev_incapacidade() != null) + { + java.util.Date ddate = new java.util.Date(a.getData_rev_incapacidade().getTime()); + calRevisaoIncap.setValue(ddate); + } + + if(a.getPeriodo_incapacidade_de() != null) + { + java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_de().getTime()); + calPeridoIncapDe.setValue(ddate); + } + + if(a.getPeriodo_incapacidade_a() != null) + { + java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_a().getTime()); + calPeriodoIncapA.setValue(ddate); + } + + if(a.getImg_flexao().matches("y")) + { + chkImgFlexao.setSelected(new Boolean(true)); + } + + if(a.getImg_rot1().matches("y")) + { + chkImgRot1.setSelected(new Boolean(true)); + } + + if(a.getImg_rot2().matches("y")) + { + chkImgRot2.setSelected(new Boolean(true)); + } + + if(a.getImg_ext1().matches("y")) + { + chkImgExt1.setSelected(new Boolean(true)); + } + + if(a.getImg_ext2().matches("y")) + { + chkImgExt2.setSelected(new Boolean(true)); + } + + if(a.getImg_cab1().matches("y")) + { + chkImgCab1.setSelected(new Boolean(true)); + } + + if(a.getImg_cab2().matches("y")) + { + chkImgCab2.setSelected(new Boolean(true)); + } + + if(a.getImg_cab3().matches("y")) + { + chkImgCab3.setSelected(new Boolean(true)); + } + + if(a.getImg_cab4().matches("y")) + { + chkImgCab4.setSelected(new Boolean(true)); + } + + if(a.getImg_ma1().matches("y")) + { + chkImgMa1.setSelected(new Boolean(true)); + } + + if(a.getImg_ma2().matches("y")) + { + chkImgMa2.setSelected(new Boolean(true)); + } + + if(a.getImg_ma3().matches("y")) + { + chkImgMa3.setSelected(new Boolean(true)); + } + + if(a.getImg_ma4().matches("y")) + { + chkImgMa4.setSelected(new Boolean(true)); + } + + if(a.getImg_ma5().matches("y")) + { + chkImgMa5.setSelected(new Boolean(true)); + } + + if(a.getImg_ma6().matches("y")) + { + chkImgMa6.setSelected(new Boolean(true)); + } + + if(a.getImg_ma7().matches("y")) + { + chkImgMa7.setSelected(new Boolean(true)); + } + + if(a.getImg_ma8().matches("y")) + { + chkImgMa8.setSelected(new Boolean(true)); + } + + if(a.getImg_ma9().matches("y")) + { + chkImgMa9.setSelected(new Boolean(true)); + } + + if(a.getImg_ma10().matches("y")) + { + chkImgMa10.setSelected(new Boolean(true)); + } + + if(a.getRestricao_carga() != null) + { + if(a.getRestricao_carga().intValue() > 0) + { + chkRestricaoCargas.setSelected(new Boolean(true)); + rbKgs2.setRendered(true); + rbKgs5.setRendered(true); + rbKgs10.setRendered(true); + rbKgs15.setRendered(true); + rbKgsOutro.setRendered(true); + txtKgs.setRendered(true); + stKgs2.setRendered(true); + stKgs5.setRendered(true); + stKgs10.setRendered(true); + stKgs15.setRendered(true); + stKgsOutro.setRendered(true); + stKg.setRendered(true); + int carga = a.getRestricao_carga().intValue(); + switch(carga) + { + case 2: + rbKgs2.setSelected(new Boolean(true)); + break; + case 5: + rbKgs5.setSelected(new Boolean(true)); + break; + case 10: + rbKgs10.setSelected(new Boolean(true)); + break; + case 15: + rbKgs15.setSelected(new Boolean(true)); + break; + default: + rbKgsOutro.setSelected(new Boolean(true)); + txtKgs.setText(a.getRestricao_carga().toString()); + break; + } + } + else + { + chkRestricaoCargas.setSelected(new Boolean(false)); + rbKgs2.setRendered(false); + rbKgs5.setRendered(false); + rbKgs10.setRendered(false); + rbKgs15.setRendered(false); + rbKgsOutro.setRendered(false); + txtKgs.setRendered(false); + stKgs2.setRendered(false); + stKgs5.setRendered(false); + stKgs10.setRendered(false); + stKgs15.setRendered(false); + stKgsOutro.setRendered(false); + stKg.setRendered(false); + } + } + else + { + chkRestricaoCargas.setSelected(new Boolean(false)); + rbKgs2.setRendered(false); + rbKgs5.setRendered(false); + rbKgs10.setRendered(false); + rbKgs15.setRendered(false); + rbKgsOutro.setRendered(false); + txtKgs.setRendered(false); + stKgs2.setRendered(false); + stKgs5.setRendered(false); + stKgs10.setRendered(false); + stKgs15.setRendered(false); + stKgsOutro.setRendered(false); + stKg.setRendered(false); + } + + if(a.getRestricao_motricidade().matches("y")) + { + chkRestricaoMotricidade.setSelected(new Boolean(true)); + } + + if(a.getRestricao_conducao().matches("y")) + { + chkRestricaoConducao.setSelected(new Boolean(true)); + } + + if(a.getRestricao_vibracoes().matches("y")) + { + chkRestricaoVibracoes.setSelected(new Boolean(true)); + } + + if(a.getRestricao_outras() != null) + { + if(a.getRestricao_outras().trim().length() > 0) + { + chkRestricaoOutras.setSelected(new Boolean(true)); + txtRestricaoOutras.setText(a.getRestricao_outras()); + } + } + + txtObservacoes.setText(a.getMed_observ()); + + } + + private void fillMedicoView(AnaliseAcidente a) + { + PanelGroup pg = null; + StaticText st = null; + HtmlPanelGrid grd = null; + ImageComponent img = null; + //LESAO : + + if(a.getLesao_cabeca().matches("y")) + { + st = new StaticText(); + st.setId("stLesaoCabeca"); + st.setEscape(false); + st.setText("Cabeça"); + gridLesao.getChildren().add(st); + } + + if(a.getLesao_pescoco().matches("y")) + { + st = new StaticText(); + st.setId("stLesaoPescoco"); + st.setEscape(false); + st.setText("Pescoço"); + gridLesao.getChildren().add(st); + } + + if(a.getLesao_tronco().matches("y")) + { + st = new StaticText(); + st.setId("stLesaoTronco"); + st.setEscape(false); + st.setText("Tronco"); + gridLesao.getChildren().add(st); + } + + grd = new HtmlPanelGrid(); + grd.setId("gridLesaoMembros"); + grd.setColumns(2); + grd.setColumnClasses("gridColLeft"); + if(a.getLesao_membro_sup_dir().matches("y")) + { + st = new StaticText(); + st.setId("stLesaoMembroSupDir"); + st.setEscape(false); + st.setText("Membro Superior Direito"); + grd.getChildren().add(st); + if(a.getEspecif1() != null) + { + if(a.getEspecif1().trim().length() > 0) + { + st = new StaticText(); + st.setId("stEspecif1"); + st.setEscape(false); + st.setText(" - " + a.getEspecif1()); + grd.getChildren().add(st); + } + } + + } + + if(a.getLesao_membro_sup_esq().matches("y")) + { + st = new StaticText(); + st.setId("stLesaoMembroSupEsq"); + st.setEscape(false); + st.setText("Membro Superior Esquerdo"); + grd.getChildren().add(st); + if(a.getEspecif2() != null) + { + if(a.getEspecif2().trim().length() > 0) + { + st = new StaticText(); + st.setId("stEspecif2"); + st.setEscape(false); + st.setText(" - " + a.getEspecif2()); + grd.getChildren().add(st); + } + } + + } + + if(a.getLesao_membro_inf_dir().matches("y")) + { + st = new StaticText(); + st.setId("stLesaoMembroInfDir"); + st.setEscape(false); + st.setText("Membro Inferior Direito"); + grd.getChildren().add(st); + if(a.getEspecif3() != null) + { + if(a.getEspecif3().trim().length() > 0) + { + st = new StaticText(); + st.setId("stEspecif3"); + st.setEscape(false); + st.setText(a.getEspecif3()); + grd.getChildren().add(st); + } + } + } + + if(a.getLesao_membro_inf_esq().matches("y")) + { + st = new StaticText(); + st.setId("stLesaoMembroInfEsq"); + st.setEscape(false); + st.setText("Membro Inferior Esquerdo"); + grd.getChildren().add(st); + if(a.getEspecif4() != null) + { + if(a.getEspecif4().trim().length() > 0) + { + st = new StaticText(); + st.setId("stEspecif4"); + st.setEscape(false); + st.setText(a.getEspecif4()); + grd.getChildren().add(st); + } + } + + } + if(grd.getChildren().size() > 0) + { + gridLesao.getChildren().add(grd); + } + + if(a.getTipo_lesao().trim().length() > 0 ) + { + pg = new PanelGroup(); + pg.setId("pgTipoLesao"); + st = new StaticText(); + st.setId("stTipoLesaoLbl"); + st.setEscape(false); + st.setText("Tipo de lesão:   "); + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stTipoLesao"); + st.setEscape(false); + st.setText(a.getTipo_lesao()); + pg.getChildren().add(st); + gridLesao.getChildren().add(pg); + } + + //INCAPACIDADE : + pg = new PanelGroup(); + pg.setId("pgTipoIncapacidade"); + st = new StaticText(); + st.setId("stTipoIncapacidadeLbl1"); + st.setStyle("font-weight: bold"); + st.setEscape(false); + st.setText("Tipo de incapacidade:  "); + if(a.getTipo_incapacidade().matches("t")) + { + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stTipoIncapacidade"); + st.setEscape(false); + st.setText("Temporária  "); + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stTipoIncapacidadeLbl2"); + st.setStyle("font-weight: bold"); + st.setEscape(false); + st.setText("Coeficiente de incapacidade:  "); + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stCoefIncapacidade"); + st.setEscape(false); + st.setText(a.getCoef_incapacidade().toString() + "%"); + pg.getChildren().add(st); + } + else if(a.getTipo_incapacidade().matches("p")) + { + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stTipoIncapacidade"); + st.setEscape(false); + st.setText("Permanente  "); + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stTipoIncapacidadeLbl2"); + st.setStyle("font-weight: bold"); + st.setEscape(false); + st.setText("Coeficiente de incapacidade:  "); + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stCoefIncapacidade"); + st.setEscape(false); + st.setText(a.getCoef_incapacidade().toString() + "%"); + pg.getChildren().add(st); + } + + if(pg.getChildren().size() > 0) + { + gridIncapacidade2.getChildren().add(pg); + } + + pg = new PanelGroup(); + if(a.getData_aval_incapacidade() != null) + { + + pg.setId("pgAvaliacaoIncapacidade"); + st = new StaticText(); + st.setId("stDataAvalIncapacidadeLbl1"); + st.setEscape(false); + st.setText("Avaliação de incapacidade realizada em  "); + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stDataAvalIncapacidade"); + st.setEscape(false); + //st.setText(a.getData_aval_incapacidade()); + try + { + java.util.Date ddate = new java.util.Date(a.getData_aval_incapacidade().getTime()); + st.setText(utils.Utils.dateToYYYYMMDD(ddate)); + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + pg.getChildren().add(st); + } + + + if(a.getData_rev_incapacidade() != null) + { + st = new StaticText(); + st.setId("stDataRevIncapacidadeLbl1"); + st.setEscape(false); + st.setText("Revisão de incapacidade em  "); + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stDataRevIncapacidade"); + st.setEscape(false); + //st.setText(a.getData_rev_incapacidade()); + try + { + java.util.Date ddate = new java.util.Date(a.getData_rev_incapacidade().getTime()); + st.setText(utils.Utils.dateToYYYYMMDD(ddate)); + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + pg.getChildren().add(st); + } + + + if(pg.getChildren().size() > 0) + { + gridIncapacidade2.getChildren().add(pg); + } + + + pg = new PanelGroup(); + + if(a.getPeriodo_incapacidade_de() != null || a.getPeriodo_incapacidade_a() != null) + { + + pg.setId("pgPeriodoIncapacidade"); + st = new StaticText(); + st.setId("stPeriodoIncapacidadeLbl1"); + st.setEscape(false); + st.setText("Período de incapacidade temporária de  "); + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stPeriodoIncapacidadeDe"); + st.setEscape(false); + //st.setText(a.getPeriodo_incapacidade_de()); + try + { + java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_de().getTime()); + st.setText(utils.Utils.dateToYYYYMMDD(ddate)); + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stPeriodoIncapacidadeLbl2"); + st.setEscape(false); + st.setText("  a  "); + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stPeriodoIncapacidadeA"); + st.setEscape(false); + //st.setText(a.getPeriodo_incapacidade_a()); + try + { + java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_a().getTime()); + st.setText(utils.Utils.dateToYYYYMMDD(ddate)); + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + pg.getChildren().add(st); + + } + + if(pg.getChildren().size() > 0) + { + gridIncapacidade2.getChildren().add(pg); + } + + + //RESTRICOES + +// if(a.getImg_flexao().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgFlexao"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// pg = new PanelGroup(); +// pg.setId("pgImgFlexao"); +// img = new ImageComponent(); +// img.setId("imgRestricoes1000"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/fle1.gif"); +// pg.getChildren().add(img); +// img = new ImageComponent(); +// img.setId("imgRestricoes1001"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/fle2.gif"); +// pg.getChildren().add(img); +// img = new ImageComponent(); +// img.setId("imgRestricoes1002"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/fle3.gif"); +// pg.getChildren().add(img); +// img = new ImageComponent(); +// img.setId("imgRestricoes1003"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/fle4.gif"); +// pg.getChildren().add(img); +// grd.getChildren().add(pg); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl1"); +// st.setEscape(false); +// st.setText("Flexão"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_rot1().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgRot1"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes1005"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/rot1.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl2"); +// st.setEscape(false); +// st.setText("Flexão Lateral"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_rot2().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgRot2"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes1006"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/rot2.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl3"); +// st.setEscape(false); +// st.setText("Rotação"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ext1().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgExt1"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes1007"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ext1.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl4"); +// st.setEscape(false); +// st.setText("Extensão"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ext2().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgExt2"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// pg = new PanelGroup(); +// pg.setId("pgImgExt2"); +// img = new ImageComponent(); +// img.setId("imgRestricoes1008"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ext2.gif"); +// pg.getChildren().add(img); +// img = new ImageComponent(); +// img.setId("imgRestricoes1009"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ext3.gif"); +// pg.getChildren().add(img); +// img = new ImageComponent(); +// img.setId("imgRestricoes1010"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ext4.gif"); +// pg.getChildren().add(img); +// grd.getChildren().add(pg); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl5"); +// st.setEscape(false); +// st.setText("Flexão/Extensão Lateral + Rotação"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_cab1().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgCab1"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10011"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ca1.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl6"); +// st.setEscape(false); +// st.setText("Flexão"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_cab2().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgCab2"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10012"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ca2.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl7"); +// st.setEscape(false); +// st.setText("Extensão"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_cab3().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgCab3"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10013"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ca3.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl8"); +// st.setEscape(false); +// st.setText("Flexão Lateral"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_cab4().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgCab4"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10014"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ca4.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl9"); +// st.setEscape(false); +// st.setText("Rotação"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma1().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa1"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10015"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma1.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl10"); +// st.setEscape(false); +// st.setText("Poronação"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma2().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa2"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10016"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma2.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl11"); +// st.setEscape(false); +// st.setText("Supinação"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma3().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa3"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10017"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma3.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl12"); +// st.setEscape(false); +// st.setText("Flexão"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma4().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa4"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10018"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma4.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl13"); +// st.setEscape(false); +// st.setText("Extensão"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma5().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa5"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10019"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma5.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl14"); +// st.setEscape(false); +// st.setText("Desvio Ulnar"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma6().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa6"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10020"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma6.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl15"); +// st.setEscape(false); +// st.setText("Desvio Radial"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma7().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa7"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10021"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma7.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl16"); +// st.setEscape(false); +// st.setText("Pinça Digital"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma8().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa8"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10022"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma8.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl17"); +// st.setEscape(false); +// st.setText("Segurar objectos entre os dedos"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma9().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa9"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10023"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma9.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl18"); +// st.setEscape(false); +// st.setText("Dedos em extensão"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma10().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa10"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10024"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma10.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl19"); +// st.setEscape(false); +// st.setText("Pega palmar"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getRestricao_carga() != null) +// { +// if(a.getRestricao_carga().intValue() > 0) +// { +// pg = new PanelGroup(); +// st = new StaticText(); +// st.setId("stRestricaoCargaLbl"); +// st.setEscape(false); +// st.setText("Movimentação e manipulação de cargas com mais de  "); +// pg.getChildren().add(st); +// st = new StaticText(); +// st.setId("stRestricaoCargaKgs"); +// st.setEscape(false); +// st.setText(a.getRestricao_carga().toString()); +// pg.getChildren().add(st); +// st = new StaticText(); +// st.setId("stRestricaoCargaLbl1"); +// st.setEscape(false); +// st.setText("Kg"); +// pg.getChildren().add(st); +// gridOutrasRestricoes.getChildren().add(pg); +// } +// +// if(a.getRestricao_motricidade().matches("y")) +// { +// st = new StaticText(); +// st.setId("stRestricaoMotricidadeLbl"); +// st.setEscape(false); +// st.setText("Operações que requeiram motricidade fina."); +// gridOutrasRestricoes.getChildren().add(st); +// } +// +// if(a.getRestricao_conducao().matches("y")) +// { +// st = new StaticText(); +// st.setId("stRestricaoConducaoLbl"); +// st.setEscape(false); +// st.setText("Condução/interacção com veículos ou outros equipamentos."); +// gridOutrasRestricoes.getChildren().add(st); +// } +// +// if(a.getRestricao_vibracoes().matches("y")) +// { +// st = new StaticText(); +// st.setId("stRestricaoVibracoesLbl"); +// st.setEscape(false); +// st.setText("Utilizaçõo de equipamentos/ferramentas que impliquem exposição a vibrações ou impactos."); +// gridOutrasRestricoes.getChildren().add(st); +// } +// +// if(a.getRestricao_outras().trim().length() > 0) +// { +// st = new StaticText(); +// st.setId("stRestricaoOutras"); +// st.setEscape(false); +// st.setText(a.getRestricao_outras()); +// gridOutrasRestricoes.getChildren().add(st); +// } +// +// if(a.getMed_observ().trim().length() > 0) +// { +// stObservacoes.setText(a.getMed_observ()); +// } +// } + + } +// private String getPageFrom(String referer) +// { +// String pageFrom = referer.substring(referer.lastIndexOf("/")+1); +// return pageFrom; +// } + +// public String lnkNome_action() { +// // TODO: Replace with your code +// RowKey rk = tableRowGroup1.getRowKey(); +// int k = Integer.parseInt(rk.getRowId()); +// TrabalhadoresListDataProvider provider = (TrabalhadoresListDataProvider) tableRowGroup1.getSourceData(); +// ArrayList list = (ArrayList) provider.getList(); +// Trabalhador t = (Trabalhador)list.get(k); +// txtTrabalhador.setText(t.getNome()); +// txtNomeAcidentado.setText(t.getNome()); +// txtDataNascimento.setText(t.getData_nascimento()); +// Acidentado a = new Acidentado(); +// a.setTrabalhador_id(t.getId()); +// a.setData_nascimento(t.getData_nascimento()); +// a.setNome(t.getNome()); +// a.setFuncao(utils.Utils.unicodeToHTML(t.getFuncao())); +// a.setData_admissao(t.getData_admissao()); +// getSessionBean1().setAcidentado(a); +// if(getSessionBean1().getCurrentAnalise() != null) // new analise) +// { +// gridTrabalhadores.setRendered(false); +// } +// +// return null; +// } + +// public String lnkDataNascimento_action() { +// // TODO: Replace with your code +// RowKey rk = tableRowGroup1.getRowKey(); +// int k = Integer.parseInt(rk.getRowId()); +// TrabalhadoresListDataProvider provider = (TrabalhadoresListDataProvider) tableRowGroup1.getSourceData(); +// ArrayList list = (ArrayList) provider.getList(); +// Trabalhador t = (Trabalhador)list.get(k); +// txtTrabalhador.setText(t.getNome()); +// txtNomeAcidentado.setText(t.getNome()); +// txtDataNascimento.setText(t.getData_nascimento()); +// Acidentado a = new Acidentado(); +// a.setTrabalhador_id(t.getId()); +// a.setData_nascimento(t.getData_nascimento()); +// a.setNome(t.getNome()); +// a.setFuncao(t.getFuncao()); +// a.setData_admissao(t.getData_admissao()); +// getSessionBean1().setAcidentado(a); +// if(getSessionBean1().getCurrentAnalise() != null) // new analise) +// { +// gridTrabalhadores.setRendered(false); +// } +// return null; +// } + + private void fillVerificacao(AnaliseAcidente a) + { + int estado = a.getEstado().intValue(); + switch(estado) + { + case Global.ESTADO_ASSINATURA_SEG: + if(a.getAss_resp_seg().matches("y")) + { + chkVerRespSeg.setSelected(new Boolean(true)); + chkVerRespSeg.setDisabled(true); + java.util.Date ddate = new java.util.Date(a.getData_assinatura_seg().getTime()); + stVerRespSeg.setText("Tomei conhecimento a " + utils.Utils.dateToYYYYMMDD(ddate)); + } + break; + + case Global.ESTADO_ASSINATURA_RH: + if(a.getAss_resp_rh().matches("y")) + { + chkVerRespRh.setSelected(new Boolean(true)); + chkVerRespRh.setDisabled(true); + java.util.Date ddate = new java.util.Date(a.getData_assinatura_rh().getTime()); + stVerRespRh.setText("Tomei conhecimento a " + utils.Utils.dateToYYYYMMDD(ddate)); + } + + break; + } + } + + private void fillVerificacaoView(AnaliseAcidente a) + { + StaticText st = null; + String txtVer = null; + if(a.getAveriguador() != null) + { + if(a.getAveriguador().trim().length() > 0) + { + st = new StaticText(); + st.setId("stVerificacao1"); + st.setEscape(false); + txtVer = "Averiguado por " + a.getAveriguador() + " (Departamento de Segurança) a "; + //txtVer += a.getData_assinatura_seg(); + + try + { + java.util.Date ddate = new java.util.Date(a.getData_inicio_processo().getTime()); + txtVer += utils.Utils.dateToYYYYMMDD(ddate) + "."; + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + st.setText(txtVer); + gridAssinaturasView.getChildren().add(st); + } + } + + if(a.getAss_consolidacao().matches("y")) + { + st = new StaticText(); + st.setId("stVerificacao2"); + st.setEscape(false); + txtVer = "Verificado por " + a.getNome_resp_consolidacao() + " (Técnico de SHST) a "; + //txtVer += a.getData_assinatura_rh(); + try + { + java.util.Date ddate = new java.util.Date(a.getData_consolidacao().getTime()); + txtVer += utils.Utils.dateToYYYYMMDD(ddate) + "."; + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + st.setText(txtVer); + gridAssinaturasView.getChildren().add(st); + } + + if(a.getAss_resp_seg().matches("y")) + { + st = new StaticText(); + st.setId("stVerificacao3"); + st.setEscape(false); + txtVer = "Verificado por " + a.getNome_resp_seg() + " (Responsável de Segurança) a "; + //txtVer += a.getData_assinatura_rh(); + try + { + java.util.Date ddate = new java.util.Date(a.getData_assinatura_seg().getTime()); + txtVer += utils.Utils.dateToYYYYMMDD(ddate) + "."; + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + st.setText(txtVer); + gridAssinaturasView.getChildren().add(st); + } + + if(a.getAss_resp_rh().matches("y")) + { + st = new StaticText(); + st.setId("stVerificacao4"); + st.setEscape(false); + txtVer = "Verificado por " + a.getNome_resp_rh() + " (Responsável de RH) a "; + //txtVer += a.getData_assinatura_rh(); + try + { + java.util.Date ddate = new java.util.Date(a.getData_assinatura_rh().getTime()); + txtVer += utils.Utils.dateToYYYYMMDD(ddate) + "."; + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + st.setText(txtVer); + gridAssinaturasView.getChildren().add(st); + } + +// AnalisesDataProvider adp = new AnalisesDataProvider(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + Acidentado ac = adp.getAcidentado(a.getAcidentado_id()); + if(ac.getNome_superior_hierarquico() != null) + { + if(ac.getNome_superior_hierarquico().trim().length() > 0) + { + st = new StaticText(); + st.setId("stVerificacao5"); + st.setEscape(false); + txtVer = "Com conhecimento de " + ac.getNome_superior_hierarquico() + " (Responsável hierárquico)"; + + if(ac.getEmail_superior_hierarquico() != null) + { + if(ac.getEmail_superior_hierarquico().trim().length() > 0) + { + try + { + java.util.Date ddate = new java.util.Date(ac.getData_email_superior_hierarquico().getTime()); + txtVer += " a " + utils.Utils.dateToYYYYMMDD(ddate); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + } + txtVer += "."; + st.setText(txtVer); + gridAssinaturasView.getChildren().add(st); + } + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + HtmlPanelGrid grid = new HtmlPanelGrid(); + grid.setId("rodape1"); + grid.setColumns(1); + grid.setStyle("width: 100%"); + grid.setColumnClasses("gridColCenter"); + st = new StaticText(); + st.setId("stRodape1"); + st.setEscape(false); + st.setText("- processamento informático - acesso autenticado -"); + grid.getChildren().add(st); + gridAssinaturasView.getChildren().add(grid); + } + + + private AnaliseAcidente fillAnaliseFieldsImpressao(AnaliseAcidente a) + { + a.setAss_superior("n"); + if(chkAssSup.getSelected() != null) + { + if(chkAssSup.getSelected().equals(new Boolean(true))) + { + a.setAss_superior("y"); + } + } + + if(a.getAss_superior().matches("y")) + { + a.setNome_superior(""); + if(txtAssSup.getText() != null) + { + a.setNome_superior( (String) txtAssSup.getText()); + } + java.util.Date today = + new java.util.Date(); + java.sql.Date sqlToday = + new java.sql.Date(today.getTime()); + a.setData_assinatura_superior(sqlToday); + } + else + { + a.setNome_superior(""); + a.setData_assinatura_superior(null); + } + return a; + } + + private void fillImpressao(AnaliseAcidente a) + { + if(a.getAss_superior().matches("y")) + { + chkAssSup.setSelected(new Boolean(true)); + txtAssSup.setText(a.getNome_superior()); + String txt = (String) stAssSup2.getText(); + String nome_acidentado = getSessionBean1().getAcidentado().getNome(); + String stData = ""; + try + { + java.util.Date ddate = new java.util.Date(a.getData_assinatura_superior().getTime()); + stData += utils.Utils.dateToYYYYMMDD(ddate); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + stAssSup2.setText(txt + nome_acidentado + ", a " + stData); + } + + } + + private void fillImpressaoView(AnaliseAcidente a) + { + StaticText st = new StaticText(); + st.setId("stImpressaoView1"); + st.setEscape(false); + String stData = ""; + try + { + java.util.Date ddate = new java.util.Date(a.getData_assinatura_superior().getTime()); + stData += utils.Utils.dateToYYYYMMDD(ddate); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + String txt = "Assinado na Ficha de Análise de Acidente em papel por " + a.getNome_superior() + ", superior hierárquico / superior de "; + txt += getSessionBean1().getAcidentado().getNome() + ", a " + stData; + gridAssSupView.getChildren().add(st); + } + + public String butImagem_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + getSessionBean1().setIeBug(true); + savePageState(); + return "load_image"; + } + + private void fillImages() + { +// String imageName = getSessionBean1().getImageName(); +// if(imageName != null) +// { +// ImageComponent newImg = new ImageComponent(); +// newImg.setUrl("/resources/imagens/" + imageName); +// System.out.println("IMAGE URL : " + "/resources/imagens/" + imageName); +// newImg.setRendered(true); +// gridImages.getChildren().add(newImg); +// System.out.println("HERE"); +// } +// if(gridImages.getChildren().size() > 0) +// { +// gridImages.getChildren().clear(); +// } + ServletContext theApplicationsServletContext = + (ServletContext) this.getExternalContext().getContext(); + + + File apacheTmpFolder = new File(theApplicationsServletContext.getRealPath( Global.RESOURCES_IMAGE_FOLDER ) + "/tmp" + getSessionBean1().getCurrentUser().getLogin()); + if(apacheTmpFolder.exists()) + { + Global global = new Global(); + global.deleteFolderFiles(apacheTmpFolder); + } + else + { + apacheTmpFolder.mkdir(); + } + +// String imageFileFolder = theApplicationsServletContext.getRealPath(Global.IMAGE_FOLDER + "/tmp" + getSessionBean1().getCurrentUser().getLogin()); + String imageFileFolder = Global.IMAGE_FOLDER + "/tmp" + getSessionBean1().getCurrentUser().getLogin(); + try + { + File f = new File(imageFileFolder); + + if(f.exists()) + { + File files[] = f.listFiles(); + //List list = Arrays.asList(files); + Arrays.sort(files); + for(int i=0;i 0) + { + a.setBilhete_identidade(bi); + } + } + + a.setMorada(""); + if(txtMorada.getText() != null) + { + String morada = (String) txtMorada.getText(); + if(morada.trim().length() > 0) + { + a.setMorada( morada ); + } + } + + a.setCod_postal(""); + String cod_postal = ""; + if(txtCodPostal1.getText() != null ) + { + String cod_postal1 = (String) txtCodPostal1.getText(); + String cod_postal2 = ""; + if(txtCodPostal2.getText() != null) + { + cod_postal2 = (String) txtCodPostal2.getText(); + } + if(cod_postal1.trim().length() > 0) + { + cod_postal =(String) txtCodPostal1.getText() + "-" + (String) txtCodPostal2.getText(); + a.setCod_postal( cod_postal); + } + + } + + a.setLocalidade(""); + if(txtLocalidade.getText() != null) + { + String localidade = (String) txtLocalidade.getText(); + if(localidade.trim().length() > 0) + { + a.setLocalidade( localidade); + } + } + + a.setContacto_telefonico(""); + if(txtContactoTelefonico.getText() != null) + { + String contacto_telefonico = (String) txtContactoTelefonico.getText(); + if(contacto_telefonico.trim().length() > 0) + { + a.setContacto_telefonico( contacto_telefonico ); + } + } + + + a.setTurno("v"); // null + if(rbTurnoManha.getValue() != null) + { + if(rbTurnoManha.getValue().equals(new Boolean(true))) + { + a.setTurno("m"); + } + } + if(rbTurnoTarde.getValue() != null) + { + if(rbTurnoTarde.getValue().equals(new Boolean(true))) + { + a.setTurno("t"); + } + } + if(rbTurnoNoite.getValue() != null) + { + if(rbTurnoNoite.getValue().equals(new Boolean(true))) + { + a.setTurno("n"); + } + } + + if(txtNomeSuperior.getText() != null) + { + a.setNome_superior_hierarquico((String) txtNomeSuperior.getText()); + } + + if(txtEmailSuperior.getText() != null) + { + a.setEmail_superior_hierarquico((String) txtEmailSuperior.getText()); + java.util.Date today = + new java.util.Date(); + java.sql.Date sqlToday = + new java.sql.Date(today.getTime()); + a.setData_email_superior_hierarquico(sqlToday); + } + + return a; + } + + private AnaliseAcidente fillAnaliseFields() + { + int estado = 0; + AnaliseAcidente a = null; + //fill analise fields + if(getSessionBean1().getCurrentAnalise() == null) //null + { + a = new AnaliseAcidente(); + a.setEspecif1(""); + a.setEspecif2(""); + a.setEspecif3(""); + a.setEspecif4(""); + a.setRestricao_outras(""); + a.setTipo_lesao(""); + a.setMed_observ(""); + estado = Global.ESTADO_SEG; + a.setEstado(new Integer(estado)); + } + else + { + a = getSessionBean1().getCurrentAnalise(); + estado = a.getEstado().intValue(); + } + + + //averiguacao posterior +// if(estado < Global.ESTADO_ASSINATURAS) + if(estado <= Global.ESTADO_ASSINATURA_SEG) + { + if(getSessionBean1().getCurrentUser().getTipo().intValue() == 1) //seguranca + { + if(a.getAveriguacao_posterior().matches("y")) + { + if(txtAveriguacaoObs1.getText() != null) + { + a.setAveriguacao_obs((String) txtAveriguacaoObs1.getText()); + } + } + } + } + + switch(estado) + { + case Global.ESTADO_SEG: + a = fillAnaliseFieldsSeg(a); + break; + case Global.ESTADO_RH1: + //a = fillAnaliseFieldsSeg(a); + a = fillAnaliseFieldsRH1(a); + break; + case Global.ESTADO_HS: + //a = fillAnaliseFieldsHS(a); + break; + case Global.ESTADO_RH2: + a = fillAnaliseFieldsMedico(a); + //a = fillAnaliseFieldsRH2(a); + break; +// case Global.ESTADO_MEDICINA: +// a = fillAnaliseFieldsMedico(a); +// break; + case Global.ESTADO_CONSOLIDACAO: + a = fillAnaliseFieldsConsolidacao(a); + break; +// case Global.ESTADO_ASSINATURAS: + case Global.ESTADO_ASSINATURA_SEG: + a = fillAnaliseAssinaturas(a); + break; + case Global.ESTADO_ASSINATURA_RH: + a = fillAnaliseAssinaturas(a); + break; + + } + + return a; + } + + private AnaliseAcidente fillAnaliseFieldsSeg(AnaliseAcidente a) + { + if(txtAveriguador.getText() != null) + { + a.setAveriguador((String) txtAveriguador.getText()); + } + + java.util.Date today = new java.util.Date(); + java.sql.Date sqlToday = new java.sql.Date(today.getTime()); + //if(a.getData_acidente() == null) + //{ + // a.setData_acidente(sqlToday); + //} + //else + //{ + DateFormat formatador = new SimpleDateFormat("yyyy-MM-dd"); + + java.util.Date ddate = (java.util.Date) calDataOcorrencia.getValue(); + try + { + String ddate_str = formatador.format(ddate); + java.sql.Date ddate_sql = new java.sql.Date(formatador.parse(ddate_str).getTime()); + a.setData_acidente(ddate_sql); + } + catch(Exception ex) + { + a.setData_acidente(null); + } + //} + + if(a.getData_inicio_processo() == null) + { + a.setData_inicio_processo(sqlToday); + } + + Integer hhInt = (Integer) drpHours.getSelected(); + Integer mmInt = (Integer) drpMinutes.getSelected(); + + if(hhInt.intValue() == -1 || mmInt.intValue() == -1) + { + a.setHora_acidente(null); + } + else + { +// String hh = drpHours.getSelected().toString(); +// String mm = drpMinutes.getSelected().toString(); + String hh = hhInt.toString(); + String mm = mmInt.toString(); + SimpleDateFormat formatter = new SimpleDateFormat ( "HH:mm" ); + try + { + Time horaAcidente = new Time(formatter.parse( hh + ":" + mm ).getTime()); + a.setHora_acidente(horaAcidente); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + } + + + + if(getSessionBean1().getCurrentAnalise() == null) // new + { + a.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id()); + a.setEstabelecimento_id(getSessionBean1().getCurrentUser().getEstabelecimento_id()); + } + +// Integer medico_id = (Integer) drpMedicos.getSelected(); + Medico m = getSessionBean1().getMedico(); + if(m != null) + { + Integer medico_id = m.getId(); + if(medico_id.intValue() > 0) + { + a.setMedico_id(medico_id); + } + + } + + Integer horas_turno = null; + try + { + String horas_turno_str = (String) txtHorasTurno.getText(); + horas_turno = new Integer( Integer.parseInt(horas_turno_str) ); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + a.setHoras_turno(horas_turno); + + a.setDepartamento_id(( Integer ) drpDepartamento.getSelected()); + a.setSeccao_id((Integer) drpSeccao.getSelected()); + + try + { + if(txtLocal.getText() != null) + { + a.setLocal_trabalho( (String) txtLocal.getText() ); + } + else + { + a.setLocal_trabalho(""); + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + try + { + if(txtTarefa.getText() != null) + { + a.setTarefa( (String) txtTarefa.getText() ); + } + else + { + a.setTarefa(""); + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + try + { + if(txtSubstancias.getText() != null) + { + a.setSubstancias( (String) txtSubstancias.getText() ); + } + else + { + a.setSubstancias(""); + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + +// try +// { +// if(txtSuperior.getText() != null) +// { +// a.setSuperior_hierarquico( (String) txtSuperior.getText() ); +// } +// else +// { +// a.setSuperior_hierarquico(""); +// } +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + + try + { + if(txtCondicoes.getText() != null) + { + a.setCondicoes( (String) txtCondicoes.getText() ); + } + else + { + a.setCondicoes(""); + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + try + { + if(txtTestemunhas.getText() != null) + { + a.setTestemunhas( (String) txtTestemunhas.getText() ); + } + else + { + a.setTestemunhas(""); + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + +// try +// { +// if(txtCausas.getText() != null) +// { +// a.setCausas( (String) txtCausas.getText() ); +// } +// else +// { +// a.setCausas(""); +// } +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + + a.setCausas((Integer) drpCausas.getSelected()); + + try + { + if(txtDescricao.getText() != null) + { + a.setDescricao( (String) txtDescricao.getText() ); + } + else + { + a.setDescricao(""); + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + try + { + if(txtConclusoes.getText() != null) + { + a.setConclusoes( (String) txtConclusoes.getText() ); + } + else + { + a.setConclusoes(""); + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + try + { + if(txtAccoes.getText() != null) + { + a.setAccoes( (String) txtAccoes.getText() ); + } + else + { + a.setAccoes(""); + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + a.setAveriguacao_posterior("n"); + if(chkAveriguacaoPosterior.getSelected() != null) + { + if(chkAveriguacaoPosterior.getSelected().equals(new Boolean(true))) + { + a.setAveriguacao_posterior("y"); + } + } + + if(txtAveriguacaoObs.getText() != null) + { + a.setAveriguacao_obs((String) txtAveriguacaoObs.getText()); + } + return a; + } + + private AnaliseAcidente fillAnaliseFieldsRH1(AnaliseAcidente a) + { + boolean booFormacaoSHST = false; + if(rbFormacaoSHSTY.getSelected() != null) + { + Boolean f = (Boolean) rbFormacaoSHSTY.getSelected(); + if(f.equals(new Boolean(true))) + { + a.setFormacao_shst("y"); + booFormacaoSHST = true; + } + } + + if(!booFormacaoSHST) + { + if(rbFormacaoSHSTN.getSelected() != null) + { + Boolean f = (Boolean) rbFormacaoSHSTN.getSelected(); + if(f.equals(new Boolean(true))) + { + a.setFormacao_shst("n"); + a.setFormacao_shst_nao_porque(""); + if(txtFormacaoSHSTNWhy.getText() != null) + { + String s = (String) txtFormacaoSHSTNWhy.getText(); + if(s.trim().length() > 0 ) + { + a.setFormacao_shst_nao_porque( s ); + } + } + } + } + else + { + a.setFormacao_shst("t"); + } + } + + boolean booAcidentesColaborador = false; + a.setOutros_acidentes_com_colaborador("n"); + if(rbAcidentesColaboradorY.getSelected() != null) + { + Boolean f = (Boolean) rbAcidentesColaboradorY.getSelected(); + if(f.equals(new Boolean(true))) + { + a.setOutros_acidentes_com_colaborador("y"); + booAcidentesColaborador = true; + if(txtNrAcidentesColaborador.getText() != null) + { + String nr_str = (String) txtNrAcidentesColaborador.getText(); + if(nr_str.trim().length() > 0) + { + try + { + Integer nr = new Integer(Integer.parseInt(nr_str)); + a.setNr_acidentes_com_colaborador(nr); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + } + + if(txtNrRelatorioAcidentesColaborador1.getText() != null) + { + String nr_str = (String) txtNrRelatorioAcidentesColaborador1.getText(); + if(nr_str.trim().length() > 0) + { + try + { + Integer nr = new Integer(Integer.parseInt(nr_str)); + a.setNr_relatorio_acidente_colaborador1(nr); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + } + if(txtNrRelatorioAcidentesColaborador2.getText() != null) + { + String nr_str = (String) txtNrRelatorioAcidentesColaborador2.getText(); + if(nr_str.trim().length() > 0) + { + try + { + Integer nr = new Integer(Integer.parseInt(nr_str)); + a.setNr_relatorio_acidente_colaborador2(nr); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + } + if(txtNrRelatorioAcidentesColaborador3.getText() != null) + { + String nr_str = (String) txtNrRelatorioAcidentesColaborador3.getText(); + if(nr_str.trim().length() > 0) + { + try + { + Integer nr = new Integer(Integer.parseInt(nr_str)); + a.setNr_relatorio_acidente_colaborador3(nr); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + } + if(txtNrRelatorioAcidentesColaborador4.getText() != null) + { + String nr_str = (String) txtNrRelatorioAcidentesColaborador4.getText(); + if(nr_str.trim().length() > 0) + { + try + { + Integer nr = new Integer(Integer.parseInt(nr_str)); + a.setNr_relatorio_acidente_colaborador4(nr); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + } + } + } + + if(!booAcidentesColaborador) + { + if(rbAcidentesColaboradorN.getSelected() != null) + { + Boolean f = (Boolean) rbAcidentesColaboradorN.getSelected(); + if(f.equals(new Boolean(true))) + { + a.setOutros_acidentes_com_colaborador("n"); + } + } + else + { + a.setOutros_acidentes_com_colaborador("t"); + } + } + + boolean booAcidentesColaboradores = false; + if(rbAcidentesColaboradoresY.getSelected() != null) + { + Boolean f = (Boolean) rbAcidentesColaboradoresY.getSelected(); + if(f.equals(new Boolean(true))) + { + a.setAcidentes_outros_colaboradores("y"); + booAcidentesColaboradores = true; + if(txtNrAcidentesColaboradores.getText() != null) + { + String nr_str = (String) txtNrAcidentesColaboradores.getText(); + if(nr_str.trim().length() > 0) + { + try + { + Integer nr = new Integer(Integer.parseInt(nr_str)); + a.setNr_acidentes_outros_colaboradores(nr); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + } + + if(txtNrRelatorioAcidentesColaboradores1.getText() != null) + { + String nr_str = (String) txtNrRelatorioAcidentesColaboradores1.getText(); + if(nr_str.trim().length() > 0) + { + try + { + Integer nr = new Integer(Integer.parseInt(nr_str)); + a.setNr_relatorio_acidente_outros_colaboradores1(nr); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + } + if(txtNrRelatorioAcidentesColaboradores2.getText() != null) + { + String nr_str = (String) txtNrRelatorioAcidentesColaboradores2.getText(); + if(nr_str.trim().length() > 0) + { + try + { + Integer nr = new Integer(Integer.parseInt(nr_str)); + a.setNr_relatorio_acidente_outros_colaboradores2(nr); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + } + if(txtNrRelatorioAcidentesColaboradores3.getText() != null) + { + String nr_str = (String) txtNrRelatorioAcidentesColaboradores3.getText(); + if(nr_str.trim().length() > 0) + { + try + { + Integer nr = new Integer(Integer.parseInt(nr_str)); + a.setNr_relatorio_acidente_outros_colaboradores3(nr); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + } + if(txtNrRelatorioAcidentesColaboradores4.getText() != null) + { + String nr_str = (String) txtNrRelatorioAcidentesColaboradores4.getText(); + if(nr_str.trim().length() > 0) + { + try + { + Integer nr = new Integer(Integer.parseInt(nr_str)); + a.setNr_relatorio_acidente_outros_colaboradores4(nr); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + } + + } + } + + if(!booAcidentesColaboradores) + { + if(rbAcidentesColaboradoresN.getSelected() != null) + { + Boolean f = (Boolean) rbAcidentesColaboradoresN.getSelected(); + if(f.equals(new Boolean(true))) + { + a.setAcidentes_outros_colaboradores("n"); + } + } + else + { + a.setAcidentes_outros_colaboradores("t"); + } + } + + return a; + } + + private ArrayList fillAnaliseRecomendacoesHs(AnaliseAcidente a) + { + System.out.println("FILL RECOMENDACOES"); + ArrayList list = new ArrayList(); + ListIterator iter = gridRecomendacoes.getChildren().listIterator(); + while(iter.hasNext()) + { + HtmlPanelGrid grd = (HtmlPanelGrid)iter.next(); + TextArea ta = (TextArea) grd.getChildren().get(1); + if(ta.getText() != null ) + { + String txt = (String) ta.getText(); + if(txt.trim().length() > 0) + { + Recomendacao r = new Recomendacao(); + r.setAnalise_id(a.getId()); + r.setRecomendacao(txt); + list.add(r); + } + } + } + return list; + } + + private ArrayList fillAnaliseMedidasRh(AnaliseAcidente a) + { + ArrayList list = new ArrayList(); + ListIterator iter = gridMedidas.getChildren().listIterator(); + while(iter.hasNext()) + { + HtmlPanelGrid grd = (HtmlPanelGrid)iter.next(); + TextArea ta = (TextArea) grd.getChildren().get(1); + if(ta.getText() != null ) + { + String txt = (String) ta.getText(); + if(txt.trim().length() > 0) + { + Medida m = new Medida(); + m.setAnalise_id(a.getId()); + m.setMedida(txt); + list.add(m); + } + } + } + return list; + } + + private AnaliseAcidente fillAnaliseFieldsRH2(AnaliseAcidente a) + { + return a; + } + + private AnaliseAcidente fillAnaliseFieldsMedico(AnaliseAcidente a) + { + a.setLesao_cabeca("n"); + if(chkCabeca.getSelected() != null) + { + if(chkCabeca.getSelected().equals(new Boolean(true))) + { + a.setLesao_cabeca("y"); + } + } + + a.setLesao_pescoco("n"); + if(chkPescoco.getSelected() != null) + { + if(chkPescoco.getSelected().equals(new Boolean(true))) + { + a.setLesao_pescoco("y"); + } + } + + a.setLesao_tronco("n"); + if(chkTronco.getSelected() != null) + { + if(chkTronco.getSelected().equals(new Boolean(true))) + { + a.setLesao_tronco("y"); + } + } + + a.setEspecif1(""); + a.setEspecif2(""); + a.setEspecif3(""); + a.setEspecif4(""); + + a.setLesao_membro_sup_dir("n"); + if(chkMembroSupDir.getSelected() != null) + { + if(chkMembroSupDir.getSelected().equals(new Boolean(true))) + { + a.setLesao_membro_sup_dir("y"); + if(txtEspecif1.getText() != null) + { + a.setEspecif1((String) txtEspecif1.getText()); + } + } + } + + a.setLesao_membro_sup_esq("n"); + if(chkMembroSupEsq.getSelected() != null) + { + if(chkMembroSupEsq.getSelected().equals(new Boolean(true))) + { + a.setLesao_membro_sup_esq("y"); + if(txtEspecif2.getText() != null) + { + a.setEspecif2((String) txtEspecif2.getText()); + } + } + } + + a.setLesao_membro_inf_dir("n"); + if(chkMembroInfDir.getSelected() != null) + { + if(chkMembroInfDir.getSelected().equals(new Boolean(true))) + { + a.setLesao_membro_inf_dir("y"); + if(txtEspecif3.getText() != null) + { + a.setEspecif3((String) txtEspecif3.getText()); + } + } + } + + a.setLesao_membro_inf_esq("n"); + if(chkMembroInfEsq.getSelected() != null) + { + if(chkMembroInfEsq.getSelected().equals(new Boolean(true))) + { + a.setLesao_membro_inf_esq("y"); + if(txtEspecif4.getText() != null) + { + a.setEspecif4((String) txtEspecif4.getText()); + } + } + } + + a.setTipo_lesao(""); + if(txtTipoLesao.getText() != null) + { + a.setTipo_lesao((String) txtTipoLesao.getText()); + } + + a.setTipo_incapacidade("v"); + if(rbIncapacidadeNone.getSelected() != null) + { + if(rbIncapacidadeNone.getSelected().equals(new Boolean(true))) + { + a.setTipo_incapacidade("n"); + } + } + if(rbIncapacidadeTemp.getSelected() != null) + { + if(rbIncapacidadeTemp.getSelected().equals(new Boolean(true))) + { + a.setTipo_incapacidade("t"); + } + } + if(rbIncapacidadePerm.getSelected() != null) + { + if(rbIncapacidadePerm.getSelected().equals(new Boolean(true))) + { + a.setTipo_incapacidade("p"); + } + } + + if(txtCoefIncapacidade.getText() != null) + { + String coef_str = txtCoefIncapacidade.getText().toString(); + if ( coef_str != null && ! "".equals( coef_str.trim() ) ) + { + try + { + int coef = Integer.parseInt( coef_str ); + a.setCoef_incapacidade( new Integer( coef ) ); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + } + } + + DateFormat formatador = new SimpleDateFormat("yyyy-MM-dd"); + + java.util.Date ddate = (java.util.Date) calAvaliacaoIncap.getValue(); + try + { + String ddate_str = formatador.format(ddate); + java.sql.Date ddate_sql = new java.sql.Date(formatador.parse(ddate_str).getTime()); + a.setData_aval_incapacidade(ddate_sql); + } + catch(Exception ex) + { + a.setData_aval_incapacidade(null); + } + + ddate = (java.util.Date) calRevisaoIncap.getValue(); + + try + { + String ddate_str = formatador.format(ddate); + java.sql.Date ddate_sql = new java.sql.Date(formatador.parse(ddate_str).getTime()); + a.setData_rev_incapacidade(ddate_sql); + } + catch(Exception ex) + { + a.setData_rev_incapacidade(null); + } + + ddate = (java.util.Date) calPeridoIncapDe.getValue(); + try + { + String ddate_str = formatador.format(ddate); + java.sql.Date ddate_sql = new java.sql.Date(formatador.parse(ddate_str).getTime()); + a.setPeriodo_incapacidade_de(ddate_sql); + } + catch(Exception ex) + { + a.setPeriodo_incapacidade_de(null); + } + + ddate = (java.util.Date) calPeriodoIncapA.getValue(); + try + { + String ddate_str = formatador.format(ddate); + java.sql.Date ddate_sql = new java.sql.Date(formatador.parse(ddate_str).getTime()); + a.setPeriodo_incapacidade_a(ddate_sql); + } + catch(Exception ex) + { + a.setPeriodo_incapacidade_a(null); + } + +// a.setImg_flexao("n"); +// if(chkImgFlexao.getSelected() != null) +// { +// if(chkImgFlexao.getSelected().equals(new Boolean(true))) +// { +// a.setImg_flexao("y"); +// } +// } +// +// a.setImg_rot1("n"); +// if(chkImgRot1.getSelected() != null) +// { +// if(chkImgRot1.getSelected().equals(new Boolean(true))) +// { +// a.setImg_rot1("y"); +// } +// } +// +// a.setImg_rot2("n"); +// if(chkImgRot2.getSelected() != null) +// { +// if(chkImgRot2.getSelected().equals(new Boolean(true))) +// { +// a.setImg_rot2("y"); +// } +// } +// +// a.setImg_ext1("n"); +// if(chkImgExt1.getSelected() != null) +// { +// if(chkImgExt1.getSelected().equals(new Boolean(true))) +// { +// a.setImg_ext1("y"); +// } +// } +// +// a.setImg_ext2("n"); +// if(chkImgExt2.getSelected() != null) +// { +// if(chkImgExt2.getSelected().equals(new Boolean(true))) +// { +// a.setImg_ext2("y"); +// } +// } +// +// a.setImg_cab1("n"); +// if(chkImgCab1.getSelected() != null) +// { +// if(chkImgCab1.getSelected().equals(new Boolean(true))) +// { +// a.setImg_cab1("y"); +// } +// } +// +// a.setImg_cab2("n"); +// if(chkImgCab2.getSelected() != null) +// { +// if(chkImgCab2.getSelected().equals(new Boolean(true))) +// { +// a.setImg_cab2("y"); +// } +// } +// +// a.setImg_cab3("n"); +// if(chkImgCab3.getSelected() != null) +// { +// if(chkImgCab3.getSelected().equals(new Boolean(true))) +// { +// a.setImg_cab3("y"); +// } +// } +// +// a.setImg_cab4("n"); +// if(chkImgCab4.getSelected() != null) +// { +// if(chkImgCab4.getSelected().equals(new Boolean(true))) +// { +// a.setImg_cab4("y"); +// } +// } +// +// a.setImg_ma1("n"); +// if(chkImgMa1.getSelected() != null) +// { +// if(chkImgMa1.getSelected().equals(new Boolean(true))) +// { +// a.setImg_ma1("y"); +// } +// } +// +// a.setImg_ma2("n"); +// if(chkImgMa2.getSelected() != null) +// { +// if(chkImgMa2.getSelected().equals(new Boolean(true))) +// { +// a.setImg_ma2("y"); +// } +// } +// +// a.setImg_ma3("n"); +// if(chkImgMa3.getSelected() != null) +// { +// if(chkImgMa3.getSelected().equals(new Boolean(true))) +// { +// a.setImg_ma3("y"); +// } +// } +// +// a.setImg_ma4("n"); +// if(chkImgMa4.getSelected() != null) +// { +// if(chkImgMa4.getSelected().equals(new Boolean(true))) +// { +// a.setImg_ma4("y"); +// } +// } +// +// a.setImg_ma5("n"); +// if(chkImgMa5.getSelected() != null) +// { +// if(chkImgMa5.getSelected().equals(new Boolean(true))) +// { +// a.setImg_ma5("y"); +// } +// } +// +// a.setImg_ma6("n"); +// if(chkImgMa6.getSelected() != null) +// { +// if(chkImgMa6.getSelected().equals(new Boolean(true))) +// { +// a.setImg_ma6("y"); +// } +// } +// +// a.setImg_ma7("n"); +// if(chkImgMa7.getSelected() != null) +// { +// if(chkImgMa7.getSelected().equals(new Boolean(true))) +// { +// a.setImg_ma7("y"); +// } +// } +// +// a.setImg_ma8("n"); +// if(chkImgMa8.getSelected() != null) +// { +// if(chkImgMa8.getSelected().equals(new Boolean(true))) +// { +// a.setImg_ma8("y"); +// } +// } +// +// a.setImg_ma9("n"); +// if(chkImgMa9.getSelected() != null) +// { +// if(chkImgMa9.getSelected().equals(new Boolean(true))) +// { +// a.setImg_ma9("y"); +// } +// } +// +// a.setImg_ma10("n"); +// if(chkImgMa10.getSelected() != null) +// { +// if(chkImgMa10.getSelected().equals(new Boolean(true))) +// { +// a.setImg_ma10("y"); +// } +// } +// +// a.setRestricao_carga(new Integer(0)); +// if(chkRestricaoCargas.getSelected()!= null) +// { +// if(chkRestricaoCargas.getSelected().equals(new Boolean(true))) +// { +// if(rbKgs2.getSelected() != null) +// { +// if(rbKgs2.getSelected().equals(new Boolean(true))) +// { +// a.setRestricao_carga(new Integer(2)); +// } +// } +// if(rbKgs5.getSelected() != null) +// { +// if(rbKgs5.getSelected().equals(new Boolean(true))) +// { +// a.setRestricao_carga(new Integer(5)); +// } +// } +// if(rbKgs10.getSelected() != null) +// { +// if(rbKgs10.getSelected().equals(new Boolean(true))) +// { +// a.setRestricao_carga(new Integer(10)); +// } +// } +// if(rbKgs15.getSelected() != null) +// { +// if(rbKgs15.getSelected().equals(new Boolean(true))) +// { +// a.setRestricao_carga(new Integer(15)); +// } +// } +// +// if(rbKgsOutro.getSelected() != null) +// { +// if(rbKgsOutro.getSelected().equals(new Boolean(true))) +// { +// if(txtKgs.getText() != null) +// { +// String kgs_str = txtKgs.getText().toString(); +// int kgs = Integer.parseInt(kgs_str); +// a.setRestricao_carga(new Integer(kgs)); +// } +// } +// } +// } +// } +// +// a.setRestricao_motricidade("n"); +// if(chkRestricaoMotricidade.getSelected() != null) +// { +// if(chkRestricaoMotricidade.getSelected().equals(new Boolean(true))) +// { +// a.setRestricao_motricidade("y"); +// } +// } +// +// a.setRestricao_conducao("n"); +// if(chkRestricaoConducao.getSelected() != null) +// { +// if(chkRestricaoConducao.getSelected().equals(new Boolean(true))) +// { +// a.setRestricao_conducao("y"); +// } +// } +// +// a.setRestricao_vibracoes("n"); +// if(chkRestricaoVibracoes.getSelected() != null) +// { +// if(chkRestricaoVibracoes.getSelected().equals(new Boolean(true))) +// { +// a.setRestricao_vibracoes("y"); +// } +// } +// +// a.setRestricao_outras(""); +// if(chkRestricaoOutras.getSelected() != null) +// { +// if(chkRestricaoOutras.getSelected().equals(new Boolean(true))) +// { +// if(txtRestricaoOutras.getText() != null) +// { +// a.setRestricao_outras((String)txtRestricaoOutras.getText()); +// } +// } +// } +// +// a.setMed_observ(""); +// if(txtObservacoes.getText() != null) +// { +// a.setMed_observ( (String) txtObservacoes.getText() ); +// } + + return a; + } + + private AnaliseAcidente fillAnaliseFieldsConsolidacao(AnaliseAcidente a) + { + String nome_resp_consolidacao = getSessionBean1().getCurrentUser().getNome(); + a.setNome_resp_consolidacao(nome_resp_consolidacao); + java.util.Date today = new java.util.Date(); + java.sql.Date sqlToday = new java.sql.Date(today.getTime()); + a.setData_consolidacao(sqlToday); + a.setAss_consolidacao("y"); + return a; + } + + private AnaliseAcidente fillAnaliseAssinaturas(AnaliseAcidente a) + { +// UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); + java.util.Date today = new java.util.Date(); + java.sql.Date sqlToday = new java.sql.Date(today.getTime()); + int estado = a.getEstado().intValue(); + switch(estado) + { + case Global.ESTADO_ASSINATURA_SEG: + //notifyNextSignature(new Integer(Global.ESTADO_ASSINATURA_RH)); + a.setData_assinatura_seg(sqlToday); + a.setAss_resp_seg("y"); + a.setNome_resp_seg( getSessionBean1().getCurrentUser().getNome() ); + break; + case Global.ESTADO_ASSINATURA_RH: + a.setData_assinatura_rh(sqlToday); + a.setAss_resp_rh("y"); + a.setNome_resp_rh(getSessionBean1().getCurrentUser().getNome()); + break; + } + + return a; + } + + private boolean validationDepartmentSectionOk() + { + Integer departmentId = (Integer) drpDepartamento.getSelected(); + if(departmentId.intValue() == 0) + { + getSessionBean1().setMsg("Falta departamento!"); + return false; + } + Integer seccaoId = (Integer) drpSeccao.getSelected(); + if(seccaoId.intValue() == 0) + { + getSessionBean1().setMsg("Falta secção!"); + return false; + } + + return true; + } + + private boolean fieldsLenOk() + { + //System.out.println("VALIDATION GRAVAR OK"); +// AnalisesDataProvider adp = new AnalisesDataProvider(); + HashMap meta = new HashMap(); + HashMap meta_ac = new HashMap(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + meta = adp.getMetaData("analises_acidentes"); + meta_ac = adp.getMetaData("acidentados"); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + meta = null; + meta_ac = null; + } + + if(meta == null || meta_ac == null) + { + getSessionBean1().setMsg("Erro na aquisição da metadata!"); + return false; + } + + int estado = 0; + if(getSessionBean1().getCurrentAnalise() == null) //null + { + estado = Global.ESTADO_SEG; + } + else + { + AnaliseAcidente a = getSessionBean1().getCurrentAnalise(); + estado = a.getEstado().intValue(); + } + + if(estado == Global.ESTADO_SEG) + { + if(txtAveriguador.getText() != null) + { + String averiguador = txtAveriguador.getText().toString(); + int len = ((Integer)meta.get("averiguador")).intValue(); + System.out.println("Averiguador : " + len); + if(averiguador.length() > len) + { + getSessionBean1().setMsg("O campo Averiguador não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtLocal.getText() != null) + { + String local = txtLocal.getText().toString(); + int len = ((Integer)meta.get("local_trabalho")).intValue(); + System.out.println("Local : " + len); + if(local.length() > len) + { + getSessionBean1().setMsg("O campo Local não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtTarefa.getText() != null) + { + String tarefa = txtTarefa.getText().toString(); + int len = ((Integer)meta.get("tarefa")).intValue(); + System.out.println("Tarefa : " + len); + if(tarefa.length() > len) + { + getSessionBean1().setMsg("O campo Tarefa não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtSubstancias.getText() != null) + { + String substancias = txtSubstancias.getText().toString(); + int len = ((Integer)meta.get("substancias")).intValue(); + System.out.println("Substancias : " + len); + if(substancias.length() > len) + { + getSessionBean1().setMsg("O campo Substancias não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtTestemunhas.getText() != null) + { + String testemunhas = txtTestemunhas.getText().toString(); + int len = ((Integer)meta.get("testemunhas")).intValue(); + System.out.println("Testemunhas : " + len); + if(testemunhas.length() > len) + { + getSessionBean1().setMsg("O campo Testemunhas não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtDescricao.getText() != null) + { + String descricao = txtDescricao.getText().toString(); + int len = ((Integer)meta.get("descricao")).intValue(); + System.out.println("Descricao : " + len); + if(descricao.length() > len) + { + getSessionBean1().setMsg("O campo Descrição não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtConclusoes.getText() != null) + { + String conclusoes = txtConclusoes.getText().toString(); + int len = ((Integer)meta.get("conclusoes")).intValue(); + System.out.println("Conclusoes : " + len); + if(conclusoes.length() > len) + { + getSessionBean1().setMsg("O campo Conclusões não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtAccoes.getText() != null) + { + String accoes = txtAccoes.getText().toString(); + int len = ((Integer)meta.get("accoes")).intValue(); + System.out.println("Accoes : " + len); + if(accoes.length() > len) + { + getSessionBean1().setMsg("O campo Accões não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtCondicoes.getText() != null) + { + String condicoes = txtCondicoes.getText().toString(); + int len = ((Integer)meta.get("condicoes")).intValue(); + System.out.println("Condicoes : " + len); + if(condicoes.length() > len) + { + getSessionBean1().setMsg("O campo Condições não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtAveriguacaoObs.getText() != null) + { + String averiguacao_obs = txtAveriguacaoObs.getText().toString(); + int len = ((Integer)meta.get("averiguacao_obs")).intValue(); + System.out.println("Observacoes : " + len); + if(averiguacao_obs.length() > len) + { + getSessionBean1().setMsg("O campo Observações não pode exceder " + len + " caracteres!"); + return false; + } + } + } + else if(estado == Global.ESTADO_RH1) + { + if(txtBI.getText() != null) + { + String bi = (String) txtBI.getText(); + int len = ((Integer)meta_ac.get("bilhete_identidade")).intValue(); + System.out.println("BI : " + len); + if(bi.length() > len) + { + getSessionBean1().setMsg("Campo Bilhete Identidade não pode exceder " + len + " caracteres!"); + return false; + } +// try +// { +// int bi_nr = Integer.parseInt(bi); +// } +// catch(Exception ex) +// { +// getSessionBean1().setMsg("Nº do Bilhete de Identidade tem de ser numérico!"); +// return false; +// } + } + + if(txtMorada.getText() != null) + { + String morada = txtMorada.getText().toString(); + int len = ((Integer)meta_ac.get("morada")).intValue(); + System.out.println("Morada : " + len); + if(morada.length() > len) + { + getSessionBean1().setMsg("O campo Morada não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtLocalidade.getText() != null) + { + String localidade = txtLocalidade.getText().toString(); + int len = ((Integer)meta_ac.get("localidade")).intValue(); + System.out.println("Localidade : " + len); + if(localidade.length() > len) + { + getSessionBean1().setMsg("O campo Localidade não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtContactoTelefonico.getText() != null) + { + String contacto_telefonico = txtContactoTelefonico.getText().toString(); + int len = ((Integer)meta_ac.get("contacto_telefonico")).intValue(); + System.out.println("Contacto Telefonico : " + len); + if(contacto_telefonico.length() > len) + { + getSessionBean1().setMsg("O campo Contacto Telefónico não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtNomeSuperior.getText() != null) + { + String nome_superior = txtNomeSuperior.getText().toString(); + int len = ((Integer)meta_ac.get("nome_superior_hierarquico")).intValue(); + System.out.println("Nome Superior : " + len); + if(nome_superior.length() > len) + { + getSessionBean1().setMsg("O campo Nome do Superior Hierárquico não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtEmailSuperior.getText() != null) + { + String email_superior = txtEmailSuperior.getText().toString(); + int len = ((Integer)meta_ac.get("email_superior_hierarquico")).intValue(); + System.out.println("Email Superior : " + len); + if(email_superior.length() > len) + { + getSessionBean1().setMsg("O campo Email do Superior Hierárquico não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtEmailSuperior.getText() != null) + { + String email_superior = (String) txtEmailSuperior.getText(); + if(email_superior.trim().length() > 0) + { + if(! utils.Utils.isValidEmail(email_superior)) + { + getSessionBean1().setMsg("Email do superior hierárquico inválido!"); + return false; + } + } + } + + if(txtFormacaoSHSTNWhy.getText() != null) + { + String why = txtFormacaoSHSTNWhy.getText().toString(); + int len = ((Integer)meta.get("formacao_shst_nao_porque")).intValue(); + System.out.println("Porque Nao Teve Formacao : " + len); + if(why.length() > len) + { + getSessionBean1().setMsg("O campo Porquê o Colaborador Não Teve Formação não pode exceder " + len + " caracteres!"); + return false; + } + } + } + else if(estado == Global.ESTADO_HS) + { + if(!checkRecomendacoesLen()) + { + return false; + } + } + else if(estado == Global.ESTADO_RH2) + { + if(!checkMedidasLen()) + { + return false; + } + + if(txtEspecif1.getText() != null) + { + String especif = txtEspecif1.getText().toString(); + int len = ((Integer)meta.get("especif1")).intValue(); + if(especif.length() > len) + { + getSessionBean1().setMsg("O campo Especifíque não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtEspecif2.getText() != null) + { + String especif = txtEspecif2.getText().toString(); + int len = ((Integer)meta.get("especif2")).intValue(); + if(especif.length() > len) + { + getSessionBean1().setMsg("O campo Especifíque não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtEspecif3.getText() != null) + { + String especif = txtEspecif3.getText().toString(); + int len = ((Integer)meta.get("especif3")).intValue(); + if(especif.length() > len) + { + getSessionBean1().setMsg("O campo Especifíque não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtEspecif4.getText() != null) + { + String especif = txtEspecif4.getText().toString(); + int len = ((Integer)meta.get("especif4")).intValue(); + if(especif.length() > len) + { + getSessionBean1().setMsg("O campo Especifíque não pode exceder " + len + " caracteres!"); + return false; + } + } + + if(txtTipoLesao.getText() != null) + { + String tipo_lesao = txtTipoLesao.getText().toString(); + int len = ((Integer)meta.get("tipo_lesao")).intValue(); + System.out.println("Tipo Lesao : " + len); + if(tipo_lesao.length() > len) + { + getSessionBean1().setMsg("O campo Tipo Lesão não pode exceder " + len + " caracteres!"); + return false; + } + } + } + + return true; + } + + private boolean validationOk() + { + + if(getSessionBean1().isSubmetido() || getSessionBean1().isGravado()) + { + return true; + } + if(getSessionBean1().getAcidentado() == null) + { + getSessionBean1().setMsg("Não seleccionou trabalhador acidentado!"); + return false; + } + + if(!fieldsLenOk()) + { + return false; + } + + int estado = 0; + int estado_assinatura = 0; + if(getSessionBean1().getCurrentAnalise() == null) //null + { + estado = Global.ESTADO_SEG; + } + else + { + AnaliseAcidente a = getSessionBean1().getCurrentAnalise(); + estado = a.getEstado().intValue(); + estado_assinatura = a.getEstado_assinatura().intValue(); + } + + if(estado == Global.ESTADO_SEG) + { + if(txtAveriguador.getText() == null) + { + getSessionBean1().setMsg("Falta averiguador!"); + return false; + } + else + { + String averiguador = (String) txtAveriguador.getText(); + if(averiguador.trim().length() == 0) + { + getSessionBean1().setMsg("Falta averiguador!"); + return false; + } + + } + + if(drpHours.getSelected() == null || drpMinutes.getSelected() == null) + { + getSessionBean1().setMsg("Falta hora acidente!"); + return false; + } + else + { + Integer h = (Integer) drpHours.getSelected(); + Integer m = (Integer) drpMinutes.getSelected(); + if(h.intValue() == -1 || m.intValue() == -1) + { + getSessionBean1().setMsg("Falta hora acidente!"); + return false; + } + + } + + if(txtHorasTurno.getText() != null) + { + String horas_turno = txtHorasTurno.getText().toString(); + if(horas_turno.trim().length() == 0) + { + getSessionBean1().setMsg("Falta nº horas trabalhadas no turno!"); + return false; + } + else + { + try + { + int nr = Integer.parseInt(horas_turno); + if(nr > 9) + { + getSessionBean1().setMsg("As horas turno devem ser entre 0 e 9!"); + return false; + } + } + catch(Exception ex) + { + getSessionBean1().setMsg("As horas turno devem ser um valor numérico!"); + return false; + } + } + } + else + { + getSessionBean1().setMsg("Falta nº horas trabalhadas no turno!"); + return false; + } + + + if(drpDepartamento.getSelected() == null) + { + getSessionBean1().setMsg("Falta departamento!"); + return false; + } + else + { + Integer d = (Integer) drpDepartamento.getSelected(); + if(d.intValue() == 0) + { + getSessionBean1().setMsg("Falta departamento!"); + return false; + } + } + + if(drpSeccao.getSelected() == null) + { + getSessionBean1().setMsg("Falta secção!"); + return false; + } + else + { + Integer s = (Integer) drpSeccao.getSelected(); + if(s.intValue() == 0) + { + getSessionBean1().setMsg("Falta secção!"); + return false; + } + } + + if(txtLocal.getText() == null) + { + getSessionBean1().setMsg("Falta local específico!"); + return false; + } + else + { + String local = (String) txtLocal.getText(); + if(local.trim().length() == 0) + { + getSessionBean1().setMsg("Falta local específico!"); + return false; + } + } + + if(txtTarefa.getText() == null) + { + getSessionBean1().setMsg("Falta tarefa!"); + return false; + } + else + { + String tarefa = (String) txtTarefa.getText(); + if(tarefa.trim().length() == 0) + { + getSessionBean1().setMsg("Falta tarefa!"); + return false; + } + } + + if(txtSubstancias.getText() == null) + { + getSessionBean1().setMsg("Falta substâncias!"); + return false; + } + else + { + String substancias = (String) txtSubstancias.getText(); + if(substancias.trim().length() == 0) + { + getSessionBean1().setMsg("Falta substâncias!"); + return false; + } + } + + if(txtCondicoes.getText() == null) + { + getSessionBean1().setMsg("Falta condições!"); + return false; + } + else + { + String condicoes = (String) txtCondicoes.getText(); + if(condicoes.trim().length() == 0) + { + getSessionBean1().setMsg("Falta condições!"); + return false; + } + } + + if(txtTestemunhas.getText() == null) + { + getSessionBean1().setMsg("Falta testemunhas!"); + return false; + } + else + { + String testemunhas = (String) txtTestemunhas.getText(); + if(testemunhas.trim().length() == 0) + { + getSessionBean1().setMsg("Falta testemunhas!"); + return false; + } + } + + if(drpCausas.getSelected() == null) + { + getSessionBean1().setMsg("Falta causa do acidente!"); + return false; + } + else + { + Integer c = (Integer) drpCausas.getSelected(); + if(c.intValue() == 0) + { + getSessionBean1().setMsg("Falta causa do acidente!"); + return false; + } + } + + if(txtDescricao.getText() == null) + { + getSessionBean1().setMsg("Falta descrição do acidente!"); + return false; + } + else + { + String descricao = (String) txtDescricao.getText(); + if(descricao.trim().length() == 0) + { + getSessionBean1().setMsg("Falta descrição do acidente!"); + return false; + } + } + + if(txtConclusoes.getText() == null) + { + getSessionBean1().setMsg("Falta conclusões!"); + return false; + } + else + { + String conclusoes = (String) txtConclusoes.getText(); + if(conclusoes.trim().length() == 0) + { + getSessionBean1().setMsg("Falta conclusões!"); + return false; + } + } + + if(txtAccoes.getText() == null) + { + getSessionBean1().setMsg("Falta acções!"); + return false; + } + else + { + String accoes = (String) txtAccoes.getText(); + if(accoes.trim().length() == 0) + { + getSessionBean1().setMsg("Falta acções!"); + return false; + } + } + + } + + + if(estado == Global.ESTADO_RH1) + { + + if(txtBI.getText() == null) + { + getSessionBean1().setMsg("Falta Nº Bilhete de Identidade!"); + return false; + } + else + { + String bi = (String) txtBI.getText(); + if(bi.trim().length() == 0) + { + getSessionBean1().setMsg("Falta Nº Bilhete de Identidade!"); + return false; + } +// else +// { +// try +// { +// int bi_nr = Integer.parseInt(bi); +// } +// catch(Exception ex) +// { +// getSessionBean1().setMsg("Nº do Bilhete de Identidade tem de ser numérico!"); +// return false; +// } +// } + } + + if(txtMorada.getText() == null) + { + getSessionBean1().setMsg("Falta morada!"); + return false; + } + else + { + String morada = (String) txtMorada.getText(); + if(morada.trim().length() == 0) + { + getSessionBean1().setMsg("Falta morada!"); + return false; + } + } + + String cod_postal1 = ""; + String cod_postal2 = ""; + if(txtCodPostal1.getText() == null || txtCodPostal2.getText() == null) + { + getSessionBean1().setMsg("Falta código postal!"); + return false; + } + else + { + cod_postal1 = (String) txtCodPostal1.getText(); + cod_postal2 = (String) txtCodPostal2.getText(); + + if(cod_postal1.trim().length() == 0 || cod_postal2.trim().length() == 0) + { + getSessionBean1().setMsg("Falta código postal!"); + return false; + } + } + + if(txtCodPostal1.getText() != null) + { + if(cod_postal1.trim().length() > 0) + { + try + { + int nr = Integer.parseInt(cod_postal1); + if(nr < 1000 || nr > 9999) + { + getSessionBean1().setMsg("O formato do código postal é : '9999-999'"); + return false; + } + } + catch(Exception ex) + { + getSessionBean1().setMsg("O código postal tem de ser um valor numérico!"); + return false; + } + } + } + + if(txtCodPostal2.getText() != null) + { + if(cod_postal2.trim().length() > 0) + { + if(cod_postal1.trim().length() == 0) + { + getSessionBean1().setMsg("O formato do código postal é : '9999-999'"); + return false; + } + try + { + int nr = Integer.parseInt(cod_postal2); + if(cod_postal2.length() > 3 ) + { + getSessionBean1().setMsg("O formato do código postal é : '9999-999'"); + return false; + } + } + catch(Exception ex) + { + getSessionBean1().setMsg("O código postal de ser um valor numérico!"); + return false; + } + } + + if(txtLocalidade.getText() == null) + { + getSessionBean1().setMsg("Falta localidade!"); + return false; + } + else + { + String localidade = (String) txtLocalidade.getText(); + if(localidade.trim().length() == 0) + { + getSessionBean1().setMsg("Falta localidade!"); + return false; + } + } + + if(txtContactoTelefonico.getText() == null) + { + getSessionBean1().setMsg("Falta contacto telefónico!"); + return false; + } + else + { + String contacto_telefonico = (String) txtContactoTelefonico.getText(); + if(contacto_telefonico.trim().length() == 0) + { + getSessionBean1().setMsg("Falta contacto telefónico!"); + return false; + } + } + + if(rbTurnoManha.getSelected() == null && rbTurnoTarde.getSelected() == null && rbTurnoNoite.getSelected() == null ) + { + getSessionBean1().setMsg("Falta turno de trabalho!"); + return false; + } + + if(txtNomeSuperior.getText() == null) + { + getSessionBean1().setMsg("Falta nome do superior hierárquico!"); + return false; + } + else + { + String nome_superior = (String) txtNomeSuperior.getText(); + if(nome_superior.trim().length() == 0) + { + getSessionBean1().setMsg("Falta nome do superior hierárquico!"); + return false; + } + } + + if(txtEmailSuperior.getText() != null) + { + String email_superior = (String) txtEmailSuperior.getText(); + if(email_superior.trim().length() > 0) + { + if(! utils.Utils.isValidEmail(email_superior)) + { + getSessionBean1().setMsg("Email do superior hierárquico inválido!"); + return false; + } + } + else + { + getSessionBean1().setMsg("Falta email do superior hierárquico!"); + return false; + } + } + else + { + getSessionBean1().setMsg("Falta email do superior hierárquico!"); + return false; + } + } + + if(estado == Global.ESTADO_RH1) + { + + if(rbFormacaoSHSTY.getSelected() == null && rbFormacaoSHSTN.getSelected() == null) + { + getSessionBean1().setMsg("Falta indicar se o colaborador teve formação em SHST!"); + return false; + } + else + { + if(rbFormacaoSHSTY.getSelected() != null) + { + if(rbFormacaoSHSTY.getSelected().equals(new Boolean(false))) + { + if(rbFormacaoSHSTN.getSelected() != null) + { + if(rbFormacaoSHSTN.getSelected().equals(new Boolean(false))) + { + getSessionBean1().setMsg("Falta indicar se o colaborador teve formação em SHST!"); + return false; + } + } + } + } + } + + if(rbFormacaoSHSTN.getSelected() != null) + { + if(rbFormacaoSHSTN.getSelected().equals(new Boolean(true))) + { + if(txtFormacaoSHSTNWhy.getText() == null) + { + getSessionBean1().setMsg("Falta indicar a razão porque o colaborador não teve formação em SHST!"); + return false; + } + else + { + String why = (String) txtFormacaoSHSTNWhy.getText(); + if(why.trim().length() == 0) + { + getSessionBean1().setMsg("Falta indicar a razão porque o colaborador não teve formação em SHST!"); + return false; + } + } + } + + } + + if(rbAcidentesColaboradorY.getSelected() == null && rbAcidentesColaboradorN.getSelected() == null) + { + getSessionBean1().setMsg("Falta indicar se o colaborador teve outras ocorrências, ou não!"); + return false; + } + else + { + if(rbAcidentesColaboradorY.getSelected() != null) + { + if(rbAcidentesColaboradorY.getSelected().equals(new Boolean(false))) + { + if(rbAcidentesColaboradorN.getSelected() != null) + { + if(rbAcidentesColaboradorN.getSelected().equals(new Boolean(false))) + { + getSessionBean1().setMsg("Falta indicar se o colaborador teve outras ocorrências, ou não!"); + return false; + } + } + } + } + } + + if(rbAcidentesColaboradorY.getSelected() != null) + { + + if(rbAcidentesColaboradorY.getSelected().equals(new Boolean(true))) + { + if(txtNrAcidentesColaborador.getText() != null) + { + String nr_str = txtNrAcidentesColaborador.getText().toString(); + if(nr_str.trim().length() > 0) + { + try + { + int nr = Integer.parseInt(nr_str); + } + catch(Exception ex) + { + getSessionBean1().setMsg("O º de acidentes do colaborador deve ser um valor numérico!"); + return false; + } + } + else + { + getSessionBean1().setMsg("Falta indicar o º de ocorrências do colaborador!"); + return false; + } + } + else + { + getSessionBean1().setMsg("Falta indicar o º de ocorrências do colaborador!"); + return false; + } + + if( + txtNrRelatorioAcidentesColaborador1.getText() == null && + txtNrRelatorioAcidentesColaborador2.getText() == null && + txtNrRelatorioAcidentesColaborador3.getText() == null && + txtNrRelatorioAcidentesColaborador1.getText() == null + ) + { + getSessionBean1().setMsg("Falta indicar o(s) º(s) do(s) relatório(s) de acidente do colaborador!"); + return false; + } + else + { + String nr_relatorio1 = ""; + String nr_relatorio2 = ""; + String nr_relatorio3 = ""; + String nr_relatorio4 = ""; + if(txtNrRelatorioAcidentesColaborador1.getText() != null) + { + nr_relatorio1 = (String) txtNrRelatorioAcidentesColaborador1.getText(); + } + if(txtNrRelatorioAcidentesColaborador2.getText() != null) + { + nr_relatorio2 = (String) txtNrRelatorioAcidentesColaborador2.getText(); + } + if(txtNrRelatorioAcidentesColaborador3.getText() != null) + { + nr_relatorio3 = (String) txtNrRelatorioAcidentesColaborador3.getText(); + } + if(txtNrRelatorioAcidentesColaborador4.getText() != null) + { + nr_relatorio4 = (String) txtNrRelatorioAcidentesColaborador4.getText(); + } + + if(nr_relatorio1.trim().length() == 0 && nr_relatorio2.trim().length() == 0 && nr_relatorio3.trim().length() == 0 && nr_relatorio4.trim().length() == 0) + { + getSessionBean1().setMsg("Falta indicar o(s) º(s) do(s) relatório(s) de acidente do colaborador!"); + return false; + } + } + }// + + } + + + + if(rbAcidentesColaboradoresY.getSelected() == null && rbAcidentesColaboradoresN.getSelected() == null) + { + getSessionBean1().setMsg("Falta indicar se houve outras ocorrências com outros colaboradores!"); + return false; + } + else + { + if(rbAcidentesColaboradoresY.getSelected() != null) + { + if(rbAcidentesColaboradoresY.getSelected().equals(new Boolean(false))) + { + if(rbAcidentesColaboradoresN.getSelected() != null) + { + if(rbAcidentesColaboradoresN.getSelected().equals(new Boolean(false))) + { + getSessionBean1().setMsg("Falta indicar se houve outras ocorrências com outros colaboradores!"); + return false; + } + } + } + } + } + + if(rbAcidentesColaboradoresY.getSelected() != null) + { + + if(rbAcidentesColaboradoresY.getSelected().equals(new Boolean(true))) + { + if(txtNrAcidentesColaboradores.getText() != null) + { + String nr_str = txtNrAcidentesColaboradores.getText().toString(); + if(nr_str.trim().length() > 0) + { + try + { + int nr = Integer.parseInt(nr_str); + } + catch(Exception ex) + { + getSessionBean1().setMsg("O º de acidentes dos colaboradores deve ser um valor numérico!"); + return false; + } + } + else + { + getSessionBean1().setMsg("Falta indicar o º de ocorrências com outros colaboradores!"); + return false; + } + } + else + { + getSessionBean1().setMsg("Falta indicar o º de ocorrências com outros colaboradores!"); + return false; + } + + if( + txtNrRelatorioAcidentesColaboradores1.getText() == null && + txtNrRelatorioAcidentesColaboradores2.getText() == null && + txtNrRelatorioAcidentesColaboradores3.getText() == null && + txtNrRelatorioAcidentesColaboradores1.getText() == null + ) + { + getSessionBean1().setMsg("Falta indicar o(s) º(s) do(s) relatório(s) de acidente com outros colaboradores!"); + return false; + } + else + { + String nr_relatorio1 = ""; + String nr_relatorio2 = ""; + String nr_relatorio3 = ""; + String nr_relatorio4 = ""; + if(txtNrRelatorioAcidentesColaboradores1.getText() != null) + { + nr_relatorio1 = (String) txtNrRelatorioAcidentesColaboradores1.getText(); + } + if(txtNrRelatorioAcidentesColaboradores2.getText() != null) + { + nr_relatorio2 = (String) txtNrRelatorioAcidentesColaboradores2.getText(); + } + if(txtNrRelatorioAcidentesColaboradores3.getText() != null) + { + nr_relatorio3 = (String) txtNrRelatorioAcidentesColaboradores3.getText(); + } + if(txtNrRelatorioAcidentesColaboradores4.getText() != null) + { + nr_relatorio4 = (String) txtNrRelatorioAcidentesColaboradores4.getText(); + } + + if(nr_relatorio1.trim().length() == 0 && nr_relatorio2.trim().length() == 0 && nr_relatorio3.trim().length() == 0 && nr_relatorio4.trim().length() == 0) + { + getSessionBean1().setMsg("Falta indicar o(s) º(s) do(s) relatório(s) de acidente com outros colaboradores!"); + return false; + } + } + }// + + } + + } + } + else if(estado == Global.ESTADO_HS) //recomendacoes + { + if(isRecomendacoesEmpty()) + { + getSessionBean1().setMsg("Tem de preencher pelo menos uma recomendação!"); + return false; + } + } + else if(estado == Global.ESTADO_RH2) //medidas + { + if(isMedidasEmpty()) + { + getSessionBean1().setMsg("Tem de preencher pelo menos uma medida!"); + return false; + } +// } +// //else if(estado == Global.ESTADO_MEDICINA) +// else if(estado == Global.ESTADO_RH2) +// { + if(rbIncapacidadeNone.getSelected() == null && rbIncapacidadeTemp.getSelected() == null && rbIncapacidadePerm.getSelected() == null) + { + getSessionBean1().setMsg("Falta indicar o tipo de incapacidade!"); + return false; + } + else + { + if(rbIncapacidadeNone.getSelected() != null) + { + if(rbIncapacidadeNone.getSelected().equals(new Boolean(false))) + { + if(rbIncapacidadeTemp.getSelected() != null) + { + if(rbIncapacidadeTemp.getSelected().equals(new Boolean(false))) + { + if(rbIncapacidadePerm.getSelected() != null) + { + if(rbIncapacidadePerm.getSelected().equals(new Boolean(false))) + { + getSessionBean1().setMsg("Falta indicar o tipo de incapacidade!"); + return false; + } + } + } + } + } + } + } + + if(txtCoefIncapacidade.getText() != null) + { + String coef_str = txtCoefIncapacidade.getText().toString(); + if(coef_str.trim().length() > 0) + { + try + { + int nr = Integer.parseInt(coef_str); + } + catch(Exception ex) + { + getSessionBean1().setMsg("O coeficiente de incapacidade deve ser um valor numérico!"); + return false; + } + } + else + { + getSessionBean1().setMsg("Falta coeficiente de incapacidade!"); + return false; + } + } + else + { + getSessionBean1().setMsg("Falta coeficiente de incapacidade!"); + return false; + } + + if(chkRestricaoCargas.getSelected() != null) + { + Boolean b = (Boolean) chkRestricaoCargas.getSelected(); + if(b.equals(new Boolean(true))) + { + if(txtKgs.getText() != null) + { + String kgs_str = txtKgs.getText().toString(); + try + { + int nr = Integer.parseInt(kgs_str); + } + catch(Exception ex) + { + getSessionBean1().setMsg("O valor de kgs deve ser um valor numérico!"); + return false; + } + } + } + } + } + else if(estado == Global.ESTADO_CONSOLIDACAO) + { + if(chkVerHs.getSelected() == null) + { + getSessionBean1().setMsg("Falta assinatura!"); + return false; + } + else if(chkVerHs.getSelected().equals(new Boolean(false))) + { + getSessionBean1().setMsg("Falta assinatura!"); + return false; + } + } + else if(estado == Global.ESTADO_ASSINATURA_SEG) + { + if(chkVerRespSeg.getSelected() == null) + { + getSessionBean1().setMsg("Falta assinatura!"); + return false; + } + else if(chkVerRespSeg.getSelected().equals(new Boolean(false))) + { + getSessionBean1().setMsg("Falta assinatura!"); + return false; + } + } + else if(estado == Global.ESTADO_ASSINATURA_RH) + { + if(chkVerRespRh.getSelected() == null) + { + getSessionBean1().setMsg("Falta assinatura!"); + return false; + } + else if(chkVerRespRh.getSelected().equals(new Boolean(false))) + { + getSessionBean1().setMsg("Falta assinatura!"); + return false; + } + } + + + return true; + } + + private void createImagesFolder(AnaliseAcidente a) + //private void createImagesFolder(String folderName) + { + String folderName = a.getAnalise_nr().substring(0,2) + a.getAnalise_nr().substring(3); + + ServletContext theApplicationsServletContext = + (ServletContext) this.getExternalContext().getContext(); +// String imageFileFolder = theApplicationsServletContext.getRealPath(Global.IMAGE_FOLDER + "/" + folderName); + String imageFileFolder = Global.IMAGE_FOLDER + "/" + folderName; + try + { +// String imageFileFolderTmp = theApplicationsServletContext.getRealPath(Global.IMAGE_FOLDER + "/tmp" + getSessionBean1().getCurrentUser().getLogin()); + String imageFileFolderTmp = Global.IMAGE_FOLDER + "/tmp" + getSessionBean1().getCurrentUser().getLogin(); + File f = new File(imageFileFolderTmp); + if( f.exists() ) + { + File folder = new File(imageFileFolder); + folder.mkdir(); + + File files[] = f.listFiles(); + + for(int i=0;i 0) + { + gridImages.getChildren().clear(); + } + ServletContext theApplicationsServletContext = + (ServletContext) this.getExternalContext().getContext(); +// String imageFileFolder = theApplicationsServletContext.getRealPath(Global.IMAGE_FOLDER + "/" + folderName); + + + File apacheAnaliseFolder = new File(theApplicationsServletContext.getRealPath( Global.RESOURCES_IMAGE_FOLDER ) + "/analises/" + folderName); + if(apacheAnaliseFolder.exists()) + { + Global global = new Global(); + global.deleteFolderFiles(apacheAnaliseFolder); + System.out.println("FILES DELETED"); + } + else + { + apacheAnaliseFolder.mkdir(); + } + + + + String imageFileFolder = Global.IMAGE_FOLDER + "/" + folderName; + try + { + File f = new File(imageFileFolder); + + if(f.exists()) + { + File images[] = f.listFiles(); + Arrays.sort(images); + for(int i=0;i"; + + System.out.println( "Sending mail to next user." ); + + String responsavel_loja = "n"; + switch ( estado.intValue() ) + { + case Global.ESTADO_RH1: + tipo = new Integer( Global.TIPO_UTILIZADOR_RH ); + break; + case Global.ESTADO_HS: + tipo = new Integer( Global.TIPO_UTILIZADOR_HS ); + break; + case Global.ESTADO_RH2: + tipo = new Integer( Global.TIPO_UTILIZADOR_RH ); + break; + case Global.ESTADO_CONSOLIDACAO: + tipo = new Integer( Global.TIPO_UTILIZADOR_HS ); + break; + case Global.ESTADO_ASSINATURA_SEG: + tipo =new Integer( Global.TIPO_UTILIZADOR_SEGURANCA ); + responsavel_loja = "y"; + break; + case Global.ESTADO_ASSINATURA_RH: + tipo = new Integer( Global.TIPO_UTILIZADOR_RH ); + responsavel_loja = "y"; + break; + case Global.ESTADO_FECHAR: + tipo = new Integer( Global.TIPO_UTILIZADOR_HS ); + break; + } + +// if(estado.intValue() == Global.ESTADO_FECHAR) +// { +// tipo = new Integer(Global.TIPO_UTILIZADOR_HS); // hs +// } +// else +// { +// tipo = estado; +// } + +// UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + + ArrayList list = udp.getUtilizadoresListByTipo( tipo, responsavel_loja, a.getEstabelecimento_id() ); + ListIterator iter = list.listIterator(); + while ( iter.hasNext() ) + { + Utilizador u = ( Utilizador ) iter.next(); + System.out.println( "USER MAIL NEXT FASE : " + u.getLogin() + " ; " + u.getEmail() ); + try + { + //sendEmail(u.getEmail(), Global.ENDERECO_ENVIO, assunto, texto_email); + sendEmailWithPdf( a, u.getEmail(), Global.ENDERECO_ENVIO, assunto, texto_email ); + } + catch ( Exception ex1 ) + { + errorMessage += "Erro a enviar email para " + u.getEmail(); + boolean isValid = EmailValidator.getInstance().isValid( u.getEmail() ); + if ( ! isValid ) + { + errorMessage += " : email inválido."; + } + errorMessage += "
"; + + ErrorLogger.logException( ex1 ); + System.out.println("MAIL ERROR : " + ex1.getMessage()); + } + + } + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + + return errorMessage; + } + + private String sendEmailResponsavelHierarquico( AnaliseAcidente a ) + { + String errorMessage = ""; + + Acidentado ac = getSessionBean1().getAcidentado(); + String assunto = "Comunicação de Análise de Acidentes de Trabalho de " + ac.getNome(); + + String data_acidente = ""; + try + { + java.util.Date ddate = new java.util.Date( a.getData_acidente().getTime() ); + data_acidente = utils.Utils.dateToYYYYMMDD( ddate ); + } + catch ( Exception ex ) + { +// ErrorLogger.logException( ex ); + } + + String texto_email = "

Caro(a) Colega,

"; + texto_email += "

Na sequência do acidente de trabalho do colaborador "; + texto_email += ac.getNome(); + texto_email += " no dia " + data_acidente; + texto_email += ", vimos pelo presente remeter cópia da análise do acidente " + a.getAnalise_nr() + " que se encontra em processo de averiguação pelo departamento de Segurança, Recursos Humanos e pela SIPRP para seu conhecimento. Caso tenha qualquer informação importante sobre o processo ou pretenda esclarecimentos adicionais contacte, por favor, a secção de Recursos Humanos.

"; + texto_email += "

Cumprimentos.

"; + try + { + sendEmailWithPdf( a, ac.getEmail_superior_hierarquico(), Global.ENDERECO_ENVIO, assunto, texto_email ); + //sendEmail(ac.getEmail_superior_hierarquico(), Global.ENDERECO_ENVIO, assunto, texto_email); + } + catch ( Exception ex ) + { + errorMessage += "Error a enviar email para " + ac.getEmail_superior_hierarquico(); + boolean isValid = EmailValidator.getInstance().isValid( ac.getEmail_superior_hierarquico() ); + if ( ! isValid ) + { + errorMessage += " : email inválido."; + } + errorMessage += "
"; + ErrorLogger.logException( ex ); + } + + return errorMessage; + } + + private String sendEmailFimProcesso( AnaliseAcidente a ) + { + String errorMessage = ""; + + Acidentado ac = getSessionBean1().getAcidentado(); + String assunto = "Fecho do Processo de Análise de Acidente de Trabalho de " + ac.getNome(); + + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + + ArrayList responsavelRh_list = udp.getResponsavelRhList(a.getEstabelecimento_id()); + if ( responsavelRh_list != null ) + { + ListIterator iter = responsavelRh_list.listIterator(); + while ( iter.hasNext() ) + { + Utilizador u = ( Utilizador ) iter.next(); + String texto_email = "

Exmo. (a) Senhor(a), " + u.getNome() + "

"; + texto_email += "

Informamos que o processo de análise de acidente de trabalho nº " + a.getAnalise_nr() + " se encontra finalizado, "; + texto_email += "pelo que solicitamos a sua impressão e arquivamento em pasta própria, juntamente com a participação de sinistro à seguradora.

"; + texto_email += "

Caso pretenda qualquer esclarecimento, contacte-nos, por favor, através de acidentes.auchan@siprp.pt ou pelo telefone 213 504 540.

"; + texto_email += "

Os melhores cumprimentos.

"; + texto_email += "

SIPRP

"; + try + { + //sendEmail(u.getEmail(), Global.ENDERECO_ENVIO, assunto, texto_email); + sendEmailWithPdf(a, u.getEmail(), Global.ENDERECO_ENVIO, assunto, texto_email); + } + catch ( Exception ex ) + { + errorMessage += "Erro a enviar email para " + u.getEmail(); + boolean isValid = EmailValidator.getInstance().isValid( u.getEmail() ); + if ( ! isValid ) + { + errorMessage += " : email inválido."; + } + errorMessage += "
"; + ErrorLogger.logException( ex ); + } + } + } + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + return errorMessage; + } + + private String sendEmailToRhFase4(AnaliseAcidente a) + { + String errorMessage = ""; + + System.out.println("SEND EMAIL TO RH FASE 4"); + Acidentado ac = getSessionBean1().getAcidentado(); + //String assunto = "SIPRP ¯ Fecho do Processo de Análise de Acidente de Trabalho nº " + a.getAnalise_nr() + " ¯ Ficheiro para Impressão"; + String assunto = "SIPRP - Fecho do Processo de Análise de Acidente de Trabalho nº " + a.getAnalise_nr() + " - Ficheiro para Impressão"; + +// UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + + Utilizador urh = udp.getUtilizador(a.getRh_fase4()); + String texto_email = "

Exmo. (a) Senhor(a),

"; + texto_email += "

Confirmamos que o processo de Análise de Acidente de Trabalho nº " + a.getAnalise_nr() + " se encontra encerrado após o preenchimento e validação de todos os intervenientes.

"; + texto_email += "

Sugerimos que imprima o ficheiro que enviamos em anexo e o junte à Participação de Sinistro à Seguradora para dar conhecimento ao Médico do Trabalho do seu estabelecimento. Após o seu conhecimento, aconselhamos que entregue uma cópia da Ficha de Análise de Acidente de Trabalho à equipa de Saúde Ocupacional, para que esta a arquive no processo clínico do trabalhador antes de juntar toda a documentação no processo individual do colaborador nos Recursos Humanos.

"; + texto_email += "

Agradecemos a sua colaboração e ficamos ao dispor para qualquer esclarecimento através dos telefones 213 504 544 (Catarina Leonardo) ou 213 504 542 (Sónia Campos).

"; + texto_email += "

Os melhores cumprimentos,

"; + texto_email += "

A equipa da SIPRP

"; + try + { + sendEmailWithPdf(a, urh.getEmail(), Global.ENDERECO_ENVIO, assunto, texto_email); + } + catch (Exception ex) + { + errorMessage += "Erro a enviar email para " + urh.getEmail(); + boolean isValid = EmailValidator.getInstance().isValid( urh.getEmail() ); + if ( ! isValid ) + { + errorMessage += " : email inválido."; + } + errorMessage += "
"; + ErrorLogger.logException(ex); + System.out.println("EMAIL FASE 4 ERROR : " + ex.getMessage()); + } + } catch (Exception ex) { + ErrorLogger.logException(ex); + } + + return errorMessage; + } + +// private void sendEmail(String emailTo, String emailFrom, String assunto, String texto_email) throws Exception +// { +// Properties props = new Properties(); +// //props.put("mail.transport.protocol", "smtp"); +// props.put("mail.smtp.host", "smtp.netcabo.pt"); +// props.put("mail.from", emailFrom); +// Session session1 = Session.getInstance(props); +// Message msg = new MimeMessage(session1); +// +//// try +//// { +// //Address Email_TO = new InternetAddress("myemail@bol.com.br"); +// msg.setFrom(new InternetAddress(emailFrom)); +// InternetAddress[] address = {new InternetAddress(emailTo)}; +// msg.setRecipients(Message.RecipientType.TO, address); +// msg.setSubject(assunto); +// msg.setSentDate(new Date()); +// Multipart multipart = new MimeMultipart(); +// BodyPart msgBodyPart = new MimeBodyPart(); +// String html; +// html=" "; +// html+=""; +// html+= texto_email; +// html+=""; +// msgBodyPart.setContent(html, "text/html"); +// multipart.addBodyPart(msgBodyPart); +// msg.setContent(multipart); +// Transport.send(msg); +// System.out.println("Email Enviado !!!! "); +//// } +//// catch (Exception ex) +//// { +//// System.out.println("MAIL ERROR : " + ex.getMessage()); +//// ErrorLogger.logException( ex ); +//// } +// +// } + + private final String SMTP_HOST = "mail2.evolute.pt"; + private final int SMTP_PORT = 587; + + private final String mail_username = "acidentes.auchan@siprp.pt"; + private final String mail_password = "EghRzS2l"; + + private final String mail_bcc = "acidentes.auchan@siprp.pt"; + private final String mail_bcc2 = "siprp.aat@evolute.pt"; + +// private void sendEmail(String emailTo, String emailFrom, String assunto, String texto_email) +// throws Exception +// { +// Properties props = new Properties(); +// //props.put("mail.transport.protocol", "smtp"); +// props.put("mail.smtp.host", SMTP_HOST ); +// props.put("mail.from", emailFrom); +// props.put("mail.smtp.auth", "true"); +// props.put("mail.smtp.user", mail_username ); +// props.put("mail.smtp.password", mail_password ); +// +// Session session = Session.getDefaultInstance( props ); +// +// Message msg = new MimeMessage(session); +// msg.setFrom(new InternetAddress(emailFrom)); +// InternetAddress[] address = {new InternetAddress(emailTo)}; +// msg.setRecipients(Message.RecipientType.TO, address); +// +// InternetAddress[] addressBCC = new InternetAddress[ 2 ]; +// addressBCC[ 0 ] = new InternetAddress( mail_bcc ); +// addressBCC[ 1 ] = new InternetAddress( mail_bcc2 ); +// msg.setRecipients( Message.RecipientType.BCC, addressBCC ); +// +// ((MimeMessage)msg).setSubject(assunto, "UTF-8"); +// msg.setSentDate(new Date()); +// Multipart multipart = new MimeMultipart(); +// BodyPart msgBodyPart = new MimeBodyPart(); +// String html; +// html=" "; +// html+=""; +// html+= texto_email; +// html+=""; +// msgBodyPart.setContent(html, "text/html"); +// multipart.addBodyPart(msgBodyPart); +// msg.setContent(multipart); +// +// Transport t; +// t = session.getTransport( "smtp" ); +// +// t.connect( SMTP_HOST, SMTP_PORT, mail_username, mail_password ); +// t.sendMessage( msg, msg.getAllRecipients() ); +// +// t.close(); +// System.out.println("Email Enviado !!!!" ); +// } + + private void sendEmailWithPdf(AnaliseAcidente a, String emailTo, String emailFrom, String assunto, String texto_email) + throws Exception + { + System.out.println("\nSEND EMAIL WITH PDF"); + + System.out.println( "\temailTo : " + emailTo ); + System.out.println( "\temailFrom : " + emailFrom ); + System.out.println( "\tAnaliseAcidente : " + ( a == null ? "null" : a.getId() ) ); + System.out.println( "\t\tTecnicoSaudeID : " + (a == null ? "a null" : "" + a.getTecnico_saude_id()) ); + System.out.println( "\t\tMedicoID : " + (a == null ? "a null" : "" + a.getMedico_id() ) ); + + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + + Utilizador ut = udp.getUtilizador(a.getTecnico_saude_id()); + Utilizador um = udp.getUtilizador(a.getMedico_id()); +// AnalisesDataProvider adp = new AnalisesDataProvider(); + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + Acidentado ac = adp.getAcidentado(a.getAcidentado_id()); + Estabelecimento e = new Estabelecimento(); + e.setId(a.getEstabelecimento_id()); + e.setNome(adp.getEstabelecimentoNome(a.getEstabelecimento_id())); + Seccao s = adp.getSeccao(a.getSeccao_id()); + Causa c = adp.getCausa(a.getCausas()); + ArrayList recList = adp.getRecomendacoesByAnalise(a.getId()); + Recomendacao[] recArray = new Recomendacao[recList.size()]; + ListIterator iter = recList.listIterator(); + int i = 0; + while(iter.hasNext()) + { + Recomendacao rec = (Recomendacao) iter.next(); + recArray[i] = rec; + i++; + } + //Recomendacao recArray[] = (Recomendacao)recList.toArray(); + ArrayList medList = adp.getMedidasByAnalise(a.getId()); + //Medida medArray[] = (Medida)medList.toArray(); + Medida[] medArray = new Medida[medList.size()]; + iter = medList.listIterator(); + i = 0; + while(iter.hasNext()) + { + Medida med = (Medida) iter.next(); + medArray[i] = med; + i++; + } + + PdfGenerator pdf = new PdfGenerator(Global.IMAGE_FOLDER, e, ut, um, a, ac, s, recArray, medArray, c); + + ByteArrayDataSource ds = new ByteArrayDataSource( pdf.generatePdf(), "application/pdf" ); + Properties props = new Properties(); + //props.put("mail.transport.protocol", "smtp"); + props.put("mail.smtp.host", SMTP_HOST ); + props.put("mail.from", emailFrom); + props.put("mail.smtp.auth", "true"); + props.put("mail.smtp.user", mail_username ); + props.put("mail.smtp.password", mail_password ); + +// Authenticator auth = new SMTPAuthenticator(); +// Session session = Session.getDefaultInstance(props, auth); + Session session = Session.getDefaultInstance( props ); + + Message msg = new MimeMessage(session); + msg.setFrom(new InternetAddress(emailFrom)); + InternetAddress[] address = {new InternetAddress(emailTo)}; + msg.setRecipients(Message.RecipientType.TO, address); + + InternetAddress[] addressBCC = new InternetAddress[ 2 ]; + addressBCC[ 0 ] = new InternetAddress( mail_bcc ); + addressBCC[ 1 ] = new InternetAddress( mail_bcc2 ); + msg.setRecipients( Message.RecipientType.BCC, addressBCC ); + + ((MimeMessage)msg).setSubject(assunto, "UTF-8"); + msg.setSentDate(new Date()); + Multipart multipart = new MimeMultipart(); + BodyPart msgBodyPart = new MimeBodyPart(); + String html; + html=" "; + html+=""; + html+= "
" + texto_email + "
"; + html+=""; + msgBodyPart.setContent(html, "text/html"); + multipart.addBodyPart(msgBodyPart); + + MimeBodyPart pdfPart = new MimeBodyPart(); + //pdfPart.setContent(ds,"application/pdf"); + pdfPart.setDataHandler(new DataHandler(ds)); + pdfPart.setHeader("Content-Transfer-Encoding","base64"); + pdfPart.setHeader("Content-Disposition","attachment"); + String pdfname = "Analise" + a.getAnalise_nr(); + pdfPart.setFileName(pdfname); + multipart.addBodyPart(pdfPart,1); + + msg.setContent( multipart ); + + Transport t; + t = session.getTransport( "smtp" ); + + t.connect( SMTP_HOST, SMTP_PORT, mail_username, mail_password ); + t.sendMessage( msg, msg.getAllRecipients() ); + + t.close(); + System.out.println("Email Pdf Enviado !!!! " + emailTo); + } + + public String butImprimir_action() + { +// AnaliseAcidente a = getSessionBean1().getCurrentAnalise(); +// if(a.getEstado().intValue() == ESTADO_IMPRESSAO) +// { +// Pdf pdf = new Pdf(); +// pdf.generatePdf(a); +// } + + if(validationOk()) + { + AnaliseAcidente a = fillAnaliseFields(); + Acidentado ac = null; + ArrayList recs = null; + ArrayList meds = null; + int estado = a.getEstado().intValue(); + //if(estado == ESTADO_SEG || estado == ESTADO_RH1) +// if(estado == Global.ESTADO_RH1) +// { +// ac = fillAcidentadoFields(); +// } +// else if(estado == Global.ESTADO_HS) +// { +// a.setTecnico_saude_id(getSessionBean1().getCurrentUser().getId()); +// recs = fillAnaliseRecomendacoesHs(a); +// } +// else if(estado == Global.ESTADO_RH2) +// { +// meds = fillAnaliseMedidasRh(a); +// } +// int novo_estado = a.getEstado().intValue(); +// +// if(a.getCorrecao().matches("y")) +// { +// a.setCorrecao("n"); +// a.setEstado(a.getEstado_antes_correcao()); +// a.setEstado_antes_correcao(null); +// a.setObservacoes_correcao(""); +// } +// else +// { +// if(novo_estado < Global.ESTADO_CONCLUIDO) +// { +// novo_estado++; +// // if(novo_estado == ESTADO_MEDICO) +// // { +// // novo_estado++; //skip medico +// // } +// if(novo_estado == Global.ESTADO_ASSINATURAS) +// { +// a.setEstado_assinatura(new Integer(ESTADO_ASSINATURA_1)); +// notifyNextSignature(new Integer(ESTADO_ASSINATURA_1)); +// } +// } +// a.setEstado(new Integer(novo_estado)); +// } + + try + { + update(a, ac, recs, meds); + chkVerRespRh.setDisabled(true); + //createImagesFolder(analiseId.toString()); +// updateImagesFolder(a.getId().toString()); +// sendMailToNextUser(new Integer(novo_estado)); +// String navFrom = getSessionBean1().getNavFrom(); +// if(navFrom.matches("FormSeguranca")) +// { +// return "form_seguranca"; +// } +// else if(navFrom.matches("FormRH")) +// { +// return "form_rh"; +// } +// else if(navFrom.matches("FormHS")) +// { +// return "form_hs"; +// } +// else if(navFrom.matches("FormMedico")) +// { +// return "form_medico"; +// } + } + catch(Exception ex) + { + getSessionBean1().setMsg("Erro na actualização da análise !"); + ErrorLogger.logException( ex ); + } + } + + return null; + } + +// private void buildPdf(AnaliseAcidente a) +// { +// +// // create pdf folder +// String pdf_folder = createPdfFolder(a.getId().toString()); +// if(pdf_folder != null) +// { +// hidDisableEnviar.setValue(a.getId().toString()); +// Pdf pdf = new Pdf(); +// pdf.generatePdf(pdf_folder, a); +// } +// } + + +// private String createPdfFolder(String folderName) +// { +// ServletContext theApplicationsServletContext = +// (ServletContext) this.getExternalContext().getContext(); +// String pdfFileFolder = theApplicationsServletContext.getRealPath(PDFS_FOLDER_URL + "/" + folderName); +// try +// { +// //String imageFileFolderTmp = theApplicationsServletContext.getRealPath(IMAGE_URL + "/tmp" + getSessionBean1().getCurrentUser().getLogin()); +// File folder = new File(pdfFileFolder); +// if(! folder.exists()) +// { +// folder.mkdir(); +// } +// else +// { +// //remove all existing files +// File files[] = folder.listFiles(); +// +// for(int i=0;i 0) + { + booNrOk = true; + } + else + { + nr_mecano = null; + } + } + + if(txtNomeTrabalhador.getText() != null) + { + nome = (String) txtNomeTrabalhador.getText(); + if(nome.trim().length() > 0) + { + booNomeOk = true; + } + else + { + nome = null; + } + } + + if(! booNrOk && !booNomeOk) + { + getSessionBean1().setMsg("Tem de preencher Numero Mecanográfico ou Nome"); + return null; + } + +// AnalisesDataProvider adp = new AnalisesDataProvider(); + + Trabalhador t = null; + if(nome != null) + { + nome = utils.Utils.textToUnicode( nome.toUpperCase()); + } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList list = adp.searchTrabalhador(getSessionBean1().getCurrentUser().getEmpresa_id(), getSessionBean1().getCurrentUser().getEstabelecimento_id(), nr_mecano, nome ); + if(list.size() == 1) + { + t = (Trabalhador) list.get(0); + txtTrabalhador.setText(t.getNome()); + txtNomeAcidentado.setText(t.getNome()); + txtDataNascimento.setText(t.getData_nascimento()); + Acidentado a = new Acidentado(); + a.setTrabalhador_id(t.getId()); + a.setData_nascimento(t.getData_nascimento()); + a.setNome(t.getNome()); + a.setFuncao(utils.Utils.unicodeToHTML(t.getFuncao())); + a.setData_admissao(t.getData_admissao()); + a.setNumero_mecanografico(t.getNumero_mecanografico()); + getSessionBean1().setAcidentado(a); + gridSiprp.setRendered(true); + gridDadosAcidenteSeg.setRendered(true); + gridTrabalhadores.setRendered(false); + } + else + { + tblTrabalhadores.setRendered(true); + getSessionBean1().getTrabalhadoresListDataProvider().setList(list); + } + if(getSessionBean1().getCurrentAnalise() != null) // new analise) + { + gridTrabalhadores.setRendered(false); + } + } + catch(Exception ex) + { + getSessionBean1().setMsg("Trabalhador inexistente ! "); + tblTrabalhadores.setRendered(false); + txtTrabalhador.setText(""); + gridSiprp.setRendered(false); + gridDadosAcidenteSeg.setRendered(false); + ErrorLogger.logException( ex ); + } + + return null; + } + + public String lnkPOR_action() { + // TODO: Replace with your code + getSessionBean1().setIeBug(true); + Trabalhador t = getTrabalhadorRowData(); + Acidentado ac = setAcidentado(t); + gridSiprp.setRendered(true); + gridAcidentadoView.setRendered(true); + gridDadosAcidenteSeg.setRendered(true); + gridTrabalhadores.setRendered(false); + fillAcidentadoView(ac); + return null; + } + + public String lnkNomeTrabalhador_action() { + // TODO: Replace with your code + getSessionBean1().setIeBug(true); + Trabalhador t = getTrabalhadorRowData(); + Acidentado ac = setAcidentado(t); + gridSiprp.setRendered(true); + gridAcidentadoView.setRendered(true); + gridDadosAcidenteSeg.setRendered(true); + gridTrabalhadores.setRendered(false); + fillAcidentadoView(ac); + return null; + } + + public String lnkEstabelecimentoTrabalhador_action() { + // TODO: Replace with your code + getSessionBean1().setIeBug(true); + Trabalhador t = getTrabalhadorRowData(); + Acidentado ac = setAcidentado(t); + gridSiprp.setRendered(true); + gridAcidentadoView.setRendered(true); + gridDadosAcidenteSeg.setRendered(true); + gridTrabalhadores.setRendered(false); + fillAcidentadoView(ac); + return null; + } + + private Trabalhador getTrabalhadorRowData() + { + RowKey rk = tableRowGroup1.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + TrabalhadoresListDataProvider provider = (TrabalhadoresListDataProvider) tableRowGroup1.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + Trabalhador t = (Trabalhador)list.get(k); + return t; + } + + private Acidentado setAcidentado(Trabalhador t) + { + txtTrabalhador.setText(t.getNome()); + txtNomeAcidentado.setText(t.getNome()); + txtDataNascimento.setText(t.getData_nascimento()); + Acidentado a = new Acidentado(); + a.setTrabalhador_id(t.getId()); + a.setData_nascimento(t.getData_nascimento()); + a.setNome(t.getNome()); + a.setMorada(""); + a.setFuncao(utils.Utils.unicodeToHTML(t.getFuncao())); + a.setData_admissao(t.getData_admissao()); + a.setNumero_mecanografico(t.getNumero_mecanografico()); + a.setEstabelecimento_origem(t.getEstabelecimento()); + getSessionBean1().setAcidentado(a); + return a; + } + + public String butCorrecao_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + getSessionBean1().setIeBug(true); + getSessionBean1().setCorrecao(null); + return "correcao"; + } + + public String lnkNewUser_action() { + // TODO: Replace with your code + + return null; + } + + private boolean isRecomendacoesEmpty() + { + boolean res = true; + + for(int i=0; i < gridRecomendacoes.getChildren().size(); i++) + { + HtmlPanelGrid g = (HtmlPanelGrid) gridRecomendacoes.getChildren().get(i); + TextArea t = (TextArea) g.getChildren().get(1); + if(t.getText() != null) + { + String txt = (String) t.getText(); + if(txt.trim().length() > 0) + { + res = false; + break; + } + } + } + + return res; + } + + private boolean isMedidasEmpty() + { + boolean res = true; + + for(int i=0; i < gridMedidas.getChildren().size(); i++) + { + HtmlPanelGrid g = (HtmlPanelGrid) gridMedidas.getChildren().get(i); + TextArea t = (TextArea) g.getChildren().get(1); + if(t.getText() != null) + { + String txt = (String) t.getText(); + if(txt.trim().length() > 0) + { + res = false; + break; + } + } + } + + return res; + } + + public void drpDepartamento_processValueChange(ValueChangeEvent event) + { + // TODO: Replace with your code + + Integer departamento_id = (Integer) drpDepartamento.getSelected(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + if(departamento_id.intValue()== 0) + { + getSessionBean1().setSeccaoOptions(adp.getSeccoesList(null)); + } + else + { + getSessionBean1().setSeccaoOptions(adp.getSeccoesList(departamento_id)); + } + + drpSeccao.setSelected(new Integer(0)); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + hidAnchor.setValue("dados"); + } + + public String lnkAjuda_action() { + // TODO: Replace with your code +// ServletContext theApplicationsServletContext = +// (ServletContext) this.getExternalContext().getContext(); +// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); +// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf"; +// +// Global global = new Global(); +// try +// { +// global.showPdf(pdfFilePath); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + getSessionBean1().setIeBug(true); + return null; + } + + private boolean checkRecomendacoesLen() + { +// AnalisesDataProvider adp = new AnalisesDataProvider(); + HashMap meta = new HashMap(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + meta = adp.getMetaData("recomendacoes"); + ArrayList list = new ArrayList(); + ListIterator iter = gridRecomendacoes.getChildren().listIterator(); + while(iter.hasNext()) + { + HtmlPanelGrid grd = (HtmlPanelGrid)iter.next(); + TextArea ta = (TextArea) grd.getChildren().get(1); + if(ta.getText() != null ) + { + String txt = (String) ta.getText(); + if(txt.length() > 0) + { + int len = ( (Integer) meta.get("recomendacao") ).intValue(); + if(txt.length() > len) + { + getSessionBean1().setMsg("Os Campos Recomendações não podem exceder " + len + " caracteres!"); + return false; + } + } + } + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + return false; + } + return true; + } + + private boolean checkMedidasLen() + { + HashMap meta = new HashMap(); + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + meta = adp.getMetaData("medidas"); + ArrayList list = new ArrayList(); + ListIterator iter = gridMedidas.getChildren().listIterator(); + while(iter.hasNext()) + { + HtmlPanelGrid grd = (HtmlPanelGrid)iter.next(); + TextArea ta = (TextArea) grd.getChildren().get(1); + if(ta.getText() != null ) + { + String txt = (String) ta.getText(); + if(txt.length() > 0) + { + int len = ( (Integer) meta.get("medida") ).intValue(); + if(txt.length() > len) + { + getSessionBean1().setMsg("Os Campos Medidas não podem exceder " + len + " caracteres!"); + return false; + } + } + } + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + return false; + } + + return true; + } + + public String lnkPlanosActuacao_action() { + // TODO: Replace with your code + return null; + } + +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ApplicationBean1.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ApplicationBean1.java new file mode 100644 index 00000000..36df6ef2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ApplicationBean1.java @@ -0,0 +1,100 @@ +/* + * ApplicationBean1.java + * + * Created on September 18, 2007, 3:14 PM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import com.sun.rave.web.ui.appbase.AbstractApplicationBean; +import javax.faces.FacesException; + +/** + *

Application scope data bean for your application. Create properties + * here to represent cached data that should be made available to all users + * and pages in the application.

+ * + *

An instance of this class will be created for you automatically, + * the first time your application evaluates a value binding expression + * or method binding expression that references a managed bean using + * this class.

+ */ +public class ApplicationBean1 extends AbstractApplicationBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + //
+ + /** + *

Construct a new application data bean instance.

+ */ + public ApplicationBean1() { + } + + /** + *

This method is called when this bean is initially added to + * application scope. Typically, this occurs as a result of evaluating + * a value binding or method binding expression, which utilizes the + * managed bean facility to instantiate this bean and store it into + * application scope.

+ * + *

You may customize this method to initialize and cache application wide + * data values (such as the lists of valid options for dropdown list + * components), or to allocate resources that are required for the + * lifetime of the application.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("ApplicationBean1 Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

This method is called when this bean is removed from + * application scope. Typically, this occurs as a result of + * the application being shut down by its owning container.

+ * + *

You may customize this method to clean up resources allocated + * during the execution of the init() method, or + * at any later time during the lifetime of the application.

+ */ + public void destroy() { + } + + /** + *

Return an appropriate character encoding based on the + * Locale defined for the current JavaServer Faces + * view. If no more suitable encoding can be found, return + * "UTF-8" as a general purpose default.

+ * + *

The default implementation uses the implementation from + * our superclass, AbstractApplicationBean.

+ */ + public String getLocaleCharacterEncoding() { + return super.getLocaleCharacterEncoding(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Bundle.properties b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Bundle.properties new file mode 100644 index 00000000..13e936fe --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Bundle.properties @@ -0,0 +1 @@ +# Sample ResourceBundle properties file diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ConfirmarDesactivar.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ConfirmarDesactivar.java new file mode 100644 index 00000000..bffd73e9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ConfirmarDesactivar.java @@ -0,0 +1,304 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package analiseacidentestrabalho; + +import beans.AnaliseAcidente; +import beans.Utilizador; +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Hyperlink; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.TextArea; +import db.providers.AnalisesDataProvider; +import global.Global; +import java.util.Date; +import javax.faces.FacesException; +import javax.faces.context.FacesContext; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ * + * @version ConfirmarDesactivar.java + * @version Created on Oct 11, 2010, 3:38:04 PM + * @author dneves + */ + +public class ConfirmarDesactivar extends AbstractPageBean +{ + + private Hyperlink lnkPlanosActuacao = new Hyperlink(); + public Hyperlink getLnkPlanosActuacao() + { + return lnkPlanosActuacao; + } + public void setLnkPlanosActuacao( Hyperlink h ) + { + this.lnkPlanosActuacao = h; + } + + private StaticText lblUser = new StaticText(); + public StaticText getLblUser() + { + return lblUser; + } + public void setLblUser( StaticText st ) + { + this.lblUser = st; + } + + private StaticText txtMsg = new StaticText(); + public StaticText getTxtMsg() + { + return txtMsg; + } + public void setTxtMsg( StaticText st ) + { + this.txtMsg = st; + } + + private StaticText textAnalise = new StaticText(); + public StaticText getTextAnalise() + { + return textAnalise; + } + public void setTextAnalise( StaticText textAnalise ) + { + this.textAnalise = textAnalise; + } + + private TextArea textComentario = new TextArea(); + public TextArea getTextComentario() + { + return textComentario; + } + public void setTextComentario( TextArea textComentario ) + { + this.textComentario = textComentario; + } + + + private void _init() throws Exception + { + + } + + + public ConfirmarDesactivar() + { + + } + + + @Override + public void init() + { + super.init(); + + try + { + _init(); + } + catch ( Exception e ) + { + log( "ConfirmarDesactivar Initialization Failure", e ); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + if ( ! canAccess() ) + { + try + { + getExternalContext().redirect( "Login.jsp" ); + } + catch( Exception e ) + { + ErrorLogger.logException( e ); + } + } + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + @Override + public void preprocess() + { + txtMsg.setText( getSessionBean1().getMsg() ); + getSessionBean1().setMsg( "" ); + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + @Override + public void prerender() + { + System.out.println( "=== CONFIRMAR_DESACTIVACAO ===" ); + + lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); + + AnaliseAcidente analise = getSessionBean1().getCurrentAnalise(); + if ( analise != null ) + { + textAnalise.setText( "Análise nº " + analise.getAnalise_nr() ); + } + else + { + textAnalise.setText( "Análise inválida." ); + } + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + @Override + public void destroy() + { + + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1) getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1) getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1) getBean("ApplicationBean1"); + } + + private boolean canAccess() + { + boolean canAccess = false; + + if ( getSessionBean1().isLoggedIn() ) + { + Utilizador u = getSessionBean1().getCurrentUser(); + if ( u != null && u.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP ) + { + canAccess = true; + } + } + + return canAccess; + } + + public String lnkPlanosActuacao_action() + { + Utilizador u = getSessionBean1().getCurrentUser(); + FacesContext fc = getFacesContext().getCurrentInstance(); + Global.redirectToPlanos(fc, u); + return null; + } + + public String lnkNewUser_action() + { + getSessionBean1().setNavFrom( "EstatisticasProcesso" ); + return "gestao_utilizadores"; + } + + public String lnkEditUser_action() + { + getSessionBean1().setNavFrom( "EstatisticasProcesso" ); + getSessionBean1().setModoEdicaoUtilizador( "edit" ); + return "user"; + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), true ); + + return null; + } + + public String buttonCancelar_action() + { + getSessionBean1().setCurrentAnalise( null ); + return "formDirSiprp"; + } + + public String buttonConfirmar_action() + { + Utilizador currentUser = getSessionBean1().getCurrentUser(); + AnaliseAcidente analise = getSessionBean1().getCurrentAnalise(); + if ( userCanDesactivarAnalise( currentUser ) && analise != null ) + { + try + { + String comentario = null; + if ( textComentario.getText() != null ) + { + comentario = ( ( String ) textComentario.getText() ).trim(); + comentario = "".equals( comentario ) ? null : comentario; + comentario = comentario != null ? comentario.replaceAll( "\n", "
" ) : null; + } + + analise.setEstado( Global.ESTADO_CONCLUIDO ); + analise.setConcluido_por_desactivacao( Boolean.TRUE ); + analise.setData_desactivacao( new Date() ); + analise.setComentario_desactivacao( comentario ); + + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + adp.updateAnalise( analise ); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + getSessionBean1().setMsg( "Erro a desactivar análise.\n" + e.getMessage() ); + } + } + + return "formDirSiprp"; + } + + private boolean userCanDesactivarAnalise( Utilizador user ) + { + boolean canDesactivar = false; + if ( user != null ) + { + int userType = user.getTipo() == null ? -1 : user.getTipo().intValue(); + canDesactivar = userType == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP; + } + return canDesactivar; + } +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Dummy.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Dummy.java new file mode 100644 index 00000000..199b84af --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Dummy.java @@ -0,0 +1,424 @@ +/* + * Dummy.java + * + * + * Created on September 19, 2007, 10:56 AM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.HiddenField; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.model.SingleSelectOptionsList; +import javax.faces.FacesException; +import javax.faces.event.ActionEvent; +import javax.faces.event.ValueChangeEvent; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class Dummy extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HiddenField hiddenField1 = new HiddenField(); + + public HiddenField getHiddenField1() { + return hiddenField1; + } + + public void setHiddenField1(HiddenField hf) { + this.hiddenField1 = hf; + } + + private HiddenField hidConfEnviar = new HiddenField(); + + public HiddenField getHidConfEnviar() { + return hidConfEnviar; + } + + public void setHidConfEnviar(HiddenField hf) { + this.hidConfEnviar = hf; + } + + private HiddenField hidConfDelete = new HiddenField(); + + public HiddenField getHidConfDelete() { + return hidConfDelete; + } + + public void setHidConfDelete(HiddenField hf) { + this.hidConfDelete = hf; + } + private SingleSelectOptionsList dropDown1DefaultOptions = new SingleSelectOptionsList(); + + public SingleSelectOptionsList getDropDown1DefaultOptions() { + return dropDown1DefaultOptions; + } + + public void setDropDown1DefaultOptions(SingleSelectOptionsList ssol) { + this.dropDown1DefaultOptions = ssol; + } + private SingleSelectOptionsList dropDown2DefaultOptions = new SingleSelectOptionsList(); + + public SingleSelectOptionsList getDropDown2DefaultOptions() { + return dropDown2DefaultOptions; + } + + public void setDropDown2DefaultOptions(SingleSelectOptionsList ssol) { + this.dropDown2DefaultOptions = ssol; + } + + //
+ + /** + *

Construct a new Page bean instance.

+ */ + public Dummy() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("Dummy Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + public void prerender() { + //txtIn.setText("OLA"); + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + + + public String butCancelar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + return null; + } + + public String butGravar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + return null; + } + + public String butEnviar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + return null; + } + + public String butImagem_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + return null; + } + + public String lnkMoreMed1_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkNome_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkDataNascimento_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkEditUser_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), false ); + return null; + } + + public String butProcurarTrab_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + return null; + } + + public String lnkPOR_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkNomeTrabalhador_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkEstabelecimentoTrabalhador_action() { + // TODO: Replace with your code + + return null; + } + + public void drpTipo_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public void drpNome_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public String hyperlink1_action() { + // TODO: Replace with your code + + return null; + } + + public void lnk_actionListener(ActionEvent e) + { + System.out.println("LINK"); + } + + + +// public String lnkAjuda_action() { +// // TODO: Replace with your code +// ServletContext theApplicationsServletContext = +// (ServletContext) this.getExternalContext().getContext(); +// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); +// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf"; +// +// Global global = new Global(); +// try +// { +// global.showPdf(pdfFilePath); +// } +// catch(Exception ex) +// { +// ex.printStackTrace(); +// } +// return null; +// } + + public String butVoltar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + return null; + } + + public String butEliminar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + return null; + } + + public String lnkPlanosActuacao_action() { + // TODO: Replace with your code + return null; + } + + public String lnkAnalisesAcidente_action() { + // TODO: Replace with your code + return null; + } + + public String lnkNewUser_action() { + // TODO: Replace with your code + return null; + } + + public String lnkAjuda_action() { + // TODO: Replace with your code + return null; + } + + public String lnkGerirUtilizadores_action() { + // TODO: Replace with your code + return null; + } + + public String lnkAnalises_action() { + // TODO: Replace with your code + return null; + } + + public String lnkPlanos_action() { + // TODO: Replace with your code + return null; + } +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EditUser.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EditUser.java new file mode 100644 index 00000000..fee0ed5c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EditUser.java @@ -0,0 +1,24 @@ +/* + * EditUser.java + * + * Created on December 5, 2007, 2:02 PM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package analiseacidentestrabalho; + +import beans.Utilizador; + +/** + * + * @author lluis + */ +public class EditUser extends Utilizador{ + + /** Creates a new instance of EditUser */ + public EditUser() { + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EnviarCorrecao.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EnviarCorrecao.java new file mode 100644 index 00000000..7939af00 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EnviarCorrecao.java @@ -0,0 +1,753 @@ +/* + * EnviarCorrecao.java + * + * Created on November 28, 2007, 5:27 PM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import beans.Correcao; +import com.evolute.utils.error.ErrorLogger; +import com.sun.data.provider.RowKey; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Button; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.Hyperlink; +import com.sun.rave.web.ui.component.ImageComponent; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.component.PanelGroup; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.Table; +import com.sun.rave.web.ui.component.TableColumn; +import com.sun.rave.web.ui.component.TableRowGroup; +import com.sun.rave.web.ui.component.TextArea; +import db.providers.AnalisesDataProvider; +import db.providers.EstadosCorrecaoDataProvider; +import global.Global; +import java.util.ArrayList; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import javax.faces.event.ValueChangeEvent; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class EnviarCorrecao extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridBase1() { + return gridBase1; + } + + public void setGridBase1(HtmlPanelGrid hpg) { + this.gridBase1 = hpg; + } + + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayout1() { + return gridLayout1; + } + + public void setGridLayout1(HtmlPanelGrid hpg) { + this.gridLayout1 = hpg; + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private ImageComponent image1 = new ImageComponent(); + + public ImageComponent getImage1() { + return image1; + } + + public void setImage1(ImageComponent ic) { + this.image1 = ic; + } + + private ImageComponent image2 = new ImageComponent(); + + public ImageComponent getImage2() { + return image2; + } + + public void setImage2(ImageComponent ic) { + this.image2 = ic; + } + + private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayoutTop1() { + return gridLayoutTop1; + } + + public void setGridLayoutTop1(HtmlPanelGrid hpg) { + this.gridLayoutTop1 = hpg; + } + + private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel9() { + return gridPanel9; + } + + public void setGridPanel9(HtmlPanelGrid hpg) { + this.gridPanel9 = hpg; + } + + private PanelGroup groupPanel8 = new PanelGroup(); + + public PanelGroup getGroupPanel8() { + return groupPanel8; + } + + public void setGroupPanel8(PanelGroup pg) { + this.groupPanel8 = pg; + } + + private StaticText staticText10 = new StaticText(); + + public StaticText getStaticText10() { + return staticText10; + } + + public void setStaticText10(StaticText st) { + this.staticText10 = st; + } + + private ImageComponent image3 = new ImageComponent(); + + public ImageComponent getImage3() { + return image3; + } + + public void setImage3(ImageComponent ic) { + this.image3 = ic; + } + + private StaticText staticText11 = new StaticText(); + + public StaticText getStaticText11() { + return staticText11; + } + + public void setStaticText11(StaticText st) { + this.staticText11 = st; + } + + private HtmlPanelGrid gridMain1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMain1() { + return gridMain1; + } + + public void setGridMain1(HtmlPanelGrid hpg) { + this.gridMain1 = hpg; + } + + private Table table1 = new Table(); + + public Table getTable1() { + return table1; + } + + public void setTable1(Table t) { + this.table1 = t; + } + + private TableRowGroup tableRowGroup1 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup1() { + return tableRowGroup1; + } + + public void setTableRowGroup1(TableRowGroup trg) { + this.tableRowGroup1 = trg; + } + + private StaticText staticText6 = new StaticText(); + + public StaticText getStaticText6() { + return staticText6; + } + + public void setStaticText6(StaticText st) { + this.staticText6 = st; + } + + private TextArea txtObservacoes = new TextArea(); + + public TextArea getTxtObservacoes() { + return txtObservacoes; + } + + public void setTxtObservacoes(TextArea ta) { + this.txtObservacoes = ta; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private Button butCancelar = new Button(); + + public Button getButCancelar() { + return butCancelar; + } + + public void setButCancelar(Button b) { + this.butCancelar = b; + } + + private TableColumn tableColumn1 = new TableColumn(); + + public TableColumn getTableColumn1() { + return tableColumn1; + } + + public void setTableColumn1(TableColumn tc) { + this.tableColumn1 = tc; + } + + private Hyperlink lnkEstadoCorr = new Hyperlink(); + + public Hyperlink getLnkEstadoCorr() { + return lnkEstadoCorr; + } + + public void setLnkEstadoCorr(Hyperlink h) { + this.lnkEstadoCorr = h; + } + + private StaticText staticText5 = new StaticText(); + + public StaticText getStaticText5() { + return staticText5; + } + + public void setStaticText5(StaticText st) { + this.staticText5 = st; + } + + private Button butConfirmar = new Button(); + + public Button getButConfirmar() { + return butConfirmar; + } + + public void setButConfirmar(Button b) { + this.butConfirmar = b; + } + + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel3() { + return gridPanel3; + } + + public void setGridPanel3(HtmlPanelGrid hpg) { + this.gridPanel3 = hpg; + } + + private StaticText txtMsg = new StaticText(); + + public StaticText getTxtMsg() { + return txtMsg; + } + + public void setTxtMsg(StaticText st) { + this.txtMsg = st; + } + private StaticText lblUser = new StaticText(); + + public StaticText getLblUser() { + return lblUser; + } + + public void setLblUser(StaticText st) { + this.lblUser = st; + } + + //
+ + /** + *

Construct a new Page bean instance.

+ */ + public EnviarCorrecao() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("EnviarCorrecao Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + + + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + public void preprocess() { + + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + public void prerender() { + lblUser.setText( getSessionBean1().getCurrentUser().getLogin()); + fillTabelaEstados(); + txtMsg.setText(getSessionBean1().getMsg()); + getSessionBean1().setMsg(""); + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + public String lnkEditUser_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), true ); + return null; + } + + public String lnkDataAcidente_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkNr_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkPor_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkNomeAcidentado_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkFase_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkDataAcidenteSeg_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkNrSeg_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkPorSeg_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkNomeAcidentadoSeg_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkFaseSeg_action() { + // TODO: Replace with your code + + return null; + } + + public void drpAno_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public void drpMes_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public void drpDia_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public String butPesquisar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + return null; + } + + public String lnkDataConcluida_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkNrConcluida_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkPorConcluida_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkNomeConcluida_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkEstabConcluida_action() { + // TODO: Replace with your code + + return null; + } + + private void fillTabelaEstados() + { + ArrayList list = new ArrayList(); + Correcao c = null; + int estado = getSessionBean1().getCurrentAnalise().getEstado().intValue(); + + switch(estado) + { + case Global.ESTADO_HS: + c = new Correcao(); + c.setCorrecao("y"); + c.setAnalise_id(getSessionBean1().getCurrentAnalise().getId()); + c.setEstado_actual(getSessionBean1().getCurrentAnalise().getEstado()); + c.setEstado_corr(new Integer(Global.ESTADO_SEG)); + c.setDescricao("FASE 1 - SEG - ABERTURA"); + list.add(c); + c = new Correcao(); + c.setCorrecao("y"); + c.setAnalise_id(getSessionBean1().getCurrentAnalise().getId()); + c.setEstado_actual(getSessionBean1().getCurrentAnalise().getEstado()); + c.setEstado_corr(new Integer(Global.ESTADO_RH1)); + c.setDescricao("FASE 2 - RH - ACOMPANHAMENTO"); + list.add(c); + getSessionBean1().getEstadosCorrecaoDataProvider().setList(list); + break; + case Global.ESTADO_CONSOLIDACAO: + c = new Correcao(); + c.setCorrecao("y"); + c.setAnalise_id(getSessionBean1().getCurrentAnalise().getId()); + c.setEstado_actual(getSessionBean1().getCurrentAnalise().getEstado()); + c.setEstado_corr(new Integer(Global.ESTADO_RH2)); + c.setDescricao("FASE 4 - RH - MEDIDAS + LESÃO"); + list.add(c); +// c = new Correcao(); +// c.setCorrecao("y"); +// c.setAnalise_id(getSessionBean1().getCurrentAnalise().getId()); +// c.setEstado_actual(getSessionBean1().getCurrentAnalise().getEstado()); +// c.setEstado_corr(new Integer(Global.ESTADO_MEDICINA)); +// c.setDescricao("Medicina"); +// list.add(c); + getSessionBean1().getEstadosCorrecaoDataProvider().setList(list); + break; + } + } + + public String lnkEstadoCorr_action() { + // TODO: Replace with your code + RowKey rk = tableRowGroup1.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + EstadosCorrecaoDataProvider provider = (EstadosCorrecaoDataProvider) tableRowGroup1.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + Correcao c = (Correcao)list.get(k); + + getSessionBean1().setCorrecao(c); + +// c.setObservacoes(""); +// if(txtObservacoes.getText() != null) +// { +// String obs = (String) txtObservacoes.getText(); +// c.setObservacoes(obs); +// } +// AnalisesDataProvider adp = new AnalisesDataProvider(); +// try +// { +// adp.changeEstado(c); +// +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } +// return "form_hs"; + return null; + } + + public String lnkNewUser_action() { + // TODO: Replace with your code + + return null; + } + + public String butCancelar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + //return "form_hs"; + return "analise_acidente"; + } + + public String lnkAjuda_action() { + // TODO: Replace with your code +// ServletContext theApplicationsServletContext = +// (ServletContext) this.getExternalContext().getContext(); +// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); +// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf"; +// +// Global global = new Global(); +// try +// { +// global.showPdf(pdfFilePath); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + return null; + } + + public String butConfirmar_action() + { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + Correcao c = getSessionBean1().getCorrecao(); + if(c != null) + { + c.setObservacoes(""); + if(txtObservacoes.getText() != null) + { + String obs = (String) txtObservacoes.getText(); + c.setObservacoes(obs); + } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + adp.changeEstado( c ); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + return "form_hs"; + } + else + { + getSessionBean1().setMsg("Tem de indicar para onde enviar a correcção"); + return null; + } + + } + + public String lnkAnalisesAcidente_action() { + // TODO: Replace with your code + return null; + } + + public String lnkPlanosActuacao_action() { + // TODO: Replace with your code + return null; + } +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Erro.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Erro.java new file mode 100644 index 00000000..66aa2dc1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Erro.java @@ -0,0 +1,239 @@ +/* + * Error.java + * + * Created on September 19, 2007, 5:21 PM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.TextField; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class Erro extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private StaticText txtCab = new StaticText(); + + public StaticText getTxtCab() { + return txtCab; + } + + public void setTxtCab(StaticText st) { + this.txtCab = st; + } + + private StaticText txtMsg = new StaticText(); + + public StaticText getTxtMsg() { + return txtMsg; + } + + public void setTxtMsg(StaticText st) { + this.txtMsg = st; + } + + //
+ + /** + *

Construct a new Page bean instance.

+ */ + public Erro() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("Error Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + public void prerender() { + txtMsg.setText( getSessionBean1().getMsg() ); + getSessionBean1().setMsg(""); + System.out.println("ERROR PAGE"); + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EstatisticasProcesso.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EstatisticasProcesso.java new file mode 100644 index 00000000..7bd62a16 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EstatisticasProcesso.java @@ -0,0 +1,903 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package analiseacidentestrabalho; + +import beans.EstatisticaProcessoBean; +import beans.Utilizador; +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Button; +import com.sun.rave.web.ui.component.DropDown; +import com.sun.rave.web.ui.component.Hyperlink; +import com.sun.rave.web.ui.component.RadioButton; +import com.sun.rave.web.ui.component.RadioButtonGroup; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.Table; +import com.sun.rave.web.ui.component.TextField; +import com.sun.rave.web.ui.model.Option; +import db.EstatisticasConstants; +import db.data.siprp.outer.SeccoesData; +import db.providers.EstatisticasDataProvider; +import global.Global; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import javax.faces.FacesException; +import javax.faces.context.FacesContext; +import javax.servlet.http.HttpServletResponse; +import org.apache.poi.hssf.usermodel.HSSFCell; +import org.apache.poi.hssf.usermodel.HSSFCellStyle; +import org.apache.poi.hssf.usermodel.HSSFFont; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import utils.Utils; + +/** + * + * @author dneves + */ +public class EstatisticasProcesso extends AbstractPageBean +{ + + private Hyperlink lnkPlanosActuacao = new Hyperlink(); + public Hyperlink getLnkPlanosActuacao() + { + return lnkPlanosActuacao; + } + public void setLnkPlanosActuacao( Hyperlink h ) + { + this.lnkPlanosActuacao = h; + } + + private Hyperlink lnkAnaliseAcidentes = new Hyperlink(); + public Hyperlink getLnkAnaliseAcidentes() + { + return lnkAnaliseAcidentes; + } + public void setLnkAnaliseAcidentes( Hyperlink lnkAnaliseAcidentes ) + { + this.lnkAnaliseAcidentes = lnkAnaliseAcidentes; + } + + + private StaticText lblUser = new StaticText(); + public StaticText getLblUser() + { + return lblUser; + } + public void setLblUser( StaticText st ) + { + this.lblUser = st; + } + + private StaticText txtMsg = new StaticText(); + public StaticText getTxtMsg() + { + return txtMsg; + } + public void setTxtMsg( StaticText st ) + { + this.txtMsg = st; + } + + private TextField textPOR = new TextField(); + public TextField getTextPOR() + { + return textPOR; + } + public void setTextPOR( TextField tf ) + { + this.textPOR = tf; + } + + private TextField textNome = new TextField(); + public TextField getTextNome() + { + return textNome; + } + public void setTextNome( TextField tf ) + { + this.textNome = tf; + } + + private TextField textAnoOcorrencia = new TextField(); + public TextField getTextAnoOcorrencia() + { + return textAnoOcorrencia; + } + public void setTextAnoOcorrencia( TextField tf ) + { + this.textAnoOcorrencia = tf; + } + + private com.sun.rave.web.ui.component.Calendar calDataOcorrencia = new com.sun.rave.web.ui.component.Calendar(); + public com.sun.rave.web.ui.component.Calendar getCalDataOcorrencia() + { + return this.calDataOcorrencia; + } + public void setCalDataOcorrencia( com.sun.rave.web.ui.component.Calendar c ) + { + this.calDataOcorrencia = c; + } + + private TextField textHoraOcorrencia = new TextField(); + public TextField getTextHoraOcorrencia() + { + return textHoraOcorrencia; + } + public void setTextHoraOcorrencia( TextField tf ) + { + this.textHoraOcorrencia = tf; + } + + private TextField textHorasTrabalhadas = new TextField(); + public TextField getTextHorasTrabalhadas() + { + return textHorasTrabalhadas; + } + public void setTextHorasTrabalhadas( TextField tf ) + { + this.textHorasTrabalhadas = tf; + } + + private Table tableEstatisticas = new Table(); + public Table getTableEstatisticas() + { + return tableEstatisticas; + } + public void setTableEstatisticas( Table t ) + { + this.tableEstatisticas = t; + } + + private DropDown dropCausas = new DropDown(); + + public DropDown getDropCausas() { + return dropCausas; + } + + public void setDropCausas(DropDown dropCausas) { + this.dropCausas = dropCausas; + } + +// private TextField textDepartamento = new TextField(); +// public TextField getTextDepartamento() { +// return textDepartamento; +// } +// public void setTextDepartamento(TextField textDepartamento) { +// this.textDepartamento = textDepartamento; +// } + + private DropDown dropSeccoes = new DropDown(); + + public DropDown getDropSeccoes() { + return dropSeccoes; + } + + public void setDropSeccoes(DropDown dropSeccoes) { + this.dropSeccoes = dropSeccoes; + } + + private DropDown dropTurno = new DropDown(); + + public DropDown getDropTurno() { + return dropTurno; + } + + public void setDropTurno(DropDown dropTurno) { + this.dropTurno = dropTurno; + } + + private RadioButtonGroup formacaoSHST = new RadioButtonGroup(); + public RadioButtonGroup getFormacaoSHST() + { + return formacaoSHST; + } + public void setFormacaoSHST( RadioButtonGroup bg ) + { + this.formacaoSHST = bg; + } + + private RadioButton formacaoSHST_true = new RadioButton(); + public RadioButton getFormacaoSHST_true() { + return formacaoSHST_true; + } + public void setFormacaoSHST_true(RadioButton formacaoSHST_true) { + this.formacaoSHST_true = formacaoSHST_true; + } + + private RadioButton formacaoSHST_false = new RadioButton(); + public RadioButton getFormacaoSHST_false() { + return formacaoSHST_false; + } + public void setFormacaoSHST_false(RadioButton formacaoSHST_false) { + this.formacaoSHST_false = formacaoSHST_false; + } + + private RadioButton formacaoSHST_none = new RadioButton(); + public RadioButton getFormacaoSHST_none() + { + return formacaoSHST_none; + } + public void setFormacaoSHST_none( RadioButton formacaoSHST_none ) + { + this.formacaoSHST_none = formacaoSHST_none; + } + + + + private RadioButton postoAcidentado_true = new RadioButton(); + private RadioButton postoAcidentado_false = new RadioButton(); + private RadioButton outrosColaboradores_true = new RadioButton(); + private RadioButton outrosColaboradores_false = new RadioButton(); + + public RadioButton getOutrosColaboradores_false() { + return outrosColaboradores_false; + } + public void setOutrosColaboradores_false(RadioButton outrosColaboradores_false) { + this.outrosColaboradores_false = outrosColaboradores_false; + } + + public RadioButton getOutrosColaboradores_true() { + return outrosColaboradores_true; + } + public void setOutrosColaboradores_true(RadioButton outrosColaboradores_true) { + this.outrosColaboradores_true = outrosColaboradores_true; + } + + public RadioButton getPostoAcidentado_false() { + return postoAcidentado_false; + } + public void setPostoAcidentado_false(RadioButton postoAcidentado_false) { + this.postoAcidentado_false = postoAcidentado_false; + } + + public RadioButton getPostoAcidentado_true() { + return postoAcidentado_true; + } + public void setPostoAcidentado_true(RadioButton postoAcidentado_true) { + this.postoAcidentado_true = postoAcidentado_true; + } + + private Button buttonExport = new Button(); + + public Button getButtonExport() { + return buttonExport; + } + public void setButtonExport(Button buttonExport) { + this.buttonExport = buttonExport; + } + + + private List< EstatisticaProcessoBean > listEstatisticas = new LinkedList< EstatisticaProcessoBean >(); + public List< EstatisticaProcessoBean > getListEstatisticas() + { + return this.listEstatisticas; + } + public void setListEstatisticas( List< EstatisticaProcessoBean > l ) + { + this.listEstatisticas = l; + } + + private boolean canAccess() + { + boolean canAccess = false; + canAccess = getSessionBean1().getCanAccessEstatisticas(); + return canAccess; + } + + @Override + public void init() + { + super.init(); + + try + { + _init(); + } + catch ( Exception e ) + { + log("Page1 Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e : new FacesException(e); + } + + if ( ! canAccess() ) + { + try + { + getExternalContext().redirect( "Login.jsp" ); + } + catch( Exception e ) + { + ErrorLogger.logException( e ); + } + } + + formacaoSHST_none.setSelected( true ); + } + + protected SessionBean1 getSessionBean1() + { + return ( SessionBean1 ) getBean( "SessionBean1" ); + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + @Override + public void preprocess() + { + txtMsg.setText( getSessionBean1().getMsg() ); + getSessionBean1().setMsg( "" ); + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + @Override + public void prerender() + { + System.out.println( "=== ESTATISTICAS_PROCESSO ===" ); + + lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); + + Option[] turnosOptions = new Option[ 4 ]; + turnosOptions[ 0 ] = new Option( "", "" ); + turnosOptions[ 1 ] = new Option( "m", "Manhã" ); + turnosOptions[ 2 ] = new Option( "t", "Tarde" ); + turnosOptions[ 3 ] = new Option( "n", "Noite" ); + dropTurno.setItems( turnosOptions ); + + try + { + EstatisticasDataProvider statsProvider = EstatisticasDataProvider.getInstance(); + Option[] causas = statsProvider.getCausasAcidente(); + if ( causas != null ) + { + dropCausas.setItems( causas ); + } + + Option[] seccoes = statsProvider.getSeccoesList(); + if ( seccoes != null ) + { + dropSeccoes.setItems( seccoes ); + } + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + @Override + public void destroy() + { + + } + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() + { + + } + + public String lnkAnalisesAcidente_action() + { + Utilizador currentUser = getSessionBean1().getCurrentUser(); + int userType = currentUser == null ? -1 : currentUser.getTipo() == null ? -1 : currentUser.getTipo().intValue(); + + switch ( userType ) + { + case Global.TIPO_UTILIZADOR_SEGURANCA : + return "form_seguranca"; + case Global.TIPO_UTILIZADOR_RH : + return "form_rh"; + case Global.TIPO_UTILIZADOR_HS : + return "form_hs"; + case Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP : + return "form_dir_siprp"; + case Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH : + return "form_dir_ger_rh"; + case Global.TIPO_UTILIZADOR_GESTOR : + return "form_gestor"; + } + return null; + } + + public String lnkPlanosActuacao_action() + { + Utilizador u = getSessionBean1().getCurrentUser(); + FacesContext fc = getFacesContext().getCurrentInstance(); + Global.redirectToPlanos(fc, u); + return null; + } + + public String lnkNewUser_action() + { + getSessionBean1().setNavFrom( "EstatisticasProcesso" ); + return "gestao_utilizadores"; + } + + public String lnkEditUser_action() + { + getSessionBean1().setNavFrom( "EstatisticasProcesso" ); + getSessionBean1().setModoEdicaoUtilizador( "edit" ); + return "user"; + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), true ); + + return null; + } + + private Map< String, Object > getFormFieldValues() + { + String por = null; + if ( textPOR.getText() != null ) + { + por = ( ( String ) textPOR.getText() ).trim(); + por = "".equals( por ) ? null : por; + } + String nome = null; + if ( textNome.getText() != null ) + { + nome = ( ( String ) textNome.getText() ).trim(); + nome = "".equals( nome ) ? null : nome; + } + String anoOcorrencia = null; + if ( textAnoOcorrencia.getText() != null ) + { + anoOcorrencia = ( ( String ) textAnoOcorrencia.getText() ).trim(); + anoOcorrencia = "".equals( anoOcorrencia ) ? null : anoOcorrencia; + } + Date dataOcorrencia = null; + if ( calDataOcorrencia.getValue() != null ) + { + dataOcorrencia = ( Date )calDataOcorrencia.getValue(); + } + String horaOcorrencia = null; + if ( textHoraOcorrencia.getText() != null ) + { + horaOcorrencia = ( ( String ) textHoraOcorrencia.getText() ).trim(); + horaOcorrencia = "".equals( horaOcorrencia ) ? null : horaOcorrencia; + } + String horasTrabalhadas = null; + if ( textHorasTrabalhadas.getText() != null ) + { + horasTrabalhadas = ( ( String ) textHorasTrabalhadas.getText() ).trim(); + horasTrabalhadas = "".equals( horasTrabalhadas ) ? null : horasTrabalhadas; + } +// String departamento = null; +// if ( textDepartamento.getText() != null ) +// { +// departamento = ( ( String ) textDepartamento.getText() ).trim(); +// departamento = "".equals( departamento ) ? null : departamento; +// } + Integer seccaoID = null; + if ( dropSeccoes.getSelected() != null ) + { +// seccaoID = ( Integer ) dropSeccoes.getSelected(); + String seccao = ( String ) dropSeccoes.getSelected(); + if ( seccao != null ) + { + try { seccaoID = Integer.parseInt( seccao ); } + catch ( Exception e ) { } + } + } + Integer causas = null; + if ( dropCausas.getSelected() != null ) + { + String causaID = ( String ) dropCausas.getSelected(); + if ( causaID != null ) + { + try { causas = Integer.parseInt( causaID ); } + catch ( Exception e ) { } + } + } + String turno = null; + if ( dropTurno.getSelected() != null ) + { + turno = ( String ) dropTurno.getSelected(); + turno = turno == null || "".equals( turno.trim() ) ? null : turno; + } + Boolean shst = null; + if ( formacaoSHST_true.getSelected() != null || formacaoSHST_false.getSelected() != null || formacaoSHST_none.getSelected() != null ) + { + Boolean trueSelected = ( Boolean ) formacaoSHST_true.getSelected(); + Boolean falseSelected = ( Boolean ) formacaoSHST_false.getSelected(); + Boolean noneSelected = ( Boolean ) formacaoSHST_none.getSelected(); + + if ( trueSelected != null && trueSelected ) + { + shst = Boolean.TRUE; + } + if ( falseSelected != null && falseSelected ) + { + shst = Boolean.FALSE; + } + if ( noneSelected != null && noneSelected ) + { + shst = null; + } + } + Boolean postoAcidentado = null; + if ( postoAcidentado_true.getSelected() != null || postoAcidentado_false.getSelected() != null ) + { + postoAcidentado = ( Boolean ) postoAcidentado_true.getSelected(); + } + Boolean outrosAcidentados = null; + if ( outrosColaboradores_true.getSelected() != null || outrosColaboradores_false.getSelected() != null ) + { + outrosAcidentados = ( Boolean ) outrosColaboradores_true.getSelected(); + } + + Map< String, Object > searchProperties = new HashMap< String, Object >(); + searchProperties.put( EstatisticasConstants.KEY_POR, por ); + searchProperties.put( EstatisticasConstants.KEY_NOME, nome ); + searchProperties.put( EstatisticasConstants.KEY_ANO_OCORRENCIA, anoOcorrencia ); + searchProperties.put( EstatisticasConstants.KEY_DATA_OCORRENCIA, dataOcorrencia ); + searchProperties.put( EstatisticasConstants.KEY_HORA_OCORRENCIA, horaOcorrencia ); + searchProperties.put( EstatisticasConstants.KEY_HORAS_TRABALHADAS, horasTrabalhadas ); +// searchProperties.put( EstatisticasConstants.KEY_DEPARTAMENTO, departamento ); + searchProperties.put( EstatisticasConstants.KEY_SECCAO, seccaoID ); + searchProperties.put( EstatisticasConstants.KEY_CAUSAS_ACIDENTE, causas ); + searchProperties.put( EstatisticasConstants.KEY_TURNO_TRABALHO, turno ); + searchProperties.put( EstatisticasConstants.KEY_FORMACAO_SHST, shst ); + searchProperties.put( EstatisticasConstants.KEY_POSTO_ACIDENTADO, postoAcidentado ); + searchProperties.put( EstatisticasConstants.KEY_OUTROS_ACIDENTADOS, outrosAcidentados ); + + return searchProperties; + } + + private void getEstatisticas() + { + Map< String, Object > searchProperties = getFormFieldValues(); + + listEstatisticas = new LinkedList< EstatisticaProcessoBean >(); + try + { + EstatisticasDataProvider edp = EstatisticasDataProvider.getInstance(); + listEstatisticas = edp.getEstatisticas( searchProperties ); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + setListEstatisticas( listEstatisticas ); + } + + public String buttonEstatistica_action() + { + getEstatisticas(); + buttonExport.setRendered( true ); + return null; + } + + public String buttonExport_action() + { + System.out.println( "=== EXPORT TO EXCEL ===" ); + + getEstatisticas(); + System.out.println( "-> " + getListEstatisticas().size() ); + + + HSSFWorkbook book = new HSSFWorkbook(); + Map< String, HSSFCellStyle > styles = createStyles( book ); + HSSFSheet sheet = book.createSheet( "Estatisticas" ); + + int row = writeFilters( sheet, 0 ); + + HSSFRow headerRow = getRow( sheet, row ); + HSSFCell columnEstado = getCell( headerRow, 0 ); + columnEstado.setCellValue( "Estado" ); + columnEstado.setCellStyle( styles.get( EstatisticasConstants.KEY_STYLE_COLUMN_HEADER ) ); + + HSSFCell columnFase = getCell( headerRow, 1 ); + columnFase.setCellValue( "Fase" ); + columnFase.setCellStyle( styles.get( EstatisticasConstants.KEY_STYLE_COLUMN_HEADER ) ); + + HSSFCell columnCount = getCell( headerRow, 2 ); + columnCount.setCellValue( "Contagem" ); + columnCount.setCellStyle( styles.get( EstatisticasConstants.KEY_STYLE_COLUMN_HEADER ) ); + + row++; + for ( EstatisticaProcessoBean line : getListEstatisticas() ) + { + HSSFRow lineRow = getRow( sheet, row ); + + HSSFCell columnEstadoValue = getCell( lineRow, 0 ); + columnEstadoValue.setCellValue( line.getEstado() ); + columnEstadoValue.setCellStyle( styles.get( EstatisticasConstants.KEY_STYLE_COLUMN_NORMAL ) ); + + HSSFCell columnFaseValue = getCell( lineRow, 1 ); + columnFaseValue.setCellValue( line.getFase() ); + columnFaseValue.setCellStyle( styles.get( EstatisticasConstants.KEY_STYLE_COLUMN_NORMAL ) ); + + HSSFCell columnCountValue = getCell( lineRow, 2 ); + columnCountValue.setCellValue( line.getCount() ); + columnCountValue.setCellStyle( styles.get( EstatisticasConstants.KEY_STYLE_COLUMN_NORMAL ) ); + + row++; + } + + sheet.autoSizeColumn( 0, true ); + sheet.autoSizeColumn( 1, true ); + sheet.autoSizeColumn( 2, true ); + + try + { + saveWorkbook( book ); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + getSessionBean1().setMsg( "Erro a gerar o ficheiro." ); + } + + return null; + } + + + private Map< String, HSSFCellStyle > createStyles( HSSFWorkbook book ) + { + Map< String, HSSFCellStyle > styles = new HashMap< String, HSSFCellStyle >(); + + HSSFCellStyle style; + + HSSFFont headerFont = book.createFont(); + headerFont.setFontHeightInPoints( ( short ) 12 ); + headerFont.setBoldweight( HSSFFont.BOLDWEIGHT_BOLD ); + + HSSFFont normalFont = book.createFont(); + headerFont.setFontHeightInPoints( ( short ) 12 ); + + style = book.createCellStyle(); +// style.setAlignment( HSSFCellStyle.ALIGN_CENTER ); + style.setVerticalAlignment( HSSFCellStyle.VERTICAL_CENTER ); + style.setFont( headerFont ); + styles.put( EstatisticasConstants.KEY_STYLE_COLUMN_HEADER, style ); + + style = book.createCellStyle(); + style.setVerticalAlignment( HSSFCellStyle.VERTICAL_CENTER ); + style.setFont( normalFont ); + styles.put( EstatisticasConstants.KEY_STYLE_COLUMN_NORMAL, style ); + + return styles; + } + + private HSSFRow getRow( HSSFSheet sheet, int rowNumber ) + { + HSSFRow row = sheet.getRow( rowNumber ); + if ( row == null ) + { + row = sheet.createRow( rowNumber ); + } + return row; + } + + private HSSFCell getCell( HSSFRow row, int cellNumber ) + { + HSSFCell cell = row.getCell( cellNumber ); + if ( cell == null ) + { + cell = row.createCell( cellNumber ); + } + return cell; + } + + private int writeFilters( HSSFSheet sheet, int row ) + { + Map< String, Object > searchProperties = getFormFieldValues(); + String por = ( String ) searchProperties.get( EstatisticasConstants.KEY_POR ); + String nome = ( String ) searchProperties.get( EstatisticasConstants.KEY_NOME ); + String anoOcorrencia = ( String ) searchProperties.get( EstatisticasConstants.KEY_ANO_OCORRENCIA ); + Date dataOcorrencia = ( Date ) searchProperties.get( EstatisticasConstants.KEY_DATA_OCORRENCIA ); + String horaOcorrencia = ( String ) searchProperties.get( EstatisticasConstants.KEY_HORA_OCORRENCIA ); + String horasTrabalhadas = ( String ) searchProperties.get( EstatisticasConstants.KEY_HORAS_TRABALHADAS ); +// String departamento = ( String ) searchProperties.get( EstatisticasConstants.KEY_DEPARTAMENTO ); + Integer seccaoID = ( Integer ) searchProperties.get( EstatisticasConstants.KEY_SECCAO ); + String seccao = null; + try + { + SeccoesData seccaoData = EstatisticasDataProvider.getInstance().loadSeccaoByID( seccaoID ); + seccao = seccaoData == null ? null : seccaoData.getDescricao(); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + + Integer causas = ( Integer ) searchProperties.get( EstatisticasConstants.KEY_CAUSAS_ACIDENTE ); + String turno = ( String ) searchProperties.get( EstatisticasConstants.KEY_TURNO_TRABALHO ); + Boolean formacao_shst = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_FORMACAO_SHST ); + Boolean postoAcidentado = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_POSTO_ACIDENTADO ); + Boolean outrosAcidentados = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_OUTROS_ACIDENTADOS ); + + String keyName = null; + HSSFRow currentRow = null; + HSSFCell columnLabel = null; + HSSFCell columnValue = null; + + keyName = EstatisticasConstants.KEY_NAMES[ row ]; + currentRow = getRow( sheet, row ); + columnLabel = getCell( currentRow, 0 ); + columnLabel.setCellValue( keyName ); + columnValue = getCell( currentRow, 1 ); + columnValue.setCellValue( por ); + row++; + + keyName = EstatisticasConstants.KEY_NAMES[ row ]; + currentRow = getRow( sheet, row ); + columnLabel = getCell( currentRow, 0 ); + columnLabel.setCellValue( keyName ); + columnValue = getCell( currentRow, 1 ); + columnValue.setCellValue( nome ); + row++; + + keyName = EstatisticasConstants.KEY_NAMES[ row ]; + currentRow = getRow( sheet, row ); + columnLabel = getCell( currentRow, 0 ); + columnLabel.setCellValue( keyName ); + columnValue = getCell( currentRow, 1 ); + columnValue.setCellValue( anoOcorrencia ); + row++; + + final SimpleDateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + keyName = EstatisticasConstants.KEY_NAMES[ row ]; + currentRow = getRow( sheet, row ); + columnLabel = getCell( currentRow, 0 ); + columnLabel.setCellValue( keyName ); + columnValue = getCell( currentRow, 1 ); + columnValue.setCellValue( dataOcorrencia == null ? "" : D_F.format( dataOcorrencia ) ); + row++; + + keyName = EstatisticasConstants.KEY_NAMES[ row ]; + currentRow = getRow( sheet, row ); + columnLabel = getCell( currentRow, 0 ); + columnLabel.setCellValue( keyName ); + columnValue = getCell( currentRow, 1 ); + columnValue.setCellValue( horaOcorrencia ); + row++; + + keyName = EstatisticasConstants.KEY_NAMES[ row ]; + currentRow = getRow( sheet, row ); + columnLabel = getCell( currentRow, 0 ); + columnLabel.setCellValue( keyName ); + columnValue = getCell( currentRow, 1 ); + columnValue.setCellValue( horasTrabalhadas ); + row++; + +// keyName = EstatisticasConstants.KEY_NAMES[ row ]; +// currentRow = getRow( sheet, row ); +// columnLabel = getCell( currentRow, 0 ); +// columnLabel.setCellValue( keyName ); +// columnValue = getCell( currentRow, 1 ); +// columnValue.setCellValue( departamento ); +// row++; + + keyName = EstatisticasConstants.KEY_NAMES[ row ]; + currentRow = getRow( sheet, row ); + columnLabel = getCell( currentRow, 0 ); + columnLabel.setCellValue( keyName ); + columnValue = getCell( currentRow, 1 ); + columnValue.setCellValue( seccao ); + row++; + + + String causa = ""; + if ( causas != null ) + { + try + { + EstatisticasDataProvider statsProvider = EstatisticasDataProvider.getInstance(); + causa = statsProvider.getCausaByID( causas ); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + } + keyName = EstatisticasConstants.KEY_NAMES[ row ]; + currentRow = getRow( sheet, row ); + columnLabel = getCell( currentRow, 0 ); + columnLabel.setCellValue( keyName ); + columnValue = getCell( currentRow, 1 ); + columnValue.setCellValue( causa ); + row++; + + String turnoDesc = ""; + if ( turno != null ) + { + if ( "m".equals( turno ) ) + { + turnoDesc = "Manhã"; + } + else if ( "t".equals( turno ) ) + { + turnoDesc = "Tarde"; + } + else if ( "n".equals( turno ) ) + { + turnoDesc = "Noite"; + } + } + keyName = EstatisticasConstants.KEY_NAMES[ row ]; + currentRow = getRow( sheet, row ); + columnLabel = getCell( currentRow, 0 ); + columnLabel.setCellValue( keyName ); + columnValue = getCell( currentRow, 1 ); + columnValue.setCellValue( turnoDesc ); + row++; + + keyName = EstatisticasConstants.KEY_NAMES[ row ]; + currentRow = getRow( sheet, row ); + columnLabel = getCell( currentRow, 0 ); + columnLabel.setCellValue( keyName ); + columnValue = getCell( currentRow, 1 ); + String fshst = ""; + if ( formacao_shst != null ) + { + fshst = formacao_shst ? "Sim" : "Não"; + } + columnValue.setCellValue( fshst ); + row++; + row++; + return row++; + } + + private void saveWorkbook( HSSFWorkbook book ) + throws Exception + { + byte[] bytes = book.getBytes(); + + System.out.println( "BOOK LEN : " + bytes.length ); + + FacesContext context = FacesContext.getCurrentInstance(); + HttpServletResponse response = ( HttpServletResponse ) context.getExternalContext().getResponse(); + + response.setHeader( "Expires", "0" ); + response.setHeader( "Cache-Control", "must-revalidate, post-check=0, pre-check=0" ); + response.setHeader( "Pragma", "public" ); + response.setContentType( "application/vnd.ms-excel" ); + response.addHeader( "Content-disposition", "attachment;filename=\"EstatisticasProcesso.xls\"" ); + response.setContentLength( bytes.length ); + + response.getOutputStream().write( bytes ); + response.getOutputStream().flush(); + response.getOutputStream().close(); + context.responseComplete(); + + System.out.println( "SHOW workbook DONE" ); + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FichaUtilizador.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FichaUtilizador.java new file mode 100644 index 00000000..1d005050 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FichaUtilizador.java @@ -0,0 +1,1590 @@ +/* + * FichaUtilizador.java + * + * Created on October 11, 2007, 9:49 AM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import beans.Permissao; +import beans.Utilizador; +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Button; +import com.sun.rave.web.ui.component.Checkbox; +import com.sun.rave.web.ui.component.DropDown; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.HiddenField; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.Hyperlink; +import com.sun.rave.web.ui.component.ImageComponent; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.component.PanelGroup; +import com.sun.rave.web.ui.component.PasswordField; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.TextField; +import com.sun.rave.web.ui.model.SingleSelectOptionsList; +import db.providers.AnalisesDataProvider; +import db.providers.UtilizadoresDataProvider; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import javax.faces.event.ValueChangeEvent; +import javax.servlet.http.HttpServletRequest; +import utils.Utils; +import global.Global; +import javax.faces.context.FacesContext; +import utils.JSFUtils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class FichaUtilizador extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridBase1() { + return gridBase1; + } + + public void setGridBase1(HtmlPanelGrid hpg) { + this.gridBase1 = hpg; + } + + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayout1() { + return gridLayout1; + } + + public void setGridLayout1(HtmlPanelGrid hpg) { + this.gridLayout1 = hpg; + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private ImageComponent image1 = new ImageComponent(); + + public ImageComponent getImage1() { + return image1; + } + + public void setImage1(ImageComponent ic) { + this.image1 = ic; + } + + private ImageComponent image2 = new ImageComponent(); + + public ImageComponent getImage2() { + return image2; + } + + public void setImage2(ImageComponent ic) { + this.image2 = ic; + } + + private HtmlPanelGrid gridMsg1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMsg1() { + return gridMsg1; + } + + public void setGridMsg1(HtmlPanelGrid hpg) { + this.gridMsg1 = hpg; + } + + private StaticText txtMsg = new StaticText(); + + public StaticText getTxtMsg() { + return txtMsg; + } + + public void setTxtMsg(StaticText st) { + this.txtMsg = st; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel3() { + return gridPanel3; + } + + public void setGridPanel3(HtmlPanelGrid hpg) { + this.gridPanel3 = hpg; + } + + private PanelGroup groupPanel3 = new PanelGroup(); + + public PanelGroup getGroupPanel3() { + return groupPanel3; + } + + public void setGroupPanel3(PanelGroup pg) { + this.groupPanel3 = pg; + } + + private StaticText stCriarEditar = new StaticText(); + + public StaticText getStCriarEditar() { + return stCriarEditar; + } + + public void setStCriarEditar(StaticText st) { + this.stCriarEditar = st; + } + + private StaticText staticText4 = new StaticText(); + + public StaticText getStaticText4() { + return staticText4; + } + + public void setStaticText4(StaticText st) { + this.staticText4 = st; + } + + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel4() { + return gridPanel4; + } + + public void setGridPanel4(HtmlPanelGrid hpg) { + this.gridPanel4 = hpg; + } + + private StaticText staticText5 = new StaticText(); + + public StaticText getStaticText5() { + return staticText5; + } + + public void setStaticText5(StaticText st) { + this.staticText5 = st; + } + + private DropDown drpTipo = new DropDown(); + + public DropDown getDrpTipo() { + return drpTipo; + } + + public void setDrpTipo(DropDown dd) { + this.drpTipo = dd; + } + + private StaticText staticText6 = new StaticText(); + + public StaticText getStaticText6() { + return staticText6; + } + + public void setStaticText6(StaticText st) { + this.staticText6 = st; + } + + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel5() { + return gridPanel5; + } + + public void setGridPanel5(HtmlPanelGrid hpg) { + this.gridPanel5 = hpg; + } + + private DropDown drpNome = new DropDown(); + + public DropDown getDrpNome() { + return drpNome; + } + + public void setDrpNome(DropDown dd) { + this.drpNome = dd; + } + + private TextField txtNome = new TextField(); + + public TextField getTxtNome() { + return txtNome; + } + + public void setTxtNome(TextField tf) { + this.txtNome = tf; + } + + private StaticText staticText7 = new StaticText(); + + public StaticText getStaticText7() { + return staticText7; + } + + public void setStaticText7(StaticText st) { + this.staticText7 = st; + } + + private TextField txtLogin = new TextField(); + + public TextField getTxtLogin() { + return txtLogin; + } + + public void setTxtLogin(TextField tf) { + this.txtLogin = tf; + } + + private StaticText staticText8 = new StaticText(); + + public StaticText getStaticText8() { + return staticText8; + } + + public void setStaticText8(StaticText st) { + this.staticText8 = st; + } + + private PasswordField txtPassword = new PasswordField(); + + public PasswordField getTxtPassword() { + return txtPassword; + } + + public void setTxtPassword(PasswordField pf) { + this.txtPassword = pf; + } + + private StaticText staticText9 = new StaticText(); + + public StaticText getStaticText9() { + return staticText9; + } + + public void setStaticText9(StaticText st) { + this.staticText9 = st; + } + + private TextField txtEmail = new TextField(); + + public TextField getTxtEmail() { + return txtEmail; + } + + public void setTxtEmail(TextField tf) { + this.txtEmail = tf; + } + + private StaticText lblCap = new StaticText(); + + public StaticText getLblCap() { + return lblCap; + } + + public void setLblCap(StaticText st) { + this.lblCap = st; + } + + private TextField txtCap = new TextField(); + + public TextField getTxtCap() { + return txtCap; + } + + public void setTxtCap(TextField tf) { + this.txtCap = tf; + } + + private StaticText lblCedula = new StaticText(); + + public StaticText getLblCedula() { + return lblCedula; + } + + public void setLblCedula(StaticText st) { + this.lblCedula = st; + } + + private StaticText stCedula = new StaticText(); + + public StaticText getStCedula() { + return stCedula; + } + + public void setStCedula(StaticText st) { + this.stCedula = st; + } + + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel6() { + return gridPanel6; + } + + public void setGridPanel6(HtmlPanelGrid hpg) { + this.gridPanel6 = hpg; + } + + private PanelGroup groupPanel4 = new PanelGroup(); + + public PanelGroup getGroupPanel4() { + return groupPanel4; + } + + public void setGroupPanel4(PanelGroup pg) { + this.groupPanel4 = pg; + } + + private StaticText staticText13 = new StaticText(); + + public StaticText getStaticText13() { + return staticText13; + } + + public void setStaticText13(StaticText st) { + this.staticText13 = st; + } + + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel7() { + return gridPanel7; + } + + public void setGridPanel7(HtmlPanelGrid hpg) { + this.gridPanel7 = hpg; + } + + private Button butCancelar = new Button(); + + public Button getButCancelar() { + return butCancelar; + } + + public void setButCancelar(Button b) { + this.butCancelar = b; + } + + private PanelGroup groupPanel5 = new PanelGroup(); + + public PanelGroup getGroupPanel5() { + return groupPanel5; + } + + public void setGroupPanel5(PanelGroup pg) { + this.groupPanel5 = pg; + } + + + private Button butGravar = new Button(); + + public Button getButGravar() { + return butGravar; + } + + public void setButGravar(Button b) { + this.butGravar = b; + } + + private HiddenField hidConfDelUser = new HiddenField(); + + public HiddenField getHidConfDelUser() { + return hidConfDelUser; + } + + public void setHidConfDelUser(HiddenField hf) { + this.hidConfDelUser = hf; + } + + //
+ private boolean isPostData = false; + + private final static int SEG = 1; + private final static int RH = 2; + private final static int HS = 3; + private final static int MEDICO = 5; + private final static int GESTOR = 6; + private final static int DIRECTOR_RH = 7; + private final static int DIRECTOR_SIPRP = 8; + private final static int DIRECTOR_LOJA = 9; + private final static int DIRECTOR_NACIONAL_SEGURANCA = 10; + + private boolean isFromPlanos = false; + + private StaticText staticText12 = new StaticText(); + + public StaticText getStaticText12() { + return staticText12; + } + + public void setStaticText12(StaticText st) { + this.staticText12 = st; + } + + private DropDown drpEstabelecimentos = new DropDown(); + + public DropDown getDrpEstabelecimentos() { + return drpEstabelecimentos; + } + + public void setDrpEstabelecimentos(DropDown dd) { + this.drpEstabelecimentos = dd; + } + + private SingleSelectOptionsList drpEstabelecimentosDefaultOptions = new SingleSelectOptionsList(); + + public SingleSelectOptionsList getDrpEstabelecimentosDefaultOptions() { + return drpEstabelecimentosDefaultOptions; + } + + public void setDrpEstabelecimentosDefaultOptions(SingleSelectOptionsList ssol) { + this.drpEstabelecimentosDefaultOptions = ssol; + } + + private StaticText lblResponsavelLoja = new StaticText(); + + public StaticText getLblResponsavelLoja() { + return lblResponsavelLoja; + } + + public void setLblResponsavelLoja(StaticText st) { + this.lblResponsavelLoja = st; + } + + private Checkbox chkResponsavelLoja = new Checkbox(); + + public Checkbox getChkResponsavelLoja() { + return chkResponsavelLoja; + } + + public void setChkResponsavelLoja(Checkbox c) { + this.chkResponsavelLoja = c; + } + + private StaticText staticText3 = new StaticText(); + + public StaticText getStaticText3() { + return staticText3; + } + + public void setStaticText3(StaticText st) { + this.staticText3 = st; + } + + private PasswordField txtConfPassword = new PasswordField(); + + public PasswordField getTxtConfPassword() { + return txtConfPassword; + } + + public void setTxtConfPassword(PasswordField pf) { + this.txtConfPassword = pf; + } + + private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel8() { + return gridPanel8; + } + + public void setGridPanel8(HtmlPanelGrid hpg) { + this.gridPanel8 = hpg; + } + + private PanelGroup groupPanel6 = new PanelGroup(); + + public PanelGroup getGroupPanel6() { + return groupPanel6; + } + + public void setGroupPanel6(PanelGroup pg) { + this.groupPanel6 = pg; + } + + private StaticText staticText10 = new StaticText(); + + public StaticText getStaticText10() { + return staticText10; + } + + public void setStaticText10(StaticText st) { + this.staticText10 = st; + } + + private ImageComponent image3 = new ImageComponent(); + + public ImageComponent getImage3() { + return image3; + } + + public void setImage3(ImageComponent ic) { + this.image3 = ic; + } + + private StaticText staticText11 = new StaticText(); + + public StaticText getStaticText11() { + return staticText11; + } + + public void setStaticText11(StaticText st) { + this.staticText11 = st; + } + private StaticText lblUser = new StaticText(); + + public StaticText getLblUser() { + return lblUser; + } + + public void setLblUser(StaticText st) { + this.lblUser = st; + } + private Hyperlink lnkGerirUtilizadores = new Hyperlink(); + + public Hyperlink getLnkGerirUtilizadores() { + return lnkGerirUtilizadores; + } + + public void setLnkGerirUtilizadores(Hyperlink h) { + this.lnkGerirUtilizadores = h; + } + + /** + *

Construct a new Page bean instance.

+ */ + public FichaUtilizador() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + public void init() + { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("FichaUtilizador Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e : new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + if ( ! getSessionBean1().isLoggedIn() ) + { + try + { + getExternalContext().redirect("Login.jsp"); + } + catch (Exception e) + { + // . . . handle exception . . . + } + } + else + { + FacesContext fc = getFacesContext(); + System.out.println( "REQUEST PARAMETERS : " + JSFUtils.requestHasParameters( fc ) ); + isFromPlanos = false; + + if ( JSFUtils.requestHasParameters( fc ) ) + { + isFromPlanos = true; + String user_id = JSFUtils.getRequestParameter(fc, "user"); + String mode = JSFUtils.getRequestParameter(fc, "mode"); + if (mode != null) + { + if (mode.matches("edit")) + { + System.out.println("MODE PARAMETER : " + mode); + getSessionBean1().setModoEdicaoUtilizador("edit"); + } + } + + Utilizador u = null; + if (user_id != null ) + { + try + { + Integer userId = new Integer( Integer.parseInt( user_id ) ); + System.out.println( "USER ID FROM PLANOS : " + user_id ); + + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + //udp.checkConnection(); + u = udp.getUtilizador( userId ); + getSessionBean1().setCurrentUser( u ); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + } + } + + if ( getSessionBean1().getCurrentUser().getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH + || getSessionBean1().getCurrentUser().getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP ) + { + lnkGerirUtilizadores.setDisabled( false ); + } + else + { + lnkGerirUtilizadores.setDisabled( true ); + } + + HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom(referer); + if ( isFromPlanos ) + { + isPostData = false; + } + else + { + if ( pageFrom.matches( "FichaUtilizador.jsp" ) ) + { + isPostData = true; + System.out.println( "IS POSTDATA : " + isPostData ); + } + } + + if ( ! isPostData ) + { + lblUser.setText(getSessionBean1().getCurrentUser().getLogin()); + + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + Integer permissao = udp.getPermissionCode( getSessionBean1().getCurrentUser().getId() ); + getSessionBean1().setTiposOptions( adp.getTiposList( permissao ) ); + drpTipo.setSelected( new Integer( 0 ) ); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + getSessionBean1().setEstabelecimentosOptions(adp.getEstabelecimentosList(getSessionBean1().getCurrentUser().getEmpresa_id(), new Boolean(false))); + System.out.println("ESTABELECIMENTOS OPTIONS : " + getSessionBean1().getEstabelecimentosOptions().length); + drpEstabelecimentos.setSelected(new Integer(-1)); + } + catch (Exception ex) + { + ErrorLogger.logException(ex); + } + } + else //postData + { + String del_user = (String) getExternalContext().getRequestParameterMap().get("del_user"); + if (del_user != null) + { + if (del_user.matches("yes")) + { + hidConfDelUser.setValue(""); + try + { + deleteUser(); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + getSessionBean1().setMsg("Erro na eliminação do utilizador!"); + } + + //force a page reload + // try + // { + // getExternalContext().redirect("FichaUtilizador.jsp"); + // System.out.println("REDIRECT"); + // } + // catch(Exception ex) + // { + // ErrorLogger.logException( ex ); + // } + + } + else if ( del_user.matches( "no" ) ) + { + hidConfDelUser.setValue(""); + showUser(); + } + } + + } + + } + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + public void prerender() { + stCriarEditar.setText("EDITAR"); + + if(getSessionBean1().getModoEdicaoUtilizador().matches("new")) + { + if(!isPostData) + { + txtNome.setStyleClass("hide"); + stCriarEditar.setText("CRIAR"); + lblCap.setRendered(false); + txtCap.setRendered(false); + lblCedula.setRendered(false); + stCedula.setRendered(false); + } + + } + if(getSessionBean1().getModoEdicaoUtilizador().matches("edit")) + { + //drpNome.setRendered(true); + + if(!isPostData) + { + showUser(); + } + } + + txtMsg.setText(getSessionBean1().getMsg()); + getSessionBean1().setMsg(""); + + if(getSessionBean1().isMudarPassword()) + { + //txtMsg.setStyle("color: #000000; font-weight: bold"); + if(!isPostData) + { + txtMsg.setText("Por favor confirme os seus dados e altere a password para uma apenas do seu conhecimento."); + } + //getSessionBean1().setMudarPassword(false); + } + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + public String lnkAnalisesAcidente_action() { + //return navigate(); + int tipo = getSessionBean1().getCurrentUser().getTipo().intValue(); + if(tipo == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP) + { + return "form_dir_siprp"; + } + else if(tipo == Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH) + { + return "form_dir_ger_rh"; + } + else if(tipo == Global.TIPO_UTILIZADOR_SEGURANCA) + { + return "form_seguranca"; + } + else if(tipo == Global.TIPO_UTILIZADOR_RH) + { + return "form_rh"; + } + else if(tipo == Global.TIPO_UTILIZADOR_RH) + { + return "form_rh"; + } + else if(tipo == Global.TIPO_UTILIZADOR_HS) + { + return "form_hs"; + } + else if(tipo == Global.TIPO_UTILIZADOR_GESTOR) + { + return "form_gestor"; + } + else if(tipo == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA) + { + return "form_gestor"; + } + else if(tipo == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA) + { + return "form_gestor"; + } + + return null; + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), true ); + + return null; + } + + + public String butCancelar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + return navigate(); + } + + public String butGravar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + if(validationOk()) + { + if(getSessionBean1().getModoEdicaoUtilizador().matches("new")) + { + try + { + Utilizador u = addUser(); + addPermissao(u); + getSessionBean1().setMsg("Utilizador criado"); + } + catch(Exception ex) + { + getSessionBean1().setMsg("Erro na criação do utilizador!"); + ErrorLogger.logException( ex ); + } + } + else //edit + { + try + { + updateUser(); + //getSessionBean1().setMsg("Dados actualizados"); + return navigate(); + } + catch(Exception ex) + { + getSessionBean1().setMsg("Erro na actualização do utilizador"); + ErrorLogger.logException( ex ); + } + } + + if(getSessionBean1().isMudarPassword()) + { + getSessionBean1().setMudarPassword(false); + } + + } + + return null; + } + + public void drpTipo_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + drpNome.setVisible(true); + Integer tipo = (Integer) drpTipo.getSelected(); + boolean booGestor = false; + if(tipo.intValue() == GESTOR) + { + booGestor = true; + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + getSessionBean1().setEstabelecimentosOptions(adp.getEstabelecimentosList( getSessionBean1().getCurrentUser().getEmpresa_id(), new Boolean(booGestor) )); + drpEstabelecimentos.setSelected(new Integer(-1)); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + if(tipo.intValue() == SEG || tipo.intValue() == RH || tipo.intValue() == GESTOR || tipo.intValue() == DIRECTOR_RH || tipo.intValue() == DIRECTOR_SIPRP) + { + drpNome.setRendered(false); + txtNome.setStyleClass("show"); + lblCap.setRendered(false); + txtCap.setRendered(false); + lblCedula.setRendered(false); + stCedula.setRendered(false); + } + else if(tipo.intValue() == HS || tipo.intValue() == MEDICO) + { + drpNome.setRendered(true); + txtNome.setStyleClass("hide"); + if(tipo.intValue() == HS) + { + lblCap.setRendered(true); + txtCap.setRendered(true); + lblCedula.setRendered(false); + stCedula.setRendered(false); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + getSessionBean1().setMedicosOptions(adp.getTecnicosSaudeList()); + drpNome.setSelected(new Integer(0)); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + else // medicos + { + lblCedula.setRendered(true); + stCedula.setRendered(true); + lblCap.setRendered(false); + txtCap.setRendered(false); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + getSessionBean1().setMedicosOptions(adp.getMedicosList()); + drpNome.setSelected(new Integer(0)); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + } + } + + private boolean validationOk() + { + Integer tipo = (Integer) drpTipo.getSelected(); +// if(tipo.intValue() == 0) +// { +// getSessionBean1().setMsg("Tem de escolher um tipo!"); +// return false; +// } +// Integer estabelecimento = (Integer) drpEstabelecimentos.getSelected(); +// if(estabelecimento.intValue() == -1) +// { +// getSessionBean1().setMsg("Tem de escolher um estabelecimento!"); +// return false; +// } + +// if(tipo.intValue() == SEG || tipo.intValue() == RH || tipo.intValue() == GESTOR || tipo.intValue() == DIRECTOR_RH || tipo.intValue() == DIRECTOR_SIPRP) +// { +// if(txtNome.getText() == null) +// { +// getSessionBean1().setMsg("Tem de indicar o nome!"); +// return false; +// } +// else +// { +// String nome = (String) txtNome.getText(); +// if(nome.trim().length() == 0) +// { +// getSessionBean1().setMsg("Tem de indicar o nome!"); +// return false; +// } +// } +// } +// else if(tipo.intValue() == HS || tipo.intValue() == MEDICO) +// { +// Integer nome = (Integer) drpNome.getSelected(); +// if(nome.intValue() == 0) +// { +// getSessionBean1().setMsg("Tem de indicar o nome!"); +// return false; +// } +// } + +// if(txtLogin.getText() == null) +// { +// getSessionBean1().setMsg("Tem de indicar o login!"); +// return false; +// } +// else +// { +// String login = (String) txtLogin.getText(); +// if(login.trim().length() == 0) +// { +// getSessionBean1().setMsg("Tem de indicar o login!"); +// return false; +// } +// } + + if(txtPassword.getText() == null) + { + getSessionBean1().setMsg("Tem de indicar a password!"); + return false; + } + else + { + String password = (String) txtPassword.getText(); + if(password.trim().length() == 0) + { + getSessionBean1().setMsg("Tem de indicar a password!"); + return false; + } + else + { + if(txtConfPassword.getText() == null) + { + getSessionBean1().setMsg("Tem de confirmar a password!"); + return false; + } + else + { + String conf_password = (String) txtConfPassword.getText(); + if(conf_password.trim().length() == 0) + { + getSessionBean1().setMsg("Tem de confirmar a password!"); + return false; + } + else + { + if(!password.equals(conf_password)) + { + getSessionBean1().setMsg("A confirmação tem de ser igual à a password!"); + return false; + } + } + } + } // + } + + if(getSessionBean1().isMudarPassword()) + { + String password = (String) txtPassword.getText(); + if(password.matches(getSessionBean1().getCurrentUser().getPassword())) + { + getSessionBean1().setMsg("A nova password tem de ser diferente da password actual!"); + return false; + } + + } + +// if(tipo.intValue() == HS) +// { +// if(txtCap.getText() == null ) +// { +// getSessionBean1().setMsg("Tem de indicar o c.a.p.!"); +// return false; +// } +// else +// { +// String cap = (String) txtCap.getText(); +// if(cap.trim().length() == 0) +// { +// getSessionBean1().setMsg("Tem de indicar o c.a.p.!"); +// return false; +// } +// } +// } + + return true; + } + + public void drpNome_processValueChange( ValueChangeEvent event ) + { + Integer tipo = (Integer) drpTipo.getSelected(); + if(tipo.intValue() == MEDICO) + { + Integer medico_id = (Integer) drpNome.getSelected(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + String numero_cedula = adp.getNumeroCedula(medico_id); + stCedula.setText(numero_cedula); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + } + + private Utilizador addUser() throws Exception + { + Utilizador u = fillUser(); + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + Integer id = udp.createNewUtilizador( u ); + u.setId( id ); + return u; + } + + private void addPermissao(Utilizador u) throws Exception + { + Permissao p = new Permissao(); + p.setUser_id(u.getId()); + p.setCodigo_permissao(u.getTipo()); + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + udp.createPermissao(p); + } + + private void updateUser() throws Exception + { + Utilizador u = fillUser(); + u.setId(getSessionBean1().getCurrentUser().getId()); + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + udp.updateUtilizador(u); + } + + private void deleteUser() throws Exception + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + udp.deleteUser(getSessionBean1().getCurrentUser().getId()); + } + + private void showUser() + { + Utilizador u = getSessionBean1().getCurrentUser(); + drpTipo.setSelected(u.getTipo()); + if(u.getTipo().intValue() == SEG || u.getTipo().intValue() == RH || u.getTipo().intValue() == HS || u.getTipo().intValue() == MEDICO || u.getTipo().intValue() == GESTOR || u.getTipo().intValue() == DIRECTOR_RH || u.getTipo().intValue() == DIRECTOR_SIPRP) + { + drpNome.setRendered(false); + txtNome.setStyleClass("show"); + lblCap.setRendered(false); + txtCap.setRendered(false); + lblCedula.setRendered(false); + stCedula.setRendered(false); + txtNome.setText(utils.Utils.unicodeToHTML(u.getNome())); + } + else if(u.getTipo().intValue() == HS) + { + //txtNome.setRendered(false); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + getSessionBean1().setMedicosOptions(adp.getTecnicosSaudeList()); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + drpNome.setSelected(u.getFuncionario_hst_id()); + drpNome.setStyleClass("show"); + lblCap.setRendered(true); + txtCap.setRendered(true); + lblCedula.setRendered(false); + stCedula.setRendered(false); + txtCap.setText(u.getCap()); + } + else if(u.getTipo().intValue() == DIRECTOR_LOJA || u.getTipo().intValue() == DIRECTOR_NACIONAL_SEGURANCA) + { + drpNome.setRendered(false); + txtNome.setStyleClass("show"); + lblCap.setRendered(false); + txtCap.setRendered(false); + lblCedula.setRendered(false); + stCedula.setRendered(false); + lblResponsavelLoja.setRendered(false); + chkResponsavelLoja.setRendered(false); + txtNome.setText(utils.Utils.unicodeToHTML(u.getNome())); + } + else if(u.getTipo().intValue() == MEDICO) //medico + { + drpNome.setRendered(true); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + getSessionBean1().setMedicosOptions(adp.getMedicosList()); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + drpNome.setSelected(u.getMedico_id()); + txtNome.setStyleClass("hide"); + lblCap.setRendered(false); + txtCap.setRendered(false); + lblCedula.setRendered(true); + stCedula.setRendered(true); + stCedula.setText(u.getNumero_cedula()); + + } + if(u.getEstabelecimento_id() != null) + { + drpEstabelecimentos.setSelected(u.getEstabelecimento_id()); + } + + txtLogin.setText(u.getLogin()); + //txtPassword.setText(u.getPassword()); + txtEmail.setText(u.getEmail()); + } + + private Utilizador fillUser() + { + //Utilizador u = new Utilizador(); + Utilizador u = getSessionBean1().getCurrentUser(); +// u.setActivo("y"); +// u.setAdministrador("n"); +// u.setTipo((Integer) drpTipo.getSelected()); +// u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id()); +// u.setEstabelecimento_id( (Integer) drpEstabelecimentos.getSelected() ); +// u.setLogin( (String) txtLogin.getText() ); + String password = (String) txtPassword.getText(); + u.setPassword( password ); + java.util.Date today = new java.util.Date(); + java.sql.Date sqlToday = new java.sql.Date(today.getTime()); + u.setData_password(sqlToday); + + + u.setEmail(""); + if(txtEmail.getText() != null) + { + u.setEmail( (String) txtEmail.getText() ); + } + + Integer tipo = (Integer) drpTipo.getSelected(); + +// u.setNumero_cedula(""); +// u.setCap(""); +// if(tipo.intValue() == HS || tipo.intValue() == MEDICO) +// { +// AnalisesDataProvider adp = new AnalisesDataProvider(); +// if(tipo.intValue() == HS) +// { +// try +// { +// Integer tecnico_id = (Integer) drpNome.getSelected(); +// u.setFuncionario_hst_id(tecnico_id); +// u.setNome( adp.getTecnicoSaudeNome(tecnico_id) ); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } +// u.setCap( (String) txtCap.getText()); +// } +// else // medico +// { +// try +// { +// Integer medico_id = (Integer) drpNome.getSelected(); +// u.setMedico_id(medico_id); +// u.setNome( adp.getMedicoNome(medico_id) ); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } +// u.setNumero_cedula( (String) stCedula.getText()); +// } +// } +// else +// { +// u.setNome( (String) txtNome.getText() ); +// } + +// u.setResponsavel_loja("n"); +// if(chkResponsavelLoja.getSelected() != null) +// { +// if(chkResponsavelLoja.getSelected().equals(new Boolean(true))) +// { +// u.setResponsavel_loja("y"); +// } +// } +// +// if(u.getGestor_geral() == null) +// { +// u.setGestor_geral("n"); +// } + + u.setPrimeiro_login("n"); + return u; + } + + public String lnkEditUser_action() { + // TODO: Replace with your code + + getSessionBean1().setModoEdicaoUtilizador("edit"); + return "user"; + } + + public String butApagar_action() { + // TODO: Replace with your code + hidConfDelUser.setValue("apagar"); + return null; + } + + private String navigate() + { + if(isFromPlanos) + { + Utilizador u = getSessionBean1().getCurrentUser(); + // String curUser = "?user=" + u.getId().toString(); + FacesContext fc = getFacesContext().getCurrentInstance(); + Global.redirectToPlanos(fc, u); + return null; + } + String nav_from = getSessionBean1().getNavFrom(); + if(nav_from.matches("FormSeguranca")) + { + return "form_seguranca"; + } + else if(nav_from.matches("FormRH")) + { + return "form_rh"; + } + else if(nav_from.matches("FormHS")) + { + return "form_hs"; + } + else if(nav_from.matches("FormMedico")) + { + return "form_medico"; + } + else if(nav_from.matches("AnaliseAcidenteTrabalho")) + { + return "analise_acidente"; + } + else if(nav_from.matches("ViewAnaliseAcidenteTrabalho")) + { + return "view_analise"; + } + else if(nav_from.matches("FormGestor")) + { + return "form_gestor"; + } + else if(nav_from.matches("FormDirGerRh")) + { + return "form_dir_ger_rh"; + } + else if(nav_from.matches("FormDirSiprp")) + { + return "form_dir_siprp"; + } + else if(nav_from.matches("GestaoUtilizadores")) + { + return "gestao_utilizadores"; + } + else if(nav_from.matches("NovoUtilizador")) + { + return "novo_utilizador"; + } + else if(nav_from.matches("Login")) // first login + { + int tipo = getSessionBean1().getCurrentUser().getTipo().intValue(); + switch(tipo) + { + case Global.TIPO_UTILIZADOR_SEGURANCA: + return "form_seguranca"; + case Global.TIPO_UTILIZADOR_RH: + return "form_rh"; + case Global.TIPO_UTILIZADOR_HS: + return "form_hs"; + case Global.TIPO_UTILIZADOR_MEDICO: + return "form_medico"; + case Global.TIPO_UTILIZADOR_GESTOR: + return "form_gestor"; + case Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH: + return "form_dir_ger_rh"; + case Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP: + return "form_dir_siprp"; + case Global.TIPO_UTILIZADOR_DIRECTOR_LOJA: + return "form_gestor"; + case Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA: + return "form_gestor"; + } + } + return null; + } + + public String lnkNewUser_action() { + // TODO: Replace with your code + + if(getSessionBean1().getCurrentUser().getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH) + { + getSessionBean1().setNavFrom("FormDirGerRh"); + } + else if(getSessionBean1().getCurrentUser().getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP) + { + getSessionBean1().setNavFrom("FormDirSiprp"); + } + + return "gestao_utilizadores"; + } + + public String lnkAjuda_action() { + // TODO: Replace with your code +// ServletContext theApplicationsServletContext = +// (ServletContext) this.getExternalContext().getContext(); +// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); +// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf"; +// +// Global global = new Global(); +// try +// { +// global.showPdf(pdfFilePath); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + return null; + } + + public String lnkPlanosActuacao_action() { + // TODO: Replace with your code + Utilizador u = getSessionBean1().getCurrentUser(); +// String curUser = "?user=" + u.getId().toString(); + FacesContext fc = getFacesContext().getCurrentInstance(); + Global.redirectToPlanos(fc, u); + return null; + } +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Footer.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Footer.java new file mode 100644 index 00000000..52f9e49d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Footer.java @@ -0,0 +1,152 @@ +/* + * Footer.java + * + * Created on September 19, 2007, 10:57 AM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import com.sun.rave.web.ui.appbase.AbstractFragmentBean; +import com.sun.rave.web.ui.component.ImageComponent; +import com.sun.rave.web.ui.component.PanelGroup; +import com.sun.rave.web.ui.component.StaticText; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; + +/** + *

Fragment bean that corresponds to a similarly named JSP page + * fragment. This class contains component definitions (and initialization + * code) for all components that you have defined on this fragment, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class Footer extends AbstractFragmentBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private StaticText staticText1 = new StaticText(); + + public StaticText getStaticText1() { + return staticText1; + } + + public void setStaticText1(StaticText st) { + this.staticText1 = st; + } + + private StaticText staticText2 = new StaticText(); + + public StaticText getStaticText2() { + return staticText2; + } + + public void setStaticText2(StaticText st) { + this.staticText2 = st; + } + + private ImageComponent image1 = new ImageComponent(); + + public ImageComponent getImage1() { + return image1; + } + + public void setImage1(ImageComponent ic) { + this.image1 = ic; + } + //
+ + public Footer() { + } + + /** + *

Callback method that is called whenever a page containing + * this page fragment is navigated to, either directly via a URL, + * or indirectly via page navigation. Override this method to acquire + * resources that will be needed for event handlers and lifecycle methods.

+ * + *

The default implementation does nothing.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("Page1 Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called. Override this + * method to release resources acquired in the init() + * resources that will be needed for event handlers and lifecycle methods.

+ * + *

The default implementation does nothing.

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirGerRh.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirGerRh.java new file mode 100644 index 00000000..57e6ab19 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirGerRh.java @@ -0,0 +1,1551 @@ +/* + * FormDirGerRh.java + * + * Created on December 19, 2007, 11:48 AM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import beans.Utilizador; +import beans.AnaliseAcidente; +import com.evolute.utils.error.ErrorLogger; +import com.sun.data.provider.RowKey; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Button; +import com.sun.rave.web.ui.component.DropDown; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.Hyperlink; +import com.sun.rave.web.ui.component.ImageComponent; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.component.PanelGroup; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.Table; +import com.sun.rave.web.ui.component.TableColumn; +import com.sun.rave.web.ui.component.TableRowGroup; +import com.sun.rave.web.ui.component.TextField; +import com.sun.rave.web.ui.model.Option; +import db.providers.AnalisesConcluidasDataProvider; +import db.providers.AnalisesDataProvider; +import db.providers.AnalisesSeguimentoDataProvider; +import global.Global; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.ListIterator; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import javax.faces.context.FacesContext; +import javax.faces.event.ValueChangeEvent; +import javax.servlet.http.HttpServletRequest; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class FormDirGerRh extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridBase1() { + return gridBase1; + } + + public void setGridBase1(HtmlPanelGrid hpg) { + this.gridBase1 = hpg; + } + + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayout1() { + return gridLayout1; + } + + public void setGridLayout1(HtmlPanelGrid hpg) { + this.gridLayout1 = hpg; + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private ImageComponent image1 = new ImageComponent(); + + public ImageComponent getImage1() { + return image1; + } + + public void setImage1(ImageComponent ic) { + this.image1 = ic; + } + + private ImageComponent image2 = new ImageComponent(); + + public ImageComponent getImage2() { + return image2; + } + + public void setImage2(ImageComponent ic) { + this.image2 = ic; + } + + private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayoutTop1() { + return gridLayoutTop1; + } + + public void setGridLayoutTop1(HtmlPanelGrid hpg) { + this.gridLayoutTop1 = hpg; + } + + private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridSeguimento1() { + return gridSeguimento1; + } + + public void setGridSeguimento1(HtmlPanelGrid hpg) { + this.gridSeguimento1 = hpg; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private StaticText staticText2 = new StaticText(); + + public StaticText getStaticText2() { + return staticText2; + } + + public void setStaticText2(StaticText st) { + this.staticText2 = st; + } + + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel3() { + return gridPanel3; + } + + public void setGridPanel3(HtmlPanelGrid hpg) { + this.gridPanel3 = hpg; + } + + private Table table1 = new Table(); + + public Table getTable1() { + return table1; + } + + public void setTable1(Table t) { + this.table1 = t; + } + + private TableRowGroup tableRowGroup1 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup1() { + return tableRowGroup1; + } + + public void setTableRowGroup1(TableRowGroup trg) { + this.tableRowGroup1 = trg; + } + + private TableColumn tableColumn1 = new TableColumn(); + + public TableColumn getTableColumn1() { + return tableColumn1; + } + + public void setTableColumn1(TableColumn tc) { + this.tableColumn1 = tc; + } + + private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); + + public Hyperlink getLnkDataAcidenteSeg() { + return lnkDataAcidenteSeg; + } + + public void setLnkDataAcidenteSeg(Hyperlink h) { + this.lnkDataAcidenteSeg = h; + } + + private TableColumn tableColumn2 = new TableColumn(); + + public TableColumn getTableColumn2() { + return tableColumn2; + } + + public void setTableColumn2(TableColumn tc) { + this.tableColumn2 = tc; + } + + private Hyperlink lnkNrSeg = new Hyperlink(); + + public Hyperlink getLnkNrSeg() { + return lnkNrSeg; + } + + public void setLnkNrSeg(Hyperlink h) { + this.lnkNrSeg = h; + } + + private TableColumn tableColumn3 = new TableColumn(); + + public TableColumn getTableColumn3() { + return tableColumn3; + } + + public void setTableColumn3(TableColumn tc) { + this.tableColumn3 = tc; + } + + private Hyperlink lnkPorSeg = new Hyperlink(); + + public Hyperlink getLnkPorSeg() { + return lnkPorSeg; + } + + public void setLnkPorSeg(Hyperlink h) { + this.lnkPorSeg = h; + } + + private TableColumn tableColumn4 = new TableColumn(); + + public TableColumn getTableColumn4() { + return tableColumn4; + } + + public void setTableColumn4(TableColumn tc) { + this.tableColumn4 = tc; + } + + private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); + + public Hyperlink getLnkNomeAcidentadoSeg() { + return lnkNomeAcidentadoSeg; + } + + public void setLnkNomeAcidentadoSeg(Hyperlink h) { + this.lnkNomeAcidentadoSeg = h; + } + + private TableColumn tableColumn5 = new TableColumn(); + + public TableColumn getTableColumn5() { + return tableColumn5; + } + + public void setTableColumn5(TableColumn tc) { + this.tableColumn5 = tc; + } + + private Hyperlink lnkFaseSeg = new Hyperlink(); + + public Hyperlink getLnkFaseSeg() { + return lnkFaseSeg; + } + + public void setLnkFaseSeg(Hyperlink h) { + this.lnkFaseSeg = h; + } + + + private Hyperlink lnkEstabelecimentoSeg = new Hyperlink(); + + public Hyperlink getLnkEstabelecimentoSeg() { + return lnkEstabelecimentoSeg; + } + + public void setLnkEstabelecimentoSeg(Hyperlink h) { + this.lnkEstabelecimentoSeg = h; + } + + private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridConcluidos1() { + return gridConcluidos1; + } + + public void setGridConcluidos1(HtmlPanelGrid hpg) { + this.gridConcluidos1 = hpg; + } + + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel4() { + return gridPanel4; + } + + public void setGridPanel4(HtmlPanelGrid hpg) { + this.gridPanel4 = hpg; + } + + private StaticText staticText3 = new StaticText(); + + public StaticText getStaticText3() { + return staticText3; + } + + public void setStaticText3(StaticText st) { + this.staticText3 = st; + } + + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel5() { + return gridPanel5; + } + + public void setGridPanel5(HtmlPanelGrid hpg) { + this.gridPanel5 = hpg; + } + + private PanelGroup groupPanel3 = new PanelGroup(); + + public PanelGroup getGroupPanel3() { + return groupPanel3; + } + + public void setGroupPanel3(PanelGroup pg) { + this.groupPanel3 = pg; + } + + private StaticText staticText4 = new StaticText(); + + public StaticText getStaticText4() { + return staticText4; + } + + public void setStaticText4(StaticText st) { + this.staticText4 = st; + } + + private DropDown drpAno = new DropDown(); + + public DropDown getDrpAno() { + return drpAno; + } + + public void setDrpAno(DropDown dd) { + this.drpAno = dd; + } + + private PanelGroup groupPanel4 = new PanelGroup(); + + public PanelGroup getGroupPanel4() { + return groupPanel4; + } + + public void setGroupPanel4(PanelGroup pg) { + this.groupPanel4 = pg; + } + + private StaticText lblMes = new StaticText(); + + public StaticText getLblMes() { + return lblMes; + } + + public void setLblMes(StaticText st) { + this.lblMes = st; + } + + private DropDown drpMes = new DropDown(); + + public DropDown getDrpMes() { + return drpMes; + } + + public void setDrpMes(DropDown dd) { + this.drpMes = dd; + } + + private PanelGroup groupPanel5 = new PanelGroup(); + + public PanelGroup getGroupPanel5() { + return groupPanel5; + } + + public void setGroupPanel5(PanelGroup pg) { + this.groupPanel5 = pg; + } + + private StaticText lblDia = new StaticText(); + + public StaticText getLblDia() { + return lblDia; + } + + public void setLblDia(StaticText st) { + this.lblDia = st; + } + + private DropDown drpDia = new DropDown(); + + public DropDown getDrpDia() { + return drpDia; + } + + public void setDrpDia(DropDown dd) { + this.drpDia = dd; + } + + private PanelGroup groupPanel6 = new PanelGroup(); + + public PanelGroup getGroupPanel6() { + return groupPanel6; + } + + public void setGroupPanel6(PanelGroup pg) { + this.groupPanel6 = pg; + } + + private StaticText staticText5 = new StaticText(); + + public StaticText getStaticText5() { + return staticText5; + } + + public void setStaticText5(StaticText st) { + this.staticText5 = st; + } + + private TextField txtPor = new TextField(); + + public TextField getTxtPor() { + return txtPor; + } + + public void setTxtPor(TextField tf) { + this.txtPor = tf; + } + + private PanelGroup groupPanel7 = new PanelGroup(); + + public PanelGroup getGroupPanel7() { + return groupPanel7; + } + + public void setGroupPanel7(PanelGroup pg) { + this.groupPanel7 = pg; + } + + private StaticText staticText6 = new StaticText(); + + public StaticText getStaticText6() { + return staticText6; + } + + public void setStaticText6(StaticText st) { + this.staticText6 = st; + } + + private TextField txtNome = new TextField(); + + public TextField getTxtNome() { + return txtNome; + } + + public void setTxtNome(TextField tf) { + this.txtNome = tf; + } + + private Button butPesquisar = new Button(); + + public Button getButPesquisar() { + return butPesquisar; + } + + public void setButPesquisar(Button b) { + this.butPesquisar = b; + } + + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel6() { + return gridPanel6; + } + + public void setGridPanel6(HtmlPanelGrid hpg) { + this.gridPanel6 = hpg; + } + + private Table table2 = new Table(); + + public Table getTable2() { + return table2; + } + + public void setTable2(Table t) { + this.table2 = t; + } + + private TableRowGroup tableRowGroup2 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup2() { + return tableRowGroup2; + } + + public void setTableRowGroup2(TableRowGroup trg) { + this.tableRowGroup2 = trg; + } + + private TableColumn tableColumn6 = new TableColumn(); + + public TableColumn getTableColumn6() { + return tableColumn6; + } + + public void setTableColumn6(TableColumn tc) { + this.tableColumn6 = tc; + } + + private Hyperlink lnkDataConcluida = new Hyperlink(); + + public Hyperlink getLnkDataConcluida() { + return lnkDataConcluida; + } + + public void setLnkDataConcluida(Hyperlink h) { + this.lnkDataConcluida = h; + } + + private TableColumn tableColumn7 = new TableColumn(); + + public TableColumn getTableColumn7() { + return tableColumn7; + } + + public void setTableColumn7(TableColumn tc) { + this.tableColumn7 = tc; + } + + private Hyperlink lnkNrConcluida = new Hyperlink(); + + public Hyperlink getLnkNrConcluida() { + return lnkNrConcluida; + } + + public void setLnkNrConcluida(Hyperlink h) { + this.lnkNrConcluida = h; + } + + private TableColumn tableColumn8 = new TableColumn(); + + public TableColumn getTableColumn8() { + return tableColumn8; + } + + public void setTableColumn8(TableColumn tc) { + this.tableColumn8 = tc; + } + + private Hyperlink lnkPorConcluida = new Hyperlink(); + + public Hyperlink getLnkPorConcluida() { + return lnkPorConcluida; + } + + public void setLnkPorConcluida(Hyperlink h) { + this.lnkPorConcluida = h; + } + + private TableColumn tableColumn9 = new TableColumn(); + + public TableColumn getTableColumn9() { + return tableColumn9; + } + + public void setTableColumn9(TableColumn tc) { + this.tableColumn9 = tc; + } + + private Hyperlink lnkNomeConcluida = new Hyperlink(); + + public Hyperlink getLnkNomeConcluida() { + return lnkNomeConcluida; + } + + public void setLnkNomeConcluida(Hyperlink h) { + this.lnkNomeConcluida = h; + } + + private TableColumn tableColumn10 = new TableColumn(); + + public TableColumn getTableColumn10() { + return tableColumn10; + } + + public void setTableColumn10(TableColumn tc) { + this.tableColumn10 = tc; + } + + private Hyperlink lnkEstabConcluida = new Hyperlink(); + + public Hyperlink getLnkEstabConcluida() { + return lnkEstabConcluida; + } + + public void setLnkEstabConcluida(Hyperlink h) { + this.lnkEstabConcluida = h; + } + + private StaticText txtSearchMsg = new StaticText(); + + public StaticText getTxtSearchMsg() { + return txtSearchMsg; + } + + public void setTxtSearchMsg(StaticText st) { + this.txtSearchMsg = st; + } + + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel7() { + return gridPanel7; + } + + public void setGridPanel7(HtmlPanelGrid hpg) { + this.gridPanel7 = hpg; + } + + private PanelGroup groupPanel8 = new PanelGroup(); + + public PanelGroup getGroupPanel8() { + return groupPanel8; + } + + public void setGroupPanel8(PanelGroup pg) { + this.groupPanel8 = pg; + } + + private StaticText staticText7 = new StaticText(); + + public StaticText getStaticText7() { + return staticText7; + } + + public void setStaticText7(StaticText st) { + this.staticText7 = st; + } + + private ImageComponent image3 = new ImageComponent(); + + public ImageComponent getImage3() { + return image3; + } + + public void setImage3(ImageComponent ic) { + this.image3 = ic; + } + + private StaticText staticText8 = new StaticText(); + + public StaticText getStaticText8() { + return staticText8; + } + + public void setStaticText8(StaticText st) { + this.staticText8 = st; + } + + private TableColumn tableColumn11 = new TableColumn(); + + public TableColumn getTableColumn11() { + return tableColumn11; + } + + public void setTableColumn11(TableColumn tc) { + this.tableColumn11 = tc; + } + + private Hyperlink lnkDataAberturaSeg = new Hyperlink(); + + public Hyperlink getLnkDataAberturaSeg() { + return lnkDataAberturaSeg; + } + + public void setLnkDataAberturaSeg(Hyperlink h) { + this.lnkDataAberturaSeg = h; + } + + private TableColumn tableColumn12 = new TableColumn(); + + public TableColumn getTableColumn12() { + return tableColumn12; + } + + public void setTableColumn12(TableColumn tc) { + this.tableColumn12 = tc; + } + + private TableColumn tableColumn13 = new TableColumn(); + + public TableColumn getTableColumn13() { + return tableColumn13; + } + + public void setTableColumn13(TableColumn tc) { + this.tableColumn13 = tc; + } + + private Hyperlink lnkDataAberturaConcluida = new Hyperlink(); + + public Hyperlink getLnkDataAberturaConcluida() { + return lnkDataAberturaConcluida; + } + + public void setLnkDataAberturaConcluida(Hyperlink h) { + this.lnkDataAberturaConcluida = h; + } + private StaticText lblUser = new StaticText(); + + public StaticText getLblUser() { + return lblUser; + } + + public void setLblUser(StaticText st) { + this.lblUser = st; + } + private Hyperlink lnkPlanosActuacao = new Hyperlink(); + + public Hyperlink getLnkPlanosActuacao() { + return lnkPlanosActuacao; + } + + public void setLnkPlanosActuacao(Hyperlink h) { + this.lnkPlanosActuacao = h; + } + + + private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanelFilterSeg() + { + return this.gridPanelFilterSeg; + } + public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + { + this.gridPanelFilterSeg = pg; + } + + private PanelGroup groupPanelFilterSeg = new PanelGroup(); + public PanelGroup getGroupPanelFilterSeg() + { + return this.groupPanelFilterSeg; + } + public void setGroupPanelFilterSeg( PanelGroup pg ) + { + this.groupPanelFilterSeg = pg; + } + + private StaticText labelFilterNameSeg = new StaticText(); + public StaticText getLabelFilterNameSeg() + { + return this.labelFilterNameSeg; + } + public void setLabelFilterNameSeg( StaticText st ) + { + this.labelFilterNameSeg = st; + } + + private TextField textFilterNameSeg = new TextField(); + public TextField getTextFilterNameSeg() + { + return this.textFilterNameSeg; + } + public void setTextFilterNameSeg( TextField tf ) + { + this.textFilterNameSeg = tf; + } + + private StaticText labelFilterEstabelecimentoSeg = new StaticText(); + public StaticText getLabelFilterEstabelecimentoSeg() { + return labelFilterEstabelecimentoSeg; + } + public void setLabelFilterEstabelecimentoSeg(StaticText labelFilterEstabelecimentoSeg) { + this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg; + } + + private TextField textFilterEstabelecimentoSeg = new TextField(); + + public TextField getTextFilterEstabelecimentoSeg() { + return textFilterEstabelecimentoSeg; + } + public void setTextFilterEstabelecimentoSeg(TextField textFilterEstabelecimentoSeg) { + this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg; + } + + private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); + public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + { + return this.calFilterDateSeg; + } + public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateSeg = c; + } + + private TextField textFilterPORSeg = new TextField(); + + public TextField getTextFilterPORSeg() { + return textFilterPORSeg; + } + + public void setTextFilterPORSeg(TextField textFilterPORSeg) { + this.textFilterPORSeg = textFilterPORSeg; + } + + + private Button buttonFilterSeg = new Button(); + public Button getButtonFilterSeg() + { + return this.buttonFilterSeg; + } + public void setButtonFilterSeg( Button b ) + { + this.buttonFilterSeg = b; + } + + private TextField textFilterEstabelecimentoConc = new TextField(); + + public TextField getTextFilterEstabelecimentoConc() { + return textFilterEstabelecimentoConc; + } + + public void setTextFilterEstabelecimentoConc(TextField textFilterEstabelecimentoConc) { + this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc; + } + + private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + //
+ + + /** + *

Construct a new Page bean instance.

+ */ + public FormDirGerRh() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + if (!getSessionBean1().isLoggedIn()) { + try { + getExternalContext().redirect("Login.jsp"); + } catch(Exception e) { + // . . . handle exception . . . + } + } + + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("FormDirGerRh Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + public void prerender() { + System.out.println("=== FORM_DIR_GER_RH ==="); + lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); + + HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom(referer); + if(!pageFrom.matches("FormDirGerRh.jsp")) + { + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //lblActivos.setRendered(true); + table1.setRendered(true); + + ArrayList seguimentoList = adp.getAnalisesSeguimentoDirGerRhList(); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList(seguimentoList); + } + catch(Exception ex) + { + //lblActivos.setRendered(false); + table1.setRendered(false); + ErrorLogger.logException( ex ); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //lblActivos.setRendered(true); + table2.setRendered(true); + + ArrayList concluidasList = adp.getAnalisesConcluidasList(null); + getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); + } + catch(Exception ex) + { + //lblActivos.setRendered(false); + table2.setRendered(false); + ErrorLogger.logException( ex ); + } + fillAnoDropDown(); + } + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + public String lnkAnalisesAcidente_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkNewUser_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkEditUser_action() { + // TODO: Replace with your code + + getSessionBean1().setNavFrom("FormDirGerRh"); + getSessionBean1().setModoEdicaoUtilizador("edit"); + return "user"; + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), true ); + return null; + } + + public String lnkDataAcidenteSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirGerRh"); + return "view_analise"; + + } + + public String lnkDataAberturaSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirGerRh"); + return "view_analise"; + } + + public String lnkNrSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirGerRh"); + return "view_analise"; + + } + + public String lnkPorSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirGerRh"); + return "view_analise"; + + } + + public String lnkNomeAcidentadoSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirGerRh"); + return "view_analise"; + + } + + public String lnkFaseSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirGerRh"); + return "view_analise"; + + } + + + public String lnkEstabelecimentoSeg_action() { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirGerRh"); + return "view_analise"; + } + + private AnaliseAcidente getTableSeguimentoRowData() + { + RowKey rk = tableRowGroup1.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup1.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + + public void drpAno_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + Object ano = event.getNewValue(); + if(ano == null) + { + lblMes.setVisible(false); + drpMes.setVisible(false); + lblDia.setVisible(false); + drpDia.setVisible(false); + } + else + { + lblMes.setVisible(true); + drpMes.setVisible(true); + fillMesDropDown(); + } + } + + public void drpMes_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + Object mes = event.getNewValue(); + if(mes == null) + { + lblDia.setVisible(false); + drpDia.setVisible(false); + } + else + { + lblDia.setVisible(true); + drpDia.setVisible(true); + //fillDiaDropDown(); + } + } + + public void drpDia_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public String butPesquisar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + Object obAno = null; + Object obMes = null; + Object obDia = null; + try + { + obAno = drpAno.getSelected(); + obMes = drpMes.getSelected(); + obDia = drpDia.getSelected(); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + Integer ano = null; + Integer mes = null; + Integer dia = null; + + if(obAno != null) + { + ano = (Integer) obAno; + } + + if(obMes != null) + { + mes = (Integer) obMes; + } + + if(obDia != null) + { + dia = (Integer) obDia; + } + + String por = null; + if(txtPor.getText() != null) + { + por = (String) txtPor.getText(); + if(por.trim().length() == 0) + { + por = null; + } + } + + String nome = null; + if(txtNome.getText() != null) + { + nome = (String) txtNome.getText(); + if(nome.trim().length() == 0) + { + nome = null; + } + } + + String estabelecimento = null; + if ( textFilterEstabelecimentoConc.getText() != null ) + { + estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim(); + if( estabelecimento.length() == 0 ) + { + estabelecimento = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); + ArrayList concluidasList = adp.searchAanalisesConcluidasList( + null, ano, mes, dia, por, nome, estabelecimento ); + + table2.setRendered(true); + txtSearchMsg.setRendered(false); + getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); + } + catch(Exception ex) + { + table2.setRendered(false); + txtSearchMsg.setRendered(true); + txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !"); + ErrorLogger.logException( ex ); + } + + return null; + } + + public String lnkDataConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirGerRh"); + return "view_analise"; + + } + + public String lnkDataAberturaConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirGerRh"); + return "view_analise"; + } + + public String lnkNrConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirGerRh"); + return "view_analise"; + + } + + public String lnkPorConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirGerRh"); + return "view_analise"; + + } + + public String lnkNomeConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirGerRh"); + return "view_analise"; + + } + + public String lnkEstabConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirGerRh"); + return "view_analise"; + + } + + private AnaliseAcidente getTableConcluidasRowData() + { + RowKey rk = tableRowGroup2.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup2.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + + public String lnkGerirUtilizadores_action() { + // TODO: Replace with your code + + getSessionBean1().setNavFrom("FormDirGerRh"); + //getSessionBean1().setModoEdicaoUtilizador("new"); + return "gestao_utilizadores"; + + } + + private void fillAnoDropDown() + { +// ArrayList anosList = new ArrayList(); +// for(int ano=2007; ano<2051; ano++) +// { +// anosList.add(new Integer(ano)); +// } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList anosList = adp.getAnosListFromAnalises(); + com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1]; + anoOptions[0] = new Option("", ""); + ListIterator iter = anosList.listIterator(); + int i = 1; + while(iter.hasNext()) + { + Integer ano = (Integer) iter.next(); + + anoOptions[i] = new Option(ano, ano.toString()); + i++; + } + getSessionBean1().setAnoOptions(anoOptions); + Calendar cal = new GregorianCalendar(); + int year = cal.get(Calendar.YEAR); + //drpAno.setSelected( new Integer(year) ); + + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + } + + + private void fillMesDropDown() + { + com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13]; + mesOptions[0] = new Option("", ""); + mesOptions[1] = new Option(new Integer(1), "Janeiro"); + mesOptions[2] = new Option(new Integer(2), "Fevereiro"); + mesOptions[3] = new Option(new Integer(3), "Março"); + mesOptions[4] = new Option(new Integer(4), "Abril"); + mesOptions[5] = new Option(new Integer(5), "Maio"); + mesOptions[6] = new Option(new Integer(6), "Junho"); + mesOptions[7] = new Option(new Integer(7), "Julho"); + mesOptions[8] = new Option(new Integer(8), "Agosto"); + mesOptions[9] = new Option(new Integer(9), "Setembro"); + mesOptions[10] = new Option(new Integer(10), "Outubro"); + mesOptions[11] = new Option(new Integer(11), "Novembro"); + mesOptions[12] = new Option(new Integer(12), "Dezembro"); + getSessionBean1().setMesOptions(mesOptions); + Calendar cal = new GregorianCalendar(); + int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ... + //drpMes.setSelected( new Integer(month+1) ); + } + +// private void fillDiaDropDown() +// { +// +// } + + public String lnkAjuda_action() { + // TODO: Replace with your code +// ServletContext theApplicationsServletContext = +// (ServletContext) this.getExternalContext().getContext(); +// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); +// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf"; +// +// Global global = new Global(); +// try +// { +// global.showPdf(pdfFilePath); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + return null; + } + + public String lnkPlanosActuacao_action() { + // TODO: Replace with your code + Utilizador u = getSessionBean1().getCurrentUser(); +// String curUser = "?user=" + u.getId().toString(); + FacesContext fc = getFacesContext().getCurrentInstance(); + Global.redirectToPlanos(fc, u); +// Utilizador u = getSessionBean1().getCurrentUser(); +// String curUser = "?user=" + u.getId().toString(); +// FacesContext fc = getFacesContext().getCurrentInstance(); +// try +// { +// JSFUtils.redirect(fc, Global.PLANOS_ACTUACAO_URL + curUser); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + return null; + } + + public String buttonFilterSeg_action() + { + Date visitaDate = ( Date ) calFilterDateSeg.getValue(); + String visitaDateStr = null; + if ( visitaDate != null ) + { + visitaDateStr = D_F.format( visitaDate ); + } + + String POR = null; + if ( textFilterPORSeg.getText() != null ) + { + POR = ( ( String ) textFilterPORSeg.getText() ).trim(); + if ( POR.length() == 0 ) + { + POR = null; + } + } + + String nome = null; + if ( textFilterNameSeg.getText() != null ) + { + nome = (( String ) textFilterNameSeg.getText()).trim(); + if( nome.length() == 0 ) + { + nome = null; + } + } + + String estabelecimento = null; + if ( textFilterEstabelecimentoSeg.getText() != null ) + { + estabelecimento = (( String ) textFilterEstabelecimentoSeg.getText()).trim(); + if ( estabelecimento.length() == 0 ) + { + estabelecimento = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList seguimentoList = adp.searchAnalisesSeguimentoDirGerRh( nome, estabelecimento, visitaDateStr, POR ); + + table1.setRendered( true ); + txtSearchMsg.setRendered( false ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch( Exception e ) + { + table1.setRendered( false ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + ErrorLogger.logException( e ); + } + + return null; + } + +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirSiprp.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirSiprp.java new file mode 100755 index 00000000..6731b771 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirSiprp.java @@ -0,0 +1,1591 @@ +/* + * FormDirSiprp.java + * + * Created on November 21, 2007, 1:25 PM + * Copyright lluis2 + */ +package analiseacidentestrabalho; + +import beans.Utilizador; +import beans.AnaliseAcidente; +import com.evolute.utils.error.ErrorLogger; +import com.sun.data.provider.RowKey; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Button; +import com.sun.rave.web.ui.component.DropDown; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.Hyperlink; +import com.sun.rave.web.ui.component.ImageComponent; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.component.PanelGroup; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.Table; +import com.sun.rave.web.ui.component.TableColumn; +import com.sun.rave.web.ui.component.TableRowGroup; +import com.sun.rave.web.ui.component.TextField; +import com.sun.rave.web.ui.model.Option; +import db.providers.AnalisesConcluidasDataProvider; +import db.providers.AnalisesDataProvider; +import db.providers.AnalisesSeguimentoDataProvider; +import global.Global; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.ListIterator; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import javax.faces.context.FacesContext; +import javax.faces.event.ValueChangeEvent; +import javax.servlet.http.HttpServletRequest; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class FormDirSiprp extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridBase1() { + return gridBase1; + } + + public void setGridBase1(HtmlPanelGrid hpg) { + this.gridBase1 = hpg; + } + + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayout1() { + return gridLayout1; + } + + public void setGridLayout1(HtmlPanelGrid hpg) { + this.gridLayout1 = hpg; + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private ImageComponent image1 = new ImageComponent(); + + public ImageComponent getImage1() { + return image1; + } + + public void setImage1(ImageComponent ic) { + this.image1 = ic; + } + + private ImageComponent image2 = new ImageComponent(); + + public ImageComponent getImage2() { + return image2; + } + + public void setImage2(ImageComponent ic) { + this.image2 = ic; + } + + private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayoutTop1() { + return gridLayoutTop1; + } + + public void setGridLayoutTop1(HtmlPanelGrid hpg) { + this.gridLayoutTop1 = hpg; + } + + private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridSeguimento1() { + return gridSeguimento1; + } + + public void setGridSeguimento1(HtmlPanelGrid hpg) { + this.gridSeguimento1 = hpg; + } + + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel4() { + return gridPanel4; + } + + public void setGridPanel4(HtmlPanelGrid hpg) { + this.gridPanel4 = hpg; + } + + private StaticText staticText4 = new StaticText(); + + public StaticText getStaticText4() { + return staticText4; + } + + public void setStaticText4(StaticText st) { + this.staticText4 = st; + } + + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel5() { + return gridPanel5; + } + + public void setGridPanel5(HtmlPanelGrid hpg) { + this.gridPanel5 = hpg; + } + + private Table table2 = new Table(); + + public Table getTable2() { + return table2; + } + + public void setTable2(Table t) { + this.table2 = t; + } + + private TableRowGroup tableRowGroup2 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup2() { + return tableRowGroup2; + } + + public void setTableRowGroup2(TableRowGroup trg) { + this.tableRowGroup2 = trg; + } + + private TableColumn tableColumn6 = new TableColumn(); + + public TableColumn getTableColumn6() { + return tableColumn6; + } + + public void setTableColumn6(TableColumn tc) { + this.tableColumn6 = tc; + } + + private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); + + public Hyperlink getLnkDataAcidenteSeg() { + return lnkDataAcidenteSeg; + } + + public void setLnkDataAcidenteSeg(Hyperlink h) { + this.lnkDataAcidenteSeg = h; + } + + private TableColumn tableColumn7 = new TableColumn(); + + public TableColumn getTableColumn7() { + return tableColumn7; + } + + public void setTableColumn7(TableColumn tc) { + this.tableColumn7 = tc; + } + + private Hyperlink lnkNrSeg = new Hyperlink(); + + public Hyperlink getLnkNrSeg() { + return lnkNrSeg; + } + + public void setLnkNrSeg(Hyperlink h) { + this.lnkNrSeg = h; + } + + private TableColumn tableColumn8 = new TableColumn(); + + public TableColumn getTableColumn8() { + return tableColumn8; + } + + public void setTableColumn8(TableColumn tc) { + this.tableColumn8 = tc; + } + + private Hyperlink lnkPorSeg = new Hyperlink(); + + public Hyperlink getLnkPorSeg() { + return lnkPorSeg; + } + + public void setLnkPorSeg(Hyperlink h) { + this.lnkPorSeg = h; + } + + private TableColumn tableColumn9 = new TableColumn(); + + public TableColumn getTableColumn9() { + return tableColumn9; + } + + public void setTableColumn9(TableColumn tc) { + this.tableColumn9 = tc; + } + + private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); + + public Hyperlink getLnkNomeAcidentadoSeg() { + return lnkNomeAcidentadoSeg; + } + + public void setLnkNomeAcidentadoSeg(Hyperlink h) { + this.lnkNomeAcidentadoSeg = h; + } + + private TableColumn tableColumn10 = new TableColumn(); + + public TableColumn getTableColumn10() { + return tableColumn10; + } + + public void setTableColumn10(TableColumn tc) { + this.tableColumn10 = tc; + } + + private Hyperlink lnkFaseSeg = new Hyperlink(); + + public Hyperlink getLnkFaseSeg() { + return lnkFaseSeg; + } + + public void setLnkFaseSeg(Hyperlink h) { + this.lnkFaseSeg = h; + } + + private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridConcluidos1() { + return gridConcluidos1; + } + + public void setGridConcluidos1(HtmlPanelGrid hpg) { + this.gridConcluidos1 = hpg; + } + + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel6() { + return gridPanel6; + } + + public void setGridPanel6(HtmlPanelGrid hpg) { + this.gridPanel6 = hpg; + } + + private StaticText staticText5 = new StaticText(); + + public StaticText getStaticText5() { + return staticText5; + } + + public void setStaticText5(StaticText st) { + this.staticText5 = st; + } + + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel7() { + return gridPanel7; + } + + public void setGridPanel7(HtmlPanelGrid hpg) { + this.gridPanel7 = hpg; + } + + private PanelGroup groupPanel3 = new PanelGroup(); + + public PanelGroup getGroupPanel3() { + return groupPanel3; + } + + public void setGroupPanel3(PanelGroup pg) { + this.groupPanel3 = pg; + } + + private StaticText staticText6 = new StaticText(); + + public StaticText getStaticText6() { + return staticText6; + } + + public void setStaticText6(StaticText st) { + this.staticText6 = st; + } + + private DropDown drpAno = new DropDown(); + + public DropDown getDrpAno() { + return drpAno; + } + + public void setDrpAno(DropDown dd) { + this.drpAno = dd; + } + + private PanelGroup groupPanel4 = new PanelGroup(); + + public PanelGroup getGroupPanel4() { + return groupPanel4; + } + + public void setGroupPanel4(PanelGroup pg) { + this.groupPanel4 = pg; + } + + private StaticText lblMes = new StaticText(); + + public StaticText getLblMes() { + return lblMes; + } + + public void setLblMes(StaticText st) { + this.lblMes = st; + } + + private DropDown drpMes = new DropDown(); + + public DropDown getDrpMes() { + return drpMes; + } + + public void setDrpMes(DropDown dd) { + this.drpMes = dd; + } + + private PanelGroup groupPanel5 = new PanelGroup(); + + public PanelGroup getGroupPanel5() { + return groupPanel5; + } + + public void setGroupPanel5(PanelGroup pg) { + this.groupPanel5 = pg; + } + + private StaticText lblDia = new StaticText(); + + public StaticText getLblDia() { + return lblDia; + } + + public void setLblDia(StaticText st) { + this.lblDia = st; + } + + private DropDown drpDia = new DropDown(); + + public DropDown getDrpDia() { + return drpDia; + } + + public void setDrpDia(DropDown dd) { + this.drpDia = dd; + } + + private PanelGroup groupPanel6 = new PanelGroup(); + + public PanelGroup getGroupPanel6() { + return groupPanel6; + } + + public void setGroupPanel6(PanelGroup pg) { + this.groupPanel6 = pg; + } + + private StaticText staticText7 = new StaticText(); + + public StaticText getStaticText7() { + return staticText7; + } + + public void setStaticText7(StaticText st) { + this.staticText7 = st; + } + + private TextField txtPor = new TextField(); + + public TextField getTxtPor() { + return txtPor; + } + + public void setTxtPor(TextField tf) { + this.txtPor = tf; + } + + private PanelGroup groupPanel7 = new PanelGroup(); + + public PanelGroup getGroupPanel7() { + return groupPanel7; + } + + public void setGroupPanel7(PanelGroup pg) { + this.groupPanel7 = pg; + } + + private StaticText staticText8 = new StaticText(); + + public StaticText getStaticText8() { + return staticText8; + } + + public void setStaticText8(StaticText st) { + this.staticText8 = st; + } + + private TextField txtNome = new TextField(); + + public TextField getTxtNome() { + return txtNome; + } + + public void setTxtNome(TextField tf) { + this.txtNome = tf; + } + + private Button butPesquisar = new Button(); + + public Button getButPesquisar() { + return butPesquisar; + } + + public void setButPesquisar(Button b) { + this.butPesquisar = b; + } + + private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel8() { + return gridPanel8; + } + + public void setGridPanel8(HtmlPanelGrid hpg) { + this.gridPanel8 = hpg; + } + + private Table table3 = new Table(); + + public Table getTable3() { + return table3; + } + + public void setTable3(Table t) { + this.table3 = t; + } + + private TableRowGroup tableRowGroup3 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup3() { + return tableRowGroup3; + } + + public void setTableRowGroup3(TableRowGroup trg) { + this.tableRowGroup3 = trg; + } + + private TableColumn tableColumn11 = new TableColumn(); + + public TableColumn getTableColumn11() { + return tableColumn11; + } + + public void setTableColumn11(TableColumn tc) { + this.tableColumn11 = tc; + } + + private Hyperlink lnkDataConcluida = new Hyperlink(); + + public Hyperlink getLnkDataConcluida() { + return lnkDataConcluida; + } + + public void setLnkDataConcluida(Hyperlink h) { + this.lnkDataConcluida = h; + } + + private TableColumn tableColumn12 = new TableColumn(); + + public TableColumn getTableColumn12() { + return tableColumn12; + } + + public void setTableColumn12(TableColumn tc) { + this.tableColumn12 = tc; + } + + private Hyperlink lnkNrConcluida = new Hyperlink(); + + public Hyperlink getLnkNrConcluida() { + return lnkNrConcluida; + } + + public void setLnkNrConcluida(Hyperlink h) { + this.lnkNrConcluida = h; + } + + private TableColumn tableColumn13 = new TableColumn(); + + public TableColumn getTableColumn13() { + return tableColumn13; + } + + public void setTableColumn13(TableColumn tc) { + this.tableColumn13 = tc; + } + + private Hyperlink lnkPorConcluida = new Hyperlink(); + + public Hyperlink getLnkPorConcluida() { + return lnkPorConcluida; + } + + public void setLnkPorConcluida(Hyperlink h) { + this.lnkPorConcluida = h; + } + + private TableColumn tableColumn14 = new TableColumn(); + + public TableColumn getTableColumn14() { + return tableColumn14; + } + + public void setTableColumn14(TableColumn tc) { + this.tableColumn14 = tc; + } + + private Hyperlink lnkNomeConcluida = new Hyperlink(); + + public Hyperlink getLnkNomeConcluida() { + return lnkNomeConcluida; + } + + public void setLnkNomeConcluida(Hyperlink h) { + this.lnkNomeConcluida = h; + } + + private TableColumn tableColumn15 = new TableColumn(); + + public TableColumn getTableColumn15() { + return tableColumn15; + } + + public void setTableColumn15(TableColumn tc) { + this.tableColumn15 = tc; + } + + private Hyperlink lnkEstabConcluida = new Hyperlink(); + + public Hyperlink getLnkEstabConcluida() { + return lnkEstabConcluida; + } + + public void setLnkEstabConcluida(Hyperlink h) { + this.lnkEstabConcluida = h; + } + + private StaticText txtSearchMsg = new StaticText(); + + public StaticText getTxtSearchMsg() { + return txtSearchMsg; + } + + public void setTxtSearchMsg(StaticText st) { + this.txtSearchMsg = st; + } + + private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel9() { + return gridPanel9; + } + + public void setGridPanel9(HtmlPanelGrid hpg) { + this.gridPanel9 = hpg; + } + + private PanelGroup groupPanel8 = new PanelGroup(); + + public PanelGroup getGroupPanel8() { + return groupPanel8; + } + + public void setGroupPanel8(PanelGroup pg) { + this.groupPanel8 = pg; + } + + private StaticText staticText9 = new StaticText(); + + public StaticText getStaticText9() { + return staticText9; + } + + public void setStaticText9(StaticText st) { + this.staticText9 = st; + } + + private ImageComponent image3 = new ImageComponent(); + + public ImageComponent getImage3() { + return image3; + } + + public void setImage3(ImageComponent ic) { + this.image3 = ic; + } + + private StaticText staticText10 = new StaticText(); + + public StaticText getStaticText10() { + return staticText10; + } + + public void setStaticText10(StaticText st) { + this.staticText10 = st; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private StaticText txtMsg1 = new StaticText(); + + public StaticText getTxtMsg1() { + return txtMsg1; + } + + public void setTxtMsg1(StaticText st) { + this.txtMsg1 = st; + } + + private TableColumn tableColumn1 = new TableColumn(); + + public TableColumn getTableColumn1() { + return tableColumn1; + } + + public void setTableColumn1(TableColumn tc) { + this.tableColumn1 = tc; + } + + private Hyperlink lnkDataAberturaSeg1 = new Hyperlink(); + + public Hyperlink getLnkDataAberturaSeg1() { + return lnkDataAberturaSeg1; + } + + public void setLnkDataAberturaSeg1(Hyperlink h) { + this.lnkDataAberturaSeg1 = h; + } + + private TableColumn tableColumn2 = new TableColumn(); + + public TableColumn getTableColumn2() { + return tableColumn2; + } + + public void setTableColumn2(TableColumn tc) { + this.tableColumn2 = tc; + } + + private Hyperlink lnkDataAberturaConcluida1 = new Hyperlink(); + + public Hyperlink getLnkDataAberturaConcluida1() { + return lnkDataAberturaConcluida1; + } + + public void setLnkDataAberturaConcluida1(Hyperlink h) { + this.lnkDataAberturaConcluida1 = h; + } + + private TableColumn tableColumn3 = new TableColumn(); + + public TableColumn getTableColumn3() { + return tableColumn3; + } + + public void setTableColumn3(TableColumn tc) { + this.tableColumn3 = tc; + } + + private Hyperlink lnkEstabelecimentoSeg1 = new Hyperlink(); + + public Hyperlink getLnkEstabelecimentoSeg1() { + return lnkEstabelecimentoSeg1; + } + + public void setLnkEstabelecimentoSeg1(Hyperlink h) { + this.lnkEstabelecimentoSeg1 = h; + } + private Hyperlink lnkPlanosActuacao = new Hyperlink(); + + public Hyperlink getLnkPlanosActuacao() { + return lnkPlanosActuacao; + } + + public void setLnkPlanosActuacao(Hyperlink h) { + this.lnkPlanosActuacao = h; + } + private StaticText lblUser = new StaticText(); + + public StaticText getLblUser() { + return lblUser; + } + + public void setLblUser(StaticText st) { + this.lblUser = st; + } + + public TableColumn tableColumnDesactivarAnalise = new TableColumn(); + + public TableColumn getTableColumnDesactivarAnalise() { + return tableColumnDesactivarAnalise; + } + + public void setTableColumnDesactivarAnalise(TableColumn tableColumnDesactivarAnalise) { + this.tableColumnDesactivarAnalise = tableColumnDesactivarAnalise; + } + + public Button buttonDesactivarAnalise = new Button(); + + public Button getButtonDesactivarAnalise() { + return buttonDesactivarAnalise; + } + + public void setButtonDesactivarAnalise(Button buttonDesactivarAnalise) { + this.buttonDesactivarAnalise = buttonDesactivarAnalise; + } + + + + //
+ + + + private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanelFilterSeg() + { + return this.gridPanelFilterSeg; + } + public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + { + this.gridPanelFilterSeg = pg; + } + + private PanelGroup groupPanelFilterSeg = new PanelGroup(); + public PanelGroup getGroupPanelFilterSeg() + { + return this.groupPanelFilterSeg; + } + public void setGroupPanelFilterSeg( PanelGroup pg ) + { + this.groupPanelFilterSeg = pg; + } + + private StaticText labelFilterNameSeg = new StaticText(); + public StaticText getLabelFilterNameSeg() + { + return this.labelFilterNameSeg; + } + public void setLabelFilterNameSeg( StaticText st ) + { + this.labelFilterNameSeg = st; + } + + private TextField textFilterNameSeg = new TextField(); + public TextField getTextFilterNameSeg() + { + return this.textFilterNameSeg; + } + public void setTextFilterNameSeg( TextField tf ) + { + this.textFilterNameSeg = tf; + } + + private StaticText labelFilterEstabelecimentoSeg = new StaticText(); + public StaticText getLabelFilterEstabelecimentoSeg() { + return labelFilterEstabelecimentoSeg; + } + public void setLabelFilterEstabelecimentoSeg(StaticText labelFilterEstabelecimentoSeg) { + this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg; + } + + private TextField textFilterEstabelecimentoSeg = new TextField(); + + public TextField getTextFilterEstabelecimentoSeg() { + return textFilterEstabelecimentoSeg; + } + public void setTextFilterEstabelecimentoSeg(TextField textFilterEstabelecimentoSeg) { + this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg; + } + + private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); + public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + { + return this.calFilterDateSeg; + } + public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateSeg = c; + } + + private TextField textFilterPORSeg = new TextField(); + + public TextField getTextFilterPORSeg() { + return textFilterPORSeg; + } + + public void setTextFilterPORSeg(TextField textFilterPORSeg) { + this.textFilterPORSeg = textFilterPORSeg; + } + + + private Button buttonFilterSeg = new Button(); + public Button getButtonFilterSeg() + { + return this.buttonFilterSeg; + } + public void setButtonFilterSeg( Button b ) + { + this.buttonFilterSeg = b; + } + + private TextField textFilterEstabelecimentoConc = new TextField(); + + public TextField getTextFilterEstabelecimentoConc() { + return textFilterEstabelecimentoConc; + } + + public void setTextFilterEstabelecimentoConc(TextField textFilterEstabelecimentoConc) { + this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc; + } + + private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + + + public FormDirSiprp() + { + + } + + @Override + public void init() + { + super.init(); + + try + { + _init(); + } + catch ( Exception e ) + { + log("FormDirSiprp Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + } + + @Override + public void preprocess() + { + txtMsg1.setText( getSessionBean1().getMsg() ); + getSessionBean1().setMsg( "" ); + } + + + @Override + public void prerender() + { + System.out.println("=== FORM_DIR_SIPRP ==="); + + Utilizador currentUser = getSessionBean1().getCurrentUser(); + lblUser.setText( currentUser == null ? "" : currentUser.getLogin() ); + + HttpServletRequest request = ( HttpServletRequest ) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom( referer ); + if ( ( ! pageFrom.matches( "FormDirSiprp.jsp" ) ) || getSessionBean1().isFromAnaliseDeletion() ) + { + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //lblActivos.setRendered(true); + table2.setRendered( true ); + + ArrayList seguimentoList = adp.getAnalisesSeguimentoDirSiprpList(); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch ( Exception ex ) + { + //lblActivos.setRendered(false); + table2.setRendered( false ); + ErrorLogger.logException( ex ); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //lblActivos.setRendered(true); + table3.setRendered( true ); + + ArrayList concluidasList = adp.getAnalisesConcluidasList( null ); + getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList ); + } + catch ( Exception ex ) + { + //lblActivos.setRendered(false); + table3.setRendered( false ); + ErrorLogger.logException( ex ); + } + fillAnoDropDown(); + } + + //Column para desactivar plano - mostra se o utilizador for DIRECTOR SIPRP +// System.out.println( "\n\nRendering 'desactivar' ... " + buttonDesactivarAnalise.isRendered() ); + int uType = currentUser == null ? -1 : currentUser.getTipo().intValue(); +// System.out.println( "\tuserType : " + uType ); + boolean renderOrNot = uType == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP; +// System.out.println( "\trenderOrNot : " + renderOrNot + " ( " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + " )" ); + tableColumnDesactivarAnalise.setRendered( renderOrNot ); + buttonDesactivarAnalise.setRendered( renderOrNot ); + } + + + @Override + public void destroy() + { + + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + public String lnkEditUser_action() { + // TODO: Replace with your code + + getSessionBean1().setNavFrom("FormDirSiprp"); + getSessionBean1().setModoEdicaoUtilizador("edit"); + return "user"; + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), true ); + return null; + } + + public String lnkDataAcidente_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkNr_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkPor_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkNomeAcidentado_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkFase_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkDataAcidenteSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirSiprp"); + return "view_analise"; + } + + public String lnkDataAberturaSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirSiprp"); + return "view_analise"; + } + + public String lnkNrSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirSiprp"); + return "view_analise"; + } + + public String lnkPorSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirSiprp"); + return "view_analise"; + } + + public String lnkNomeAcidentadoSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirSiprp"); + return "view_analise"; + } + + public String lnkFaseSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirSiprp"); + return "view_analise"; + } + + public String lnkEstabelecimentoSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirSiprp"); + return "view_analise"; + } + + + private AnaliseAcidente getTableSeguimentoRowData() + { + RowKey rk = tableRowGroup2.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup2.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + public void drpAno_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + Object ano = event.getNewValue(); + if(ano == null) + { + lblMes.setVisible(false); + drpMes.setVisible(false); + lblDia.setVisible(false); + drpDia.setVisible(false); + } + else + { + lblMes.setVisible(true); + drpMes.setVisible(true); + fillMesDropDown(); + } + } + + public void drpMes_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + Object mes = event.getNewValue(); + if(mes == null) + { + lblDia.setVisible(false); + drpDia.setVisible(false); + } + else + { + lblDia.setVisible(true); + drpDia.setVisible(true); + //fillDiaDropDown(); + } + } + + public void drpDia_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public String butPesquisar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + Object obAno = null; + Object obMes = null; + Object obDia = null; + try + { + obAno = drpAno.getSelected(); + obMes = drpMes.getSelected(); + obDia = drpDia.getSelected(); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + Integer ano = null; + Integer mes = null; + Integer dia = null; + + if(obAno != null) + { + ano = (Integer) obAno; + } + + if(obMes != null) + { + mes = (Integer) obMes; + } + + if(obDia != null) + { + dia = (Integer) obDia; + } + + String por = null; + if(txtPor.getText() != null) + { + por = (String) txtPor.getText(); + if(por.trim().length() == 0) + { + por = null; + } + } + + String nome = null; + if(txtNome.getText() != null) + { + nome = (String) txtNome.getText(); + if(nome.trim().length() == 0) + { + nome = null; + } + } + + String estabelecimento = null; + if ( textFilterEstabelecimentoConc.getText() != null ) + { + estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim(); + if( estabelecimento.length() == 0 ) + { + estabelecimento = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); + ArrayList concluidasList = adp.searchAanalisesConcluidasList( + null, ano, mes, dia, por, nome, estabelecimento ); + + table3.setRendered(true); + txtSearchMsg.setRendered(false); + getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); + + + } + catch(Exception ex) + { + table3.setRendered(false); + txtSearchMsg.setRendered(true); + txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !"); + ErrorLogger.logException( ex ); + } + + return null; + } + + public String lnkDataConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirSiprp"); + return "view_analise"; + } + + public String lnkDataAberturaConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirSiprp"); + return "view_analise"; + } + + public String lnkNrConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirSiprp"); + return "view_analise"; + } + + public String lnkPorConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirSiprp"); + return "view_analise"; + } + + public String lnkNomeConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirSiprp"); + return "view_analise"; + } + + public String lnkEstabConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormDirSiprp"); + return "view_analise"; + } + + private AnaliseAcidente getTableConcluidasRowData() + { + RowKey rk = tableRowGroup3.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup3.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + public String lnkNewUser_action() { + // TODO: Replace with your code + + getSessionBean1().setNavFrom("FormDirSiprp"); + //getSessionBean1().setModoEdicaoUtilizador("new"); + return "gestao_utilizadores"; + } + + private void fillAnoDropDown() + { +// ArrayList anosList = new ArrayList(); +// for(int ano=2007; ano<2051; ano++) +// { +// anosList.add(new Integer(ano)); +// } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList anosList = adp.getAnosListFromAnalises(); + com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1]; + anoOptions[0] = new Option("", ""); + ListIterator iter = anosList.listIterator(); + int i = 1; + while(iter.hasNext()) + { + Integer ano = (Integer) iter.next(); + + anoOptions[i] = new Option(ano, ano.toString()); + i++; + } + getSessionBean1().setAnoOptions(anoOptions); + Calendar cal = new GregorianCalendar(); + int year = cal.get(Calendar.YEAR); + //drpAno.setSelected( new Integer(year) ); + + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + } + + + private void fillMesDropDown() + { + com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13]; + mesOptions[0] = new Option("", ""); + mesOptions[1] = new Option(new Integer(1), "Janeiro"); + mesOptions[2] = new Option(new Integer(2), "Fevereiro"); + mesOptions[3] = new Option(new Integer(3), "Março"); + mesOptions[4] = new Option(new Integer(4), "Abril"); + mesOptions[5] = new Option(new Integer(5), "Maio"); + mesOptions[6] = new Option(new Integer(6), "Junho"); + mesOptions[7] = new Option(new Integer(7), "Julho"); + mesOptions[8] = new Option(new Integer(8), "Agosto"); + mesOptions[9] = new Option(new Integer(9), "Setembro"); + mesOptions[10] = new Option(new Integer(10), "Outubro"); + mesOptions[11] = new Option(new Integer(11), "Novembro"); + mesOptions[12] = new Option(new Integer(12), "Dezembro"); + getSessionBean1().setMesOptions(mesOptions); + Calendar cal = new GregorianCalendar(); + int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ... + //drpMes.setSelected( new Integer(month+1) ); + } + +// private void fillDiaDropDown() +// { +// +// } + + public String lnkAjuda_action() { + // TODO: Replace with your code +// ServletContext theApplicationsServletContext = +// (ServletContext) this.getExternalContext().getContext(); +// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); +// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf"; +// +// Global global = new Global(); +// try +// { +// global.showPdf(pdfFilePath); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + return null; + } + + public String lnkAnalisesAcidente_action() { + // TODO: Replace with your code + return null; + } + + public String lnkPlanosActuacao_action() { + // TODO: Replace with your code + Utilizador u = getSessionBean1().getCurrentUser(); +// String curUser = "?user=" + u.getId().toString(); + FacesContext fc = getFacesContext().getCurrentInstance(); + Global.redirectToPlanos(fc, u); +// Utilizador u = getSessionBean1().getCurrentUser(); +// String curUser = "?user=" + u.getId().toString(); +// FacesContext fc = getFacesContext().getCurrentInstance(); +// try +// { +// JSFUtils.redirect(fc, Global.PLANOS_ACTUACAO_URL + curUser); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + return null; + } + + + public String buttonFilterSeg_action() + { + Date visitaDate = ( Date ) calFilterDateSeg.getValue(); + String visitaDateStr = null; + if ( visitaDate != null ) + { + visitaDateStr = D_F.format( visitaDate ); + } + + String POR = null; + if ( textFilterPORSeg.getText() != null ) + { + POR = ( ( String ) textFilterPORSeg.getText() ).trim(); + if ( POR.length() == 0 ) + { + POR = null; + } + } + + String nome = null; + if ( textFilterNameSeg.getText() != null ) + { + nome = (( String ) textFilterNameSeg.getText()).trim(); + if( nome.length() == 0 ) + { + nome = null; + } + } + + String estabelecimento = null; + if ( textFilterEstabelecimentoSeg.getText() != null ) + { + estabelecimento = (( String ) textFilterEstabelecimentoSeg.getText()).trim(); + if ( estabelecimento.length() == 0 ) + { + estabelecimento = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList seguimentoList = adp.searchAnalisesSeguimentoDirSiprp( nome, estabelecimento, visitaDateStr, POR ); + + table2.setRendered( true ); + txtSearchMsg.setRendered( false ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch( Exception e ) + { + table2.setRendered( false ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + ErrorLogger.logException( e ); + } + + return null; + } + + public String buttonDesactivarAnalise_action() + { + System.out.println( "\nbuttonDesactivarAnalise_action() : " ); + AnaliseAcidente selectedAnalise = getTableSeguimentoRowData(); + + // TODO : call ConfirmarDesactivar.jsp with selectedAnalise + getSessionBean1().setCurrentAnalise( selectedAnalise ); + + return "confirmar_desactivar"; + } + +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormGestor.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormGestor.java new file mode 100644 index 00000000..0754cc52 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormGestor.java @@ -0,0 +1,1635 @@ +/* + * FormGestor.java + * + * Created on December 19, 2007, 3:58 PM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import beans.Utilizador; +import beans.AnaliseAcidente; +import com.evolute.utils.error.ErrorLogger; +import com.sun.data.provider.RowKey; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Button; +import com.sun.rave.web.ui.component.DropDown; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.Hyperlink; +import com.sun.rave.web.ui.component.ImageComponent; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.component.PanelGroup; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.Table; +import com.sun.rave.web.ui.component.TableColumn; +import com.sun.rave.web.ui.component.TableRowGroup; +import com.sun.rave.web.ui.component.TextField; +import com.sun.rave.web.ui.model.Option; +import db.providers.AnalisesConcluidasDataProvider; +import db.providers.AnalisesDataProvider; +import db.providers.AnalisesSeguimentoDataProvider; +import global.Global; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.ListIterator; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import javax.faces.context.FacesContext; +import javax.faces.event.ValueChangeEvent; +import javax.servlet.http.HttpServletRequest; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class FormGestor extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridBase1() { + return gridBase1; + } + + public void setGridBase1(HtmlPanelGrid hpg) { + this.gridBase1 = hpg; + } + + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayout1() { + return gridLayout1; + } + + public void setGridLayout1(HtmlPanelGrid hpg) { + this.gridLayout1 = hpg; + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private ImageComponent image1 = new ImageComponent(); + + public ImageComponent getImage1() { + return image1; + } + + public void setImage1(ImageComponent ic) { + this.image1 = ic; + } + + private ImageComponent image2 = new ImageComponent(); + + public ImageComponent getImage2() { + return image2; + } + + public void setImage2(ImageComponent ic) { + this.image2 = ic; + } + + private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayoutTop1() { + return gridLayoutTop1; + } + + public void setGridLayoutTop1(HtmlPanelGrid hpg) { + this.gridLayoutTop1 = hpg; + } + + private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridSeguimento1() { + return gridSeguimento1; + } + + public void setGridSeguimento1(HtmlPanelGrid hpg) { + this.gridSeguimento1 = hpg; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private StaticText staticText2 = new StaticText(); + + public StaticText getStaticText2() { + return staticText2; + } + + public void setStaticText2(StaticText st) { + this.staticText2 = st; + } + + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel3() { + return gridPanel3; + } + + public void setGridPanel3(HtmlPanelGrid hpg) { + this.gridPanel3 = hpg; + } + + private Table table1 = new Table(); + + public Table getTable1() { + return table1; + } + + public void setTable1(Table t) { + this.table1 = t; + } + + private TableRowGroup tableRowGroup1 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup1() { + return tableRowGroup1; + } + + public void setTableRowGroup1(TableRowGroup trg) { + this.tableRowGroup1 = trg; + } + + private TableColumn tableColumn1 = new TableColumn(); + + public TableColumn getTableColumn1() { + return tableColumn1; + } + + public void setTableColumn1(TableColumn tc) { + this.tableColumn1 = tc; + } + + private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); + + public Hyperlink getLnkDataAcidenteSeg() { + return lnkDataAcidenteSeg; + } + + public void setLnkDataAcidenteSeg(Hyperlink h) { + this.lnkDataAcidenteSeg = h; + } + + private TableColumn tableColumn2 = new TableColumn(); + + public TableColumn getTableColumn2() { + return tableColumn2; + } + + public void setTableColumn2(TableColumn tc) { + this.tableColumn2 = tc; + } + + private Hyperlink lnkNrSeg = new Hyperlink(); + + public Hyperlink getLnkNrSeg() { + return lnkNrSeg; + } + + public void setLnkNrSeg(Hyperlink h) { + this.lnkNrSeg = h; + } + + private TableColumn tableColumn3 = new TableColumn(); + + public TableColumn getTableColumn3() { + return tableColumn3; + } + + public void setTableColumn3(TableColumn tc) { + this.tableColumn3 = tc; + } + + private Hyperlink lnkPorSeg = new Hyperlink(); + + public Hyperlink getLnkPorSeg() { + return lnkPorSeg; + } + + public void setLnkPorSeg(Hyperlink h) { + this.lnkPorSeg = h; + } + + private TableColumn tableColumn4 = new TableColumn(); + + public TableColumn getTableColumn4() { + return tableColumn4; + } + + public void setTableColumn4(TableColumn tc) { + this.tableColumn4 = tc; + } + + private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); + + public Hyperlink getLnkNomeAcidentadoSeg() { + return lnkNomeAcidentadoSeg; + } + + public void setLnkNomeAcidentadoSeg(Hyperlink h) { + this.lnkNomeAcidentadoSeg = h; + } + + private TableColumn tableColumn5 = new TableColumn(); + + public TableColumn getTableColumn5() { + return tableColumn5; + } + + public void setTableColumn5(TableColumn tc) { + this.tableColumn5 = tc; + } + + private Hyperlink lnkFaseSeg = new Hyperlink(); + + public Hyperlink getLnkFaseSeg() { + return lnkFaseSeg; + } + + public void setLnkFaseSeg(Hyperlink h) { + this.lnkFaseSeg = h; + } + + private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridConcluidos1() { + return gridConcluidos1; + } + + public void setGridConcluidos1(HtmlPanelGrid hpg) { + this.gridConcluidos1 = hpg; + } + + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel4() { + return gridPanel4; + } + + public void setGridPanel4(HtmlPanelGrid hpg) { + this.gridPanel4 = hpg; + } + + private StaticText staticText3 = new StaticText(); + + public StaticText getStaticText3() { + return staticText3; + } + + public void setStaticText3(StaticText st) { + this.staticText3 = st; + } + + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel5() { + return gridPanel5; + } + + public void setGridPanel5(HtmlPanelGrid hpg) { + this.gridPanel5 = hpg; + } + + private PanelGroup groupPanel3 = new PanelGroup(); + + public PanelGroup getGroupPanel3() { + return groupPanel3; + } + + public void setGroupPanel3(PanelGroup pg) { + this.groupPanel3 = pg; + } + + private StaticText staticText4 = new StaticText(); + + public StaticText getStaticText4() { + return staticText4; + } + + public void setStaticText4(StaticText st) { + this.staticText4 = st; + } + + private DropDown drpAno = new DropDown(); + + public DropDown getDrpAno() { + return drpAno; + } + + public void setDrpAno(DropDown dd) { + this.drpAno = dd; + } + + private PanelGroup groupPanel4 = new PanelGroup(); + + public PanelGroup getGroupPanel4() { + return groupPanel4; + } + + public void setGroupPanel4(PanelGroup pg) { + this.groupPanel4 = pg; + } + + private StaticText lblMes = new StaticText(); + + public StaticText getLblMes() { + return lblMes; + } + + public void setLblMes(StaticText st) { + this.lblMes = st; + } + + private DropDown drpMes = new DropDown(); + + public DropDown getDrpMes() { + return drpMes; + } + + public void setDrpMes(DropDown dd) { + this.drpMes = dd; + } + + private PanelGroup groupPanel5 = new PanelGroup(); + + public PanelGroup getGroupPanel5() { + return groupPanel5; + } + + public void setGroupPanel5(PanelGroup pg) { + this.groupPanel5 = pg; + } + + private StaticText lblDia = new StaticText(); + + public StaticText getLblDia() { + return lblDia; + } + + public void setLblDia(StaticText st) { + this.lblDia = st; + } + + private DropDown drpDia = new DropDown(); + + public DropDown getDrpDia() { + return drpDia; + } + + public void setDrpDia(DropDown dd) { + this.drpDia = dd; + } + + private PanelGroup groupPanel6 = new PanelGroup(); + + public PanelGroup getGroupPanel6() { + return groupPanel6; + } + + public void setGroupPanel6(PanelGroup pg) { + this.groupPanel6 = pg; + } + + private StaticText staticText5 = new StaticText(); + + public StaticText getStaticText5() { + return staticText5; + } + + public void setStaticText5(StaticText st) { + this.staticText5 = st; + } + + private TextField txtPor = new TextField(); + + public TextField getTxtPor() { + return txtPor; + } + + public void setTxtPor(TextField tf) { + this.txtPor = tf; + } + + private PanelGroup groupPanel7 = new PanelGroup(); + + public PanelGroup getGroupPanel7() { + return groupPanel7; + } + + public void setGroupPanel7(PanelGroup pg) { + this.groupPanel7 = pg; + } + + private StaticText staticText6 = new StaticText(); + + public StaticText getStaticText6() { + return staticText6; + } + + public void setStaticText6(StaticText st) { + this.staticText6 = st; + } + + private TextField txtNome = new TextField(); + + public TextField getTxtNome() { + return txtNome; + } + + public void setTxtNome(TextField tf) { + this.txtNome = tf; + } + + private Button butPesquisar = new Button(); + + public Button getButPesquisar() { + return butPesquisar; + } + + public void setButPesquisar(Button b) { + this.butPesquisar = b; + } + + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel6() { + return gridPanel6; + } + + public void setGridPanel6(HtmlPanelGrid hpg) { + this.gridPanel6 = hpg; + } + + private Table table2 = new Table(); + + public Table getTable2() { + return table2; + } + + public void setTable2(Table t) { + this.table2 = t; + } + + private TableRowGroup tableRowGroup2 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup2() { + return tableRowGroup2; + } + + public void setTableRowGroup2(TableRowGroup trg) { + this.tableRowGroup2 = trg; + } + + private TableColumn tableColumn6 = new TableColumn(); + + public TableColumn getTableColumn6() { + return tableColumn6; + } + + public void setTableColumn6(TableColumn tc) { + this.tableColumn6 = tc; + } + + private Hyperlink lnkDataConcluida = new Hyperlink(); + + public Hyperlink getLnkDataConcluida() { + return lnkDataConcluida; + } + + public void setLnkDataConcluida(Hyperlink h) { + this.lnkDataConcluida = h; + } + + private TableColumn tableColumn7 = new TableColumn(); + + public TableColumn getTableColumn7() { + return tableColumn7; + } + + public void setTableColumn7(TableColumn tc) { + this.tableColumn7 = tc; + } + + private Hyperlink lnkNrConcluida = new Hyperlink(); + + public Hyperlink getLnkNrConcluida() { + return lnkNrConcluida; + } + + public void setLnkNrConcluida(Hyperlink h) { + this.lnkNrConcluida = h; + } + + private TableColumn tableColumn8 = new TableColumn(); + + public TableColumn getTableColumn8() { + return tableColumn8; + } + + public void setTableColumn8(TableColumn tc) { + this.tableColumn8 = tc; + } + + private Hyperlink lnkPorConcluida = new Hyperlink(); + + public Hyperlink getLnkPorConcluida() { + return lnkPorConcluida; + } + + public void setLnkPorConcluida(Hyperlink h) { + this.lnkPorConcluida = h; + } + + private TableColumn tableColumn9 = new TableColumn(); + + public TableColumn getTableColumn9() { + return tableColumn9; + } + + public void setTableColumn9(TableColumn tc) { + this.tableColumn9 = tc; + } + + private Hyperlink lnkNomeConcluida = new Hyperlink(); + + public Hyperlink getLnkNomeConcluida() { + return lnkNomeConcluida; + } + + public void setLnkNomeConcluida(Hyperlink h) { + this.lnkNomeConcluida = h; + } + + private TableColumn tableColumn10 = new TableColumn(); + + public TableColumn getTableColumn10() { + return tableColumn10; + } + + public void setTableColumn10(TableColumn tc) { + this.tableColumn10 = tc; + } + + private Hyperlink lnkEstabConcluida = new Hyperlink(); + + public Hyperlink getLnkEstabConcluida() { + return lnkEstabConcluida; + } + + public void setLnkEstabConcluida(Hyperlink h) { + this.lnkEstabConcluida = h; + } + + private StaticText txtSearchMsg = new StaticText(); + + public StaticText getTxtSearchMsg() { + return txtSearchMsg; + } + + public void setTxtSearchMsg(StaticText st) { + this.txtSearchMsg = st; + } + + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel7() { + return gridPanel7; + } + + public void setGridPanel7(HtmlPanelGrid hpg) { + this.gridPanel7 = hpg; + } + + private PanelGroup groupPanel8 = new PanelGroup(); + + public PanelGroup getGroupPanel8() { + return groupPanel8; + } + + public void setGroupPanel8(PanelGroup pg) { + this.groupPanel8 = pg; + } + + private StaticText staticText7 = new StaticText(); + + public StaticText getStaticText7() { + return staticText7; + } + + public void setStaticText7(StaticText st) { + this.staticText7 = st; + } + + private ImageComponent image3 = new ImageComponent(); + + public ImageComponent getImage3() { + return image3; + } + + public void setImage3(ImageComponent ic) { + this.image3 = ic; + } + + private StaticText staticText8 = new StaticText(); + + public StaticText getStaticText8() { + return staticText8; + } + + public void setStaticText8(StaticText st) { + this.staticText8 = st; + } + + private TableColumn tableColumn11 = new TableColumn(); + + public TableColumn getTableColumn11() { + return tableColumn11; + } + + public void setTableColumn11(TableColumn tc) { + this.tableColumn11 = tc; + } + + private Hyperlink lnkDataAberturaSeg1 = new Hyperlink(); + + public Hyperlink getLnkDataAberturaSeg1() { + return lnkDataAberturaSeg1; + } + + public void setLnkDataAberturaSeg1(Hyperlink h) { + this.lnkDataAberturaSeg1 = h; + } + + private TableColumn tableColumn12 = new TableColumn(); + + public TableColumn getTableColumn12() { + return tableColumn12; + } + + public void setTableColumn12(TableColumn tc) { + this.tableColumn12 = tc; + } + + private Hyperlink lnkDataAberturaConcluida1 = new Hyperlink(); + + public Hyperlink getLnkDataAberturaConcluida1() { + return lnkDataAberturaConcluida1; + } + + public void setLnkDataAberturaConcluida1(Hyperlink h) { + this.lnkDataAberturaConcluida1 = h; + } + + private TableColumn tableColumn13 = new TableColumn(); + + public TableColumn getTableColumn13() { + return tableColumn13; + } + + public void setTableColumn13(TableColumn tc) { + this.tableColumn13 = tc; + } + + private Hyperlink lnkEstabelecimentoSeg1 = new Hyperlink(); + + public Hyperlink getLnkEstabelecimentoSeg1() { + return lnkEstabelecimentoSeg1; + } + + public void setLnkEstabelecimentoSeg1(Hyperlink h) { + this.lnkEstabelecimentoSeg1 = h; + } + private StaticText lblUser = new StaticText(); + + public StaticText getLblUser() { + return lblUser; + } + + public void setLblUser(StaticText st) { + this.lblUser = st; + } + private Hyperlink lnkPlanosActuacao = new Hyperlink(); + + public Hyperlink getLnkPlanosActuacao() { + return lnkPlanosActuacao; + } + + public void setLnkPlanosActuacao(Hyperlink h) { + this.lnkPlanosActuacao = h; + } + + + + private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanelFilterSeg() + { + return this.gridPanelFilterSeg; + } + public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + { + this.gridPanelFilterSeg = pg; + } + + private PanelGroup groupPanelFilterSeg = new PanelGroup(); + public PanelGroup getGroupPanelFilterSeg() + { + return this.groupPanelFilterSeg; + } + public void setGroupPanelFilterSeg( PanelGroup pg ) + { + this.groupPanelFilterSeg = pg; + } + + private StaticText labelFilterNameSeg = new StaticText(); + public StaticText getLabelFilterNameSeg() + { + return this.labelFilterNameSeg; + } + public void setLabelFilterNameSeg( StaticText st ) + { + this.labelFilterNameSeg = st; + } + + private TextField textFilterNameSeg = new TextField(); + public TextField getTextFilterNameSeg() + { + return this.textFilterNameSeg; + } + public void setTextFilterNameSeg( TextField tf ) + { + this.textFilterNameSeg = tf; + } + + private StaticText labelFilterEstabelecimentoSeg = new StaticText(); + public StaticText getLabelFilterEstabelecimentoSeg() { + return labelFilterEstabelecimentoSeg; + } + public void setLabelFilterEstabelecimentoSeg(StaticText labelFilterEstabelecimentoSeg) { + this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg; + } + + private TextField textFilterEstabelecimentoSeg = new TextField(); + + public TextField getTextFilterEstabelecimentoSeg() { + return textFilterEstabelecimentoSeg; + } + public void setTextFilterEstabelecimentoSeg(TextField textFilterEstabelecimentoSeg) { + this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg; + } + + private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); + public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + { + return this.calFilterDateSeg; + } + public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateSeg = c; + } + + private TextField textFilterPORSeg = new TextField(); + + public TextField getTextFilterPORSeg() { + return textFilterPORSeg; + } + + public void setTextFilterPORSeg(TextField textFilterPORSeg) { + this.textFilterPORSeg = textFilterPORSeg; + } + + + private Button buttonFilterSeg = new Button(); + public Button getButtonFilterSeg() + { + return this.buttonFilterSeg; + } + public void setButtonFilterSeg( Button b ) + { + this.buttonFilterSeg = b; + } + + private TextField textFilterEstabelecimentoConc = new TextField(); + + public TextField getTextFilterEstabelecimentoConc() { + return textFilterEstabelecimentoConc; + } + + public void setTextFilterEstabelecimentoConc(TextField textFilterEstabelecimentoConc) { + this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc; + } + + + private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + //
+ + /** + *

Construct a new Page bean instance.

+ */ + public FormGestor() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + @Override + public void init() + { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + if (!getSessionBean1().isLoggedIn()) { + try { + getExternalContext().redirect("Login.jsp"); + } catch(Exception e) { + // . . . handle exception . . . + } + } + + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("FormGestor Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + @Override + public void preprocess() + { + + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + @Override + public void prerender() + { + System.out.println("=== FORM_GESTOR ==="); + Utilizador curUser = getSessionBean1().getCurrentUser(); + lblUser.setText( curUser.getLogin() ); + if(curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR) + { + if(curUser.getGestor_geral().matches("n")) + { + lnkPlanosActuacao.setDisabled(true); + } + } + else if(curUser.getTipo().intValue() != Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA) + { + if(curUser.getTipo().intValue() != Global.TIPO_UTILIZADOR_DIRECTOR_LOJA) + { + lnkPlanosActuacao.setDisabled(true); + } + } + + HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom(referer); + if ( ! pageFrom.matches( "FormGestor.jsp" ) ) + { + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + Integer estabelecimento_id = null; + table1.setRendered( true ); + ArrayList seguimentoList = null; + + //if(curUser.getGestor_geral().matches("y") || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA) + if ( curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR ) + { + estabelecimento_id = curUser.getEstabelecimento_gestor(); + if ( estabelecimento_id.intValue() == 0 ) + { + seguimentoList = adp.getAnalisesSeguimentoGestorList( null ); + } + else + { + seguimentoList = adp.getAnalisesSeguimentoGestorList( curUser.getEstabelecimento_id() ); + } + } + else if ( curUser.getGestor_geral().matches("y") || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA ) + { + seguimentoList = adp.getAnalisesSeguimentoGestorList( null ); + } + else if ( curUser.getGestor_geral().matches("n") || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA ) + { + seguimentoList = adp.getAnalisesSeguimentoGestorList( curUser.getEstabelecimento_id() ); + } + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch ( Exception ex ) + { + table1.setRendered( false ); + ErrorLogger.logException( ex ); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + table2.setRendered( true ); + ArrayList concluidasList = null; + + if ( getSessionBean1().getCurrentUser().getGestor_geral().matches("y") + || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA + /*|| curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA*/ ) + { + concluidasList = adp.getAnalisesConcluidasList( null ); + } + else + { + concluidasList = adp.getAnalisesConcluidasList( getSessionBean1().getCurrentUser().getEstabelecimento_id() ); + } + getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList ); + } + catch ( Exception ex ) + { + table2.setRendered( false ); + ErrorLogger.logException( ex ); + } + fillAnoDropDown(); + } + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + @Override + public void destroy() + { + + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + public String lnkPlanosActuacao_action() { + // TODO: Replace with your code + Utilizador u = getSessionBean1().getCurrentUser(); +// String curUser = "?user=" + u.getId().toString(); + FacesContext fc = getFacesContext().getCurrentInstance(); + Global.redirectToPlanos(fc, u); + +// Utilizador u = getSessionBean1().getCurrentUser(); +// String curUser = "?user=" + u.getId().toString(); +// FacesContext fc = getFacesContext().getCurrentInstance(); +// try +// { +// JSFUtils.redirect(fc, Global.PLANOS_ACTUACAO_URL + curUser); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + return null; + } + + public String lnkAnalisesAcidente_action() { + return null; + } + + public String lnkGerirUtilizadores_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkEditUser_action() { + // TODO: Replace with your code + + getSessionBean1().setNavFrom("FormGestor"); + getSessionBean1().setModoEdicaoUtilizador("edit"); + return "user"; + + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), true ); + return null; + } + + public String lnkDataAcidenteSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormGestor"); + return "view_analise"; + + } + + public String lnkDataAberturaSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormGestor"); + return "view_analise"; + } + + public String lnkNrSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormGestor"); + return "view_analise"; + + } + + public String lnkPorSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormGestor"); + return "view_analise"; + + } + + public String lnkNomeAcidentadoSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormGestor"); + return "view_analise"; + + } + + public String lnkFaseSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormGestor"); + return "view_analise"; + + } + + public String lnkEstabelecimentoSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormGestor"); + return "view_analise"; + } + + private AnaliseAcidente getTableSeguimentoRowData() + { + RowKey rk = tableRowGroup1.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup1.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + + public void drpAno_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + Object ano = event.getNewValue(); + if(ano == null) + { + lblMes.setVisible(false); + drpMes.setVisible(false); + lblDia.setVisible(false); + drpDia.setVisible(false); + } + else + { + lblMes.setVisible(true); + drpMes.setVisible(true); + fillMesDropDown(); + } + } + + public void drpMes_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + Object mes = event.getNewValue(); + if(mes == null) + { + lblDia.setVisible(false); + drpDia.setVisible(false); + } + else + { + lblDia.setVisible(true); + drpDia.setVisible(true); + //fillDiaDropDown(); + } + } + + public void drpDia_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public String butPesquisar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + Object obAno = null; + Object obMes = null; + Object obDia = null; + try + { + obAno = drpAno.getSelected(); + obMes = drpMes.getSelected(); + obDia = drpDia.getSelected(); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + Integer ano = null; + Integer mes = null; + Integer dia = null; + + if(obAno != null) + { + ano = (Integer) obAno; + } + + if(obMes != null) + { + mes = (Integer) obMes; + } + + if(obDia != null) + { + dia = (Integer) obDia; + } + + String por = null; + if(txtPor.getText() != null) + { + por = (String) txtPor.getText(); + if(por.trim().length() == 0) + { + por = null; + } + } + + String nome = null; + if(txtNome.getText() != null) + { + nome = (String) txtNome.getText(); + if(nome.trim().length() == 0) + { + nome = null; + } + } + + String estabelecimento = null; + if ( textFilterEstabelecimentoConc.getText() != null ) + { + estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim(); + if( estabelecimento.length() == 0 ) + { + estabelecimento = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); + ArrayList concluidasList = null; + if ( getSessionBean1().getCurrentUser().getGestor_geral().matches( "y" ) ) + { + concluidasList = adp.searchAanalisesConcluidasList( + null, ano, mes, dia, por, nome, estabelecimento ); + } + else + { + concluidasList = adp.searchAanalisesConcluidasList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), + ano, mes, dia, por, nome, null ); + } + + table2.setRendered(true); + txtSearchMsg.setRendered(false); + getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); + } + catch(Exception ex) + { + table2.setRendered(false); + txtSearchMsg.setRendered(true); + txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !"); + ErrorLogger.logException( ex ); + } + + return null; + } + + public String lnkDataConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormGestor"); + return "view_analise"; + + } + + public String lnkDataAberturaConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormGestor"); + return "view_analise"; + } + + public String lnkNrConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormGestor"); + return "view_analise"; + + } + + public String lnkPorConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormGestor"); + return "view_analise"; + + } + + public String lnkNomeConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormGestor"); + return "view_analise"; + + } + + public String lnkEstabConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormGestor"); + return "view_analise"; + + } + + private AnaliseAcidente getTableConcluidasRowData() + { + RowKey rk = tableRowGroup2.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup2.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + + private void fillAnoDropDown() + { +// ArrayList anosList = new ArrayList(); +// for(int ano=2007; ano<2051; ano++) +// { +// anosList.add(new Integer(ano)); +// } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList anosList = adp.getAnosListFromAnalises(); + com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1]; + anoOptions[0] = new Option("", ""); + ListIterator iter = anosList.listIterator(); + int i = 1; + while(iter.hasNext()) + { + Integer ano = (Integer) iter.next(); + + anoOptions[i] = new Option(ano, ano.toString()); + i++; + } + getSessionBean1().setAnoOptions(anoOptions); + Calendar cal = new GregorianCalendar(); + int year = cal.get(Calendar.YEAR); + //drpAno.setSelected( new Integer(year) ); + + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + } + + + private void fillMesDropDown() + { + com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13]; + mesOptions[0] = new Option("", ""); + mesOptions[1] = new Option(new Integer(1), "Janeiro"); + mesOptions[2] = new Option(new Integer(2), "Fevereiro"); + mesOptions[3] = new Option(new Integer(3), "Março"); + mesOptions[4] = new Option(new Integer(4), "Abril"); + mesOptions[5] = new Option(new Integer(5), "Maio"); + mesOptions[6] = new Option(new Integer(6), "Junho"); + mesOptions[7] = new Option(new Integer(7), "Julho"); + mesOptions[8] = new Option(new Integer(8), "Agosto"); + mesOptions[9] = new Option(new Integer(9), "Setembro"); + mesOptions[10] = new Option(new Integer(10), "Outubro"); + mesOptions[11] = new Option(new Integer(11), "Novembro"); + mesOptions[12] = new Option(new Integer(12), "Dezembro"); + getSessionBean1().setMesOptions(mesOptions); + Calendar cal = new GregorianCalendar(); + int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ... + //drpMes.setSelected( new Integer(month+1) ); + } + +// private void fillDiaDropDown() +// { +// +// } + + public String lnkAjuda_action() { + // TODO: Replace with your code +// ServletContext theApplicationsServletContext = +// (ServletContext) this.getExternalContext().getContext(); +// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); +// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf"; +// +// Global global = new Global(); +// try +// { +// global.showPdf(pdfFilePath); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + return null; + } + + public String lnkEstabelecimento_action() { + // TODO: Replace with your code + + return null; + } + + public String buttonFilterSeg_action() + { + Date visitaDate = ( Date ) calFilterDateSeg.getValue(); + String visitaDateStr = null; + if ( visitaDate != null ) + { + visitaDateStr = D_F.format( visitaDate ); + } + + String POR = null; + if ( textFilterPORSeg.getText() != null ) + { + POR = ( ( String ) textFilterPORSeg.getText() ).trim(); + if ( POR.length() == 0 ) + { + POR = null; + } + } + + String nome = null; + if ( textFilterNameSeg.getText() != null ) + { + nome = (( String ) textFilterNameSeg.getText()).trim(); + if( nome.length() == 0 ) + { + nome = null; + } + } + + String estabelecimento = null; + if ( textFilterEstabelecimentoSeg.getText() != null ) + { + estabelecimento = (( String ) textFilterEstabelecimentoSeg.getText()).trim(); + if ( estabelecimento.length() == 0 ) + { + estabelecimento = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + Utilizador curUser = getSessionBean1().getCurrentUser(); + ArrayList seguimentoList = null; + Integer estabelecimento_id = null; + + if ( curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR ) + { + estabelecimento_id = curUser.getEstabelecimento_gestor(); + if ( estabelecimento_id.intValue() == 0 ) + { + seguimentoList = adp.searchAnalisesSeguimentoGestor( null, nome, estabelecimento, visitaDateStr, POR ); + } + else + { + seguimentoList = adp.searchAnalisesSeguimentoGestor( curUser.getEstabelecimento_id(), nome, estabelecimento, visitaDateStr, POR ); + } + } + else if ( curUser.getGestor_geral().matches( "y" ) || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA ) + { + seguimentoList = adp.searchAnalisesSeguimentoGestor( null, nome, estabelecimento, visitaDateStr, POR ); + } + else if ( curUser.getGestor_geral().matches( "n" ) || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA ) + { + seguimentoList = adp.searchAnalisesSeguimentoGestor( curUser.getEstabelecimento_id(), nome, estabelecimento, visitaDateStr, POR ); + } + + table1.setRendered( true ); + txtSearchMsg.setRendered( false ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch( Exception e ) + { + table1.setRendered( false ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + ErrorLogger.logException( e ); + } + + return null; + } + +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormHS.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormHS.java new file mode 100644 index 00000000..dbab7df0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormHS.java @@ -0,0 +1,2067 @@ +/* + * FormHS.java + * + * Created on October 1, 2007, 1:43 PM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import beans.Utilizador; +import beans.AnaliseAcidente; +import com.evolute.utils.error.ErrorLogger; +import com.sun.data.provider.RowKey; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Button; +import com.sun.rave.web.ui.component.DropDown; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.Hyperlink; +import com.sun.rave.web.ui.component.ImageComponent; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.component.PanelGroup; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.Table; +import com.sun.rave.web.ui.component.TableColumn; +import com.sun.rave.web.ui.component.TableRowGroup; +import com.sun.rave.web.ui.component.TextField; +import com.sun.rave.web.ui.model.Option; +import db.providers.AnalisesActualDataProvider; +import db.providers.AnalisesConcluidasDataProvider; +import db.providers.AnalisesDataProvider; +import db.providers.AnalisesSeguimentoDataProvider; +import global.Global; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.ListIterator; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import javax.faces.context.FacesContext; +import javax.faces.event.ValueChangeEvent; +import javax.servlet.http.HttpServletRequest; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class FormHS extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridBase1() { + return gridBase1; + } + + public void setGridBase1(HtmlPanelGrid hpg) { + this.gridBase1 = hpg; + } + + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayout1() { + return gridLayout1; + } + + public void setGridLayout1(HtmlPanelGrid hpg) { + this.gridLayout1 = hpg; + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private ImageComponent image1 = new ImageComponent(); + + public ImageComponent getImage1() { + return image1; + } + + public void setImage1(ImageComponent ic) { + this.image1 = ic; + } + + private ImageComponent image2 = new ImageComponent(); + + public ImageComponent getImage2() { + return image2; + } + + public void setImage2(ImageComponent ic) { + this.image2 = ic; + } + + private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayoutTop1() { + return gridLayoutTop1; + } + + public void setGridLayoutTop1(HtmlPanelGrid hpg) { + this.gridLayoutTop1 = hpg; + } + + private HtmlPanelGrid gridActual1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridActual1() { + return gridActual1; + } + + public void setGridActual1(HtmlPanelGrid hpg) { + this.gridActual1 = hpg; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private StaticText staticText4 = new StaticText(); + + public StaticText getStaticText4() { + return staticText4; + } + + public void setStaticText4(StaticText st) { + this.staticText4 = st; + } + + private StaticText staticText5 = new StaticText(); + + public StaticText getStaticText5() { + return staticText5; + } + + public void setStaticText5(StaticText st) { + this.staticText5 = st; + } + + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel3() { + return gridPanel3; + } + + public void setGridPanel3(HtmlPanelGrid hpg) { + this.gridPanel3 = hpg; + } + + private Table table1 = new Table(); + + public Table getTable1() { + return table1; + } + + public void setTable1(Table t) { + this.table1 = t; + } + + private TableRowGroup tableRowGroup1 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup1() { + return tableRowGroup1; + } + + public void setTableRowGroup1(TableRowGroup trg) { + this.tableRowGroup1 = trg; + } + + private TableColumn tableColumn1 = new TableColumn(); + + public TableColumn getTableColumn1() { + return tableColumn1; + } + + public void setTableColumn1(TableColumn tc) { + this.tableColumn1 = tc; + } + + private Hyperlink lnkDataAcidente = new Hyperlink(); + + public Hyperlink getLnkDataAcidente() { + return lnkDataAcidente; + } + + public void setLnkDataAcidente(Hyperlink h) { + this.lnkDataAcidente = h; + } + + private TableColumn tableColumn2 = new TableColumn(); + + public TableColumn getTableColumn2() { + return tableColumn2; + } + + public void setTableColumn2(TableColumn tc) { + this.tableColumn2 = tc; + } + + private Hyperlink lnkNr = new Hyperlink(); + + public Hyperlink getLnkNr() { + return lnkNr; + } + + public void setLnkNr(Hyperlink h) { + this.lnkNr = h; + } + + private TableColumn tableColumn3 = new TableColumn(); + + public TableColumn getTableColumn3() { + return tableColumn3; + } + + public void setTableColumn3(TableColumn tc) { + this.tableColumn3 = tc; + } + + private Hyperlink lnkNomeAcidentado = new Hyperlink(); + + public Hyperlink getLnkNomeAcidentado() { + return lnkNomeAcidentado; + } + + public void setLnkNomeAcidentado(Hyperlink h) { + this.lnkNomeAcidentado = h; + } + + private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridSeguimento1() { + return gridSeguimento1; + } + + public void setGridSeguimento1(HtmlPanelGrid hpg) { + this.gridSeguimento1 = hpg; + } + + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel4() { + return gridPanel4; + } + + public void setGridPanel4(HtmlPanelGrid hpg) { + this.gridPanel4 = hpg; + } + + private StaticText staticText6 = new StaticText(); + + public StaticText getStaticText6() { + return staticText6; + } + + public void setStaticText6(StaticText st) { + this.staticText6 = st; + } + + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel5() { + return gridPanel5; + } + + public void setGridPanel5(HtmlPanelGrid hpg) { + this.gridPanel5 = hpg; + } + + private Table table2 = new Table(); + + public Table getTable2() { + return table2; + } + + public void setTable2(Table t) { + this.table2 = t; + } + + private TableRowGroup tableRowGroup2 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup2() { + return tableRowGroup2; + } + + public void setTableRowGroup2(TableRowGroup trg) { + this.tableRowGroup2 = trg; + } + + private TableColumn tableColumn4 = new TableColumn(); + + public TableColumn getTableColumn4() { + return tableColumn4; + } + + public void setTableColumn4(TableColumn tc) { + this.tableColumn4 = tc; + } + + private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); + + public Hyperlink getLnkDataAcidenteSeg() { + return lnkDataAcidenteSeg; + } + + public void setLnkDataAcidenteSeg(Hyperlink h) { + this.lnkDataAcidenteSeg = h; + } + + private TableColumn tableColumn5 = new TableColumn(); + + public TableColumn getTableColumn5() { + return tableColumn5; + } + + public void setTableColumn5(TableColumn tc) { + this.tableColumn5 = tc; + } + + private Hyperlink lnkNrSeg = new Hyperlink(); + + public Hyperlink getLnkNrSeg() { + return lnkNrSeg; + } + + public void setLnkNrSeg(Hyperlink h) { + this.lnkNrSeg = h; + } + + private TableColumn tableColumn6 = new TableColumn(); + + public TableColumn getTableColumn6() { + return tableColumn6; + } + + public void setTableColumn6(TableColumn tc) { + this.tableColumn6 = tc; + } + + private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); + + public Hyperlink getLnkNomeAcidentadoSeg() { + return lnkNomeAcidentadoSeg; + } + + public void setLnkNomeAcidentadoSeg(Hyperlink h) { + this.lnkNomeAcidentadoSeg = h; + } + + private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridConcluidos1() { + return gridConcluidos1; + } + + public void setGridConcluidos1(HtmlPanelGrid hpg) { + this.gridConcluidos1 = hpg; + } + + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel6() { + return gridPanel6; + } + + public void setGridPanel6(HtmlPanelGrid hpg) { + this.gridPanel6 = hpg; + } + + private StaticText staticText7 = new StaticText(); + + public StaticText getStaticText7() { + return staticText7; + } + + public void setStaticText7(StaticText st) { + this.staticText7 = st; + } + + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel7() { + return gridPanel7; + } + + public void setGridPanel7(HtmlPanelGrid hpg) { + this.gridPanel7 = hpg; + } + + private PanelGroup groupPanel3 = new PanelGroup(); + + public PanelGroup getGroupPanel3() { + return groupPanel3; + } + + public void setGroupPanel3(PanelGroup pg) { + this.groupPanel3 = pg; + } + + private StaticText staticText8 = new StaticText(); + + public StaticText getStaticText8() { + return staticText8; + } + + public void setStaticText8(StaticText st) { + this.staticText8 = st; + } + + private DropDown drpAno = new DropDown(); + + public DropDown getDrpAno() { + return drpAno; + } + + public void setDrpAno(DropDown dd) { + this.drpAno = dd; + } + + private PanelGroup groupPanel4 = new PanelGroup(); + + public PanelGroup getGroupPanel4() { + return groupPanel4; + } + + public void setGroupPanel4(PanelGroup pg) { + this.groupPanel4 = pg; + } + + private StaticText lblMes = new StaticText(); + + public StaticText getLblMes() { + return lblMes; + } + + public void setLblMes(StaticText st) { + this.lblMes = st; + } + + private DropDown drpMes = new DropDown(); + + public DropDown getDrpMes() { + return drpMes; + } + + public void setDrpMes(DropDown dd) { + this.drpMes = dd; + } + + private PanelGroup groupPanel5 = new PanelGroup(); + + public PanelGroup getGroupPanel5() { + return groupPanel5; + } + + public void setGroupPanel5(PanelGroup pg) { + this.groupPanel5 = pg; + } + + private StaticText lblDia = new StaticText(); + + public StaticText getLblDia() { + return lblDia; + } + + public void setLblDia(StaticText st) { + this.lblDia = st; + } + + private DropDown drpDia = new DropDown(); + + public DropDown getDrpDia() { + return drpDia; + } + + public void setDrpDia(DropDown dd) { + this.drpDia = dd; + } + + private PanelGroup groupPanel6 = new PanelGroup(); + + public PanelGroup getGroupPanel6() { + return groupPanel6; + } + + public void setGroupPanel6(PanelGroup pg) { + this.groupPanel6 = pg; + } + + private StaticText staticText9 = new StaticText(); + + public StaticText getStaticText9() { + return staticText9; + } + + public void setStaticText9(StaticText st) { + this.staticText9 = st; + } + + private TextField txtNome = new TextField(); + + public TextField getTxtNome() { + return txtNome; + } + + public void setTxtNome(TextField tf) { + this.txtNome = tf; + } + + private Button butPesquisar = new Button(); + + public Button getButPesquisar() { + return butPesquisar; + } + + public void setButPesquisar(Button b) { + this.butPesquisar = b; + } + + private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel8() { + return gridPanel8; + } + + public void setGridPanel8(HtmlPanelGrid hpg) { + this.gridPanel8 = hpg; + } + + private Table table3 = new Table(); + + public Table getTable3() { + return table3; + } + + public void setTable3(Table t) { + this.table3 = t; + } + + private TableRowGroup tableRowGroup3 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup3() { + return tableRowGroup3; + } + + public void setTableRowGroup3(TableRowGroup trg) { + this.tableRowGroup3 = trg; + } + + private TableColumn tableColumn7 = new TableColumn(); + + public TableColumn getTableColumn7() { + return tableColumn7; + } + + public void setTableColumn7(TableColumn tc) { + this.tableColumn7 = tc; + } + + private Hyperlink lnkDataConcluida = new Hyperlink(); + + public Hyperlink getLnkDataConcluida() { + return lnkDataConcluida; + } + + public void setLnkDataConcluida(Hyperlink h) { + this.lnkDataConcluida = h; + } + + private TableColumn tableColumn8 = new TableColumn(); + + public TableColumn getTableColumn8() { + return tableColumn8; + } + + public void setTableColumn8(TableColumn tc) { + this.tableColumn8 = tc; + } + + private Hyperlink lnkNrConcluida = new Hyperlink(); + + public Hyperlink getLnkNrConcluida() { + return lnkNrConcluida; + } + + public void setLnkNrConcluida(Hyperlink h) { + this.lnkNrConcluida = h; + } + + private TableColumn tableColumn9 = new TableColumn(); + + public TableColumn getTableColumn9() { + return tableColumn9; + } + + public void setTableColumn9(TableColumn tc) { + this.tableColumn9 = tc; + } + + private Hyperlink lnkNomeConcluida = new Hyperlink(); + + public Hyperlink getLnkNomeConcluida() { + return lnkNomeConcluida; + } + + public void setLnkNomeConcluida(Hyperlink h) { + this.lnkNomeConcluida = h; + } + + private StaticText txtSearchMsg = new StaticText(); + + public StaticText getTxtSearchMsg() { + return txtSearchMsg; + } + + public void setTxtSearchMsg(StaticText st) { + this.txtSearchMsg = st; + } + + private TableColumn tableColumn10 = new TableColumn(); + + public TableColumn getTableColumn10() { + return tableColumn10; + } + + public void setTableColumn10(TableColumn tc) { + this.tableColumn10 = tc; + } + + private Hyperlink lnkFase = new Hyperlink(); + + public Hyperlink getLnkFase() { + return lnkFase; + } + + public void setLnkFase(Hyperlink h) { + this.lnkFase = h; + } + + private TableColumn tableColumn11 = new TableColumn(); + + public TableColumn getTableColumn11() { + return tableColumn11; + } + + public void setTableColumn11(TableColumn tc) { + this.tableColumn11 = tc; + } + + private Hyperlink lnkFaseSeg = new Hyperlink(); + + public Hyperlink getLnkFaseSeg() { + return lnkFaseSeg; + } + + public void setLnkFaseSeg(Hyperlink h) { + this.lnkFaseSeg = h; + } + + private TableColumn tableColumn12 = new TableColumn(); + + public TableColumn getTableColumn12() { + return tableColumn12; + } + + public void setTableColumn12(TableColumn tc) { + this.tableColumn12 = tc; + } + + private TableColumn tableColumn13 = new TableColumn(); + + public TableColumn getTableColumn13() { + return tableColumn13; + } + + public void setTableColumn13(TableColumn tc) { + this.tableColumn13 = tc; + } + + private TableColumn tableColumn14 = new TableColumn(); + + public TableColumn getTableColumn14() { + return tableColumn14; + } + + public void setTableColumn14(TableColumn tc) { + this.tableColumn14 = tc; + } + + private TableColumn tableColumn15 = new TableColumn(); + + public TableColumn getTableColumn15() { + return tableColumn15; + } + + public void setTableColumn15(TableColumn tc) { + this.tableColumn15 = tc; + } + + private Hyperlink lnkPor = new Hyperlink(); + + public Hyperlink getLnkPor() { + return lnkPor; + } + + public void setLnkPor(Hyperlink h) { + this.lnkPor = h; + } + + private Hyperlink lnkPorSeg = new Hyperlink(); + + public Hyperlink getLnkPorSeg() { + return lnkPorSeg; + } + + public void setLnkPorSeg(Hyperlink h) { + this.lnkPorSeg = h; + } + + private Hyperlink lnkPorConcluida = new Hyperlink(); + + public Hyperlink getLnkPorConcluida() { + return lnkPorConcluida; + } + + public void setLnkPorConcluida(Hyperlink h) { + this.lnkPorConcluida = h; + } + + private Hyperlink lnkEstabConcluida = new Hyperlink(); + + public Hyperlink getLnkEstabConcluida() { + return lnkEstabConcluida; + } + + public void setLnkEstabConcluida(Hyperlink h) { + this.lnkEstabConcluida = h; + } + + private PanelGroup groupPanel7 = new PanelGroup(); + + public PanelGroup getGroupPanel7() { + return groupPanel7; + } + + public void setGroupPanel7(PanelGroup pg) { + this.groupPanel7 = pg; + } + + private StaticText staticText3 = new StaticText(); + + public StaticText getStaticText3() { + return staticText3; + } + + public void setStaticText3(StaticText st) { + this.staticText3 = st; + } + + private TextField txtPor = new TextField(); + + public TextField getTxtPor() { + return txtPor; + } + + public void setTxtPor(TextField tf) { + this.txtPor = tf; + } + + private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel9() { + return gridPanel9; + } + + public void setGridPanel9(HtmlPanelGrid hpg) { + this.gridPanel9 = hpg; + } + + private PanelGroup groupPanel8 = new PanelGroup(); + + public PanelGroup getGroupPanel8() { + return groupPanel8; + } + + public void setGroupPanel8(PanelGroup pg) { + this.groupPanel8 = pg; + } + + private StaticText staticText10 = new StaticText(); + + public StaticText getStaticText10() { + return staticText10; + } + + public void setStaticText10(StaticText st) { + this.staticText10 = st; + } + + private ImageComponent image3 = new ImageComponent(); + + public ImageComponent getImage3() { + return image3; + } + + public void setImage3(ImageComponent ic) { + this.image3 = ic; + } + + private StaticText staticText11 = new StaticText(); + + public StaticText getStaticText11() { + return staticText11; + } + + public void setStaticText11(StaticText st) { + this.staticText11 = st; + } + + private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel10() { + return gridPanel10; + } + + public void setGridPanel10(HtmlPanelGrid hpg) { + this.gridPanel10 = hpg; + } + + private StaticText txtMsg = new StaticText(); + + public StaticText getTxtMsg() { + return txtMsg; + } + + public void setTxtMsg(StaticText st) { + this.txtMsg = st; + } + + private TableColumn tableColumn16 = new TableColumn(); + + public TableColumn getTableColumn16() { + return tableColumn16; + } + + public void setTableColumn16(TableColumn tc) { + this.tableColumn16 = tc; + } + + private Hyperlink lnkDataAbertura = new Hyperlink(); + + public Hyperlink getLnkDataAbertura() { + return lnkDataAbertura; + } + + public void setLnkDataAbertura(Hyperlink h) { + this.lnkDataAbertura = h; + } + + private TableColumn tableColumn17 = new TableColumn(); + + public TableColumn getTableColumn17() { + return tableColumn17; + } + + public void setTableColumn17(TableColumn tc) { + this.tableColumn17 = tc; + } + + private Hyperlink lnkDataAberturaSeg = new Hyperlink(); + + public Hyperlink getLnkDataAberturaSeg() { + return lnkDataAberturaSeg; + } + + public void setLnkDataAberturaSeg(Hyperlink h) { + this.lnkDataAberturaSeg = h; + } + + private TableColumn tableColumn18 = new TableColumn(); + + public TableColumn getTableColumn18() { + return tableColumn18; + } + + public void setTableColumn18(TableColumn tc) { + this.tableColumn18 = tc; + } + + private Hyperlink lnkDataAberturaConcluida = new Hyperlink(); + + public Hyperlink getLnkDataAberturaConcluida() { + return lnkDataAberturaConcluida; + } + + public void setLnkDataAberturaConcluida(Hyperlink h) { + this.lnkDataAberturaConcluida = h; + } + + private TableColumn tableColumn19 = new TableColumn(); + + public TableColumn getTableColumn19() { + return tableColumn19; + } + + public void setTableColumn19(TableColumn tc) { + this.tableColumn19 = tc; + } + + private Hyperlink lnkEstabelecimento = new Hyperlink(); + + public Hyperlink getLnkEstabelecimento() { + return lnkEstabelecimento; + } + + public void setLnkEstabelecimento(Hyperlink h) { + this.lnkEstabelecimento = h; + } + + private TableColumn tableColumn20 = new TableColumn(); + + public TableColumn getTableColumn20() { + return tableColumn20; + } + + public void setTableColumn20(TableColumn tc) { + this.tableColumn20 = tc; + } + + private Hyperlink lnkEstabelecimentoSeg = new Hyperlink(); + + public Hyperlink getLnkEstabelecimentoSeg() { + return lnkEstabelecimentoSeg; + } + + public void setLnkEstabelecimentoSeg(Hyperlink h) { + this.lnkEstabelecimentoSeg = h; + } + private StaticText lblUser = new StaticText(); + + public StaticText getLblUser() { + return lblUser; + } + + public void setLblUser(StaticText st) { + this.lblUser = st; + } + private Hyperlink lnkPlanosActuacao = new Hyperlink(); + + public Hyperlink getLnkPlanosActuacao() { + return lnkPlanosActuacao; + } + + public void setLnkPlanosActuacao(Hyperlink h) { + this.lnkPlanosActuacao = h; + } + + + private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanelFilterActual() + { + return this.gridPanelFilterActual; + } + public void setGridPanelFilterActual( HtmlPanelGrid pg ) + { + this.gridPanelFilterActual = pg; + } + + private PanelGroup groupPanelFilterActual = new PanelGroup(); + public PanelGroup getGroupPanelFilterActual() + { + return this.groupPanelFilterActual; + } + public void setGroupPanelFilterActual( PanelGroup pg ) + { + this.groupPanelFilterActual = pg; + } + + private StaticText labelFilterNameActual = new StaticText(); + public StaticText getLabelFilterNameActual() + { + return this.labelFilterNameActual; + } + public void setLabelFilterNameActual( StaticText st ) + { + this.labelFilterNameActual = st; + } + + private TextField textFilterNameActual = new TextField(); + public TextField getTextFilterNameActual() + { + return this.textFilterNameActual; + } + public void setTextFilterNameActual( TextField tf ) + { + this.textFilterNameActual = tf; + } + + private StaticText labelFilterEstabelecimentoActual = new StaticText(); + public StaticText getLabelFilterEstabelecimentoActual() { + return labelFilterEstabelecimentoActual; + } + public void setLabelFilterEstabelecimentoActual(StaticText labelFilterEstabelecimentoActual) { + this.labelFilterEstabelecimentoActual = labelFilterEstabelecimentoActual; + } + + private TextField textFilterEstabelecimentoActual = new TextField(); + + public TextField getTextFilterEstabelecimentoActual() { + return textFilterEstabelecimentoActual; + } + public void setTextFilterEstabelecimentoActual(TextField textFilterEstabelecimentoActual) { + this.textFilterEstabelecimentoActual = textFilterEstabelecimentoActual; + } + + private com.sun.rave.web.ui.component.Calendar calFilterDateActual = new com.sun.rave.web.ui.component.Calendar(); + public com.sun.rave.web.ui.component.Calendar getCalFilterDateActual() + { + return this.calFilterDateActual; + } + public void setCalFilterDateActual( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateActual = c; + } + + private TextField textFilterPORActual = new TextField(); + + public TextField getTextFilterPORActual() { + return textFilterPORActual; + } + + public void setTextFilterPORActual(TextField textFilterPORActual) { + this.textFilterPORActual = textFilterPORActual; + } + + + private Button buttonFilterActual = new Button(); + public Button getButtonFilterActual() + { + return this.buttonFilterActual; + } + public void setButtonFilterActual( Button b ) + { + this.buttonFilterActual = b; + } + + private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanelFilterSeg() + { + return this.gridPanelFilterSeg; + } + public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + { + this.gridPanelFilterSeg = pg; + } + + private PanelGroup groupPanelFilterSeg = new PanelGroup(); + public PanelGroup getGroupPanelFilterSeg() + { + return this.groupPanelFilterSeg; + } + public void setGroupPanelFilterSeg( PanelGroup pg ) + { + this.groupPanelFilterSeg = pg; + } + + private StaticText labelFilterNameSeg = new StaticText(); + public StaticText getLabelFilterNameSeg() + { + return this.labelFilterNameSeg; + } + public void setLabelFilterNameSeg( StaticText st ) + { + this.labelFilterNameSeg = st; + } + + private TextField textFilterNameSeg = new TextField(); + public TextField getTextFilterNameSeg() + { + return this.textFilterNameSeg; + } + public void setTextFilterNameSeg( TextField tf ) + { + this.textFilterNameSeg = tf; + } + + private StaticText labelFilterEstabelecimentoSeg = new StaticText(); + public StaticText getLabelFilterEstabelecimentoSeg() { + return labelFilterEstabelecimentoSeg; + } + public void setLabelFilterEstabelecimentoSeg(StaticText labelFilterEstabelecimentoSeg) { + this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg; + } + + private TextField textFilterEstabelecimentoSeg = new TextField(); + + public TextField getTextFilterEstabelecimentoSeg() { + return textFilterEstabelecimentoSeg; + } + public void setTextFilterEstabelecimentoSeg(TextField textFilterEstabelecimentoSeg) { + this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg; + } + + private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); + public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + { + return this.calFilterDateSeg; + } + public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateSeg = c; + } + + private TextField textFilterPORSeg = new TextField(); + + public TextField getTextFilterPORSeg() { + return textFilterPORSeg; + } + + public void setTextFilterPORSeg(TextField textFilterPORSeg) { + this.textFilterPORSeg = textFilterPORSeg; + } + + + private Button buttonFilterSeg = new Button(); + public Button getButtonFilterSeg() + { + return this.buttonFilterSeg; + } + public void setButtonFilterSeg( Button b ) + { + this.buttonFilterSeg = b; + } + + + private TextField textFilterEstabelecimentoConc = new TextField(); + + public TextField getTextFilterEstabelecimentoConc() { + return textFilterEstabelecimentoConc; + } + + public void setTextFilterEstabelecimentoConc(TextField textFilterEstabelecimentoConc) { + this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc; + } + + + private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + //
+ + /** + *

Construct a new Page bean instance.

+ */ + public FormHS() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("FormHS Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + + if (!getSessionBean1().isLoggedIn()) { + try { + getExternalContext().redirect("Login.jsp"); + } catch(Exception e) { + // . . . handle exception . . . + } + } + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + public void prerender() { + System.out.println("=== FORM_HS ==="); + lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); + + HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom(referer); + System.out.println("PAGE FROM : " + pageFrom); + if((!pageFrom.matches("FormHS.jsp")) || getSessionBean1().isFromAnaliseDeletion()) + { + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //lblActivos.setRendered(true); + table1.setRendered(true); + + //ArrayList actuaisList = adp.getAnalisesActuaisList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), new Integer(3)); + ArrayList actuaisList = adp.getAnalisesActuaisHsList( getSessionBean1().getCurrentUser().getEstabelecimento_id() ); + getSessionBean1().getAnalisesActualDataProvider().setList(actuaisList); + } + catch(Exception ex) + { + //lblActivos.setRendered(false); + table1.setRendered(false); + ErrorLogger.logException( ex ); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //lblActivos.setRendered(true); + table2.setRendered(true); + + ArrayList seguimentoList = adp.getAnalisesSeguimentoHsList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList(seguimentoList); + } + catch(Exception ex) + { + //lblActivos.setRendered(false); + table2.setRendered(false); + ErrorLogger.logException( ex ); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //lblActivos.setRendered(true); + System.out.println("CONCLUIDAS TABLE"); + getSessionBean1().getAnalisesConcluidasDataProvider().setList(null); + table3.setRendered(true); + ArrayList concluidasList = adp.getAnalisesConcluidasHsList(); + getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); + } + catch(Exception ex) + { + //lblActivos.setRendered(false); + table3.setRendered(false); + ErrorLogger.logException( ex ); +// System.out.println("ERRRRRROR : " + ex.getMessage()); + } + fillAnoDropDown(); + } + + txtMsg.setText(getSessionBean1().getMsg()); + getSessionBean1().setMsg(""); + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), true ); + return null; + } + + public String lnkDataAcidente_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormHS"); + return "analise_acidente"; + } + + public String lnkDataAbertura_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormHS"); + return "analise_acidente"; + } + + public String lnkNr_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormHS"); + return "analise_acidente"; + } + + public String lnkNomeAcidentado_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormHS"); + return "analise_acidente"; + } + + private AnaliseAcidente getTableActivosRowData() + { + RowKey rk = tableRowGroup1.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesActualDataProvider provider = (AnalisesActualDataProvider) tableRowGroup1.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + public String lnkDataAcidenteSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormHS"); + return "view_analise"; + } + + public String lnkDataAberturaSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormHS"); + return "view_analise"; + } + + public String lnkNrSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormHS"); + return "view_analise"; + } + + public String lnkNomeAcidentadoSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormHS"); + return "view_analise"; + } + + private AnaliseAcidente getTableSeguimentoRowData() + { + RowKey rk = tableRowGroup2.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup2.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + private AnaliseAcidente getTableConcluidasRowData() + { + RowKey rk = tableRowGroup3.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup3.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + public void drpAno_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + Object ano = event.getNewValue(); + if(ano == null) + { + lblMes.setVisible(false); + drpMes.setVisible(false); + lblDia.setVisible(false); + drpDia.setVisible(false); + } + else + { + lblMes.setVisible(true); + drpMes.setVisible(true); + fillMesDropDown(); + } + } + + public void drpMes_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + Object mes = event.getNewValue(); + if(mes == null) + { + lblDia.setVisible(false); + drpDia.setVisible(false); + } + else + { + lblDia.setVisible(true); + drpDia.setVisible(true); + //fillDiaDropDown(); + } + } + + public void drpDia_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public String butPesquisar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + Object obAno = null; + Object obMes = null; + Object obDia = null; + try + { + obAno = drpAno.getSelected(); + obMes = drpMes.getSelected(); + obDia = drpDia.getSelected(); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + Integer ano = null; + Integer mes = null; + Integer dia = null; + + if(obAno != null) + { + ano = (Integer) obAno; + } + + if(obMes != null) + { + mes = (Integer) obMes; + } + + if(obDia != null) + { + dia = (Integer) obDia; + } + + String por = null; + if(txtPor.getText() != null) + { + por = (String) txtPor.getText(); + if(por.trim().length() == 0) + { + por = null; + } + } + + String nome = null; + if(txtNome.getText() != null) + { + nome = (String) txtNome.getText(); + if(nome.trim().length() == 0) + { + nome = null; + } + } + + String estabelecimento = null; + if ( textFilterEstabelecimentoConc.getText() != null ) + { + estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim(); + if( estabelecimento.length() == 0 ) + { + estabelecimento = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); + ArrayList concluidasList = adp.searchAanalisesConcluidasList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), + ano, mes, dia, por, nome, estabelecimento ); + + table3.setRendered(true); + txtSearchMsg.setRendered(false); + getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); + } + catch(Exception ex) + { + table3.setRendered(false); + txtSearchMsg.setRendered(true); + txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !"); + ErrorLogger.logException( ex ); + } + + return null; + } + +// private String getPageFrom(String referer) +// { +// String pageFrom = referer.substring(referer.lastIndexOf("/")+1); +// return pageFrom; +// } + + private void fillAnoDropDown() + { +// ArrayList anosList = new ArrayList(); +// for(int ano=2007; ano<2051; ano++) +// { +// anosList.add(new Integer(ano)); +// } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList anosList = adp.getAnosListFromAnalises(); + com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1]; + anoOptions[0] = new Option("", ""); + ListIterator iter = anosList.listIterator(); + int i = 1; + while(iter.hasNext()) + { + Integer ano = (Integer) iter.next(); + + anoOptions[i] = new Option(ano, ano.toString()); + i++; + } + getSessionBean1().setAnoOptions(anoOptions); + Calendar cal = new GregorianCalendar(); + int year = cal.get(Calendar.YEAR); + //drpAno.setSelected( new Integer(year) ); + + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + } + + + private void fillMesDropDown() + { + com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13]; + mesOptions[0] = new Option("", ""); + mesOptions[1] = new Option(new Integer(1), "Janeiro"); + mesOptions[2] = new Option(new Integer(2), "Fevereiro"); + mesOptions[3] = new Option(new Integer(3), "Março"); + mesOptions[4] = new Option(new Integer(4), "Abril"); + mesOptions[5] = new Option(new Integer(5), "Maio"); + mesOptions[6] = new Option(new Integer(6), "Junho"); + mesOptions[7] = new Option(new Integer(7), "Julho"); + mesOptions[8] = new Option(new Integer(8), "Agosto"); + mesOptions[9] = new Option(new Integer(9), "Setembro"); + mesOptions[10] = new Option(new Integer(10), "Outubro"); + mesOptions[11] = new Option(new Integer(11), "Novembro"); + mesOptions[12] = new Option(new Integer(12), "Dezembro"); + getSessionBean1().setMesOptions(mesOptions); + Calendar cal = new GregorianCalendar(); + int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ... + //drpMes.setSelected( new Integer(month+1) ); + } + + private void fillDiaDropDown() + { +// int ano = ( (Integer)drpAno.getSelected() ).intValue(); +// int mes = ( (Integer)drpMes.getSelected() ).intValue(); +// int dias = 0; +// switch (mes) { +// case 1: dias=31; break; +// case 2: +// GregorianCalendar cal = new GregorianCalendar(); +// if(cal.isLeapYear(ano)) +// { +// dias = 29; +// } +// else +// { +// dias = 28; +// } +// break; +// case 3: dias=31; break; +// case 4: dias=30; break; +// case 5: dias=31; break; +// case 6: dias=30; break; +// case 7: dias=31; break; +// case 8: dias=31; break; +// case 9: dias=30; break; +// case 10: dias=31; break; +// case 11: dias=30; break; +// case 12: dias=31; break; +// default: System.out.println("Invalid month.");break; +// } +// +// ArrayList diasList = new ArrayList(); +// for(int dia=1; diaPage bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class FormMedico extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridBase1() { + return gridBase1; + } + + public void setGridBase1(HtmlPanelGrid hpg) { + this.gridBase1 = hpg; + } + + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayout1() { + return gridLayout1; + } + + public void setGridLayout1(HtmlPanelGrid hpg) { + this.gridLayout1 = hpg; + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private ImageComponent image1 = new ImageComponent(); + + public ImageComponent getImage1() { + return image1; + } + + public void setImage1(ImageComponent ic) { + this.image1 = ic; + } + + private ImageComponent image2 = new ImageComponent(); + + public ImageComponent getImage2() { + return image2; + } + + public void setImage2(ImageComponent ic) { + this.image2 = ic; + } + + private PanelGroup groupPanel2 = new PanelGroup(); + + public PanelGroup getGroupPanel2() { + return groupPanel2; + } + + public void setGroupPanel2(PanelGroup pg) { + this.groupPanel2 = pg; + } + + private StaticText lblUser = new StaticText(); + + public StaticText getLblUser() { + return lblUser; + } + + public void setLblUser(StaticText st) { + this.lblUser = st; + } + + private StaticText staticText1 = new StaticText(); + + public StaticText getStaticText1() { + return staticText1; + } + + public void setStaticText1(StaticText st) { + this.staticText1 = st; + } + + private Hyperlink lnkEditUser = new Hyperlink(); + + public Hyperlink getLnkEditUser() { + return lnkEditUser; + } + + public void setLnkEditUser(Hyperlink h) { + this.lnkEditUser = h; + } + + private StaticText staticText2 = new StaticText(); + + public StaticText getStaticText2() { + return staticText2; + } + + public void setStaticText2(StaticText st) { + this.staticText2 = st; + } + + private Hyperlink lnkLogout = new Hyperlink(); + + public Hyperlink getLnkLogout() { + return lnkLogout; + } + + public void setLnkLogout(Hyperlink h) { + this.lnkLogout = h; + } + + private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayoutTop1() { + return gridLayoutTop1; + } + + public void setGridLayoutTop1(HtmlPanelGrid hpg) { + this.gridLayoutTop1 = hpg; + } + + private HtmlPanelGrid gridActual = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridActual() { + return gridActual; + } + + public void setGridActual(HtmlPanelGrid hpg) { + this.gridActual = hpg; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private StaticText staticText4 = new StaticText(); + + public StaticText getStaticText4() { + return staticText4; + } + + public void setStaticText4(StaticText st) { + this.staticText4 = st; + } + + private StaticText staticText5 = new StaticText(); + + public StaticText getStaticText5() { + return staticText5; + } + + public void setStaticText5(StaticText st) { + this.staticText5 = st; + } + + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel3() { + return gridPanel3; + } + + public void setGridPanel3(HtmlPanelGrid hpg) { + this.gridPanel3 = hpg; + } + + private Table table1 = new Table(); + + public Table getTable1() { + return table1; + } + + public void setTable1(Table t) { + this.table1 = t; + } + + private TableRowGroup tableRowGroup1 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup1() { + return tableRowGroup1; + } + + public void setTableRowGroup1(TableRowGroup trg) { + this.tableRowGroup1 = trg; + } + + private TableColumn tableColumn1 = new TableColumn(); + + public TableColumn getTableColumn1() { + return tableColumn1; + } + + public void setTableColumn1(TableColumn tc) { + this.tableColumn1 = tc; + } + + private Hyperlink lnkDataAcidente = new Hyperlink(); + + public Hyperlink getLnkDataAcidente() { + return lnkDataAcidente; + } + + public void setLnkDataAcidente(Hyperlink h) { + this.lnkDataAcidente = h; + } + + private TableColumn tableColumn2 = new TableColumn(); + + public TableColumn getTableColumn2() { + return tableColumn2; + } + + public void setTableColumn2(TableColumn tc) { + this.tableColumn2 = tc; + } + + private Hyperlink lnkNr = new Hyperlink(); + + public Hyperlink getLnkNr() { + return lnkNr; + } + + public void setLnkNr(Hyperlink h) { + this.lnkNr = h; + } + + private TableColumn tableColumn3 = new TableColumn(); + + public TableColumn getTableColumn3() { + return tableColumn3; + } + + public void setTableColumn3(TableColumn tc) { + this.tableColumn3 = tc; + } + + private Hyperlink lnkNomeAcidentado = new Hyperlink(); + + public Hyperlink getLnkNomeAcidentado() { + return lnkNomeAcidentado; + } + + public void setLnkNomeAcidentado(Hyperlink h) { + this.lnkNomeAcidentado = h; + } + + private HtmlPanelGrid gridSeguimento = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridSeguimento() { + return gridSeguimento; + } + + public void setGridSeguimento(HtmlPanelGrid hpg) { + this.gridSeguimento = hpg; + } + + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel4() { + return gridPanel4; + } + + public void setGridPanel4(HtmlPanelGrid hpg) { + this.gridPanel4 = hpg; + } + + private StaticText staticText6 = new StaticText(); + + public StaticText getStaticText6() { + return staticText6; + } + + public void setStaticText6(StaticText st) { + this.staticText6 = st; + } + + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel5() { + return gridPanel5; + } + + public void setGridPanel5(HtmlPanelGrid hpg) { + this.gridPanel5 = hpg; + } + + private Table table2 = new Table(); + + public Table getTable2() { + return table2; + } + + public void setTable2(Table t) { + this.table2 = t; + } + + private TableRowGroup tableRowGroup2 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup2() { + return tableRowGroup2; + } + + public void setTableRowGroup2(TableRowGroup trg) { + this.tableRowGroup2 = trg; + } + + private TableColumn tableColumn4 = new TableColumn(); + + public TableColumn getTableColumn4() { + return tableColumn4; + } + + public void setTableColumn4(TableColumn tc) { + this.tableColumn4 = tc; + } + + private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); + + public Hyperlink getLnkDataAcidenteSeg() { + return lnkDataAcidenteSeg; + } + + public void setLnkDataAcidenteSeg(Hyperlink h) { + this.lnkDataAcidenteSeg = h; + } + + private TableColumn tableColumn5 = new TableColumn(); + + public TableColumn getTableColumn5() { + return tableColumn5; + } + + public void setTableColumn5(TableColumn tc) { + this.tableColumn5 = tc; + } + + private Hyperlink lnkNrSeg = new Hyperlink(); + + public Hyperlink getLnkNrSeg() { + return lnkNrSeg; + } + + public void setLnkNrSeg(Hyperlink h) { + this.lnkNrSeg = h; + } + + private TableColumn tableColumn6 = new TableColumn(); + + public TableColumn getTableColumn6() { + return tableColumn6; + } + + public void setTableColumn6(TableColumn tc) { + this.tableColumn6 = tc; + } + + private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); + + public Hyperlink getLnkNomeAcidentadoSeg() { + return lnkNomeAcidentadoSeg; + } + + public void setLnkNomeAcidentadoSeg(Hyperlink h) { + this.lnkNomeAcidentadoSeg = h; + } + + private HtmlPanelGrid gridConcluidos = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridConcluidos() { + return gridConcluidos; + } + + public void setGridConcluidos(HtmlPanelGrid hpg) { + this.gridConcluidos = hpg; + } + + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel6() { + return gridPanel6; + } + + public void setGridPanel6(HtmlPanelGrid hpg) { + this.gridPanel6 = hpg; + } + + private StaticText staticText7 = new StaticText(); + + public StaticText getStaticText7() { + return staticText7; + } + + public void setStaticText7(StaticText st) { + this.staticText7 = st; + } + + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel7() { + return gridPanel7; + } + + public void setGridPanel7(HtmlPanelGrid hpg) { + this.gridPanel7 = hpg; + } + + private PanelGroup groupPanel3 = new PanelGroup(); + + public PanelGroup getGroupPanel3() { + return groupPanel3; + } + + public void setGroupPanel3(PanelGroup pg) { + this.groupPanel3 = pg; + } + + private StaticText staticText8 = new StaticText(); + + public StaticText getStaticText8() { + return staticText8; + } + + public void setStaticText8(StaticText st) { + this.staticText8 = st; + } + + private DropDown drpAno = new DropDown(); + + public DropDown getDrpAno() { + return drpAno; + } + + public void setDrpAno(DropDown dd) { + this.drpAno = dd; + } + + private PanelGroup groupPanel4 = new PanelGroup(); + + public PanelGroup getGroupPanel4() { + return groupPanel4; + } + + public void setGroupPanel4(PanelGroup pg) { + this.groupPanel4 = pg; + } + + private StaticText lblMes = new StaticText(); + + public StaticText getLblMes() { + return lblMes; + } + + public void setLblMes(StaticText st) { + this.lblMes = st; + } + + private DropDown drpMes = new DropDown(); + + public DropDown getDrpMes() { + return drpMes; + } + + public void setDrpMes(DropDown dd) { + this.drpMes = dd; + } + + private PanelGroup groupPanel5 = new PanelGroup(); + + public PanelGroup getGroupPanel5() { + return groupPanel5; + } + + public void setGroupPanel5(PanelGroup pg) { + this.groupPanel5 = pg; + } + + private StaticText lblDia = new StaticText(); + + public StaticText getLblDia() { + return lblDia; + } + + public void setLblDia(StaticText st) { + this.lblDia = st; + } + + private DropDown drpDia = new DropDown(); + + public DropDown getDrpDia() { + return drpDia; + } + + public void setDrpDia(DropDown dd) { + this.drpDia = dd; + } + + private PanelGroup groupPanel6 = new PanelGroup(); + + public PanelGroup getGroupPanel6() { + return groupPanel6; + } + + public void setGroupPanel6(PanelGroup pg) { + this.groupPanel6 = pg; + } + + private StaticText staticText9 = new StaticText(); + + public StaticText getStaticText9() { + return staticText9; + } + + public void setStaticText9(StaticText st) { + this.staticText9 = st; + } + + private TextField txtNome = new TextField(); + + public TextField getTxtNome() { + return txtNome; + } + + public void setTxtNome(TextField tf) { + this.txtNome = tf; + } + + private Button butPesquisar = new Button(); + + public Button getButPesquisar() { + return butPesquisar; + } + + public void setButPesquisar(Button b) { + this.butPesquisar = b; + } + + private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel8() { + return gridPanel8; + } + + public void setGridPanel8(HtmlPanelGrid hpg) { + this.gridPanel8 = hpg; + } + + private Table table3 = new Table(); + + public Table getTable3() { + return table3; + } + + public void setTable3(Table t) { + this.table3 = t; + } + + private TableRowGroup tableRowGroup3 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup3() { + return tableRowGroup3; + } + + public void setTableRowGroup3(TableRowGroup trg) { + this.tableRowGroup3 = trg; + } + + private TableColumn tableColumn7 = new TableColumn(); + + public TableColumn getTableColumn7() { + return tableColumn7; + } + + public void setTableColumn7(TableColumn tc) { + this.tableColumn7 = tc; + } + + private Hyperlink lnkDataConcluida = new Hyperlink(); + + public Hyperlink getLnkDataConcluida() { + return lnkDataConcluida; + } + + public void setLnkDataConcluida(Hyperlink h) { + this.lnkDataConcluida = h; + } + + private TableColumn tableColumn8 = new TableColumn(); + + public TableColumn getTableColumn8() { + return tableColumn8; + } + + public void setTableColumn8(TableColumn tc) { + this.tableColumn8 = tc; + } + + private Hyperlink lnkNrConcluida = new Hyperlink(); + + public Hyperlink getLnkNrConcluida() { + return lnkNrConcluida; + } + + public void setLnkNrConcluida(Hyperlink h) { + this.lnkNrConcluida = h; + } + + private TableColumn tableColumn9 = new TableColumn(); + + public TableColumn getTableColumn9() { + return tableColumn9; + } + + public void setTableColumn9(TableColumn tc) { + this.tableColumn9 = tc; + } + + private Hyperlink lnkNomeConcluida = new Hyperlink(); + + public Hyperlink getLnkNomeConcluida() { + return lnkNomeConcluida; + } + + public void setLnkNomeConcluida(Hyperlink h) { + this.lnkNomeConcluida = h; + } + + private StaticText txtSearchMsg = new StaticText(); + + public StaticText getTxtSearchMsg() { + return txtSearchMsg; + } + + public void setTxtSearchMsg(StaticText st) { + this.txtSearchMsg = st; + } + + private TableColumn tableColumn10 = new TableColumn(); + + public TableColumn getTableColumn10() { + return tableColumn10; + } + + public void setTableColumn10(TableColumn tc) { + this.tableColumn10 = tc; + } + + private Hyperlink lnkFase = new Hyperlink(); + + public Hyperlink getLnkFase() { + return lnkFase; + } + + public void setLnkFase(Hyperlink h) { + this.lnkFase = h; + } + + private Hyperlink lnkEstabelecimento = new Hyperlink(); + + public Hyperlink getLnkEstabelecimento() { + return lnkEstabelecimento; + } + + public void setLnkEstabelecimento(Hyperlink h) { + this.lnkEstabelecimento = h; + } + + private TableColumn tableColumn16 = new TableColumn(); + + public TableColumn getTableColumn16() { + return tableColumn16; + } + + public void setTableColumn16(TableColumn tc) { + this.tableColumn16 = tc; + } + + private TableColumn tableColumn17 = new TableColumn(); + + public TableColumn getTableColumn17() { + return tableColumn17; + } + + public void setTableColumn17(TableColumn tc) { + this.tableColumn17 = tc; + } + + private TableColumn tableColumn11 = new TableColumn(); + + public TableColumn getTableColumn11() { + return tableColumn11; + } + + public void setTableColumn11(TableColumn tc) { + this.tableColumn11 = tc; + } + + private Hyperlink lnkFaseSeg = new Hyperlink(); + + public Hyperlink getLnkFaseSeg() { + return lnkFaseSeg; + } + + public void setLnkFaseSeg(Hyperlink h) { + this.lnkFaseSeg = h; + } + + private Hyperlink lnkEstabelecimentoSeg = new Hyperlink(); + + public Hyperlink getLnkEstabelecimentoSeg() { + return lnkEstabelecimentoSeg; + } + + public void setLnkEstabelecimentoSeg(Hyperlink h) { + this.lnkEstabelecimentoSeg = h; + } + + private TableColumn tableColumn12 = new TableColumn(); + + public TableColumn getTableColumn12() { + return tableColumn12; + } + + public void setTableColumn12(TableColumn tc) { + this.tableColumn12 = tc; + } + + private TableColumn tableColumn13 = new TableColumn(); + + public TableColumn getTableColumn13() { + return tableColumn13; + } + + public void setTableColumn13(TableColumn tc) { + this.tableColumn13 = tc; + } + + private TableColumn tableColumn14 = new TableColumn(); + + public TableColumn getTableColumn14() { + return tableColumn14; + } + + public void setTableColumn14(TableColumn tc) { + this.tableColumn14 = tc; + } + + private TableColumn tableColumn15 = new TableColumn(); + + public TableColumn getTableColumn15() { + return tableColumn15; + } + + public void setTableColumn15(TableColumn tc) { + this.tableColumn15 = tc; + } + + private Hyperlink lnkPor = new Hyperlink(); + + public Hyperlink getLnkPor() { + return lnkPor; + } + + public void setLnkPor(Hyperlink h) { + this.lnkPor = h; + } + + private Hyperlink lnkPorSeg = new Hyperlink(); + + public Hyperlink getLnkPorSeg() { + return lnkPorSeg; + } + + public void setLnkPorSeg(Hyperlink h) { + this.lnkPorSeg = h; + } + + private Hyperlink lnkPorConcluida = new Hyperlink(); + + public Hyperlink getLnkPorConcluida() { + return lnkPorConcluida; + } + + public void setLnkPorConcluida(Hyperlink h) { + this.lnkPorConcluida = h; + } + + private Hyperlink lnkEstabConcluida = new Hyperlink(); + + public Hyperlink getLnkEstabConcluida() { + return lnkEstabConcluida; + } + + public void setLnkEstabConcluida(Hyperlink h) { + this.lnkEstabConcluida = h; + } + + private PanelGroup groupPanel7 = new PanelGroup(); + + public PanelGroup getGroupPanel7() { + return groupPanel7; + } + + public void setGroupPanel7(PanelGroup pg) { + this.groupPanel7 = pg; + } + + private StaticText staticText3 = new StaticText(); + + public StaticText getStaticText3() { + return staticText3; + } + + public void setStaticText3(StaticText st) { + this.staticText3 = st; + } + + private TextField txtPor = new TextField(); + + public TextField getTxtPor() { + return txtPor; + } + + public void setTxtPor(TextField tf) { + this.txtPor = tf; + } + + private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel9() { + return gridPanel9; + } + + public void setGridPanel9(HtmlPanelGrid hpg) { + this.gridPanel9 = hpg; + } + + private PanelGroup groupPanel8 = new PanelGroup(); + + public PanelGroup getGroupPanel8() { + return groupPanel8; + } + + public void setGroupPanel8(PanelGroup pg) { + this.groupPanel8 = pg; + } + + private StaticText staticText10 = new StaticText(); + + public StaticText getStaticText10() { + return staticText10; + } + + public void setStaticText10(StaticText st) { + this.staticText10 = st; + } + + private ImageComponent image3 = new ImageComponent(); + + public ImageComponent getImage3() { + return image3; + } + + public void setImage3(ImageComponent ic) { + this.image3 = ic; + } + + private StaticText staticText11 = new StaticText(); + + public StaticText getStaticText11() { + return staticText11; + } + + public void setStaticText11(StaticText st) { + this.staticText11 = st; + } + + + + private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanelFilterActual() + { + return this.gridPanelFilterActual; + } + public void setGridPanelFilterActual( HtmlPanelGrid pg ) + { + this.gridPanelFilterActual = pg; + } + + private PanelGroup groupPanelFilterActual = new PanelGroup(); + public PanelGroup getGroupPanelFilterActual() + { + return this.groupPanelFilterActual; + } + public void setGroupPanelFilterActual( PanelGroup pg ) + { + this.groupPanelFilterActual = pg; + } + + private StaticText labelFilterNameActual = new StaticText(); + public StaticText getLabelFilterNameActual() + { + return this.labelFilterNameActual; + } + public void setLabelFilterNameActual( StaticText st ) + { + this.labelFilterNameActual = st; + } + + private TextField textFilterNameActual = new TextField(); + public TextField getTextFilterNameActual() + { + return this.textFilterNameActual; + } + public void setTextFilterNameActual( TextField tf ) + { + this.textFilterNameActual = tf; + } + + private com.sun.rave.web.ui.component.Calendar calFilterDateActual = new com.sun.rave.web.ui.component.Calendar(); + public com.sun.rave.web.ui.component.Calendar getCalFilterDateActual() + { + return this.calFilterDateActual; + } + public void setCalFilterDateActual( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateActual = c; + } + + private TextField textFilterPORActual = new TextField(); + + public TextField getTextFilterPORActual() { + return textFilterPORActual; + } + + public void setTextFilterPORActual(TextField textFilterPORActual) { + this.textFilterPORActual = textFilterPORActual; + } + + + private Button buttonFilterActual = new Button(); + public Button getButtonFilterActual() + { + return this.buttonFilterActual; + } + public void setButtonFilterActual( Button b ) + { + this.buttonFilterActual = b; + } + + private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanelFilterSeg() + { + return this.gridPanelFilterSeg; + } + public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + { + this.gridPanelFilterSeg = pg; + } + + private PanelGroup groupPanelFilterSeg = new PanelGroup(); + public PanelGroup getGroupPanelFilterSeg() + { + return this.groupPanelFilterSeg; + } + public void setGroupPanelFilterSeg( PanelGroup pg ) + { + this.groupPanelFilterSeg = pg; + } + + private StaticText labelFilterNameSeg = new StaticText(); + public StaticText getLabelFilterNameSeg() + { + return this.labelFilterNameSeg; + } + public void setLabelFilterNameSeg( StaticText st ) + { + this.labelFilterNameSeg = st; + } + + private TextField textFilterNameSeg = new TextField(); + public TextField getTextFilterNameSeg() + { + return this.textFilterNameSeg; + } + public void setTextFilterNameSeg( TextField tf ) + { + this.textFilterNameSeg = tf; + } + + private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); + public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + { + return this.calFilterDateSeg; + } + public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateSeg = c; + } + + private TextField textFilterPORSeg = new TextField(); + + public TextField getTextFilterPORSeg() { + return textFilterPORSeg; + } + + public void setTextFilterPORSeg(TextField textFilterPORSeg) { + this.textFilterPORSeg = textFilterPORSeg; + } + + + private Button buttonFilterSeg = new Button(); + public Button getButtonFilterSeg() + { + return this.buttonFilterSeg; + } + public void setButtonFilterSeg( Button b ) + { + this.buttonFilterSeg = b; + } + + private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + //
+ + /** + *

Construct a new Page bean instance.

+ */ + public FormMedico() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("FormMedico Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + + if (!getSessionBean1().isLoggedIn()) { + try { + getExternalContext().redirect("Login.jsp"); + } catch(Exception e) { + // . . . handle exception . . . + } + } + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + public void prerender() { + lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); + + HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom(referer); + if(!pageFrom.matches("FormMedico.jsp")) + { + try + { + //lblActivos.setRendered(true); + table1.setRendered(true); + + //ArrayList actuaisList = adp.getAnalisesActuaisList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), new Integer(5)); + // ArrayList actuaisList = adp.getAnalisesActuaisMedicoList( getSessionBean1().getCurrentUser().getEstabelecimento_id() ); + // getSessionBean1().getAnalisesActualDataProvider().setList(actuaisList); + } + catch(Exception ex) + { + //lblActivos.setRendered(false); + table1.setRendered(false); + ErrorLogger.logException( ex ); + } + + table2.setRendered(false); + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //lblActivos.setRendered(true); + table2.setRendered(true); + + ArrayList seguimentoList = adp.getAnalisesSeguimentoMedList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList(seguimentoList); + } + catch(Exception ex) + { + //lblActivos.setRendered(false); + table2.setRendered(false); + ErrorLogger.logException( ex ); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //lblActivos.setRendered(true); + table3.setRendered(true); + + ArrayList concluidasList = adp.getAnalisesConcluidasList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); + getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); + } + catch(Exception ex) + { + //lblActivos.setRendered(false); + table3.setRendered(false); + ErrorLogger.logException( ex ); + } + fillAnoDropDown(); + } + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + public String lnkEditUser_action() { + // TODO: Replace with your code + + getSessionBean1().setNavFrom("FormMedico"); + getSessionBean1().setModoEdicaoUtilizador("edit"); + return "user"; + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), false ); + + return "login"; + } + + public String lnkDataAcidente_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "analise_acidente"; + } + + public String lnkNr_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "analise_acidente"; + } + + public String lnkNomeAcidentado_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "analise_acidente"; + } + + private AnaliseAcidente getTableActivosRowData() + { + RowKey rk = tableRowGroup1.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesActualDataProvider provider = (AnalisesActualDataProvider) tableRowGroup1.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + private AnaliseAcidente getTableConcluidasRowData() + { + RowKey rk = tableRowGroup3.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup3.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + public String lnkDataAcidenteSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "view_analise"; + } + + public String lnkNrSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "view_analise"; + } + + public String lnkNomeAcidentadoSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "view_analise"; + } + + private AnaliseAcidente getTableSeguimentoRowData() + { + RowKey rk = tableRowGroup2.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup2.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + public void drpAno_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + Object ano = event.getNewValue(); + if(ano == null) + { + lblMes.setVisible(false); + drpMes.setVisible(false); + lblDia.setVisible(false); + drpDia.setVisible(false); + } + else + { + lblMes.setVisible(true); + drpMes.setVisible(true); + fillMesDropDown(); + } + } + + public void drpMes_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + Object mes = event.getNewValue(); + if(mes == null) + { + lblDia.setVisible(false); + drpDia.setVisible(false); + } + else + { + lblDia.setVisible(true); + drpDia.setVisible(true); + fillDiaDropDown(); + } + } + + public void drpDia_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public String butPesquisar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + Object obAno = null; + Object obMes = null; + Object obDia = null; + try + { + obAno = drpAno.getSelected(); + obMes = drpMes.getSelected(); + obDia = drpDia.getSelected(); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + Integer ano = null; + Integer mes = null; + Integer dia = null; + + if(obAno != null) + { + ano = (Integer) obAno; + } + + if(obMes != null) + { + mes = (Integer) obMes; + } + + if(obDia != null) + { + dia = (Integer) obDia; + } + + String por = null; + if(txtPor.getText() != null) + { + por = (String) txtPor.getText(); + if(por.trim().length() == 0) + { + por = null; + } + } + + String nome = null; + if(txtNome.getText() != null) + { + nome = (String) txtNome.getText(); + if(nome.trim().length() == 0) + { + nome = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); + ArrayList concluidasList = adp.searchAanalisesConcluidasList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), + ano, mes, dia, por, nome, null + ); + + table3.setRendered(true); + txtSearchMsg.setRendered(false); + getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); + + + } + catch(Exception ex) + { + table3.setRendered(false); + txtSearchMsg.setRendered(true); + txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !"); + ErrorLogger.logException( ex ); + } + return null; + } + + private void fillAnoDropDown() + { +// ArrayList anosList = new ArrayList(); +// for(int ano=2007; ano<2051; ano++) +// { +// anosList.add(new Integer(ano)); +// } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList anosList = adp.getAnosListFromAnalises(); + com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1]; + anoOptions[0] = new Option("", ""); + ListIterator iter = anosList.listIterator(); + int i = 1; + while(iter.hasNext()) + { + Integer ano = (Integer) iter.next(); + + anoOptions[i] = new Option(ano, ano.toString()); + i++; + } + getSessionBean1().setAnoOptions(anoOptions); + Calendar cal = new GregorianCalendar(); + int year = cal.get(Calendar.YEAR); + //drpAno.setSelected( new Integer(year) ); + + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + } + + + private void fillMesDropDown() + { + com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13]; + mesOptions[0] = new Option("", ""); + mesOptions[1] = new Option(new Integer(1), "Janeiro"); + mesOptions[2] = new Option(new Integer(2), "Fevereiro"); + mesOptions[3] = new Option(new Integer(3), "Março"); + mesOptions[4] = new Option(new Integer(4), "Abril"); + mesOptions[5] = new Option(new Integer(5), "Maio"); + mesOptions[6] = new Option(new Integer(6), "Junho"); + mesOptions[7] = new Option(new Integer(7), "Julho"); + mesOptions[8] = new Option(new Integer(8), "Agosto"); + mesOptions[9] = new Option(new Integer(9), "Setembro"); + mesOptions[10] = new Option(new Integer(10), "Outubro"); + mesOptions[11] = new Option(new Integer(11), "Novembro"); + mesOptions[12] = new Option(new Integer(12), "Dezembro"); + getSessionBean1().setMesOptions(mesOptions); + Calendar cal = new GregorianCalendar(); + int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ... + //drpMes.setSelected( new Integer(month+1) ); + } + + private void fillDiaDropDown() + { + + } + + public String lnkDataConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "view_analise"; + } + + public String lnkNrConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "view_analise"; + } + + public String lnkNomeConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "view_analise"; + } + + public String lnkFase_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "analise_acidente"; + } + + public String lnkEstabelecimento_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "analise_acidente"; + } + + public String lnkFaseSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "view_analise"; + } + + public String lnkEstabelecimentoSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "view_analise"; + } + + public String lnkPor_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "analise_acidente"; + } + + public String lnkPorSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "view_analise"; + } + + public String lnkPorConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "view_analise"; + } + + public String lnkEstabConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormMedico"); + return "view_analise"; + } + + + + + public String buttonFilterActual_action() + { + Date visitaDate = ( Date ) calFilterDateActual.getValue(); + String visitaDateStr = null; + if ( visitaDate != null ) + { + visitaDateStr = D_F.format( visitaDate ); + } + + String POR = null; + if ( textFilterPORActual.getText() != null ) + { + POR = ( ( String ) textFilterPORActual.getText() ).trim(); + if ( POR.length() == 0 ) + { + POR = null; + } + } + + String nome = null; + if ( textFilterNameActual.getText() != null ) + { + nome = (( String ) textFilterNameActual.getText()).trim(); + if( nome.length() == 0 ) + { + nome = null; + } + } + +// AnalisesDataProvider adp = new AnalisesDataProvider(); + try + { +// ArrayList actualList = adp.searchAnalisesActuaisMedico( +// getSessionBean1().getCurrentUser().getEstabelecimento_id(), nome, visitaDateStr ); + + table1.setRendered( true ); + txtSearchMsg.setRendered( false ); +// getSessionBean1().getAnalisesActualDataProvider().setList( actualList ); + } + catch( Exception e ) + { + table1.setRendered( false ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + ErrorLogger.logException( e ); + } + + return null; + } + + public String buttonFilterSeg_action() + { + Date visitaDate = ( Date ) calFilterDateSeg.getValue(); + String visitaDateStr = null; + if ( visitaDate != null ) + { + visitaDateStr = D_F.format( visitaDate ); + } + + String POR = null; + if ( textFilterPORSeg.getText() != null ) + { + POR = ( ( String ) textFilterPORSeg.getText() ).trim(); + if ( POR.length() == 0 ) + { + POR = null; + } + } + + String nome = null; + if ( textFilterNameSeg.getText() != null ) + { + nome = (( String ) textFilterNameSeg.getText()).trim(); + if( nome.length() == 0 ) + { + nome = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList seguimentoList = adp.searchAnalisesSeguimentoMedico( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), + nome, visitaDateStr, POR ); + + table2.setRendered( true ); + txtSearchMsg.setRendered( false ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch( Exception e ) + { + table2.setRendered( false ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + ErrorLogger.logException( e ); + } + + return null; + } + +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormRH.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormRH.java new file mode 100644 index 00000000..0d6e9cff --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormRH.java @@ -0,0 +1,2022 @@ +/* + * FormRH.java + * + * Created on October 1, 2007, 11:43 AM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import beans.Utilizador; +import beans.AnaliseAcidente; +import com.evolute.utils.error.ErrorLogger; +import com.sun.data.provider.RowKey; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Button; +import com.sun.rave.web.ui.component.DropDown; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.Hyperlink; +import com.sun.rave.web.ui.component.ImageComponent; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.component.PanelGroup; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.Table; +import com.sun.rave.web.ui.component.TableColumn; +import com.sun.rave.web.ui.component.TableRowGroup; +import com.sun.rave.web.ui.component.TextField; +import com.sun.rave.web.ui.model.Option; +import db.providers.AnalisesActualDataProvider; +import db.providers.AnalisesConcluidasDataProvider; +import db.providers.AnalisesDataProvider; +import db.providers.AnalisesSeguimentoDataProvider; +import global.Global; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.ListIterator; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import javax.faces.context.FacesContext; +import javax.faces.event.ValueChangeEvent; +import javax.servlet.http.HttpServletRequest; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class FormRH extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridBase1() { + return gridBase1; + } + + public void setGridBase1(HtmlPanelGrid hpg) { + this.gridBase1 = hpg; + } + + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayout1() { + return gridLayout1; + } + + public void setGridLayout1(HtmlPanelGrid hpg) { + this.gridLayout1 = hpg; + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private ImageComponent image1 = new ImageComponent(); + + public ImageComponent getImage1() { + return image1; + } + + public void setImage1(ImageComponent ic) { + this.image1 = ic; + } + + private ImageComponent image2 = new ImageComponent(); + + public ImageComponent getImage2() { + return image2; + } + + public void setImage2(ImageComponent ic) { + this.image2 = ic; + } + + private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayoutTop1() { + return gridLayoutTop1; + } + + public void setGridLayoutTop1(HtmlPanelGrid hpg) { + this.gridLayoutTop1 = hpg; + } + + private HtmlPanelGrid gridActual1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridActual1() { + return gridActual1; + } + + public void setGridActual1(HtmlPanelGrid hpg) { + this.gridActual1 = hpg; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private StaticText staticText4 = new StaticText(); + + public StaticText getStaticText4() { + return staticText4; + } + + public void setStaticText4(StaticText st) { + this.staticText4 = st; + } + + private StaticText staticText5 = new StaticText(); + + public StaticText getStaticText5() { + return staticText5; + } + + public void setStaticText5(StaticText st) { + this.staticText5 = st; + } + + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel3() { + return gridPanel3; + } + + public void setGridPanel3(HtmlPanelGrid hpg) { + this.gridPanel3 = hpg; + } + + private Table table1 = new Table(); + + public Table getTable1() { + return table1; + } + + public void setTable1(Table t) { + this.table1 = t; + } + + private TableRowGroup tableRowGroup1 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup1() { + return tableRowGroup1; + } + + public void setTableRowGroup1(TableRowGroup trg) { + this.tableRowGroup1 = trg; + } + + private TableColumn tableColumn1 = new TableColumn(); + + public TableColumn getTableColumn1() { + return tableColumn1; + } + + public void setTableColumn1(TableColumn tc) { + this.tableColumn1 = tc; + } + + private Hyperlink lnkDataAcidente = new Hyperlink(); + + public Hyperlink getLnkDataAcidente() { + return lnkDataAcidente; + } + + public void setLnkDataAcidente(Hyperlink h) { + this.lnkDataAcidente = h; + } + + private TableColumn tableColumn2 = new TableColumn(); + + public TableColumn getTableColumn2() { + return tableColumn2; + } + + public void setTableColumn2(TableColumn tc) { + this.tableColumn2 = tc; + } + + private Hyperlink lnkNr = new Hyperlink(); + + public Hyperlink getLnkNr() { + return lnkNr; + } + + public void setLnkNr(Hyperlink h) { + this.lnkNr = h; + } + + private TableColumn tableColumn3 = new TableColumn(); + + public TableColumn getTableColumn3() { + return tableColumn3; + } + + public void setTableColumn3(TableColumn tc) { + this.tableColumn3 = tc; + } + + private Hyperlink lnkNomeAcidentado = new Hyperlink(); + + public Hyperlink getLnkNomeAcidentado() { + return lnkNomeAcidentado; + } + + public void setLnkNomeAcidentado(Hyperlink h) { + this.lnkNomeAcidentado = h; + } + + private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridSeguimento1() { + return gridSeguimento1; + } + + public void setGridSeguimento1(HtmlPanelGrid hpg) { + this.gridSeguimento1 = hpg; + } + + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel4() { + return gridPanel4; + } + + public void setGridPanel4(HtmlPanelGrid hpg) { + this.gridPanel4 = hpg; + } + + private StaticText staticText6 = new StaticText(); + + public StaticText getStaticText6() { + return staticText6; + } + + public void setStaticText6(StaticText st) { + this.staticText6 = st; + } + + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel5() { + return gridPanel5; + } + + public void setGridPanel5(HtmlPanelGrid hpg) { + this.gridPanel5 = hpg; + } + + private Table table2 = new Table(); + + public Table getTable2() { + return table2; + } + + public void setTable2(Table t) { + this.table2 = t; + } + + private TableRowGroup tableRowGroup2 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup2() { + return tableRowGroup2; + } + + public void setTableRowGroup2(TableRowGroup trg) { + this.tableRowGroup2 = trg; + } + + private TableColumn tableColumn4 = new TableColumn(); + + public TableColumn getTableColumn4() { + return tableColumn4; + } + + public void setTableColumn4(TableColumn tc) { + this.tableColumn4 = tc; + } + + private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); + + public Hyperlink getLnkDataAcidenteSeg() { + return lnkDataAcidenteSeg; + } + + public void setLnkDataAcidenteSeg(Hyperlink h) { + this.lnkDataAcidenteSeg = h; + } + + private TableColumn tableColumn5 = new TableColumn(); + + public TableColumn getTableColumn5() { + return tableColumn5; + } + + public void setTableColumn5(TableColumn tc) { + this.tableColumn5 = tc; + } + + private Hyperlink lnkNrSeg = new Hyperlink(); + + public Hyperlink getLnkNrSeg() { + return lnkNrSeg; + } + + public void setLnkNrSeg(Hyperlink h) { + this.lnkNrSeg = h; + } + + private TableColumn tableColumn6 = new TableColumn(); + + public TableColumn getTableColumn6() { + return tableColumn6; + } + + public void setTableColumn6(TableColumn tc) { + this.tableColumn6 = tc; + } + + private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); + + public Hyperlink getLnkNomeAcidentadoSeg() { + return lnkNomeAcidentadoSeg; + } + + public void setLnkNomeAcidentadoSeg(Hyperlink h) { + this.lnkNomeAcidentadoSeg = h; + } + + private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridConcluidos1() { + return gridConcluidos1; + } + + public void setGridConcluidos1(HtmlPanelGrid hpg) { + this.gridConcluidos1 = hpg; + } + + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel6() { + return gridPanel6; + } + + public void setGridPanel6(HtmlPanelGrid hpg) { + this.gridPanel6 = hpg; + } + + private StaticText staticText7 = new StaticText(); + + public StaticText getStaticText7() { + return staticText7; + } + + public void setStaticText7(StaticText st) { + this.staticText7 = st; + } + + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel7() { + return gridPanel7; + } + + public void setGridPanel7(HtmlPanelGrid hpg) { + this.gridPanel7 = hpg; + } + + private PanelGroup groupPanel3 = new PanelGroup(); + + public PanelGroup getGroupPanel3() { + return groupPanel3; + } + + public void setGroupPanel3(PanelGroup pg) { + this.groupPanel3 = pg; + } + + private StaticText staticText8 = new StaticText(); + + public StaticText getStaticText8() { + return staticText8; + } + + public void setStaticText8(StaticText st) { + this.staticText8 = st; + } + + private DropDown drpAno = new DropDown(); + + public DropDown getDrpAno() { + return drpAno; + } + + public void setDrpAno(DropDown dd) { + this.drpAno = dd; + } + + private PanelGroup groupPanel4 = new PanelGroup(); + + public PanelGroup getGroupPanel4() { + return groupPanel4; + } + + public void setGroupPanel4(PanelGroup pg) { + this.groupPanel4 = pg; + } + + private StaticText lblMes = new StaticText(); + + public StaticText getLblMes() { + return lblMes; + } + + public void setLblMes(StaticText st) { + this.lblMes = st; + } + + private DropDown drpMes = new DropDown(); + + public DropDown getDrpMes() { + return drpMes; + } + + public void setDrpMes(DropDown dd) { + this.drpMes = dd; + } + + private PanelGroup groupPanel5 = new PanelGroup(); + + public PanelGroup getGroupPanel5() { + return groupPanel5; + } + + public void setGroupPanel5(PanelGroup pg) { + this.groupPanel5 = pg; + } + + private StaticText lblDia = new StaticText(); + + public StaticText getLblDia() { + return lblDia; + } + + public void setLblDia(StaticText st) { + this.lblDia = st; + } + + private DropDown drpDia = new DropDown(); + + public DropDown getDrpDia() { + return drpDia; + } + + public void setDrpDia(DropDown dd) { + this.drpDia = dd; + } + + private PanelGroup groupPanel6 = new PanelGroup(); + + public PanelGroup getGroupPanel6() { + return groupPanel6; + } + + public void setGroupPanel6(PanelGroup pg) { + this.groupPanel6 = pg; + } + + private StaticText staticText9 = new StaticText(); + + public StaticText getStaticText9() { + return staticText9; + } + + public void setStaticText9(StaticText st) { + this.staticText9 = st; + } + + private TextField txtNome = new TextField(); + + public TextField getTxtNome() { + return txtNome; + } + + public void setTxtNome(TextField tf) { + this.txtNome = tf; + } + + private Button butPesquisar = new Button(); + + public Button getButPesquisar() { + return butPesquisar; + } + + public void setButPesquisar(Button b) { + this.butPesquisar = b; + } + + private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel8() { + return gridPanel8; + } + + public void setGridPanel8(HtmlPanelGrid hpg) { + this.gridPanel8 = hpg; + } + + private Table table3 = new Table(); + + public Table getTable3() { + return table3; + } + + public void setTable3(Table t) { + this.table3 = t; + } + + private TableRowGroup tableRowGroup3 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup3() { + return tableRowGroup3; + } + + public void setTableRowGroup3(TableRowGroup trg) { + this.tableRowGroup3 = trg; + } + + private TableColumn tableColumn7 = new TableColumn(); + + public TableColumn getTableColumn7() { + return tableColumn7; + } + + public void setTableColumn7(TableColumn tc) { + this.tableColumn7 = tc; + } + + private Hyperlink lnkDataConcluida = new Hyperlink(); + + public Hyperlink getLnkDataConcluida() { + return lnkDataConcluida; + } + + public void setLnkDataConcluida(Hyperlink h) { + this.lnkDataConcluida = h; + } + + private TableColumn tableColumn8 = new TableColumn(); + + public TableColumn getTableColumn8() { + return tableColumn8; + } + + public void setTableColumn8(TableColumn tc) { + this.tableColumn8 = tc; + } + + private Hyperlink lnkNrConcluida = new Hyperlink(); + + public Hyperlink getLnkNrConcluida() { + return lnkNrConcluida; + } + + public void setLnkNrConcluida(Hyperlink h) { + this.lnkNrConcluida = h; + } + + private TableColumn tableColumn9 = new TableColumn(); + + public TableColumn getTableColumn9() { + return tableColumn9; + } + + public void setTableColumn9(TableColumn tc) { + this.tableColumn9 = tc; + } + + private Hyperlink lnkNomeConcluida = new Hyperlink(); + + public Hyperlink getLnkNomeConcluida() { + return lnkNomeConcluida; + } + + public void setLnkNomeConcluida(Hyperlink h) { + this.lnkNomeConcluida = h; + } + + private StaticText txtSearchMsg = new StaticText(); + + public StaticText getTxtSearchMsg() { + return txtSearchMsg; + } + + public void setTxtSearchMsg(StaticText st) { + this.txtSearchMsg = st; + } + + private TableColumn tableColumn10 = new TableColumn(); + + public TableColumn getTableColumn10() { + return tableColumn10; + } + + public void setTableColumn10(TableColumn tc) { + this.tableColumn10 = tc; + } + + private Hyperlink lnkFase = new Hyperlink(); + + public Hyperlink getLnkFase() { + return lnkFase; + } + + public void setLnkFase(Hyperlink h) { + this.lnkFase = h; + } + + private Hyperlink lnkEstabelecimento = new Hyperlink(); + + public Hyperlink getLnkEstabelecimento() { + return lnkEstabelecimento; + } + + public void setLnkEstabelecimento(Hyperlink h) { + this.lnkEstabelecimento = h; + } + + private TableColumn tableColumn11 = new TableColumn(); + + public TableColumn getTableColumn11() { + return tableColumn11; + } + + public void setTableColumn11(TableColumn tc) { + this.tableColumn11 = tc; + } + + private Hyperlink lnkFaseSeg = new Hyperlink(); + + public Hyperlink getLnkFaseSeg() { + return lnkFaseSeg; + } + + public void setLnkFaseSeg(Hyperlink h) { + this.lnkFaseSeg = h; + } + + private Hyperlink lnkEstabelecimentoSeg = new Hyperlink(); + + public Hyperlink getLnkEstabelecimentoSeg() { + return lnkEstabelecimentoSeg; + } + + public void setLnkEstabelecimentoSeg(Hyperlink h) { + this.lnkEstabelecimentoSeg = h; + } + + + private TableColumn tableColumn12 = new TableColumn(); + + public TableColumn getTableColumn12() { + return tableColumn12; + } + + public void setTableColumn12(TableColumn tc) { + this.tableColumn12 = tc; + } + + private TableColumn tableColumn13 = new TableColumn(); + + public TableColumn getTableColumn13() { + return tableColumn13; + } + + public void setTableColumn13(TableColumn tc) { + this.tableColumn13 = tc; + } + + private TableColumn tableColumn14 = new TableColumn(); + + public TableColumn getTableColumn14() { + return tableColumn14; + } + + public void setTableColumn14(TableColumn tc) { + this.tableColumn14 = tc; + } + + private TableColumn tableColumn15 = new TableColumn(); + + public TableColumn getTableColumn15() { + return tableColumn15; + } + + public void setTableColumn15(TableColumn tc) { + this.tableColumn15 = tc; + } + + private Hyperlink lnkPor = new Hyperlink(); + + public Hyperlink getLnkPor() { + return lnkPor; + } + + public void setLnkPor(Hyperlink h) { + this.lnkPor = h; + } + + private Hyperlink lnkPorSeg = new Hyperlink(); + + public Hyperlink getLnkPorSeg() { + return lnkPorSeg; + } + + public void setLnkPorSeg(Hyperlink h) { + this.lnkPorSeg = h; + } + + private Hyperlink lnkPorConcluida = new Hyperlink(); + + public Hyperlink getLnkPorConcluida() { + return lnkPorConcluida; + } + + public void setLnkPorConcluida(Hyperlink h) { + this.lnkPorConcluida = h; + } + + private Hyperlink lnkEstabConcluida = new Hyperlink(); + + public Hyperlink getLnkEstabConcluida() { + return lnkEstabConcluida; + } + + public void setLnkEstabConcluida(Hyperlink h) { + this.lnkEstabConcluida = h; + } + + private PanelGroup groupPanel7 = new PanelGroup(); + + public PanelGroup getGroupPanel7() { + return groupPanel7; + } + + public void setGroupPanel7(PanelGroup pg) { + this.groupPanel7 = pg; + } + + private StaticText staticText3 = new StaticText(); + + public StaticText getStaticText3() { + return staticText3; + } + + public void setStaticText3(StaticText st) { + this.staticText3 = st; + } + + private TextField txtPor = new TextField(); + + public TextField getTxtPor() { + return txtPor; + } + + public void setTxtPor(TextField tf) { + this.txtPor = tf; + } + + private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel9() { + return gridPanel9; + } + + public void setGridPanel9(HtmlPanelGrid hpg) { + this.gridPanel9 = hpg; + } + + private PanelGroup groupPanel8 = new PanelGroup(); + + public PanelGroup getGroupPanel8() { + return groupPanel8; + } + + public void setGroupPanel8(PanelGroup pg) { + this.groupPanel8 = pg; + } + + private StaticText staticText1 = new StaticText(); + + public StaticText getStaticText1() { + return staticText1; + } + + public void setStaticText1(StaticText st) { + this.staticText1 = st; + } + + private ImageComponent image3 = new ImageComponent(); + + public ImageComponent getImage3() { + return image3; + } + + public void setImage3(ImageComponent ic) { + this.image3 = ic; + } + + private StaticText staticText10 = new StaticText(); + + public StaticText getStaticText10() { + return staticText10; + } + + public void setStaticText10(StaticText st) { + this.staticText10 = st; + } + + private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel10() { + return gridPanel10; + } + + public void setGridPanel10(HtmlPanelGrid hpg) { + this.gridPanel10 = hpg; + } + + private StaticText txtMsg1 = new StaticText(); + + public StaticText getTxtMsg1() { + return txtMsg1; + } + + public void setTxtMsg1(StaticText st) { + this.txtMsg1 = st; + } + + private TableColumn tableColumn16 = new TableColumn(); + + public TableColumn getTableColumn16() { + return tableColumn16; + } + + public void setTableColumn16(TableColumn tc) { + this.tableColumn16 = tc; + } + + private Hyperlink lnkDataAbertura = new Hyperlink(); + + public Hyperlink getLnkDataAbertura() { + return lnkDataAbertura; + } + + public void setLnkDataAbertura(Hyperlink h) { + this.lnkDataAbertura = h; + } + + private TableColumn tableColumn17 = new TableColumn(); + + public TableColumn getTableColumn17() { + return tableColumn17; + } + + public void setTableColumn17(TableColumn tc) { + this.tableColumn17 = tc; + } + + private Hyperlink lnkDataAberturaSeg = new Hyperlink(); + + public Hyperlink getLnkDataAberturaSeg() { + return lnkDataAberturaSeg; + } + + public void setLnkDataAberturaSeg(Hyperlink h) { + this.lnkDataAberturaSeg = h; + } + + private TableColumn tableColumn18 = new TableColumn(); + + public TableColumn getTableColumn18() { + return tableColumn18; + } + + public void setTableColumn18(TableColumn tc) { + this.tableColumn18 = tc; + } + + private TableColumn tableColumn19 = new TableColumn(); + + public TableColumn getTableColumn19() { + return tableColumn19; + } + + public void setTableColumn19(TableColumn tc) { + this.tableColumn19 = tc; + } + + private TableColumn tableColumn20 = new TableColumn(); + + public TableColumn getTableColumn20() { + return tableColumn20; + } + + public void setTableColumn20(TableColumn tc) { + this.tableColumn20 = tc; + } + + private Hyperlink lnkDataAberturaConcluida = new Hyperlink(); + + public Hyperlink getLnkDataAberturaConcluida() { + return lnkDataAberturaConcluida; + } + + public void setLnkDataAberturaConcluida(Hyperlink h) { + this.lnkDataAberturaConcluida = h; + } + private Hyperlink lnkPlanosActuacao = new Hyperlink(); + + public Hyperlink getLnkPlanosActuacao() { + return lnkPlanosActuacao; + } + + public void setLnkPlanosActuacao(Hyperlink h) { + this.lnkPlanosActuacao = h; + } + private StaticText lblUser = new StaticText(); + + public StaticText getLblUser() { + return lblUser; + } + + public void setLblUser(StaticText st) { + this.lblUser = st; + } + + + + private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanelFilterActual() + { + return this.gridPanelFilterActual; + } + public void setGridPanelFilterActual( HtmlPanelGrid pg ) + { + this.gridPanelFilterActual = pg; + } + + private PanelGroup groupPanelFilterActual = new PanelGroup(); + public PanelGroup getGroupPanelFilterActual() + { + return this.groupPanelFilterActual; + } + public void setGroupPanelFilterActual( PanelGroup pg ) + { + this.groupPanelFilterActual = pg; + } + + private StaticText labelFilterNameActual = new StaticText(); + public StaticText getLabelFilterNameActual() + { + return this.labelFilterNameActual; + } + public void setLabelFilterNameActual( StaticText st ) + { + this.labelFilterNameActual = st; + } + + private TextField textFilterNameActual = new TextField(); + public TextField getTextFilterNameActual() + { + return this.textFilterNameActual; + } + public void setTextFilterNameActual( TextField tf ) + { + this.textFilterNameActual = tf; + } + private com.sun.rave.web.ui.component.Calendar calFilterDateActual = new com.sun.rave.web.ui.component.Calendar(); + public com.sun.rave.web.ui.component.Calendar getCalFilterDateActual() + { + return this.calFilterDateActual; + } + public void setCalFilterDateActual( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateActual = c; + } + + private TextField textFilterPORActual = new TextField(); + + public TextField getTextFilterPORActual() { + return textFilterPORActual; + } + + public void setTextFilterPORActual(TextField textFilterPORActual) { + this.textFilterPORActual = textFilterPORActual; + } + + + private Button buttonFilterActual = new Button(); + public Button getButtonFilterActual() + { + return this.buttonFilterActual; + } + public void setButtonFilterActual( Button b ) + { + this.buttonFilterActual = b; + } + + private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanelFilterSeg() + { + return this.gridPanelFilterSeg; + } + public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + { + this.gridPanelFilterSeg = pg; + } + + private PanelGroup groupPanelFilterSeg = new PanelGroup(); + public PanelGroup getGroupPanelFilterSeg() + { + return this.groupPanelFilterSeg; + } + public void setGroupPanelFilterSeg( PanelGroup pg ) + { + this.groupPanelFilterSeg = pg; + } + + private StaticText labelFilterNameSeg = new StaticText(); + public StaticText getLabelFilterNameSeg() + { + return this.labelFilterNameSeg; + } + public void setLabelFilterNameSeg( StaticText st ) + { + this.labelFilterNameSeg = st; + } + + private TextField textFilterNameSeg = new TextField(); + public TextField getTextFilterNameSeg() + { + return this.textFilterNameSeg; + } + public void setTextFilterNameSeg( TextField tf ) + { + this.textFilterNameSeg = tf; + } + + private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); + public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + { + return this.calFilterDateSeg; + } + public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateSeg = c; + } + + private TextField textFilterPORSeg = new TextField(); + + public TextField getTextFilterPORSeg() { + return textFilterPORSeg; + } + + public void setTextFilterPORSeg(TextField textFilterPORSeg) { + this.textFilterPORSeg = textFilterPORSeg; + } + + + private Button buttonFilterSeg = new Button(); + public Button getButtonFilterSeg() + { + return this.buttonFilterSeg; + } + public void setButtonFilterSeg( Button b ) + { + this.buttonFilterSeg = b; + } + + + private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + //
+ + /** + *

Construct a new Page bean instance.

+ */ + public FormRH() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("FormRH Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + + if (!getSessionBean1().isLoggedIn()) { + try { + getExternalContext().redirect("Login.jsp"); + } catch(Exception e) { + // . . . handle exception . . . + } + } + + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + public void prerender() { + System.out.println("=== FORM_RH ==="); + lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); + + String responsavel_loja = getSessionBean1().getCurrentUser().getResponsavel_loja(); + if(responsavel_loja.matches("n")) + { + lnkPlanosActuacao.setDisabled(true); + } +// if(getSessionBean1().getCurrentUser().getTipo().intValue() == 7) // director rh +// { +// //////stSep.setText("|"); +// } +// else //rh +// { +// //////stSep.setText(" "); +// //////lnkNewUser.setRendered(false); +// stSep1.setRendered(false); +// } + + + HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom(referer); + if(!pageFrom.matches("FormRH.jsp")) + { + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //lblActivos.setRendered(true); + table1.setRendered(true); + + //ArrayList actuaisList = adp.getAnalisesActuaisList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); + ArrayList actuaisList = adp.getAnalisesActuaisRhList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), responsavel_loja); + getSessionBean1().getAnalisesActualDataProvider().setList(actuaisList); + } + catch(Exception ex) + { + //lblActivos.setRendered(false); + table1.setRendered(false); + ErrorLogger.logException( ex ); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //lblActivos.setRendered(true); + table2.setRendered(true); + + ArrayList seguimentoList = adp.getAnalisesSeguimentoRhList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), responsavel_loja); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList(seguimentoList); + } + catch(Exception ex) + { + //lblActivos.setRendered(false); + table2.setRendered(false); + ErrorLogger.logException( ex ); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //lblActivos.setRendered(true); + table3.setRendered(true); + + ArrayList concluidasList = adp.getAnalisesConcluidasList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); + getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); + } + catch(Exception ex) + { + //lblActivos.setRendered(false); + table3.setRendered(false); + ErrorLogger.logException( ex ); + } + fillAnoDropDown(); + } + + txtMsg1.setText(getSessionBean1().getMsg()); + getSessionBean1().setMsg(""); + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), true ); + return null; + } + + public String butNovaAnalise_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + return null; + } + + public String lnkDataAcidente_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormRH"); + return "analise_acidente"; + } + + public String lnkDataAbertura_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormRH"); + return "analise_acidente"; + } + + public String lnkNr_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormRH"); + return "analise_acidente"; + } + + public String lnkNomeAcidentado_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormRH"); + return "analise_acidente"; + } + + private AnaliseAcidente getTableActivosRowData() + { + RowKey rk = tableRowGroup1.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesActualDataProvider provider = (AnalisesActualDataProvider) tableRowGroup1.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + public String lnkDataAcidenteSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormRH"); + return "view_analise"; + } + + public String lnkDataAberturaSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormRH"); + return "view_analise"; + } + + public String lnkNrSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormRH"); + return "view_analise"; + } + + + public String lnkNomeAcidentadoSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormRH"); + return "view_analise"; + } + + private AnaliseAcidente getTableSeguimentoRowData() + { + RowKey rk = tableRowGroup2.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup2.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + private AnaliseAcidente getTableConcluidasRowData() + { + RowKey rk = tableRowGroup3.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup3.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + public void drpAno_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + Object ano = event.getNewValue(); + if(ano == null) + { + lblMes.setVisible(false); + drpMes.setVisible(false); + lblDia.setVisible(false); + drpDia.setVisible(false); + } + else + { + lblMes.setVisible(true); + drpMes.setVisible(true); + fillMesDropDown(); + } + } + + public void drpMes_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + Object mes = event.getNewValue(); + if(mes == null) + { + lblDia.setVisible(false); + drpDia.setVisible(false); + } + else + { + lblDia.setVisible(true); + drpDia.setVisible(true); + //fillDiaDropDown(); + } + } + + public void drpDia_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public String butPesquisar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + Object obAno = null; + Object obMes = null; + Object obDia = null; + try + { + obAno = drpAno.getSelected(); + obMes = drpMes.getSelected(); + obDia = drpDia.getSelected(); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + Integer ano = null; + Integer mes = null; + Integer dia = null; + + if(obAno != null) + { + ano = (Integer) obAno; + } + + if(obMes != null) + { + mes = (Integer) obMes; + } + + if(obDia != null) + { + dia = (Integer) obDia; + } + + String por = null; + if(txtPor.getText() != null) + { + por = (String) txtPor.getText(); + if(por.trim().length() == 0) + { + por = null; + } + } + + String nome = null; + if(txtNome.getText() != null) + { + nome = (String) txtNome.getText(); + if(nome.trim().length() == 0) + { + nome = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); + ArrayList concluidasList = adp.searchAanalisesConcluidasList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), + ano, mes, dia, por, nome, null ); + + table3.setRendered(true); + txtSearchMsg.setRendered(false); + getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); + + + } + catch(Exception ex) + { + table3.setRendered(false); + txtSearchMsg.setRendered(true); + txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !"); + ErrorLogger.logException( ex ); + } + + return null; + } + +// private String getPageFrom(String referer) +// { +// String pageFrom = referer.substring(referer.lastIndexOf("/")+1); +// return pageFrom; +// } + + private void fillAnoDropDown() + { +// ArrayList anosList = new ArrayList(); +// for(int ano=2007; ano<2051; ano++) +// { +// anosList.add(new Integer(ano)); +// } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList anosList = adp.getAnosListFromAnalises(); + com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1]; + anoOptions[0] = new Option("", ""); + ListIterator iter = anosList.listIterator(); + int i = 1; + while(iter.hasNext()) + { + Integer ano = (Integer) iter.next(); + + anoOptions[i] = new Option(ano, ano.toString()); + i++; + } + getSessionBean1().setAnoOptions(anoOptions); + Calendar cal = new GregorianCalendar(); + int year = cal.get(Calendar.YEAR); + //drpAno.setSelected( new Integer(year) ); + + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + } + + + private void fillMesDropDown() + { + com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13]; + mesOptions[0] = new Option("", ""); + mesOptions[1] = new Option(new Integer(1), "Janeiro"); + mesOptions[2] = new Option(new Integer(2), "Fevereiro"); + mesOptions[3] = new Option(new Integer(3), "Março"); + mesOptions[4] = new Option(new Integer(4), "Abril"); + mesOptions[5] = new Option(new Integer(5), "Maio"); + mesOptions[6] = new Option(new Integer(6), "Junho"); + mesOptions[7] = new Option(new Integer(7), "Julho"); + mesOptions[8] = new Option(new Integer(8), "Agosto"); + mesOptions[9] = new Option(new Integer(9), "Setembro"); + mesOptions[10] = new Option(new Integer(10), "Outubro"); + mesOptions[11] = new Option(new Integer(11), "Novembro"); + mesOptions[12] = new Option(new Integer(12), "Dezembro"); + getSessionBean1().setMesOptions(mesOptions); + Calendar cal = new GregorianCalendar(); + int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ... + //drpMes.setSelected( new Integer(month+1) ); + } + + private void fillDiaDropDown() + { +// int ano = ( (Integer)drpAno.getSelected() ).intValue(); +// int mes = ( (Integer)drpMes.getSelected() ).intValue(); +// int dias = 0; +// switch (mes) { +// case 1: dias=31; break; +// case 2: +// GregorianCalendar cal = new GregorianCalendar(); +// if(cal.isLeapYear(ano)) +// { +// dias = 29; +// } +// else +// { +// dias = 28; +// } +// break; +// case 3: dias=31; break; +// case 4: dias=30; break; +// case 5: dias=31; break; +// case 6: dias=30; break; +// case 7: dias=31; break; +// case 8: dias=31; break; +// case 9: dias=30; break; +// case 10: dias=31; break; +// case 11: dias=30; break; +// case 12: dias=31; break; +// default: System.out.println("Invalid month.");break; +// } +// +// ArrayList diasList = new ArrayList(); +// for(int dia=1; diaPage bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class FormSeguranca extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridBase = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridBase() { + return gridBase; + } + + public void setGridBase(HtmlPanelGrid hpg) { + this.gridBase = hpg; + } + + private HtmlPanelGrid gridLayout = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayout() { + return gridLayout; + } + + public void setGridLayout(HtmlPanelGrid hpg) { + this.gridLayout = hpg; + } + + private HtmlPanelGrid gridLayoutTop = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayoutTop() { + return gridLayoutTop; + } + + public void setGridLayoutTop(HtmlPanelGrid hpg) { + this.gridLayoutTop = hpg; + } + + private HtmlPanelGrid gridActual = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridActual() { + return gridActual; + } + + public void setGridActual(HtmlPanelGrid hpg) { + this.gridActual = hpg; + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private StaticText staticText1 = new StaticText(); + + public StaticText getStaticText1() { + return staticText1; + } + + public void setStaticText1(StaticText st) { + this.staticText1 = st; + } + + private HtmlPanelGrid gridSeguimento = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridSeguimento() { + return gridSeguimento; + } + + public void setGridSeguimento(HtmlPanelGrid hpg) { + this.gridSeguimento = hpg; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private StaticText staticText2 = new StaticText(); + + public StaticText getStaticText2() { + return staticText2; + } + + public void setStaticText2(StaticText st) { + this.staticText2 = st; + } + + private HtmlPanelGrid gridConcluidos = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridConcluidos() { + return gridConcluidos; + } + + public void setGridConcluidos(HtmlPanelGrid hpg) { + this.gridConcluidos = hpg; + } + + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel3() { + return gridPanel3; + } + + public void setGridPanel3(HtmlPanelGrid hpg) { + this.gridPanel3 = hpg; + } + + private StaticText staticText3 = new StaticText(); + + public StaticText getStaticText3() { + return staticText3; + } + + public void setStaticText3(StaticText st) { + this.staticText3 = st; + } + + private Link link2 = new Link(); + + public Link getLink2() { + return link2; + } + + public void setLink2(Link l) { + this.link2 = l; + } + + private Button butNovaAnalise = new Button(); + + public Button getButNovaAnalise() { + return butNovaAnalise; + } + + public void setButNovaAnalise(Button b) { + this.butNovaAnalise = b; + } + + private StaticText staticText4 = new StaticText(); + + public StaticText getStaticText4() { + return staticText4; + } + + public void setStaticText4(StaticText st) { + this.staticText4 = st; + } + + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel4() { + return gridPanel4; + } + + public void setGridPanel4(HtmlPanelGrid hpg) { + this.gridPanel4 = hpg; + } + + private Table table1 = new Table(); + + public Table getTable1() { + return table1; + } + + public void setTable1(Table t) { + this.table1 = t; + } + + private TableRowGroup tableRowGroup1 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup1() { + return tableRowGroup1; + } + + public void setTableRowGroup1(TableRowGroup trg) { + this.tableRowGroup1 = trg; + } + + private TableColumn tableColumn1 = new TableColumn(); + + public TableColumn getTableColumn1() { + return tableColumn1; + } + + public void setTableColumn1(TableColumn tc) { + this.tableColumn1 = tc; + } + + private TableColumn tableColumn2 = new TableColumn(); + + public TableColumn getTableColumn2() { + return tableColumn2; + } + + public void setTableColumn2(TableColumn tc) { + this.tableColumn2 = tc; + } + + private TableColumn tableColumn3 = new TableColumn(); + + public TableColumn getTableColumn3() { + return tableColumn3; + } + + public void setTableColumn3(TableColumn tc) { + this.tableColumn3 = tc; + } + + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel5() { + return gridPanel5; + } + + public void setGridPanel5(HtmlPanelGrid hpg) { + this.gridPanel5 = hpg; + } + + private Table table2 = new Table(); + + public Table getTable2() { + return table2; + } + + public void setTable2(Table t) { + this.table2 = t; + } + + private TableRowGroup tableRowGroup2 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup2() { + return tableRowGroup2; + } + + public void setTableRowGroup2(TableRowGroup trg) { + this.tableRowGroup2 = trg; + } + + private TableColumn tableColumn4 = new TableColumn(); + + public TableColumn getTableColumn4() { + return tableColumn4; + } + + public void setTableColumn4(TableColumn tc) { + this.tableColumn4 = tc; + } + + private TableColumn tableColumn5 = new TableColumn(); + + public TableColumn getTableColumn5() { + return tableColumn5; + } + + public void setTableColumn5(TableColumn tc) { + this.tableColumn5 = tc; + } + + private TableColumn tableColumn6 = new TableColumn(); + + public TableColumn getTableColumn6() { + return tableColumn6; + } + + public void setTableColumn6(TableColumn tc) { + this.tableColumn6 = tc; + } + + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel6() { + return gridPanel6; + } + + public void setGridPanel6(HtmlPanelGrid hpg) { + this.gridPanel6 = hpg; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private StaticText staticText11 = new StaticText(); + + public StaticText getStaticText11() { + return staticText11; + } + + public void setStaticText11(StaticText st) { + this.staticText11 = st; + } + + private DropDown drpAno = new DropDown(); + + public DropDown getDrpAno() { + return drpAno; + } + + public void setDrpAno(DropDown dd) { + this.drpAno = dd; + } + + private PanelGroup groupPanel2 = new PanelGroup(); + + public PanelGroup getGroupPanel2() { + return groupPanel2; + } + + public void setGroupPanel2(PanelGroup pg) { + this.groupPanel2 = pg; + } + + private StaticText lblMes = new StaticText(); + + public StaticText getLblMes() { + return lblMes; + } + + public void setLblMes(StaticText st) { + this.lblMes = st; + } + + private DropDown drpMes = new DropDown(); + + public DropDown getDrpMes() { + return drpMes; + } + + public void setDrpMes(DropDown dd) { + this.drpMes = dd; + } + + private PanelGroup groupPanel3 = new PanelGroup(); + + public PanelGroup getGroupPanel3() { + return groupPanel3; + } + + public void setGroupPanel3(PanelGroup pg) { + this.groupPanel3 = pg; + } + + private StaticText lblDia = new StaticText(); + + public StaticText getLblDia() { + return lblDia; + } + + public void setLblDia(StaticText st) { + this.lblDia = st; + } + + private DropDown drpDia = new DropDown(); + + public DropDown getDrpDia() { + return drpDia; + } + + public void setDrpDia(DropDown dd) { + this.drpDia = dd; + } + + private PanelGroup groupPanel4 = new PanelGroup(); + + public PanelGroup getGroupPanel4() { + return groupPanel4; + } + + public void setGroupPanel4(PanelGroup pg) { + this.groupPanel4 = pg; + } + + private StaticText staticText14 = new StaticText(); + + public StaticText getStaticText14() { + return staticText14; + } + + public void setStaticText14(StaticText st) { + this.staticText14 = st; + } + + private TextField txtNome = new TextField(); + + public TextField getTxtNome() { + return txtNome; + } + + public void setTxtNome(TextField tf) { + this.txtNome = tf; + } + + private Button butPesquisar = new Button(); + + public Button getButPesquisar() { + return butPesquisar; + } + + public void setButPesquisar(Button b) { + this.butPesquisar = b; + } + + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel7() { + return gridPanel7; + } + + public void setGridPanel7(HtmlPanelGrid hpg) { + this.gridPanel7 = hpg; + } + + private Table table3 = new Table(); + + public Table getTable3() { + return table3; + } + + public void setTable3(Table t) { + this.table3 = t; + } + + private TableRowGroup tableRowGroup3 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup3() { + return tableRowGroup3; + } + + public void setTableRowGroup3(TableRowGroup trg) { + this.tableRowGroup3 = trg; + } + + private TableColumn tableColumn7 = new TableColumn(); + + public TableColumn getTableColumn7() { + return tableColumn7; + } + + public void setTableColumn7(TableColumn tc) { + this.tableColumn7 = tc; + } + + private TableColumn tableColumn8 = new TableColumn(); + + public TableColumn getTableColumn8() { + return tableColumn8; + } + + public void setTableColumn8(TableColumn tc) { + this.tableColumn8 = tc; + } + + private TableColumn tableColumn9 = new TableColumn(); + + public TableColumn getTableColumn9() { + return tableColumn9; + } + + public void setTableColumn9(TableColumn tc) { + this.tableColumn9 = tc; + } + + private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel8() { + return gridPanel8; + } + + public void setGridPanel8(HtmlPanelGrid hpg) { + this.gridPanel8 = hpg; + } + + private PanelGroup groupPanel5 = new PanelGroup(); + + public PanelGroup getGroupPanel5() { + return groupPanel5; + } + + public void setGroupPanel5(PanelGroup pg) { + this.groupPanel5 = pg; + } + + private ImageComponent image1 = new ImageComponent(); + + public ImageComponent getImage1() { + return image1; + } + + public void setImage1(ImageComponent ic) { + this.image1 = ic; + } + + private ImageComponent image2 = new ImageComponent(); + + public ImageComponent getImage2() { + return image2; + } + + public void setImage2(ImageComponent ic) { + this.image2 = ic; + } + + private Hyperlink lnkDataAcidente = new Hyperlink(); + + public Hyperlink getLnkDataAcidente() { + return lnkDataAcidente; + } + + public void setLnkDataAcidente(Hyperlink h) { + this.lnkDataAcidente = h; + } + + private Hyperlink lnkNr = new Hyperlink(); + + public Hyperlink getLnkNr() { + return lnkNr; + } + + public void setLnkNr(Hyperlink h) { + this.lnkNr = h; + } + + private Hyperlink lnkNomeAcidentado = new Hyperlink(); + + public Hyperlink getLnkNomeAcidentado() { + return lnkNomeAcidentado; + } + + public void setLnkNomeAcidentado(Hyperlink h) { + this.lnkNomeAcidentado = h; + } + + private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); + + public Hyperlink getLnkDataAcidenteSeg() { + return lnkDataAcidenteSeg; + } + + public void setLnkDataAcidenteSeg(Hyperlink h) { + this.lnkDataAcidenteSeg = h; + } + + private Hyperlink lnkNrSeg = new Hyperlink(); + + public Hyperlink getLnkNrSeg() { + return lnkNrSeg; + } + + public void setLnkNrSeg(Hyperlink h) { + this.lnkNrSeg = h; + } + + private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); + + public Hyperlink getLnkNomeAcidentadoSeg() { + return lnkNomeAcidentadoSeg; + } + + public void setLnkNomeAcidentadoSeg(Hyperlink h) { + this.lnkNomeAcidentadoSeg = h; + } + + private Hyperlink lnkDataConcluida = new Hyperlink(); + + public Hyperlink getLnkDataConcluida() { + return lnkDataConcluida; + } + + public void setLnkDataConcluida(Hyperlink h) { + this.lnkDataConcluida = h; + } + + private Hyperlink lnkNrConcluida = new Hyperlink(); + + public Hyperlink getLnkNrConcluida() { + return lnkNrConcluida; + } + + public void setLnkNrConcluida(Hyperlink h) { + this.lnkNrConcluida = h; + } + + private Hyperlink lnkNomeConcluida = new Hyperlink(); + + public Hyperlink getLnkNomeConcluida() { + return lnkNomeConcluida; + } + + public void setLnkNomeConcluida(Hyperlink h) { + this.lnkNomeConcluida = h; + } + + private StaticText txtSearchMsg = new StaticText(); + + public StaticText getTxtSearchMsg() { + return txtSearchMsg; + } + + public void setTxtSearchMsg(StaticText st) { + this.txtSearchMsg = st; + } + + private TableColumn tableColumn10 = new TableColumn(); + + public TableColumn getTableColumn10() { + return tableColumn10; + } + + public void setTableColumn10(TableColumn tc) { + this.tableColumn10 = tc; + } + + private TableColumn tableColumn11 = new TableColumn(); + + public TableColumn getTableColumn11() { + return tableColumn11; + } + + public void setTableColumn11(TableColumn tc) { + this.tableColumn11 = tc; + } + + private Hyperlink lnkFase = new Hyperlink(); + + public Hyperlink getLnkFase() { + return lnkFase; + } + + public void setLnkFase(Hyperlink h) { + this.lnkFase = h; + } + + private Hyperlink lnkEstabelecimento = new Hyperlink(); + + public Hyperlink getLnkEstabelecimento() { + return lnkEstabelecimento; + } + + public void setLnkEstabelecimento(Hyperlink h) { + this.lnkEstabelecimento = h; + } + + private Hyperlink lnkFaseSeg = new Hyperlink(); + + public Hyperlink getLnkFaseSeg() { + return lnkFaseSeg; + } + + public void setLnkFaseSeg(Hyperlink h) { + this.lnkFaseSeg = h; + } + + private Hyperlink lnkEstabelecimentoSeg = new Hyperlink(); + + public Hyperlink getLnkEstabelecimentoSeg() { + return lnkEstabelecimentoSeg; + } + + public void setLnkEstabelecimentoSeg(Hyperlink h) { + this.lnkEstabelecimentoSeg = h; + } + + private TableColumn tableColumn12 = new TableColumn(); + + public TableColumn getTableColumn12() { + return tableColumn12; + } + + public void setTableColumn12(TableColumn tc) { + this.tableColumn12 = tc; + } + + private TableColumn tableColumn13 = new TableColumn(); + + public TableColumn getTableColumn13() { + return tableColumn13; + } + + public void setTableColumn13(TableColumn tc) { + this.tableColumn13 = tc; + } + + private TableColumn tableColumn14 = new TableColumn(); + + public TableColumn getTableColumn14() { + return tableColumn14; + } + + public void setTableColumn14(TableColumn tc) { + this.tableColumn14 = tc; + } + + private TableColumn tableColumn15 = new TableColumn(); + + public TableColumn getTableColumn15() { + return tableColumn15; + } + + public void setTableColumn15(TableColumn tc) { + this.tableColumn15 = tc; + } + + private Hyperlink lnkPor = new Hyperlink(); + + public Hyperlink getLnkPor() { + return lnkPor; + } + + public void setLnkPor(Hyperlink h) { + this.lnkPor = h; + } + + private Hyperlink lnkPorSeg = new Hyperlink(); + + public Hyperlink getLnkPorSeg() { + return lnkPorSeg; + } + + public void setLnkPorSeg(Hyperlink h) { + this.lnkPorSeg = h; + } + + private Hyperlink lnkPorConcluida = new Hyperlink(); + + public Hyperlink getLnkPorConcluida() { + return lnkPorConcluida; + } + + public void setLnkPorConcluida(Hyperlink h) { + this.lnkPorConcluida = h; + } + + private Hyperlink lnkEstabConcluida = new Hyperlink(); + + public Hyperlink getLnkEstabConcluida() { + return lnkEstabConcluida; + } + + public void setLnkEstabConcluida(Hyperlink h) { + this.lnkEstabConcluida = h; + } + + private PanelGroup groupPanel7 = new PanelGroup(); + + public PanelGroup getGroupPanel7() { + return groupPanel7; + } + + public void setGroupPanel7(PanelGroup pg) { + this.groupPanel7 = pg; + } + + private StaticText staticText5 = new StaticText(); + + public StaticText getStaticText5() { + return staticText5; + } + + public void setStaticText5(StaticText st) { + this.staticText5 = st; + } + + private TextField txtPor = new TextField(); + + public TextField getTxtPor() { + return txtPor; + } + + public void setTxtPor(TextField tf) { + this.txtPor = tf; + } + + private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel9() { + return gridPanel9; + } + + public void setGridPanel9(HtmlPanelGrid hpg) { + this.gridPanel9 = hpg; + } + + private PanelGroup groupPanel8 = new PanelGroup(); + + public PanelGroup getGroupPanel8() { + return groupPanel8; + } + + public void setGroupPanel8(PanelGroup pg) { + this.groupPanel8 = pg; + } + + private StaticText staticText6 = new StaticText(); + + public StaticText getStaticText6() { + return staticText6; + } + + public void setStaticText6(StaticText st) { + this.staticText6 = st; + } + + private ImageComponent image3 = new ImageComponent(); + + public ImageComponent getImage3() { + return image3; + } + + public void setImage3(ImageComponent ic) { + this.image3 = ic; + } + + private StaticText staticText7 = new StaticText(); + + public StaticText getStaticText7() { + return staticText7; + } + + public void setStaticText7(StaticText st) { + this.staticText7 = st; + } + + private StaticText staticText8 = new StaticText(); + + public StaticText getStaticText8() { + return staticText8; + } + + public void setStaticText8(StaticText st) { + this.staticText8 = st; + } + + private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel10() { + return gridPanel10; + } + + public void setGridPanel10(HtmlPanelGrid hpg) { + this.gridPanel10 = hpg; + } + + private StaticText txtMsg = new StaticText(); + + public StaticText getTxtMsg() { + return txtMsg; + } + + public void setTxtMsg(StaticText st) { + this.txtMsg = st; + } + + private TableColumn tableColumn16 = new TableColumn(); + + public TableColumn getTableColumn16() { + return tableColumn16; + } + + public void setTableColumn16(TableColumn tc) { + this.tableColumn16 = tc; + } + + private Hyperlink lnkDataAbertura = new Hyperlink(); + + public Hyperlink getLnkDataAbertura() { + return lnkDataAbertura; + } + + public void setLnkDataAbertura(Hyperlink h) { + this.lnkDataAbertura = h; + } + + private TableColumn tableColumn17 = new TableColumn(); + + public TableColumn getTableColumn17() { + return tableColumn17; + } + + public void setTableColumn17(TableColumn tc) { + this.tableColumn17 = tc; + } + + private Hyperlink lnkDataAberturaSeg = new Hyperlink(); + + public Hyperlink getLnkDataAberturaSeg() { + return lnkDataAberturaSeg; + } + + public void setLnkDataAberturaSeg(Hyperlink h) { + this.lnkDataAberturaSeg = h; + } + + private TableColumn tableColumn18 = new TableColumn(); + + public TableColumn getTableColumn18() { + return tableColumn18; + } + + public void setTableColumn18(TableColumn tc) { + this.tableColumn18 = tc; + } + + + private TableColumn tableColumn19 = new TableColumn(); + + public TableColumn getTableColumn19() { + return tableColumn19; + } + + public void setTableColumn19(TableColumn tc) { + this.tableColumn19 = tc; + } + + private TableColumn tableColumn20 = new TableColumn(); + + public TableColumn getTableColumn20() { + return tableColumn20; + } + + public void setTableColumn20(TableColumn tc) { + this.tableColumn20 = tc; + } + + private Hyperlink lnkDataAberturaConcluida = new Hyperlink(); + + public Hyperlink getLnkDataAberturaConcluida() { + return lnkDataAberturaConcluida; + } + + public void setLnkDataAberturaConcluida(Hyperlink h) { + this.lnkDataAberturaConcluida = h; + } + private StaticText lblUser = new StaticText(); + + public StaticText getLblUser() { + return lblUser; + } + + public void setLblUser(StaticText st) { + this.lblUser = st; + } + private Hyperlink lnkPlanosActuacao = new Hyperlink(); + + public Hyperlink getLnkPlanosActuacao() { + return lnkPlanosActuacao; + } + + public void setLnkPlanosActuacao(Hyperlink h) { + this.lnkPlanosActuacao = h; + } + + + private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanelFilterSeg() + { + return this.gridPanelFilterSeg; + } + public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + { + this.gridPanelFilterSeg = pg; + } + + private PanelGroup groupPanelFilterSeg = new PanelGroup(); + public PanelGroup getGroupPanelFilterSeg() + { + return this.groupPanelFilterSeg; + } + public void setGroupPanelFilterSeg( PanelGroup pg ) + { + this.groupPanelFilterSeg = pg; + } + + private StaticText labelFilterNameSeg = new StaticText(); + public StaticText getLabelFilterNameSeg() + { + return this.labelFilterNameSeg; + } + public void setLabelFilterNameSeg( StaticText st ) + { + this.labelFilterNameSeg = st; + } + + private TextField textFilterNameSeg = new TextField(); + public TextField getTextFilterNameSeg() + { + return this.textFilterNameSeg; + } + public void setTextFilterNameSeg( TextField tf ) + { + this.textFilterNameSeg = tf; + } + + private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); + public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + { + return this.calFilterDateSeg; + } + public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateSeg = c; + } + + private TextField textFilterPORSeg = new TextField(); + + public TextField getTextFilterPORSeg() { + return textFilterPORSeg; + } + + public void setTextFilterPORSeg(TextField textFilterPORSeg) { + this.textFilterPORSeg = textFilterPORSeg; + } + + + private Button buttonFilterSeg = new Button(); + public Button getButtonFilterSeg() + { + return this.buttonFilterSeg; + } + public void setButtonFilterSeg( Button b ) + { + this.buttonFilterSeg = b; + } + + + private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanelFilterActual() + { + return this.gridPanelFilterActual; + } + public void setGridPanelFilterActual( HtmlPanelGrid pg ) + { + this.gridPanelFilterActual = pg; + } + + private PanelGroup groupPanelFilterActual = new PanelGroup(); + public PanelGroup getGroupPanelFilterActual() + { + return this.groupPanelFilterActual; + } + public void setGroupPanelFilterActual( PanelGroup pg ) + { + this.groupPanelFilterActual = pg; + } + + private StaticText labelFilterNameActual = new StaticText(); + public StaticText getLabelFilterNameActual() + { + return this.labelFilterNameActual; + } + public void setLabelFilterNameActual( StaticText st ) + { + this.labelFilterNameActual = st; + } + + private TextField textFilterNameActual = new TextField(); + public TextField getTextFilterNameActual() + { + return this.textFilterNameActual; + } + public void setTextFilterNameActual( TextField tf ) + { + this.textFilterNameActual = tf; + } + + private com.sun.rave.web.ui.component.Calendar calFilterDateActual = new com.sun.rave.web.ui.component.Calendar(); + public com.sun.rave.web.ui.component.Calendar getCalFilterDateActual() + { + return this.calFilterDateActual; + } + public void setCalFilterDateActual( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateActual = c; + } + + private TextField textFilterPORActual = new TextField(); + + public TextField getTextFilterPORActual() { + return textFilterPORActual; + } + + public void setTextFilterPORActual(TextField textFilterPORActual) { + this.textFilterPORActual = textFilterPORActual; + } + + + private Button buttonFilterActual = new Button(); + public Button getButtonFilterActual() + { + return this.buttonFilterActual; + } + public void setButtonFilterActual( Button b ) + { + this.buttonFilterActual = b; + } + + private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + //
+ + /** + *

Construct a new Page bean instance.

+ */ + public FormSeguranca() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("FormSeguranca Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + + if (!getSessionBean1().isLoggedIn()) { + try { + getExternalContext().redirect("Login.jsp"); + } catch(Exception e) { + // . . . handle exception . . . + } + } + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + public void preprocess() { + + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + public void prerender() { + System.out.println("=== FORM_SEGURANCA ==="); + lblUser.setText( getSessionBean1().getCurrentUser().getLogin()); + String responsavel_loja = getSessionBean1().getCurrentUser().getResponsavel_loja(); + if(responsavel_loja.matches("n")) + { + lnkPlanosActuacao.setDisabled(true); + } + + + HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom(referer); + if( ! pageFrom.matches( "FormSeguranca.jsp" ) ) + { + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //lblActivos.setRendered(true); + table1.setRendered(true); + + //ArrayList actuaisList = adp.getAnalisesActuaisList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), new Integer(1)); + ArrayList actuaisList = adp.getAnalisesActuaisSegList( getSessionBean1().getCurrentUser().getEstabelecimento_id(), responsavel_loja ); + getSessionBean1().getAnalisesActualDataProvider().setList(actuaisList); + } + catch(Exception ex) + { + //lblActivos.setRendered(false); + table1.setRendered(false); + ErrorLogger.logException( ex ); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //lblActivos.setRendered(true); + table2.setRendered( true ); + + ArrayList seguimentoList = adp.getAnalisesSeguimentoSegList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), responsavel_loja ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch(Exception ex) + { + //lblActivos.setRendered(false); + table2.setRendered(false); + ErrorLogger.logException( ex ); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //lblActivos.setRendered(true); + table3.setRendered(true); + + ArrayList concluidasList = adp.getAnalisesConcluidasList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); + getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); + } + catch(Exception ex) + { + //lblActivos.setRendered(false); + table3.setRendered(false); + ErrorLogger.logException( ex ); + } + fillAnoDropDown(); + } + txtMsg.setText(getSessionBean1().getMsg()); + getSessionBean1().setMsg(""); + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + public void destroy() { + } + + +// private void fillDateDropDowns() +// { +// fillAnoDropDown(); +// //fillMesDropDown(); +// //fillDiaDropDown(); +// } + + private void fillAnoDropDown() + { +// ArrayList anosList = new ArrayList(); +// for(int ano=2007; ano<2051; ano++) +// { +// anosList.add(new Integer(ano)); +// } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList anosList = adp.getAnosListFromAnalises(); + com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1]; + anoOptions[0] = new Option("", ""); + ListIterator iter = anosList.listIterator(); + int i = 1; + while(iter.hasNext()) + { + Integer ano = (Integer) iter.next(); + + anoOptions[i] = new Option(ano, ano.toString()); + i++; + } + getSessionBean1().setAnoOptions(anoOptions); + Calendar cal = new GregorianCalendar(); + int year = cal.get(Calendar.YEAR); + //drpAno.setSelected( new Integer(year) ); + + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + } + + private void fillMesDropDown() + { + com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13]; + mesOptions[0] = new Option("", ""); + mesOptions[1] = new Option(new Integer(1), "Janeiro"); + mesOptions[2] = new Option(new Integer(2), "Fevereiro"); + mesOptions[3] = new Option(new Integer(3), "Março"); + mesOptions[4] = new Option(new Integer(4), "Abril"); + mesOptions[5] = new Option(new Integer(5), "Maio"); + mesOptions[6] = new Option(new Integer(6), "Junho"); + mesOptions[7] = new Option(new Integer(7), "Julho"); + mesOptions[8] = new Option(new Integer(8), "Agosto"); + mesOptions[9] = new Option(new Integer(9), "Setembro"); + mesOptions[10] = new Option(new Integer(10), "Outubro"); + mesOptions[11] = new Option(new Integer(11), "Novembro"); + mesOptions[12] = new Option(new Integer(12), "Dezembro"); + getSessionBean1().setMesOptions(mesOptions); + Calendar cal = new GregorianCalendar(); + int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ... + //drpMes.setSelected( new Integer(month+1) ); + } + + private void fillDiaDropDown() + { + int ano = ( (Integer)drpAno.getSelected() ).intValue(); + int mes = ( (Integer)drpMes.getSelected() ).intValue(); + int dias = 0; + switch (mes) { + case 1: dias=31; break; + case 2: + GregorianCalendar cal = new GregorianCalendar(); + if(cal.isLeapYear(ano)) + { + dias = 29; + } + else + { + dias = 28; + } + break; + case 3: dias=31; break; + case 4: dias=30; break; + case 5: dias=31; break; + case 6: dias=30; break; + case 7: dias=31; break; + case 8: dias=31; break; + case 9: dias=30; break; + case 10: dias=31; break; + case 11: dias=30; break; + case 12: dias=31; break; + default: System.out.println("Invalid month.");break; + } + + ArrayList diasList = new ArrayList(); + for(int dia=1; diaReturn a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), true ); + return null; + } + + public void drpAno_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + Object ano = event.getNewValue(); + if(ano == null) + { + lblMes.setVisible(false); + drpMes.setVisible(false); + lblDia.setVisible(false); + drpDia.setVisible(false); + } + else + { + lblMes.setVisible(true); + drpMes.setVisible(true); + fillMesDropDown(); + } + } + + public void drpMes_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + Object mes = event.getNewValue(); + if(mes == null) + { + lblDia.setVisible(false); + drpDia.setVisible(false); + } + else + { + lblDia.setVisible(true); + drpDia.setVisible(true); + fillDiaDropDown(); + } + } + + public String buttonFilterActual_action() + { + Date visitaDate = ( Date ) calFilterDateActual.getValue(); + String visitaDateStr = null; + if ( visitaDate != null ) + { + visitaDateStr = D_F.format( visitaDate ); + } + + String POR = null; + if ( textFilterPORActual.getText() != null ) + { + POR = ( ( String ) textFilterPORActual.getText() ).trim(); + if ( POR.length() == 0 ) + { + POR = null; + } + } + + String nome = null; + if ( textFilterNameActual.getText() != null ) + { + nome = (( String ) textFilterNameActual.getText()).trim(); + if( nome.length() == 0 ) + { + nome = null; + } + } + + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList actualList = adp.searchAnalisesActualSeg( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), + nome, visitaDateStr, POR, + getSessionBean1().getCurrentUser().getResponsavel_loja() ); + + table1.setRendered( true ); + txtSearchMsg.setRendered( false ); + getSessionBean1().getAnalisesActualDataProvider().setList( actualList ); + } + catch( Exception e ) + { + table1.setRendered( false ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + ErrorLogger.logException( e ); + } + + return null; + } + + public String buttonFilterSeg_action() + { + Date visitaDate = ( Date ) calFilterDateSeg.getValue(); + String visitaDateStr = null; + if ( visitaDate != null ) + { + visitaDateStr = D_F.format( visitaDate ); + } + + String POR = null; + if ( textFilterPORSeg.getText() != null ) + { + POR = ( ( String ) textFilterPORSeg.getText() ).trim(); + if ( POR.length() == 0 ) + { + POR = null; + } + } + + String nome = null; + if ( textFilterNameSeg.getText() != null ) + { + nome = (( String ) textFilterNameSeg.getText()).trim(); + if( nome.length() == 0 ) + { + nome = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList seguimentoList = adp.searchAnalisesSeguimentoSeg( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), + nome, visitaDateStr, POR, + getSessionBean1().getCurrentUser().getResponsavel_loja() ); + + table2.setRendered( true ); + txtSearchMsg.setRendered( false ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch( Exception e ) + { + table2.setRendered( false ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + ErrorLogger.logException( e ); + } + + return null; + } + + public String butPesquisar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + Object obAno = null; + Object obMes = null; + Object obDia = null; + try + { + obAno = drpAno.getSelected(); + obMes = drpMes.getSelected(); + obDia = drpDia.getSelected(); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + Integer ano = null; + Integer mes = null; + Integer dia = null; + + if(obAno != null) + { + ano = (Integer) obAno; + } + + if(obMes != null) + { + mes = (Integer) obMes; + } + + if(obDia != null) + { + dia = (Integer) obDia; + } + + String por = null; + if(txtPor.getText() != null) + { + por = (String) txtPor.getText(); + if(por.trim().length() == 0) + { + por = null; + } + } + + + String nome = null; + if(txtNome.getText() != null) + { + nome = (String) txtNome.getText(); + if(nome.trim().length() == 0) + { + nome = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); + ArrayList concluidasList = adp.searchAanalisesConcluidasList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), + ano, mes, dia, por, nome, null ); + + table3.setRendered(true); + txtSearchMsg.setRendered(false); + getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); + } + catch(Exception ex) + { + table3.setRendered(false); + txtSearchMsg.setRendered(true); + txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !"); + ErrorLogger.logException( ex ); + } + + return null; + } + + public void drpDia_processValueChange(ValueChangeEvent vce) { + // TODO: Replace with your code + + } + +// private String getPageFrom(String referer) +// { +// String pageFrom = referer.substring(referer.lastIndexOf("/")+1); +// return pageFrom; +// } + + public String butNovaAnalise_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + getSessionBean1().setNavFrom("FormSeguranca"); + getSessionBean1().setCurrentAnalise(null); + return "analise_acidente"; + } + + public String lnkDataAcidente_action() { + // TODO: Replace with your code + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "analise_acidente"; + } + + public String lnkDataAbertura_action() { + // TODO: Replace with your code + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "analise_acidente"; + } + + public String lnkNr_action() { + // TODO: Replace with your code + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "analise_acidente"; + } + + public String lnkNomeAcidentado_action() { + // TODO: Replace with your code + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "analise_acidente"; + } + + private AnaliseAcidente getTableActivosRowData() + { + RowKey rk = tableRowGroup1.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesActualDataProvider provider = (AnalisesActualDataProvider) tableRowGroup1.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + public String lnkDataAcidenteSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "view_analise"; + + } + + public String lnkDataAberturaSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "view_analise"; + } + + public String lnkNrSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "view_analise"; + } + + public String lnkNomeAcidentadoSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "view_analise"; + } + + private AnaliseAcidente getTableSeguimentoRowData() + { + RowKey rk = tableRowGroup2.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup2.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + private AnaliseAcidente getTableConcluidasRowData() + { + RowKey rk = tableRowGroup3.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup3.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + AnaliseAcidente a = (AnaliseAcidente)list.get(k); + return a; + } + + public String lnkEditUser_action() { + System.out.println("EDIT USER"); + // TODO: Replace with your code + getSessionBean1().setNavFrom("FormSeguranca"); + getSessionBean1().setModoEdicaoUtilizador("edit"); + return "user"; + } + + public String lnkDataConcluida_action() { + // TODO: Replace with your code + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "view_analise"; + } + + public String lnkDataAberturaConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "view_analise"; + } + + public String lnkNrConcluida_action() { + // TODO: Replace with your code + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "view_analise"; + } + + public String lnkNomeConcluida_action() { + // TODO: Replace with your code + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "view_analise"; + } + + public String lnkFase_action() { + // TODO: Replace with your code + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "analise_acidente"; + } + + public String lnkEstabelecimento_action() { + // TODO: Replace with your code + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "analise_acidente"; + } + + public String lnkFaseSeg_action() { + // TODO: Replace with your code + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "view_analise"; + } + + public String lnkEstabelecimentoSeg_action() { + // TODO: Replace with your code + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "view_analise"; + } + + public String lnkPor_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "analise_acidente"; } + + public String lnkPorSeg_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "view_analise"; + } + + public String lnkPorConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "view_analise"; + } + + public String lnkEstabConcluida_action() { + // TODO: Replace with your code + + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise(a); + getSessionBean1().setNavFrom("FormSeguranca"); + return "view_analise"; + } + + public String lnkNewUser_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkAjuda_action() { + System.out.println("AJUDA"); +// // TODO: Replace with your code +// ServletContext theApplicationsServletContext = +// (ServletContext) this.getExternalContext().getContext(); +// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); +// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf"; +// +// Global global = new Global(); +// try +// { +// global.showPdf(pdfFilePath); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// return null; +// } + return null; + } + + private void showPdf(String pdfFilePath) throws Exception + { + + File pdfFile = new File(pdfFilePath); + FileInputStream fis = new FileInputStream(pdfFile); + byte[] buf = new byte[(int)pdfFile.length()]; + while ((fis.read(buf)) > 0) + { + //fos.write(buf, 0, buf.length); + } + fis.close(); + FacesContext ctx = FacesContext.getCurrentInstance(); + if (!ctx.getResponseComplete()) + { + HttpServletResponse response = (HttpServletResponse)ctx.getExternalContext().getResponse(); + String contentType = "application/pdf"; + response.setContentType(contentType); + response.setHeader("Content-Disposition","attachment;filename=\"" + "Ajuda.pdf" + "\""); + + ServletOutputStream out = response.getOutputStream(); + + //out.write(model.getInfo().getBytes()); + out.write(buf, 0, buf.length); + out.flush(); + out.close(); + ctx.responseComplete(); + ctx.release(); + } + } + + public String lnkPlanosActuacao_action() { + // TODO: Replace with your code + Utilizador u = getSessionBean1().getCurrentUser(); +// String curUser = "?user=" + u.getId().toString(); + FacesContext fc = getFacesContext().getCurrentInstance(); + Global.redirectToPlanos(fc, u); +// Utilizador u = getSessionBean1().getCurrentUser(); +// String curUser = "?user=" + u.getId().toString(); +// FacesContext fc = getFacesContext().getCurrentInstance(); +// try +// { +// JSFUtils.redirect(fc, Global.PLANOS_ACTUACAO_URL + curUser); +// } +// catch(Exception ex) +// { +// +// } + return null; + } + + public String lnkAnalisesAcidente_action() { + return null; + } + +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/GestaoUtilizadores.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/GestaoUtilizadores.java new file mode 100644 index 00000000..7af0eff2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/GestaoUtilizadores.java @@ -0,0 +1,1326 @@ +/* + * GestaoUtilizadores.java + * + * Created on November 30, 2007, 1:34 PM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import beans.Utilizador; +import com.evolute.utils.error.ErrorLogger; +import com.sun.data.provider.RowKey; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Button; +import com.sun.rave.web.ui.component.DropDown; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.Hyperlink; +import com.sun.rave.web.ui.component.ImageComponent; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.component.PanelGroup; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.Table; +import com.sun.rave.web.ui.component.TableColumn; +import com.sun.rave.web.ui.component.TableRowGroup; +import com.sun.rave.web.ui.component.TextField; +import com.sun.rave.web.ui.model.SingleSelectOptionsList; +import db.providers.AnalisesDataProvider; +import db.providers.UtilizadoresActivosListDataProvider; +import db.providers.UtilizadoresDataProvider; +import db.providers.UtilizadoresInactivosListDataProvider; +import global.Global; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import javax.faces.context.FacesContext; +import javax.faces.event.ValueChangeEvent; +import javax.servlet.http.HttpServletRequest; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class GestaoUtilizadores extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridBase1() { + return gridBase1; + } + + public void setGridBase1(HtmlPanelGrid hpg) { + this.gridBase1 = hpg; + } + + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayout1() { + return gridLayout1; + } + + public void setGridLayout1(HtmlPanelGrid hpg) { + this.gridLayout1 = hpg; + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private ImageComponent image1 = new ImageComponent(); + + public ImageComponent getImage1() { + return image1; + } + + public void setImage1(ImageComponent ic) { + this.image1 = ic; + } + + private ImageComponent image2 = new ImageComponent(); + + public ImageComponent getImage2() { + return image2; + } + + public void setImage2(ImageComponent ic) { + this.image2 = ic; + } + + private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridConcluidos1() { + return gridConcluidos1; + } + + public void setGridConcluidos1(HtmlPanelGrid hpg) { + this.gridConcluidos1 = hpg; + } + + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel6() { + return gridPanel6; + } + + public void setGridPanel6(HtmlPanelGrid hpg) { + this.gridPanel6 = hpg; + } + + private StaticText staticText5 = new StaticText(); + + public StaticText getStaticText5() { + return staticText5; + } + + public void setStaticText5(StaticText st) { + this.staticText5 = st; + } + + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel7() { + return gridPanel7; + } + + public void setGridPanel7(HtmlPanelGrid hpg) { + this.gridPanel7 = hpg; + } + + private PanelGroup groupPanel6 = new PanelGroup(); + + public PanelGroup getGroupPanel6() { + return groupPanel6; + } + + public void setGroupPanel6(PanelGroup pg) { + this.groupPanel6 = pg; + } + + private StaticText staticText7 = new StaticText(); + + public StaticText getStaticText7() { + return staticText7; + } + + public void setStaticText7(StaticText st) { + this.staticText7 = st; + } + + private TextField txtPor = new TextField(); + + public TextField getTxtPor() { + return txtPor; + } + + public void setTxtPor(TextField tf) { + this.txtPor = tf; + } + + private PanelGroup groupPanel7 = new PanelGroup(); + + public PanelGroup getGroupPanel7() { + return groupPanel7; + } + + public void setGroupPanel7(PanelGroup pg) { + this.groupPanel7 = pg; + } + + private PanelGroup groupPanelLogin = new PanelGroup(); + + public PanelGroup getGroupPanelLogin() { + return groupPanelLogin; + } + + public void setGroupPanelLogin(PanelGroup groupPanelLogin) { + this.groupPanelLogin = groupPanelLogin; + } + + private TextField txtLogin = new TextField(); + + public TextField getTxtLogin() { + return txtLogin; + } + + public void setTxtLogin(TextField txtLogin) { + this.txtLogin = txtLogin; + } + + private StaticText staticTextLogin = new StaticText(); + + public StaticText getStaticTextLogin() { + return staticTextLogin; + } + + public void setStaticTextLogin(StaticText staticTextLogin) { + this.staticTextLogin = staticTextLogin; + } + + private StaticText staticText8 = new StaticText(); + + public StaticText getStaticText8() { + return staticText8; + } + + public void setStaticText8(StaticText st) { + this.staticText8 = st; + } + + private TextField txtNome = new TextField(); + + public TextField getTxtNome() { + return txtNome; + } + + public void setTxtNome(TextField tf) { + this.txtNome = tf; + } + + private Button butPesquisar = new Button(); + + public Button getButPesquisar() { + return butPesquisar; + } + + public void setButPesquisar(Button b) { + this.butPesquisar = b; + } + + private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel8() { + return gridPanel8; + } + + public void setGridPanel8(HtmlPanelGrid hpg) { + this.gridPanel8 = hpg; + } + + private Table table3 = new Table(); + + public Table getTable3() { + return table3; + } + + public void setTable3(Table t) { + this.table3 = t; + } + + private TableRowGroup tableRowGroup3 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup3() { + return tableRowGroup3; + } + + public void setTableRowGroup3(TableRowGroup trg) { + this.tableRowGroup3 = trg; + } + + private TableColumn tableColumn11 = new TableColumn(); + + public TableColumn getTableColumn11() { + return tableColumn11; + } + + public void setTableColumn11(TableColumn tc) { + this.tableColumn11 = tc; + } + + private Hyperlink lnkCategoriaActivos = new Hyperlink(); + + public Hyperlink getLnkCategoriaActivos() { + return lnkCategoriaActivos; + } + + public void setLnkCategoriaActivos(Hyperlink h) { + this.lnkCategoriaActivos = h; + } + + private TableColumn tableColumn13 = new TableColumn(); + + public TableColumn getTableColumn13() { + return tableColumn13; + } + + public void setTableColumn13(TableColumn tc) { + this.tableColumn13 = tc; + } + + private Hyperlink lnkPorActivos = new Hyperlink(); + + public Hyperlink getLnkPorActivos() { + return lnkPorActivos; + } + + public void setLnkPorActivos(Hyperlink h) { + this.lnkPorActivos = h; + } + + private TableColumn tableColumn14 = new TableColumn(); + + public TableColumn getTableColumn14() { + return tableColumn14; + } + + public void setTableColumn14(TableColumn tc) { + this.tableColumn14 = tc; + } + + private TableColumn tableColumnLogin = new TableColumn(); + + public TableColumn getTableColumnLogin() { + return tableColumnLogin; + } + + public void setTableColumnLogin(TableColumn tableColumnLogin) { + this.tableColumnLogin = tableColumnLogin; + } + + private Hyperlink lnkLoginActivos = new Hyperlink(); + + public Hyperlink getLnkLoginActivos() { + return lnkLoginActivos; + } + + private TableColumn tableColumnLoginInactivos = new TableColumn(); + + public TableColumn getTableColumnLoginInactivos() { + return tableColumnLoginInactivos; + } + + public void setTableColumnLoginInactivos(TableColumn tableColumnLoginInactivos) { + this.tableColumnLoginInactivos = tableColumnLoginInactivos; + } + + private Hyperlink lnkLoginInactivos = new Hyperlink(); + + public Hyperlink getLnkLoginInactivos() { + return lnkLoginInactivos; + } + + public void setLnkLoginInactivos(Hyperlink lnkLoginInactivos) { + this.lnkLoginInactivos = lnkLoginInactivos; + } + + + + public void setLnkLoginActivos(Hyperlink lnkLoginActivos) { + this.lnkLoginActivos = lnkLoginActivos; + } + + + + private Hyperlink lnkNomeActivos = new Hyperlink(); + + public Hyperlink getLnkNomeActivos() { + return lnkNomeActivos; + } + + public void setLnkNomeActivos(Hyperlink h) { + this.lnkNomeActivos = h; + } + + private TableColumn tableColumn15 = new TableColumn(); + + public TableColumn getTableColumn15() { + return tableColumn15; + } + + public void setTableColumn15(TableColumn tc) { + this.tableColumn15 = tc; + } + + private Hyperlink lnkEstabelecimentoActivos = new Hyperlink(); + + public Hyperlink getLnkEstabelecimentoActivos() { + return lnkEstabelecimentoActivos; + } + + public void setLnkEstabelecimentoActivos(Hyperlink h) { + this.lnkEstabelecimentoActivos = h; + } + + private StaticText txtSearchMsg1 = new StaticText(); + + public StaticText getTxtSearchMsg1() { + return txtSearchMsg1; + } + + public void setTxtSearchMsg1(StaticText st) { + this.txtSearchMsg1 = st; + } + + private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel9() { + return gridPanel9; + } + + public void setGridPanel9(HtmlPanelGrid hpg) { + this.gridPanel9 = hpg; + } + + private PanelGroup groupPanel8 = new PanelGroup(); + + public PanelGroup getGroupPanel8() { + return groupPanel8; + } + + public void setGroupPanel8(PanelGroup pg) { + this.groupPanel8 = pg; + } + + private StaticText staticText9 = new StaticText(); + + public StaticText getStaticText9() { + return staticText9; + } + + public void setStaticText9(StaticText st) { + this.staticText9 = st; + } + + private ImageComponent image3 = new ImageComponent(); + + public ImageComponent getImage3() { + return image3; + } + + public void setImage3(ImageComponent ic) { + this.image3 = ic; + } + + private StaticText staticText10 = new StaticText(); + + public StaticText getStaticText10() { + return staticText10; + } + + public void setStaticText10(StaticText st) { + this.staticText10 = st; + } + + private PanelGroup groupPanel3 = new PanelGroup(); + + public PanelGroup getGroupPanel3() { + return groupPanel3; + } + + public void setGroupPanel3(PanelGroup pg) { + this.groupPanel3 = pg; + } + + private StaticText staticText2 = new StaticText(); + + public StaticText getStaticText2() { + return staticText2; + } + + public void setStaticText2(StaticText st) { + this.staticText2 = st; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private Table table1 = new Table(); + + public Table getTable1() { + return table1; + } + + public void setTable1(Table t) { + this.table1 = t; + } + + private TableRowGroup tableRowGroup1 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup1() { + return tableRowGroup1; + } + + public void setTableRowGroup1(TableRowGroup trg) { + this.tableRowGroup1 = trg; + } + + private TableColumn tableColumn1 = new TableColumn(); + + public TableColumn getTableColumn1() { + return tableColumn1; + } + + public void setTableColumn1(TableColumn tc) { + this.tableColumn1 = tc; + } + + private Hyperlink lnkPorInactivos = new Hyperlink(); + + public Hyperlink getLnkPorInactivos() { + return lnkPorInactivos; + } + + public void setLnkPorInactivos(Hyperlink h) { + this.lnkPorInactivos = h; + } + + private TableColumn tableColumn2 = new TableColumn(); + + public TableColumn getTableColumn2() { + return tableColumn2; + } + + public void setTableColumn2(TableColumn tc) { + this.tableColumn2 = tc; + } + + private Hyperlink lnkNomeInactivos = new Hyperlink(); + + public Hyperlink getLnkNomeInactivos() { + return lnkNomeInactivos; + } + + public void setLnkNomeInactivos(Hyperlink h) { + this.lnkNomeInactivos = h; + } + + private TableColumn tableColumn3 = new TableColumn(); + + public TableColumn getTableColumn3() { + return tableColumn3; + } + + public void setTableColumn3(TableColumn tc) { + this.tableColumn3 = tc; + } + + private Hyperlink lnkCategoriaInactivos = new Hyperlink(); + + public Hyperlink getLnkCategoriaInactivos() { + return lnkCategoriaInactivos; + } + + public void setLnkCategoriaInactivos(Hyperlink h) { + this.lnkCategoriaInactivos = h; + } + + private TableColumn tableColumn4 = new TableColumn(); + + public TableColumn getTableColumn4() { + return tableColumn4; + } + + public void setTableColumn4(TableColumn tc) { + this.tableColumn4 = tc; + } + + private Hyperlink lnkEstabelecimentoInactivos = new Hyperlink(); + + public Hyperlink getLnkEstabelecimentoInactivos() { + return lnkEstabelecimentoInactivos; + } + + public void setLnkEstabelecimentoInactivos(Hyperlink h) { + this.lnkEstabelecimentoInactivos = h; + } + + private StaticText txtSearchMsg2 = new StaticText(); + + public StaticText getTxtSearchMsg2() { + return txtSearchMsg2; + } + + public void setTxtSearchMsg2(StaticText st) { + this.txtSearchMsg2 = st; + } + + private DropDown drpEstabelecimentos = new DropDown(); + + public DropDown getDrpEstabelecimentos() { + return drpEstabelecimentos; + } + + public void setDrpEstabelecimentos(DropDown dd) { + this.drpEstabelecimentos = dd; + } + + private SingleSelectOptionsList drpEstabelecimentosDefaultOptions = new SingleSelectOptionsList(); + + public SingleSelectOptionsList getDrpEstabelecimentosDefaultOptions() { + return drpEstabelecimentosDefaultOptions; + } + + public void setDrpEstabelecimentosDefaultOptions(SingleSelectOptionsList ssol) { + this.drpEstabelecimentosDefaultOptions = ssol; + } + + //
+ boolean isPostback = false; + + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel3() { + return gridPanel3; + } + + public void setGridPanel3(HtmlPanelGrid hpg) { + this.gridPanel3 = hpg; + } + + private StaticText staticText3 = new StaticText(); + + public StaticText getStaticText3() { + return staticText3; + } + + public void setStaticText3(StaticText st) { + this.staticText3 = st; + } + + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel5() { + return gridPanel5; + } + + public void setGridPanel5(HtmlPanelGrid hpg) { + this.gridPanel5 = hpg; + } + + private Button butNovoUtilizador = new Button(); + + public Button getButNovoUtilizador() { + return butNovoUtilizador; + } + + public void setButNovoUtilizador(Button b) { + this.butNovoUtilizador = b; + } + + private HtmlPanelGrid gridMsg1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMsg1() { + return gridMsg1; + } + + public void setGridMsg1(HtmlPanelGrid hpg) { + this.gridMsg1 = hpg; + } + + private StaticText txtMsg = new StaticText(); + + public StaticText getTxtMsg() { + return txtMsg; + } + + public void setTxtMsg(StaticText st) { + this.txtMsg = st; + } + private StaticText lblUser = new StaticText(); + + public StaticText getLblUser() { + return lblUser; + } + + public void setLblUser(StaticText st) { + this.lblUser = st; + } + private Hyperlink lnkPlanosActuacao = new Hyperlink(); + + public Hyperlink getLnkPlanosActuacao() { + return lnkPlanosActuacao; + } + + public void setLnkPlanosActuacao(Hyperlink h) { + this.lnkPlanosActuacao = h; + } + /** + *

Construct a new Page bean instance.

+ */ + public GestaoUtilizadores() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("GestaoUtilizadores Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + if (!getSessionBean1().isLoggedIn()) { + try { + getExternalContext().redirect("Login.jsp"); + } catch(Exception e) { + // . . . handle exception . . . + } + } + else + { + lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); + + HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom(referer); + + boolean userDeleted = getSessionBean1().isUserDeleted(); + + if(userDeleted) + { + getSessionBean1().setUserDeleted(false); + } + + FacesContext fc = getFacesContext(); + Map parameters = fc.getCurrentInstance().getExternalContext().getRequestParameterMap(); + if(!pageFrom.matches("GestaoUtilizadores.jsp") || userDeleted || parameters.size() > 0) + { + isPostback = false; + } + else + { + isPostback = true; + } + + + } + + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + @Override + public void prerender() + { + Utilizador u = getSessionBean1().getCurrentUser(); + if(u.getTipo().intValue() != Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP) + { + lnkPlanosActuacao.setDisabled(true); + } + + System.out.println("POSTBACK : " + isPostback); + if ( ! isPostback ) + { + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + com.sun.rave.web.ui.model.Option[] listOptions = adp.getEstabelecimentosList( getSessionBean1().getCurrentUser().getEmpresa_id(), new Boolean(false)); + listOptions[0].setLabel("-Todos-"); + getSessionBean1().setEstabelecimentosOptions( listOptions ); + drpEstabelecimentos.setSelected(new Integer(-1)); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + if ( ! getSessionBean1().getIsSearchingUtilizadores() ) + { + String isDirRh = "n"; + if(getSessionBean1().getCurrentUser().getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH) // Director geral rh + { + isDirRh = "y"; + } + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + List< Utilizador > listUtilizadores = udp.getUtilizadoresList( null, null, null, null, "y", isDirRh ); +// List< Utilizador > listUtilizadores = udp.getUtilizadoresList( null, null, null, "y", isDirRh ); + getSessionBean1().getUtilizadoresActivosListDataProvider().setList( listUtilizadores ); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + List< Utilizador > listUtilizadores = udp.getUtilizadoresList( null, null, null, null, "n", isDirRh ); +// List< Utilizador > listUtilizadores = udp.getUtilizadoresList( null, null, null, "n", isDirRh ); + getSessionBean1().getUtilizadoresInactivosListDataProvider().setList( listUtilizadores ); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + getSessionBean1().getUtilizadoresInactivosListDataProvider().setList( new LinkedList() ); + table1.setRendered(false); + } + } + + } + txtMsg.setText(getSessionBean1().getMsg()); + getSessionBean1().setMsg(""); + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + public String lnkEditUser_action() { + // TODO: Replace with your code + + getSessionBean1().setNavFrom("GestaoUtilizadores"); + getSessionBean1().setModoEdicaoUtilizador("edit"); + return "user"; + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), true ); + return null; + + } + + public String butNovaAnalise_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + return null; + } + + public String lnkDataAcidente_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkNr_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkPor_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkNomeAcidentado_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkFase_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkDataAcidenteSeg_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkNrSeg_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkPorSeg_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkNomeAcidentadoSeg_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkFaseSeg_action() { + // TODO: Replace with your code + + return null; + } + + public void drpAno_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public void drpMes_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public void drpDia_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public String butPesquisar_action() + { + String por = null; + String nome = null; + Integer estabelecimento_id = null; + String login = null; + + if(txtPor.getText() != null) + { + por = (String) txtPor.getText(); + if(por.trim().length() == 0) + { + por = null; + } + else + { + por = por.toLowerCase(); + } + } + + if(txtNome.getText() != null) + { + nome = (String) txtNome.getText(); + if(nome.trim().length() == 0) + { + nome = null; + } + else + { + nome = nome.toLowerCase(); + } + } + + if ( txtLogin.getText() != null ) + { + login = ( String ) txtLogin.getText(); + if ( login == null || "".equals( login.trim() ) ) + { + login = null; + } + else + { + login = login.toLowerCase(); + } + } + + estabelecimento_id = (Integer) drpEstabelecimentos.getSelected(); + if(estabelecimento_id.intValue() == -1) + { + estabelecimento_id = null; + } + + String isDirRh = "n"; + + if(getSessionBean1().getCurrentUser().getTipo().intValue() == 7) //director geral rh + { + isDirRh = "y"; + } + + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + getSessionBean1().setIsSearchingUtilizadores( true ); + List< Utilizador > listUtilizadores = udp.getUtilizadoresList( por, nome, login, estabelecimento_id, "y", isDirRh ); +// List< Utilizador > listUtilizadores = udp.getUtilizadoresList( por, nome, estabelecimento_id, "y", isDirRh ); + getSessionBean1().getUtilizadoresActivosListDataProvider().setList( listUtilizadores ); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + getSessionBean1().getUtilizadoresActivosListDataProvider().setList( new LinkedList< Utilizador >() ); + } + + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + getSessionBean1().setIsSearchingUtilizadores( true ); + List< Utilizador > listUtilizadores = udp.getUtilizadoresList( por, nome, login, estabelecimento_id, "n", isDirRh ); +// List< Utilizador > listUtilizadores = udp.getUtilizadoresList( por, nome, estabelecimento_id, "n", isDirRh ); + getSessionBean1().getUtilizadoresInactivosListDataProvider().setList( listUtilizadores ); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + getSessionBean1().getUtilizadoresInactivosListDataProvider().setList( new LinkedList< Utilizador >() ); + } + + return null; + } + + public String lnkPorActivos_action() + { + Utilizador u = getUtilizadorActivoRowData(); + getSessionBean1().setEditUser(u); + getSessionBean1().setModoEdicaoUtilizador("edit"); + getSessionBean1().setNavFrom("GestaoUtilizadores"); + return "user_fields"; + } + + public String lnkNomeActivos_action() + { + Utilizador u = getUtilizadorActivoRowData(); + System.out.println("UTILIZADOR ID : " + u.getId()); + getSessionBean1().setEditUser(u); + getSessionBean1().setModoEdicaoUtilizador("edit"); + getSessionBean1().setNavFrom("GestaoUtilizadores"); + return "user_fields"; + } + + public String lnkLoginActivos_action() + { + Utilizador u = getUtilizadorActivoRowData(); + getSessionBean1().setEditUser( u ); + getSessionBean1().setModoEdicaoUtilizador( "edit" ); + getSessionBean1().setNavFrom( "GestaoUtilizadores" ); + return "user_fields"; + } + + public String lnkCategoriaActivos_action() + { + Utilizador u = getUtilizadorActivoRowData(); + getSessionBean1().setEditUser(u); + getSessionBean1().setModoEdicaoUtilizador("edit"); + getSessionBean1().setNavFrom("GestaoUtilizadores"); + return "user_fields"; + } + + public String lnkEstabelecimentosActivos_action() + { + Utilizador u = getUtilizadorActivoRowData(); + getSessionBean1().setEditUser(u); + getSessionBean1().setModoEdicaoUtilizador("edit"); + getSessionBean1().setNavFrom("GestaoUtilizadores"); + return "user_fields"; + } + + private Utilizador getUtilizadorActivoRowData() + { + RowKey rk = tableRowGroup3.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + UtilizadoresActivosListDataProvider provider = (UtilizadoresActivosListDataProvider) tableRowGroup3.getSourceData(); + List< Utilizador > list = ( List< Utilizador > ) provider.getList(); + Utilizador u = list.get( k ); + return u; + } + + + public String lnkPorInactivos_action() + { + Utilizador u = getUtilizadorInactivoRowData(); + getSessionBean1().setEditUser(u); + getSessionBean1().setModoEdicaoUtilizador("edit"); + getSessionBean1().setNavFrom("GestaoUtilizadores"); + return "user_fields"; + } + + public String lnkNomeInactivos_action() { + // TODO: Replace with your code + Utilizador u = getUtilizadorInactivoRowData(); + getSessionBean1().setEditUser(u); + getSessionBean1().setModoEdicaoUtilizador("edit"); + getSessionBean1().setNavFrom("GestaoUtilizadores"); + return "user_fields"; + } + + public String lnkLoginInactivos_action() + { + Utilizador u = getUtilizadorInactivoRowData(); + getSessionBean1().setEditUser(u); + getSessionBean1().setModoEdicaoUtilizador("edit"); + getSessionBean1().setNavFrom("GestaoUtilizadores"); + return "user_fields"; + } + + public String lnkCategoriaInactivos_action() { + // TODO: Replace with your code + Utilizador u = getUtilizadorInactivoRowData(); + getSessionBean1().setEditUser(u); + getSessionBean1().setModoEdicaoUtilizador("edit"); + getSessionBean1().setNavFrom("GestaoUtilizadores"); + return "user_fields"; + } + + public String lnkEstabelecimentoInactivos_action() { + // TODO: Replace with your code + Utilizador u = getUtilizadorInactivoRowData(); + getSessionBean1().setEditUser(u); + getSessionBean1().setModoEdicaoUtilizador("edit"); + getSessionBean1().setNavFrom("GestaoUtilizadores"); + return "user_fields"; + } + + private Utilizador getUtilizadorInactivoRowData() + { + RowKey rk = tableRowGroup1.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + UtilizadoresInactivosListDataProvider provider = (UtilizadoresInactivosListDataProvider) tableRowGroup1.getSourceData(); + List< Utilizador > list = ( List< Utilizador > ) provider.getList(); + Utilizador u = list.get( k ); + return u; + } + + + public String lnkNewUser_action() { + // TODO: Replace with your code + + return null; + } + + public String butNovoUtilizador_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + return "novo_utilizador"; + } + + public String lnkAnalisesAcidente_action() { + // TODO: Replace with your code + String nav_from = getSessionBean1().getNavFrom(); + Integer tipo_utilizador = getSessionBean1().getCurrentUser().getTipo(); + if(tipo_utilizador.intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP) + { + return "form_dir_siprp"; + } + else if( tipo_utilizador.intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH ) + { + return "form_dir_ger_rh"; + } + return null; + } + + public String lnkAjuda_action() { + // TODO: Replace with your code +// ServletContext theApplicationsServletContext = +// (ServletContext) this.getExternalContext().getContext(); +// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); +// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf"; +// +// Global global = new Global(); +// try +// { +// global.showPdf(pdfFilePath); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + return null; + } + + public String lnkPlanosActuacao_action() { + // TODO: Replace with your code + Utilizador u = getSessionBean1().getCurrentUser(); +// String curUser = "?user=" + u.getId().toString(); + FacesContext fc = getFacesContext().getCurrentInstance(); + Global.redirectToPlanos(fc, u); + return null; + } +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Header.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Header.java new file mode 100644 index 00000000..c76d8289 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Header.java @@ -0,0 +1,130 @@ +/* + * Header.java + * + * Created on September 19, 2007, 10:14 AM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import com.sun.rave.web.ui.appbase.AbstractFragmentBean; +import javax.faces.FacesException; +import utils.Utils; + +/** + *

Fragment bean that corresponds to a similarly named JSP page + * fragment. This class contains component definitions (and initialization + * code) for all components that you have defined on this fragment, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class Header extends AbstractFragmentBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + //
+ + public Header() { + } + + /** + *

Callback method that is called whenever a page containing + * this page fragment is navigated to, either directly via a URL, + * or indirectly via page navigation. Override this method to acquire + * resources that will be needed for event handlers and lifecycle methods.

+ * + *

The default implementation does nothing.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("Page1 Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called. Override this + * method to release resources acquired in the init() + * resources that will be needed for event handlers and lifecycle methods.

+ * + *

The default implementation does nothing.

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + public String lnkAnalisesAcidente_action() { + // TODO: Replace with your code + return null; + } + + public String lnkPlanosActuacao_action() { + // TODO: Replace with your code + return null; + } + + public String lnkNewUser_action() { + // TODO: Replace with your code + return null; + } + + public String lnkEditUser_action() { + // TODO: Replace with your code + return null; + } + + public String lnkAjuda_action() { + // TODO: Replace with your code + return null; + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), false ); + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/LoadImage.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/LoadImage.java new file mode 100644 index 00000000..b94b260a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/LoadImage.java @@ -0,0 +1,475 @@ +/* + * LoadImage.java + * + * Created on September 26, 2007, 5:36 PM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Button; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.component.PanelGroup; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.Upload; +import com.sun.rave.web.ui.model.UploadedFile; +import global.Global; +import java.io.File; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import javax.servlet.ServletContext; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class LoadImage extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridBase1() { + return gridBase1; + } + + public void setGridBase1(HtmlPanelGrid hpg) { + this.gridBase1 = hpg; + } + + private HtmlPanelGrid gridLayout = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayout() { + return gridLayout; + } + + public void setGridLayout(HtmlPanelGrid hpg) { + this.gridLayout = hpg; + } + + private StaticText staticText1 = new StaticText(); + + public StaticText getStaticText1() { + return staticText1; + } + + public void setStaticText1(StaticText st) { + this.staticText1 = st; + } + + private Upload fileUpload1 = new Upload(); + + public Upload getFileUpload1() { + return fileUpload1; + } + + public void setFileUpload1(Upload u) { + this.fileUpload1 = u; + } + + //
+ /** + *

Construct a new Page bean instance.

+ */ + + private String realImageFilePath; + //private static final String IMAGE_URL = "/resources/image-file"; + //private String IMAGE_URL = "/resources/images"; + + private StaticText staticText2 = new StaticText(); + + public StaticText getStaticText2() { + return staticText2; + } + + public void setStaticText2(StaticText st) { + this.staticText2 = st; + } + + private StaticText txtMsg = new StaticText(); + + public StaticText getTxtMsg() { + return txtMsg; + } + + public void setTxtMsg(StaticText st) { + this.txtMsg = st; + } + + private PanelGroup groupPanel4 = new PanelGroup(); + + public PanelGroup getGroupPanel4() { + return groupPanel4; + } + + public void setGroupPanel4(PanelGroup pg) { + this.groupPanel4 = pg; + } + + private Button butUpload = new Button(); + + public Button getButUpload() { + return butUpload; + } + + public void setButUpload(Button b) { + this.butUpload = b; + } + + private Button butCancelar = new Button(); + + public Button getButCancelar() { + return butCancelar; + } + + public void setButCancelar(Button b) { + this.butCancelar = b; + } + public LoadImage() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("LoadImage Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + + if (!getSessionBean1().isLoggedIn()) { + try { + getExternalContext().redirect("Login.jsp"); + } catch(Exception e) { + // . . . handle exception . . . + } + } + else + { + + getSessionBean1().setImageName(null); + ServletContext theApplicationsServletContext = + (ServletContext) this.getExternalContext().getContext(); + //this.realImageFilePath = theApplicationsServletContext.getRealPath(IMAGE_URL); + //this.realImageFilePath = theApplicationsServletContext.getRealPath(Global.IMAGE_FOLDER); + try + { + realImageFilePath = Global.IMAGE_FOLDER + "/tmp" + getSessionBean1().getCurrentUser().getLogin(); + File f = new File(realImageFilePath); + f.mkdir(); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + + + + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + public void prerender() { + //String uploadedFileName = (String) this.txtFileName.getValue(); + //if ( uploadedFileName != null ) { +// IMAGE_URL += getSessionBean1().getImageName(); +// System.out.println("IMAGE URL : " + IMAGE_URL); + //image1.setUrl(IMAGE_URL); +// } + txtMsg.setText(getSessionBean1().getMsg()); + getSessionBean1().setMsg(""); + + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), false ); + return null; + } + + public String lnkNome_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkDataNascimento_action() { + // TODO: Replace with your code + + return null; + } + + public String butCancelar_action() { + getSessionBean1().setImageName(null); + return "analise_acidente"; + } + + public String butUpload_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + //realImageFilePath += "/tmp" + getSessionBean1().getCurrentUser().getLogin(); + System.out.println("REAL IMAGE FILE PATH : " + realImageFilePath); + File fdir = new File(realImageFilePath); + System.out.println("FDIR : " + fdir); + + + UploadedFile uploadedFile = fileUpload1.getUploadedFile(); + if(uploadedFile != null) + { + + String uploadedFileName = uploadedFile.getOriginalName(); + + // Some browsers return complete path name, some don't + // Make sure we only have the file name + // First, try forward slash + int index = uploadedFileName.lastIndexOf('/'); + String justFileName; + if ( index >= 0) { + justFileName = uploadedFileName.substring( index + 1 ); + } else { + // Try backslash + index = uploadedFileName.lastIndexOf('\\'); + if (index >= 0) { + justFileName = uploadedFileName.substring( index + 1 ); + } else { + // No forward or back slashes + justFileName = uploadedFileName; + } + } + //justFileName = justFileName.substring(0, justFileName.lastIndexOf('.')); + int firstImageNr = getFirstImageNr().intValue(); + File files[] = fdir.listFiles(); + // realImageFilePath += "/" + justFileName; + System.out.println("FILES : " + files); + + int imageName = firstImageNr + files.length + 1; + justFileName = new Integer(imageName).toString(); + + if(imageName < 10) + { + justFileName = "0" + justFileName; + } + //this.txtFileName.setValue(justFileName); + Long uploadedFileSize = new Long(uploadedFile.getSize()); + //this.txtFileSize.setValue(uploadedFileSize); + String uploadedFileType = uploadedFile.getContentType(); + //this.txtFileType.setValue(uploadedFileType); + if ( uploadedFileType.equals("image/jpeg") + || uploadedFileType.equals("image/pjpeg") + || uploadedFileType.equals("image/gif") + || uploadedFileType.equals("image/png") + || uploadedFileType.equals("image/x-png")) { + try { + + realImageFilePath += "/" + justFileName; + File file = new File(this.realImageFilePath); + uploadedFile.write(file); + getSessionBean1().setImageName(justFileName); + //getSessionBean1().setMsg("Ficheiro carregado !"); + } catch (Exception ex) { + ErrorLogger.logException( ex ); + getSessionBean1().setMsg("Não foi possivel carregar o ficheiro !"); + return null; + } + } else { + getSessionBean1().setMsg("Tem de seleccionar um ficheiro do tipo JPEG, PJPEG, GIF, PNG, ou X-PNG !"); + new File(this.realImageFilePath).delete(); + return null; + } + } + else + { + getSessionBean1().setImageName(null); + } + + return "analise_acidente"; + } + + private Integer getFirstImageNr() + { + if(getSessionBean1().getCurrentAnalise() == null) + { + return new Integer(0); + } + else + { + String folderName = getSessionBean1().getCurrentAnalise().getAnalise_nr().substring(0,2) + getSessionBean1().getCurrentAnalise().getAnalise_nr().substring(3); + ServletContext theApplicationsServletContext = + (ServletContext) this.getExternalContext().getContext(); +// String imageFileFolder = theApplicationsServletContext.getRealPath(Global.IMAGE_FOLDER + "/" + folderName); + String imageFileFolder = Global.IMAGE_FOLDER + "/" + folderName; + File fdir = new File(imageFileFolder); + int nr = 0; + if(fdir.exists()) + { + File files[] = fdir.listFiles(); + for(int i=0; i < files.length; i++) + { + String nr_str = files[i].getName(); + int i_nr = Integer.parseInt(nr_str); + if(i_nr > nr) + { + nr = i_nr; + } + } + return new Integer(nr); + } + + return new Integer(0); + } + } +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Login.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Login.java new file mode 100644 index 00000000..9318e035 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Login.java @@ -0,0 +1,681 @@ +/* + * Page1.java + * + * Created on September 18, 2007, 3:14 PM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import beans.Utilizador; +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Button; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.Hyperlink; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.component.PasswordField; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.TextField; +import com.sun.rave.web.ui.model.Option; +import db.providers.AnalisesDataProvider; +import db.providers.UtilizadoresDataProvider; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.GregorianCalendar; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class Login extends AbstractPageBean +{ + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel6() { + return gridPanel6; + } + + public void setGridPanel6(HtmlPanelGrid hpg) { + this.gridPanel6 = hpg; + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel3() { + return gridPanel3; + } + + public void setGridPanel3(HtmlPanelGrid hpg) { + this.gridPanel3 = hpg; + } + + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel4() { + return gridPanel4; + } + + public void setGridPanel4(HtmlPanelGrid hpg) { + this.gridPanel4 = hpg; + } + + private StaticText staticText1 = new StaticText(); + + public StaticText getStaticText1() { + return staticText1; + } + + public void setStaticText1(StaticText st) { + this.staticText1 = st; + } + + private TextField txtUtilizador = new TextField(); + + public TextField getTxtUtilizador() { + return txtUtilizador; + } + + public void setTxtUtilizador(TextField tf) { + this.txtUtilizador = tf; + } + + private StaticText staticText2 = new StaticText(); + + public StaticText getStaticText2() { + return staticText2; + } + + public void setStaticText2(StaticText st) { + this.staticText2 = st; + } + + private PasswordField txtPassword = new PasswordField(); + + public PasswordField getTxtPassword() { + return txtPassword; + } + + public void setTxtPassword(PasswordField pf) { + this.txtPassword = pf; + } + + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel5() { + return gridPanel5; + } + + public void setGridPanel5(HtmlPanelGrid hpg) { + this.gridPanel5 = hpg; + } + + private Hyperlink lnkPassRecovery = new Hyperlink(); + + public Hyperlink getLnkPassRecovery() { + return lnkPassRecovery; + } + + public void setLnkPassRecovery(Hyperlink h) { + this.lnkPassRecovery = h; + } + + private Button butLogin = new Button(); + + public Button getButLogin() { + return butLogin; + } + + public void setButLogin(Button b) { + this.butLogin = b; + } + + private StaticText txtMsg = new StaticText(); + + public StaticText getTxtMsg() { + return txtMsg; + } + + public void setTxtMsg(StaticText st) { + this.txtMsg = st; + } + + //
+ /** + *

Construct a new Page bean instance.

+ */ + public Login() + { +// connect(); + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + @Override + public void init() + { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("Page1 Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + @Override + public void preprocess() + { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + @Override + public void prerender() + { + txtMsg.setText(getSessionBean1().getMsg()); + getSessionBean1().setMsg(""); + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + @Override + public void destroy() + { + + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() + { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + public String butLogin_action() + { + String sRet = null; + + if(txtUtilizador.getText() != null) + { + String utilizador = (String) txtUtilizador.getText(); + if(utilizador.trim().length() > 0) + { + if(txtPassword.getText() != null) + { + String password = (String) txtPassword.getText(); + if( password.trim().length() > 0 ) + { + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + + Utilizador u = udp.getUtilizador( utilizador ); + if( u != null && "y".equals( u.getActivo() ) ) + { + if ( ! password.equals( u.getPassword() ) ) + { + getSessionBean1().setMsg( "Palavra-chave inválida !" ); + } + else + { + //if(u.getOwner_id().intValue() == 0 ) + + Utils.doLogin( getExternalContext(), u ); + + + + + + //Login Ok ! +// if(u.getPrimeiro_login().matches("y") || mustChangePassword(u)) + if(u.getPrimeiro_login().matches("y") ) + { + getSessionBean1().setMudarPassword(true); + getSessionBean1().setCurrentUser( u ); + getSessionBean1().setNavFrom("Login"); + getSessionBean1().setModoEdicaoUtilizador("edit"); + getSessionBean1().setLoggedIn(true); + initializeClock(); + initializeDropDownOptions(); + return "user"; + } + try + { + Integer permissao = udp.getPermissionCode( u.getId() ); + sRet = "form_seguranca"; + if ( permissao != null ) + { + if(permissao.intValue() == 1) //seguranca + { + if(u.getResponsavel_loja().matches("y")) + { + sRet = "acesso"; + } + else + { + sRet = "form_seguranca"; + } + } + else if(permissao.intValue() == 2) // rh + { + if(u.getResponsavel_loja().matches("y")) + { + sRet = "acesso"; + } + else + { + sRet = "form_rh"; + } + //sRet = "form_rh"; + } + else if(permissao.intValue() == 3) // hs + { + //sRet = "form_hs"; + sRet = "acesso"; + } + else if(permissao.intValue() == 5) // medico + { + sRet = "form_medico"; + } + else if(permissao.intValue() == 6) // gestor + { + //sRet = "form_gestor"; + sRet = "acesso"; + } + else if(permissao.intValue() == 7) // director geral rh + { + //sRet = "form_rh"; + //sRet = "form_dir_ger_rh"; + sRet = "acesso"; + } + else if(permissao.intValue() == 8) // director siprp + { + //sRet = "form_dir_siprp"; + sRet = "acesso"; + } + else if(permissao.intValue() == 9) // director loja + { + sRet = "acesso"; + } + else if(permissao.intValue() == 10) // director nacional de seguranca + { + sRet = "acesso"; + } + } + + u.setCodigo_permissao( permissao ); + getSessionBean1().setCurrentUser( u ); + getSessionBean1().setLoggedIn( true ); + initializeClock(); + initializeDropDownOptions(); + + // só para testes. retirar depois : + ///getSessionBean1().setModoEdicaoUtilizador("new"); + ///sRet = "create_user"; + } + catch ( Exception e1 ) + { + ErrorLogger.logException( e1 ); + getSessionBean1().setMsg("Não tem permissão para entrar na aplicação !"); + } + } + + } + else + { + getSessionBean1().setMsg("Utilizador inválido ! "); + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + getSessionBean1().setMsg("Utilizador inválido ! "); + } + } + else + { + getSessionBean1().setMsg("Falta palavra-chave !"); + } + } + else + { + getSessionBean1().setMsg("Falta palavra-chave !"); + } + } + else + { + getSessionBean1().setMsg("Falta utilizador !"); + } + } + else + { + getSessionBean1().setMsg("Falta utilizador !"); + } + return sRet; + } + + public String lnkPassRecovery_action() + { + return "recuperar_password"; + } + +// private void connect() +// { +// db.Db db = new db.Db(); +// try +// { +// Connection connection = db.connect(); +// } +// catch(Exception ex) +// { +// getSessionBean1().setMsg("Erro na ligação à Base de Dados"); +// //***** terminate session +// try +// { +// getExternalContext().redirect("faces/Erro.jsp"); +// } +// catch ( Exception e ) +// { +// ErrorLogger.logException( e ); +// } +// ErrorLogger.logException( ex ); +// } +// } + + private void initializeClock() + { + com.sun.rave.web.ui.model.Option[] horasOptions = new com.sun.rave.web.ui.model.Option[25]; + horasOptions[0] = new Option(new Integer(-1), "-"); + int j = 0; + String str_j = ""; + for(int i=1; i < 25; i++) + { + if(j < 10) + { + str_j = "0" + new Integer(j).toString(); + } + else + { + str_j = new Integer(j).toString(); + } + horasOptions[i] = new Option(new Integer(j), str_j); + j++; + } + getSessionBean1().setHorasOptions(horasOptions); + + com.sun.rave.web.ui.model.Option[] minutosOptions = new com.sun.rave.web.ui.model.Option[13]; + minutosOptions[0] = new Option(new Integer(-1), "-"); + j = 0; + for(int i=1; i < 13; i++) + { + if(j < 10) + { + str_j = "0" + new Integer(j).toString(); + } + else + { + str_j = new Integer(j).toString(); + } + minutosOptions[i] = new Option(new Integer(j), str_j); + j += 5; + } + getSessionBean1().setMinutosOptions(minutosOptions); + } + + private void initializeDropDownOptions() + { +// UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); +// try +// { +// getSessionBean1().setTecnicosOptions(udp.getTecnicosSaudeList()); +// //drpTipo.setSelected(new Integer(0)); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + +// try +// { +// getSessionBean1().setMedicosOptions(udp.getMedicosList()); +// //drpTipo.setSelected(new Integer(0)); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + +// AnalisesDataProvider adp = new AnalisesDataProvider(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + getSessionBean1().setCausasOptions(adp.getCausasList()); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + getSessionBean1().setDepartamentoOptions(adp.getDepartamentosList()); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + } + + private boolean mustChangePassword(Utilizador u) + { + java.util.Date now = new java.util.Date(); + Calendar cal = new GregorianCalendar(); + cal.setTime(now); + int ano = cal.get(Calendar.YEAR); + int mes = cal.get(Calendar.MONTH); + int dia = cal.get(Calendar.DAY_OF_MONTH); + + Calendar today = new GregorianCalendar(ano, mes, dia); + Calendar firstJan = new GregorianCalendar(ano, Calendar.JANUARY, 1); +// Calendar firstJan = new GregorianCalendar(ano, Calendar.DECEMBER, 27); + Calendar firstJul = new GregorianCalendar(ano, Calendar.JULY, 1); + + if(today.compareTo(firstJan) == 0 || today.compareTo(firstJul) == 0) + { + return true; + } + + if(u.getData_password() == null) + { + return true; + } + else + { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + try + { + java.util.Date dt_password = sdf.parse(u.getData_password().toString()); + Calendar cal_dt_password = new GregorianCalendar(); + cal_dt_password.setTime(dt_password); + cal_dt_password.add(GregorianCalendar.MONTH, 6); + if(cal.compareTo(cal_dt_password) > 0) + { + return true; + } + else + { + return false; + } + + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + } + return false; + } +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/NewUser.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/NewUser.java new file mode 100644 index 00000000..3b713ced --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/NewUser.java @@ -0,0 +1,176 @@ +/* + * NewUser.java + * + * Created on December 4, 2007, 11:29 AM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package analiseacidentestrabalho; + +/** + * + * @author lluis + */ +public class NewUser { + private Integer tipo; + private String tipo_descricao; + private String nome; + private Integer estabelecimento; + private String estabelecimento_descricao; + private String login; + private String password; + private String email; + + private String numero_mecanografico; + private Integer empresa_id; + private String numero_cedula; + private String cap; + private Integer funcionario_hst_id; + private Integer medico_id; + private String responsavel_loja; + private String gestor_geral; + private String activo; + + /** Creates a new instance of NewUser */ + public NewUser() { + } + + public Integer getTipo() { + return tipo; + } + + public void setTipo(Integer tipo) { + this.tipo = tipo; + } + + public String getTipo_descricao() { + return tipo_descricao; + } + + public void setTipo_descricao(String tipo_descricao) { + this.tipo_descricao = tipo_descricao; + } + + public String getNome() { + return nome; + } + + public void setNome(String nome) { + this.nome = nome; + } + + public Integer getEstabelecimento() { + return estabelecimento; + } + + public void setEstabelecimento(Integer estabelecimento) { + this.estabelecimento = estabelecimento; + } + + public String getEstabelecimento_descricao() { + return estabelecimento_descricao; + } + + public void setEstabelecimento_descricao(String estabelecimento_descricao) { + this.estabelecimento_descricao = estabelecimento_descricao; + } + + public String getLogin() { + return login; + } + + public void setLogin(String login) { + this.login = login; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getNumero_mecanografico() { + return numero_mecanografico; + } + + public void setNumero_mecanografico(String numero_mecanografico) { + this.numero_mecanografico = numero_mecanografico; + } + + public Integer getEmpresa_id() { + return empresa_id; + } + + public void setEmpresa_id(Integer empresa_id) { + this.empresa_id = empresa_id; + } + + public String getNumero_cedula() { + return numero_cedula; + } + + public void setNumero_cedula(String numero_cedula) { + this.numero_cedula = numero_cedula; + } + + public String getCap() { + return cap; + } + + public void setCap(String cap) { + this.cap = cap; + } + + public Integer getFuncionario_hst_id() { + return funcionario_hst_id; + } + + public void setFuncionario_hst_id(Integer funcionario_hst_id) { + this.funcionario_hst_id = funcionario_hst_id; + } + + public Integer getMedico_id() { + return medico_id; + } + + public void setMedico_id(Integer medico_id) { + this.medico_id = medico_id; + } + + public String getResponsavel_loja() { + return responsavel_loja; + } + + public void setResponsavel_loja(String responsavel_loja) { + this.responsavel_loja = responsavel_loja; + } + + public String getActivo() { + return activo; + } + + public void setActivo(String activo) { + this.activo = activo; + } + + public String getGestor_geral() { + return gestor_geral; + } + + public void setGestor_geral(String gestor_geral) { + this.gestor_geral = gestor_geral; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/NovoUtilizador.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/NovoUtilizador.java new file mode 100644 index 00000000..be1283a0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/NovoUtilizador.java @@ -0,0 +1,2021 @@ +/* + * NovoUtilizador.java + * + * Created on December 3, 2007, 2:30 PM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import beans.Medico; +import beans.Trabalhador; +import beans.Utilizador; +import com.evolute.utils.error.ErrorLogger; +import com.sun.data.provider.RowKey; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Button; +import com.sun.rave.web.ui.component.Checkbox; +import com.sun.rave.web.ui.component.DropDown; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.HiddenField; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.Hyperlink; +import com.sun.rave.web.ui.component.ImageComponent; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.component.PanelGroup; +import com.sun.rave.web.ui.component.RadioButton; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.Table; +import com.sun.rave.web.ui.component.TableColumn; +import com.sun.rave.web.ui.component.TableRowGroup; +import com.sun.rave.web.ui.component.TextField; +import db.providers.AnalisesDataProvider; +import db.providers.TrabalhadoresListDataProvider; +import global.Global; +import java.util.ArrayList; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import javax.faces.context.FacesContext; +import javax.faces.event.ValueChangeEvent; +import javax.servlet.http.HttpServletRequest; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class NovoUtilizador extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridBase1() { + return gridBase1; + } + + public void setGridBase1(HtmlPanelGrid hpg) { + this.gridBase1 = hpg; + } + + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayout1() { + return gridLayout1; + } + + public void setGridLayout1(HtmlPanelGrid hpg) { + this.gridLayout1 = hpg; + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private ImageComponent image1 = new ImageComponent(); + + public ImageComponent getImage1() { + return image1; + } + + public void setImage1(ImageComponent ic) { + this.image1 = ic; + } + + private ImageComponent image2 = new ImageComponent(); + + public ImageComponent getImage2() { + return image2; + } + + public void setImage2(ImageComponent ic) { + this.image2 = ic; + } + + private HtmlPanelGrid gridMsg1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMsg1() { + return gridMsg1; + } + + public void setGridMsg1(HtmlPanelGrid hpg) { + this.gridMsg1 = hpg; + } + + private StaticText txtMsg = new StaticText(); + + public StaticText getTxtMsg() { + return txtMsg; + } + + public void setTxtMsg(StaticText st) { + this.txtMsg = st; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel3() { + return gridPanel3; + } + + public void setGridPanel3(HtmlPanelGrid hpg) { + this.gridPanel3 = hpg; + } + + private PanelGroup groupPanel3 = new PanelGroup(); + + public PanelGroup getGroupPanel3() { + return groupPanel3; + } + + public void setGroupPanel3(PanelGroup pg) { + this.groupPanel3 = pg; + } + + private StaticText staticText3 = new StaticText(); + + public StaticText getStaticText3() { + return staticText3; + } + + public void setStaticText3(StaticText st) { + this.staticText3 = st; + } + + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel6() { + return gridPanel6; + } + + public void setGridPanel6(HtmlPanelGrid hpg) { + this.gridPanel6 = hpg; + } + + private PanelGroup groupPanel4 = new PanelGroup(); + + public PanelGroup getGroupPanel4() { + return groupPanel4; + } + + public void setGroupPanel4(PanelGroup pg) { + this.groupPanel4 = pg; + } + + private StaticText staticText10 = new StaticText(); + + public StaticText getStaticText10() { + return staticText10; + } + + public void setStaticText10(StaticText st) { + this.staticText10 = st; + } + + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel7() { + return gridPanel7; + } + + public void setGridPanel7(HtmlPanelGrid hpg) { + this.gridPanel7 = hpg; + } + + private Button butCancelar = new Button(); + + public Button getButCancelar() { + return butCancelar; + } + + public void setButCancelar(Button b) { + this.butCancelar = b; + } + + private PanelGroup groupPanel5 = new PanelGroup(); + + public PanelGroup getGroupPanel5() { + return groupPanel5; + } + + public void setGroupPanel5(PanelGroup pg) { + this.groupPanel5 = pg; + } + + private Button butContinuar = new Button(); + + public Button getButContinuar() { + return butContinuar; + } + + public void setButContinuar(Button b) { + this.butContinuar = b; + } + + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel4() { + return gridPanel4; + } + + public void setGridPanel4(HtmlPanelGrid hpg) { + this.gridPanel4 = hpg; + } + + private HtmlPanelGrid gridCategoria = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridCategoria() { + return gridCategoria; + } + + public void setGridCategoria(HtmlPanelGrid hpg) { + this.gridCategoria = hpg; + } + + private HtmlPanelGrid gridUtilizador = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridUtilizador() { + return gridUtilizador; + } + + public void setGridUtilizador(HtmlPanelGrid hpg) { + this.gridUtilizador = hpg; + } + + private PanelGroup pgCatDirRh = new PanelGroup(); + + public PanelGroup getPgCatDirRh() { + return pgCatDirRh; + } + + public void setPgCatDirRh(PanelGroup pg) { + this.pgCatDirRh = pg; + } + + private RadioButton rbCatDirRh = new RadioButton(); + + public RadioButton getRbCatDirRh() { + return rbCatDirRh; + } + + public void setRbCatDirRh(RadioButton rbCatGestao) { + this.rbCatDirRh = rbCatGestao; + } + + private StaticText staticText11 = new StaticText(); + + public StaticText getStaticText11() { + return staticText11; + } + + public void setStaticText11(StaticText st) { + this.staticText11 = st; + } + + private PanelGroup pgCatGestao = new PanelGroup(); + + public PanelGroup getPgCatGestao() { + return pgCatGestao; + } + + public void setPgCatGestao(PanelGroup pg) { + this.pgCatGestao = pg; + } + + private RadioButton rbCatGestao = new RadioButton(); + + public RadioButton getRbCatGestao() { + return rbCatGestao; + } + + public void setRbCatGestao(RadioButton rbCatGestao) { + this.rbCatGestao = rbCatGestao; + } + + private StaticText staticText12 = new StaticText(); + + public StaticText getStaticText12() { + return staticText12; + } + + public void setStaticText12(StaticText st) { + this.staticText12 = st; + } + + private PanelGroup pgCatGestaoAd = new PanelGroup(); + + public PanelGroup getPgCatGestaoAd() { + return pgCatGestaoAd; + } + + public void setPgCatGestaoAd(PanelGroup pg) { + this.pgCatGestaoAd = pg; + } + + private StaticText staticText13 = new StaticText(); + + public StaticText getStaticText13() { + return staticText13; + } + + public void setStaticText13(StaticText st) { + this.staticText13 = st; + } + + private Checkbox chkGestaoGeral = new Checkbox(); + + public Checkbox getChkGestaoGeral() { + return chkGestaoGeral; + } + + public void setChkGestaoGeral(Checkbox c) { + this.chkGestaoGeral = c; + } + + private PanelGroup pgCatHs = new PanelGroup(); + + public PanelGroup getPgCatHs() { + return pgCatHs; + } + + public void setPgCatHs(PanelGroup pg) { + this.pgCatHs = pg; + } + + private RadioButton rbCatHs = new RadioButton(); + + public RadioButton getRbCatHs() { + return rbCatHs; + } + + public void setRbCatHs(RadioButton rbCatGestao) { + this.rbCatHs = rbCatGestao; + } + + private StaticText staticText14 = new StaticText(); + + public StaticText getStaticText14() { + return staticText14; + } + + public void setStaticText14(StaticText st) { + this.staticText14 = st; + } + + private PanelGroup pgCatMed = new PanelGroup(); + + public PanelGroup getPgCatMed() { + return pgCatMed; + } + + public void setPgCatMed(PanelGroup pg) { + this.pgCatMed = pg; + } + + private RadioButton rbCatMed = new RadioButton(); + + public RadioButton getRbCatMed() { + return rbCatMed; + } + + public void setRbCatMed(RadioButton rbCatGestao) { + this.rbCatMed = rbCatGestao; + } + + private StaticText staticText15 = new StaticText(); + + public StaticText getStaticText15() { + return staticText15; + } + + public void setStaticText15(StaticText st) { + this.staticText15 = st; + } + + private PanelGroup pgCatRh = new PanelGroup(); + + public PanelGroup getPgCatRh() { + return pgCatRh; + } + + public void setPgCatRh(PanelGroup pg) { + this.pgCatRh = pg; + } + + private RadioButton rbCatRh = new RadioButton(); + + public RadioButton getRbCatRh() { + return rbCatRh; + } + + public void setRbCatRh(RadioButton rbCatGestao) { + this.rbCatRh = rbCatGestao; + } + + private StaticText staticText16 = new StaticText(); + + public StaticText getStaticText16() { + return staticText16; + } + + public void setStaticText16(StaticText st) { + this.staticText16 = st; + } + + private PanelGroup pgCatRhAd = new PanelGroup(); + + public PanelGroup getPgCatRhAd() { + return pgCatRhAd; + } + + public void setPgCatRhAd(PanelGroup pg) { + this.pgCatRhAd = pg; + } + + private StaticText staticText17 = new StaticText(); + + public StaticText getStaticText17() { + return staticText17; + } + + public void setStaticText17(StaticText st) { + this.staticText17 = st; + } + + private Checkbox chkRhResp = new Checkbox(); + + public Checkbox getChkRhResp() { + return chkRhResp; + } + + public void setChkRhResp(Checkbox c) { + this.chkRhResp = c; + } + + private PanelGroup pgCatSeg = new PanelGroup(); + + public PanelGroup getPgCatSeg() { + return pgCatSeg; + } + + public void setPgCatSeg(PanelGroup pg) { + this.pgCatSeg = pg; + } + + private RadioButton rbCatSeg = new RadioButton(); + + public RadioButton getRbCatSeg() { + return rbCatSeg; + } + + public void setRbCatSeg(RadioButton rbCatGestao) { + this.rbCatSeg = rbCatGestao; + } + + private StaticText staticText18 = new StaticText(); + + public StaticText getStaticText18() { + return staticText18; + } + + public void setStaticText18(StaticText st) { + this.staticText18 = st; + } + + private PanelGroup pgCatSegAd = new PanelGroup(); + + public PanelGroup getPgCatSegAd() { + return pgCatSegAd; + } + + public void setPgCatSegAd(PanelGroup pg) { + this.pgCatSegAd = pg; + } + + private StaticText staticText19 = new StaticText(); + + public StaticText getStaticText19() { + return staticText19; + } + + public void setStaticText19(StaticText st) { + this.staticText19 = st; + } + + private Checkbox chkSegResp = new Checkbox(); + + public Checkbox getChkSegResp() { + return chkSegResp; + } + + public void setChkSegResp(Checkbox c) { + this.chkSegResp = c; + } + + private HtmlPanelGrid gridTrabalhadores = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridTrabalhadores() { + return gridTrabalhadores; + } + + public void setGridTrabalhadores(HtmlPanelGrid hpg) { + this.gridTrabalhadores = hpg; + } + + private StaticText txtSearchMsg1 = new StaticText(); + + public StaticText getTxtSearchMsg1() { + return txtSearchMsg1; + } + + public void setTxtSearchMsg1(StaticText st) { + this.txtSearchMsg1 = st; + } + + private PanelGroup groupPanel6 = new PanelGroup(); + + public PanelGroup getGroupPanel6() { + return groupPanel6; + } + + public void setGroupPanel6(PanelGroup pg) { + this.groupPanel6 = pg; + } + + private StaticText staticText4 = new StaticText(); + + public StaticText getStaticText4() { + return staticText4; + } + + public void setStaticText4(StaticText st) { + this.staticText4 = st; + } + + private TextField txtNrMecanografico = new TextField(); + + public TextField getTxtNrMecanografico() { + return txtNrMecanografico; + } + + public void setTxtNrMecanografico(TextField tf) { + this.txtNrMecanografico = tf; + } + + private StaticText staticText5 = new StaticText(); + + public StaticText getStaticText5() { + return staticText5; + } + + public void setStaticText5(StaticText st) { + this.staticText5 = st; + } + + private TextField txtNomeTrabalhador = new TextField(); + + public TextField getTxtNomeTrabalhador() { + return txtNomeTrabalhador; + } + + public void setTxtNomeTrabalhador(TextField tf) { + this.txtNomeTrabalhador = tf; + } + + private StaticText staticText6 = new StaticText(); + + public StaticText getStaticText6() { + return staticText6; + } + + public void setStaticText6(StaticText st) { + this.staticText6 = st; + } + + private Button butProcurarTrab = new Button(); + + public Button getButProcurarTrab() { + return butProcurarTrab; + } + + public void setButProcurarTrab(Button b) { + this.butProcurarTrab = b; + } + + private Table tblTrabalhadores = new Table(); + + public Table getTblTrabalhadores() { + return tblTrabalhadores; + } + + public void setTblTrabalhadores(Table t) { + this.tblTrabalhadores = t; + } + + private TableRowGroup tableRowGroup1 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup1() { + return tableRowGroup1; + } + + public void setTableRowGroup1(TableRowGroup trg) { + this.tableRowGroup1 = trg; + } + + private TableColumn tableColumn1 = new TableColumn(); + + public TableColumn getTableColumn1() { + return tableColumn1; + } + + public void setTableColumn1(TableColumn tc) { + this.tableColumn1 = tc; + } + + private Hyperlink lnkPOR = new Hyperlink(); + + public Hyperlink getLnkPOR() { + return lnkPOR; + } + + public void setLnkPOR(Hyperlink h) { + this.lnkPOR = h; + } + + private TableColumn tableColumn2 = new TableColumn(); + + public TableColumn getTableColumn2() { + return tableColumn2; + } + + public void setTableColumn2(TableColumn tc) { + this.tableColumn2 = tc; + } + + private Hyperlink lnkNomeTrabalhador = new Hyperlink(); + + public Hyperlink getLnkNomeTrabalhador() { + return lnkNomeTrabalhador; + } + + public void setLnkNomeTrabalhador(Hyperlink h) { + this.lnkNomeTrabalhador = h; + } + + private TableColumn tableColumn3 = new TableColumn(); + + public TableColumn getTableColumn3() { + return tableColumn3; + } + + public void setTableColumn3(TableColumn tc) { + this.tableColumn3 = tc; + } + + private Hyperlink lnkEstabelecimentoTrabalhador = new Hyperlink(); + + public Hyperlink getLnkEstabelecimentoTrabalhador() { + return lnkEstabelecimentoTrabalhador; + } + + public void setLnkEstabelecimentoTrabalhador(Hyperlink h) { + this.lnkEstabelecimentoTrabalhador = h; + } + + private StaticText staticText7 = new StaticText(); + + public StaticText getStaticText7() { + return staticText7; + } + + public void setStaticText7(StaticText st) { + this.staticText7 = st; + } + + private StaticText stOutro = new StaticText(); + + public StaticText getStOutro() { + return stOutro; + } + + public void setStOutro(StaticText st) { + this.stOutro = st; + } + + private HtmlPanelGrid gridOutro = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridOutro() { + return gridOutro; + } + + public void setGridOutro(HtmlPanelGrid hpg) { + this.gridOutro = hpg; + } + + private StaticText staticText9 = new StaticText(); + + public StaticText getStaticText9() { + return staticText9; + } + + public void setStaticText9(StaticText st) { + this.staticText9 = st; + } + + private TextField txtNomeOutro = new TextField(); + + public TextField getTxtNomeOutro() { + return txtNomeOutro; + } + + public void setTxtNomeOutro(TextField tf) { + this.txtNomeOutro = tf; + } + + private StaticText staticText20 = new StaticText(); + + public StaticText getStaticText20() { + return staticText20; + } + + public void setStaticText20(StaticText st) { + this.staticText20 = st; + } + + private DropDown drpEstabelecimentoOutro = new DropDown(); + + public DropDown getDrpEstabelecimentoOutro() { + return drpEstabelecimentoOutro; + } + + public void setDrpEstabelecimentoOutro(DropDown dd) { + this.drpEstabelecimentoOutro = dd; + } + + private HtmlPanelGrid gridTecnicosHs = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridTecnicosHs() { + return gridTecnicosHs; + } + + public void setGridTecnicosHs(HtmlPanelGrid hpg) { + this.gridTecnicosHs = hpg; + } + + private StaticText staticText21 = new StaticText(); + + public StaticText getStaticText21() { + return staticText21; + } + + public void setStaticText21(StaticText st) { + this.staticText21 = st; + } + + private DropDown drpNomeHs = new DropDown(); + + public DropDown getDrpNomeHs() { + return drpNomeHs; + } + + public void setDrpNomeHs(DropDown dd) { + this.drpNomeHs = dd; + } + + private StaticText staticText22 = new StaticText(); + + public StaticText getStaticText22() { + return staticText22; + } + + public void setStaticText22(StaticText st) { + this.staticText22 = st; + } + + private TextField txtCap = new TextField(); + + public TextField getTxtCap() { + return txtCap; + } + + public void setTxtCap(TextField tf) { + this.txtCap = tf; + } + + private HtmlPanelGrid gridMedicos = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMedicos() { + return gridMedicos; + } + + public void setGridMedicos(HtmlPanelGrid hpg) { + this.gridMedicos = hpg; + } + + private StaticText staticText23 = new StaticText(); + + public StaticText getStaticText23() { + return staticText23; + } + + public void setStaticText23(StaticText st) { + this.staticText23 = st; + } + + private DropDown drpNomeMed = new DropDown(); + + public DropDown getDrpNomeMed() { + return drpNomeMed; + } + + public void setDrpNomeMed(DropDown dd) { + this.drpNomeMed = dd; + } + + private StaticText staticText24 = new StaticText(); + + public StaticText getStaticText24() { + return staticText24; + } + + public void setStaticText24(StaticText st) { + this.staticText24 = st; + } + + private DropDown drpEstabelecimentoMed = new DropDown(); + + public DropDown getDrpEstabelecimentoMed() { + return drpEstabelecimentoMed; + } + + public void setDrpEstabelecimentoMed(DropDown dd) { + this.drpEstabelecimentoMed = dd; + } + + //
+ boolean isPostback = false; + + private HiddenField hidHighlight = new HiddenField(); + + public HiddenField getHidHighlight() { + return hidHighlight; + } + + public void setHidHighlight(HiddenField hf) { + this.hidHighlight = hf; + } + + private HiddenField hidClear = new HiddenField(); + + public HiddenField getHidClear() { + return hidClear; + } + + public void setHidClear(HiddenField hf) { + this.hidClear = hf; + } + + private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel8() { + return gridPanel8; + } + + public void setGridPanel8(HtmlPanelGrid hpg) { + this.gridPanel8 = hpg; + } + + private PanelGroup groupPanel7 = new PanelGroup(); + + public PanelGroup getGroupPanel7() { + return groupPanel7; + } + + public void setGroupPanel7(PanelGroup pg) { + this.groupPanel7 = pg; + } + + private StaticText staticText25 = new StaticText(); + + public StaticText getStaticText25() { + return staticText25; + } + + public void setStaticText25(StaticText st) { + this.staticText25 = st; + } + + private ImageComponent image3 = new ImageComponent(); + + public ImageComponent getImage3() { + return image3; + } + + public void setImage3(ImageComponent ic) { + this.image3 = ic; + } + + private StaticText staticText26 = new StaticText(); + + public StaticText getStaticText26() { + return staticText26; + } + + public void setStaticText26(StaticText st) { + this.staticText26 = st; + } + private RadioButton rbCatDirNacSeg = new RadioButton(); + + public RadioButton getRbCatDirNacSeg() { + return rbCatDirNacSeg; + } + + public void setRbCatDirNacSeg(RadioButton rb) { + this.rbCatDirNacSeg = rb; + } + private RadioButton rbCatDirLoja = new RadioButton(); + + public RadioButton getRbCatDirLoja() { + return rbCatDirLoja; + } + + public void setRbCatDirLoja(RadioButton rb) { + this.rbCatDirLoja = rb; + } + private StaticText lblUser = new StaticText(); + + public StaticText getLblUser() { + return lblUser; + } + + public void setLblUser(StaticText st) { + this.lblUser = st; + } + /** + *

Construct a new Page bean instance.

+ */ + public NovoUtilizador() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("NovoUtilizador Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + if (!getSessionBean1().isLoggedIn()) { + try { + getExternalContext().redirect("Login.jsp"); + } catch(Exception e) { + // . . . handle exception . . . + } + } + else + { + lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); + + HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom(referer); + if(!pageFrom.matches("NovoUtilizador.jsp")) + { + isPostback = false; + } + else + { + isPostback = true; + } + + } + + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + public void prerender() { + if(!isPostback) + { + getSessionBean1().setNewUser(null); + initializePage(); + } + else + { + showPagePostback(); + } + + txtMsg.setText(getSessionBean1().getMsg()); + getSessionBean1().setMsg(""); + + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + public String lnkEditUser_action() { + // TODO: Replace with your code + + getSessionBean1().setNavFrom("NovoUtilizador"); + getSessionBean1().setModoEdicaoUtilizador("edit"); + return "user"; + + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), true ); + return null; + } + + public void drpTipo_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public void drpNome_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public String butCancelar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + return "gestao_utilizadores"; + } + + public String butApagar_action() + { + return null; + } + + public String butContinuar_action() + { + if(rbCatHs.getSelected() != null) + { + if(rbCatHs.getSelected().equals(new Boolean(true))) + { + if(drpNomeHs.getSelected().equals(new Integer(0) )) + { + getSessionBean1().setMsg("Falta nome do técnico de higiena e segurança!"); + return null; + } + else if(txtCap.getText() == null) + { + getSessionBean1().setMsg("Falta cap!"); + return null; + } + else + { + String cap = (String) txtCap.getText(); + if(cap.trim().length() == 0) + { + getSessionBean1().setMsg("Falta cap!"); + return null; + } + else + { + NewUser u = new NewUser(); + u.setTipo(new Integer(3)); + u.setNumero_mecanografico(""); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + u.setTipo_descricao(adp.getTipoDescricao(u.getTipo())); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + u.setFuncionario_hst_id((Integer) drpNomeHs.getSelected()); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + Integer tecnico_id = (Integer) drpNomeHs.getSelected(); + u.setNome(Utils.unicodeToHTML(adp.getTecnicoSaudeNome(tecnico_id))); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + u.setCap(cap); + u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id()); + u.setResponsavel_loja("n"); + u.setEstabelecimento(null); + getSessionBean1().setNewUser(u); + getSessionBean1().setModoEdicaoUtilizador("new"); + getSessionBean1().setNavFrom("NovoUtilizador"); + return "new_user_fields"; + } + } + } + } + else if(rbCatMed.getSelected() != null) + { + if(rbCatMed.getSelected().equals(new Boolean(true))) + { + if(drpNomeMed.getSelected().equals(new Integer(0))) + { + getSessionBean1().setMsg("Falta nome do médico!"); + return null; + } + else if(drpEstabelecimentoMed.getSelected().equals(new Integer(-1))) + { + getSessionBean1().setMsg("Falta estabelecimento!"); + return null; + } + else + { + NewUser u = new NewUser(); + u.setTipo(new Integer(5)); + u.setNumero_mecanografico(""); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + u.setTipo_descricao(adp.getTipoDescricao(u.getTipo())); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + u.setMedico_id((Integer) drpNomeMed.getSelected()); + //u.setNome(drpNomeMed.getLabel()); + Medico m = null; + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + Integer medico_id = (Integer) drpNomeMed.getSelected(); + m = adp.getMedico(medico_id); + u.setNome(m.getNome()); + u.setNumero_cedula(m.getNumero_cedula()); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id()); + u.setEstabelecimento((Integer) drpEstabelecimentoMed.getSelected()); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + u.setEstabelecimento_descricao(adp.getEstabelecimentoNome(u.getEstabelecimento())); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + u.setResponsavel_loja("n"); + getSessionBean1().setNewUser(u); + getSessionBean1().setModoEdicaoUtilizador("new"); + getSessionBean1().setNavFrom("NovoUtilizador"); + return "new_user_fields"; + } + } + } + else // + { + if(getSessionBean1().getNewUser() == null) + { + boolean booOutro = false; + NewUser u = new NewUser(); + if(txtNomeOutro.getText() != null) + { + String nome_outro = (String) txtNomeOutro.getText(); + if(nome_outro.trim().length() > 0) + { + u.setNome(nome_outro); + booOutro = true; + } + else + { + getSessionBean1().setMsg("Falta designação!"); + return null; + } + } + else + { + getSessionBean1().setMsg("Falta designação!"); + return null; + } + Integer estabelecimento_outro = (Integer) drpEstabelecimentoOutro.getSelected(); + System.out.println("ESTABELECIMENTO OUTRO : " + estabelecimento_outro.intValue()); + if(estabelecimento_outro.intValue() == -1) + { + getSessionBean1().setMsg("Falta estabelecimento!"); + return null; + } + else + { + u.setEstabelecimento(estabelecimento_outro); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + u.setEstabelecimento_descricao(adp.getEstabelecimentoNome(estabelecimento_outro)); + booOutro = true; + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + u = setUserTipo(u); + u.setNumero_mecanografico(""); + u.setResponsavel_loja("n"); + u.setGestor_geral("n"); + switch(u.getTipo().intValue()) + { + case 1: //seg + if(chkSegResp.getSelected() != null) + { + if(chkSegResp.getSelected().equals(new Boolean(true))) + { + u.setResponsavel_loja("y"); + } + } + break; + case 2: //rh + if(chkRhResp.getSelected() != null) + { + if(chkRhResp.getSelected().equals(new Boolean(true))) + { + u.setResponsavel_loja("y"); + } + } + break; + case 6: //gestor + if(chkGestaoGeral.getSelected() != null) + { + if(chkGestaoGeral.getSelected().equals(new Boolean(true))) + { + u.setGestor_geral("y"); + } + } + + break; + } + u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id()); + if(booOutro) + { + getSessionBean1().setNewUser(u); + getSessionBean1().setModoEdicaoUtilizador("new"); + getSessionBean1().setNavFrom("NovoUtilizador"); + return "new_user_fields"; + } + getSessionBean1().setNewUser(u); + } + } + + if(getSessionBean1().getNewUser() == null) + { + getSessionBean1().setMsg("Tem de definir um novo utilizador !"); + return null; + } + else + { + + getSessionBean1().setModoEdicaoUtilizador("new"); + getSessionBean1().setNavFrom("NovoUtilizador"); + return "new_user_fields"; + } + } + + + + private void initializePage() + { + getSessionBean1().getTrabalhadoresListDataProvider().setList(new ArrayList()); + int tipo = getSessionBean1().getCurrentUser().getTipo().intValue(); + switch(tipo) + { + case 7: //Director RH + pgCatDirRh.setRendered(false); + pgCatHs.setRendered(false); + pgCatMed.setRendered(false); + break; + } + + //gridUtilizador.setRendered(false); + gridTrabalhadores.setStyleClass("hidden"); + tblTrabalhadores.setStyleClass("hidden"); + gridTecnicosHs.setStyleClass("hidden"); + gridMedicos.setStyleClass("hidden"); + + rbCatDirRh.setSelected(null); + rbCatGestao.setSelected(null); + rbCatHs.setSelected(null); + rbCatMed.setSelected(null); + rbCatRh.setSelected(null); + rbCatSeg.setSelected(null); + rbCatDirNacSeg.setSelected(null); + rbCatDirLoja.setSelected(null); + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + com.sun.rave.web.ui.model.Option[] listMedOptions = adp.getEstabelecimentosList( new Integer(Global.AUCHAN), new Boolean(false)); + listMedOptions[0].setLabel("-Seleccionar-"); + com.sun.rave.web.ui.model.Option[] listOutroOptions = adp.getEstabelecimentosList( getSessionBean1().getCurrentUser().getEmpresa_id(), new Boolean(false)); + listOutroOptions[0].setLabel("-Seleccionar-"); + + + getSessionBean1().setEstabelecimentosMedOptions(listMedOptions); + getSessionBean1().setEstabelecimentosOutroOptions( listOutroOptions ); + drpEstabelecimentoOutro.setSelected(new Integer(-1)); + drpEstabelecimentoMed.setSelected(new Integer(-1)); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + getSessionBean1().setTecnicosOptions(adp.getTecnicosSaudeList()); + drpNomeHs.setSelected(new Integer(0)); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + getSessionBean1().setMedicosOptions(adp.getMedicosList()); + drpNomeMed.setSelected(new Integer(0)); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + + public String butProcurarTrab_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + boolean booNrOk = false; + boolean booNomeOk = false; + String nr_mecano = null; + String nome = null; + if(txtNrMecanografico.getText() != null) + { + nr_mecano = (String) txtNrMecanografico.getText(); + if(nr_mecano.trim().length() > 0) + { + booNrOk = true; + } + else + { + nr_mecano = null; + } + } + + if(txtNomeTrabalhador.getText() != null) + { + nome = (String) txtNomeTrabalhador.getText(); + + if(nome.trim().length() > 0) + { + booNomeOk = true; + } + else + { + nome = null; + } + } + + if(! booNrOk && !booNomeOk) + { + getSessionBean1().setMsg("Tem de preencher Numero Mecanográfico ou Nome"); + return null; + } + + Trabalhador t = null; + if(nome != null) + { + nome = utils.Utils.textToUnicode( nome.toUpperCase()); + } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList list = adp.searchTrabalhador(getSessionBean1().getCurrentUser().getEmpresa_id(), nr_mecano, nome ); +// if(list.size() == 1) +// { +// t = (Trabalhador) list.get(0); +// NewUser u = new NewUser(); +// +// u.setNome(t.getNome()); +// u.setNumero_mecanografico(t.getNumero_mecanografico()); +// u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id()); +// u.setEstabelecimento(t.getEstabelecimento_id()); +// u.setEstabelecimento_descricao(t.getEstabelecimento()); +// u = setUserTipo(u); +// u.setResponsavel_loja("n"); +// if(u.getTipo().intValue() == 1) //seg +// { +// if(chkSegResp.getSelected() != null) +// { +// if(chkSegResp.getSelected().equals(new Boolean(true))) +// { +// u.setResponsavel_loja("y"); +// } +// } +// } +// else if(u.getTipo().intValue() == 2) //rh +// { +// if(chkRhResp.getSelected() != null) +// { +// if(chkRhResp.getSelected().equals(new Boolean(true))) +// { +// u.setResponsavel_loja("y"); +// } +// } +// } +// getSessionBean1().setNewUser(u); +// } +// else +// { + //tblTrabalhadores.setRendered(true); + gridTrabalhadores.setStyleClass(""); + tblTrabalhadores.setStyleClass(""); + getSessionBean1().getTrabalhadoresListDataProvider().setList(list); +// } + } + catch(Exception ex) + { + getSessionBean1().setMsg("Trabalhador inexistente !"); + getSessionBean1().getTrabalhadoresListDataProvider().setList(new ArrayList()); + tblTrabalhadores.setStyleClass("hidden"); + ErrorLogger.logException( ex ); + } + return null; + } + + public String lnkPOR_action() { + // TODO: Replace with your code + Trabalhador t = getTrabalhadorRowData(); + NewUser u = new NewUser(); + u = setUserTipo(u); + u.setNome(t.getNome()); + u.setNumero_mecanografico(t.getNumero_mecanografico()); + u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id()); + u.setEstabelecimento(t.getEstabelecimento_id()); + u.setEstabelecimento_descricao(t.getEstabelecimento()); + u.setResponsavel_loja("n"); + u.setGestor_geral("n"); + if(u.getTipo().intValue() == 1) //seg + { + if(chkSegResp.getSelected() != null) + { + if(chkSegResp.getSelected().equals(new Boolean(true))) + { + u.setResponsavel_loja("y"); + } + } + } + else if(u.getTipo().intValue() == 2) //rh + { + if(chkRhResp.getSelected() != null) + { + if(chkRhResp.getSelected().equals(new Boolean(true))) + { + u.setResponsavel_loja("y"); + } + } + } + else if(u.getTipo().intValue() == 6) //gestor + { + if(chkGestaoGeral.getSelected() != null) + { + if(chkGestaoGeral.getSelected().equals(new Boolean(true))) + { + u.setGestor_geral("y"); + } + } + + } + + + getSessionBean1().setNewUser(u); + getSessionBean1().setModoEdicaoUtilizador("new"); + getSessionBean1().setNavFrom("NovoUtilizador"); + + return "new_user_fields"; + } + + public String lnkNomeTrabalhador_action() { + // TODO: Replace with your code + Trabalhador t = getTrabalhadorRowData(); + NewUser u = new NewUser(); + u = setUserTipo(u); + u.setNome(t.getNome()); + u.setNumero_mecanografico(t.getNumero_mecanografico()); + u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id()); + u.setEstabelecimento(t.getEstabelecimento_id()); + u.setEstabelecimento_descricao(t.getEstabelecimento()); + u.setResponsavel_loja("n"); + u.setGestor_geral("n"); + if(u.getTipo().intValue() == 1) //seg + { + if(chkSegResp.getSelected() != null) + { + if(chkSegResp.getSelected().equals(new Boolean(true))) + { + u.setResponsavel_loja("y"); + } + } + } + else if(u.getTipo().intValue() == 2) //rh + { + if(chkRhResp.getSelected() != null) + { + if(chkRhResp.getSelected().equals(new Boolean(true))) + { + u.setResponsavel_loja("y"); + } + } + } + else if(u.getTipo().intValue() == 6) //gestor + { + if(chkGestaoGeral.getSelected() != null) + { + if(chkGestaoGeral.getSelected().equals(new Boolean(true))) + { + u.setGestor_geral("y"); + } + } + + } + + getSessionBean1().setNewUser(u); + getSessionBean1().setModoEdicaoUtilizador("new"); + getSessionBean1().setNavFrom("NovoUtilizador"); + + return "new_user_fields"; + } + + public String lnkEstabelecimentoTrabalhador_action() { + // TODO: Replace with your code + Trabalhador t = getTrabalhadorRowData(); + NewUser u = new NewUser(); + u = setUserTipo(u); + u.setNome(t.getNome()); + u.setNumero_mecanografico(t.getNumero_mecanografico()); + u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id()); + u.setEstabelecimento(t.getEstabelecimento_id()); + u.setEstabelecimento_descricao(t.getEstabelecimento()); + u.setResponsavel_loja("n"); + u.setGestor_geral("n"); + if(u.getTipo().intValue() == 1) //seg + { + if(chkSegResp.getSelected() != null) + { + if(chkSegResp.getSelected().equals(new Boolean(true))) + { + u.setResponsavel_loja("y"); + } + } + } + else if(u.getTipo().intValue() == 2) //rh + { + if(chkRhResp.getSelected() != null) + { + if(chkRhResp.getSelected().equals(new Boolean(true))) + { + u.setResponsavel_loja("y"); + } + } + } + else if(u.getTipo().intValue() == 6) //gestor + { + if(chkGestaoGeral.getSelected() != null) + { + if(chkGestaoGeral.getSelected().equals(new Boolean(true))) + { + u.setGestor_geral("y"); + } + } + + } + + getSessionBean1().setNewUser(u); + getSessionBean1().setModoEdicaoUtilizador("new"); + getSessionBean1().setNavFrom("NovoUtilizador"); + + return "new_user_fields"; + } + + private Trabalhador getTrabalhadorRowData() + { + RowKey rk = tableRowGroup1.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + TrabalhadoresListDataProvider provider = (TrabalhadoresListDataProvider) tableRowGroup1.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + Trabalhador t = (Trabalhador)list.get(k); + hidHighlight.setValue(rk.getRowId()); + return t; + } + + private NewUser setUserTipo(NewUser u) + { + if(rbCatDirNacSeg.getSelected() != null) + { + if(rbCatDirNacSeg.getSelected().equals(new Boolean(true))) + { + u.setTipo(new Integer(10)); + } + } + if(rbCatDirLoja.getSelected() != null) + { + if(rbCatDirLoja.getSelected().equals(new Boolean(true))) + { + u.setTipo(new Integer(9)); + } + } + if(rbCatDirRh.getSelected() != null) + { + if(rbCatDirRh.getSelected().equals(new Boolean(true))) + { + u.setTipo(new Integer(7)); + } + } + if(rbCatGestao.getSelected() != null) + { + if(rbCatGestao.getSelected().equals(new Boolean(true))) + { + u.setTipo(new Integer(6)); + } + } + if(rbCatRh.getSelected() != null) + { + if(rbCatRh.getSelected().equals(new Boolean(true))) + { + u.setTipo(new Integer(2)); + } + } + if(rbCatSeg.getSelected() != null) + { + if(rbCatSeg.getSelected().equals(new Boolean(true))) + { + u.setTipo(new Integer(1)); + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + u.setTipo_descricao(adp.getTipoDescricao(u.getTipo())); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + return u; + } + + private void showPagePostback() + { + if(rbCatDirRh.getSelected() != null) + { + if(rbCatDirRh.getSelected().equals( new Boolean(true) )) + { + gridTrabalhadores.setStyleClass(""); + return; + } + } + + if(rbCatGestao.getSelected() != null) + { + if(rbCatGestao.getSelected().equals( new Boolean(true) )) + { + gridTrabalhadores.setStyleClass(""); + return; + } + } + + if(rbCatRh.getSelected() != null) + { + if(rbCatRh.getSelected().equals( new Boolean(true) )) + { + gridTrabalhadores.setStyleClass(""); + return; + } + } + if(rbCatSeg.getSelected() != null) + { + if(rbCatSeg.getSelected().equals( new Boolean(true) )) + { + gridTrabalhadores.setStyleClass(""); + return; + } + } + + if(rbCatHs.getSelected() != null) + { + if(rbCatHs.getSelected().equals( new Boolean(true) )) + { + gridTecnicosHs.setStyleClass(""); + return; + } + } + + if(rbCatMed.getSelected() != null) + { + if(rbCatMed.getSelected().equals( new Boolean(true) )) + { + gridMedicos.setStyleClass(""); + return; + } + } + + } + +// public String getColumnStyle(){ +// TableRowDataProvider trdp = (TableRowDataProvider) getBean("currentRow"); +// RowKey rowKey = trdp.getTableRow(); +// System.out.println(rowKey); +// if ((Integer.parseInt(rowKey.getRowId()) % 2) == 0){ +// return " "; +// } +// else { +// return "background-color: #eeeeee"; +// } +// } + + private void setNewUser() + { + + NewUser u = new NewUser(); + u = setUserTipo(u); + u.setNumero_mecanografico(""); + u.setResponsavel_loja("n"); + u.setGestor_geral("n"); + switch(u.getTipo().intValue()) + { + case 1: //seg + if(chkSegResp.getSelected() != null) + { + if(chkSegResp.getSelected().equals(new Boolean(true))) + { + u.setResponsavel_loja("y"); + } + } + break; + case 2: //rh + if(chkRhResp.getSelected() != null) + { + if(chkRhResp.getSelected().equals(new Boolean(true))) + { + u.setResponsavel_loja("y"); + } + } + break; + case 6: //gestor + if(chkGestaoGeral.getSelected() != null) + { + if(chkGestaoGeral.getSelected().equals(new Boolean(true))) + { + u.setGestor_geral("y"); + } + } + + break; + } + u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id()); + + } + + public String lnkNewUser_action() { + // TODO: Replace with your code + + + return "gestao_utilizadores"; + } + + public String lnkAnalisesAcidente_action() { + // TODO: Replace with your code + Integer tipo_utilizador = getSessionBean1().getCurrentUser().getTipo(); + if(tipo_utilizador.intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP) + { + return "form_dir_siprp"; + } + else if(tipo_utilizador.intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH) + { + return "form_dir_ger_rh"; + } + + return null; + } + + public void rbCatRh_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + } + + public void rbCatHs_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public String lnkAjuda_action() { + // TODO: Replace with your code +// ServletContext theApplicationsServletContext = +// (ServletContext) this.getExternalContext().getContext(); +// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); +// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf"; +// +// Global global = new Global(); +// try +// { +// global.showPdf(pdfFilePath); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + return null; + } + + public String lnkPlanosActuacao_action() { + // TODO: Replace with your code + Utilizador u = getSessionBean1().getCurrentUser(); +// String curUser = "?user=" + u.getId().toString(); + FacesContext fc = getFacesContext().getCurrentInstance(); + Global.redirectToPlanos(fc, u); + return null; + } +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RecuperarPassword.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RecuperarPassword.java new file mode 100644 index 00000000..8ff0e365 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RecuperarPassword.java @@ -0,0 +1,551 @@ +/* + * RecuperarPassword.java + * + * Created on September 19, 2007, 9:57 AM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import beans.Utilizador; +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Button; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.component.PanelGroup; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.TextField; +import db.providers.UtilizadoresDataProvider; +import global.Global; +import java.util.Date; +import java.util.Properties; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import javax.mail.BodyPart; +import javax.mail.Message; +import javax.mail.Multipart; +import javax.mail.Session; +import javax.mail.Transport; +import javax.mail.internet.InternetAddress; +import javax.mail.internet.MimeBodyPart; +import javax.mail.internet.MimeMessage; +import javax.mail.internet.MimeMultipart; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class RecuperarPassword extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel3() { + return gridPanel3; + } + + public void setGridPanel3(HtmlPanelGrid hpg) { + this.gridPanel3 = hpg; + } + + private StaticText txtMsg = new StaticText(); + + public StaticText getTxtMsg() { + return txtMsg; + } + + public void setTxtMsg(StaticText st) { + this.txtMsg = st; + } + + private StaticText staticText3 = new StaticText(); + + public StaticText getStaticText3() { + return staticText3; + } + + public void setStaticText3(StaticText st) { + this.staticText3 = st; + } + + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel4() { + return gridPanel4; + } + + public void setGridPanel4(HtmlPanelGrid hpg) { + this.gridPanel4 = hpg; + } + + private StaticText staticText1 = new StaticText(); + + public StaticText getStaticText1() { + return staticText1; + } + + public void setStaticText1(StaticText st) { + this.staticText1 = st; + } + + private TextField txtUtilizador = new TextField(); + + public TextField getTxtUtilizador() { + return txtUtilizador; + } + + public void setTxtUtilizador(TextField tf) { + this.txtUtilizador = tf; + } + + private StaticText staticText2 = new StaticText(); + + public StaticText getStaticText2() { + return staticText2; + } + + public void setStaticText2(StaticText st) { + this.staticText2 = st; + } + + private TextField txtEmail = new TextField(); + + public TextField getTxtEmail() { + return txtEmail; + } + + public void setTxtEmail(TextField tf) { + this.txtEmail = tf; + } + + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel5() { + return gridPanel5; + } + + public void setGridPanel5(HtmlPanelGrid hpg) { + this.gridPanel5 = hpg; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private Button butCancelar = new Button(); + + public Button getButCancelar() { + return butCancelar; + } + + public void setButCancelar(Button b) { + this.butCancelar = b; + } + + private Button butOk = new Button(); + + public Button getButOk() { + return butOk; + } + + public void setButOk(Button b) { + this.butOk = b; + } + + //
+ + /** + *

Construct a new Page bean instance.

+ */ + public RecuperarPassword() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("RecuperarPassword Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here +// if (!getSessionBean1().isLoggedIn()) { +// try { +// getExternalContext().redirect("Login.jsp"); +// } catch(Exception e) { +// // . . . handle exception . . . +// } +// } + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + @Override + public void preprocess() + { + + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + public void prerender() { + txtMsg.setText(getSessionBean1().getMsg()); + getSessionBean1().setMsg(""); + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + public String butLogin_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + return null; + } + + public String butCancelar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + return "login"; + } + + public String butOk_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + + + if(fieldsValidationOk()) + { + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + + String utilizador = (String) txtUtilizador.getText(); + Utilizador u = udp.getUtilizador(utilizador); + String email = (String) txtEmail.getText(); + if(u.getEmail().equals(email)) + { + //send mail : + try + { + sendEmail(u.getEmail(), u.getLogin(), u.getPassword(), Global.ENDERECO_ENVIO); + getSessionBean1().setMsg("A sua password foi enviada para o seu email"); + return "login"; + } + catch(Exception ex) + { + getSessionBean1().setMsg("Erro no envio da password !"); + ErrorLogger.logException( ex ); + } + + } + else + { + getSessionBean1().setMsg("Os dados não coincidem com os registos !"); + } + } + catch(Exception ex) + { + getSessionBean1().setMsg("Utilizador inválido !"); + } + } + + + return null; + } + + + private final String SMTP_HOST = "mail2.evolute.pt"; + private final int SMTP_PORT = 587; + + private final String mail_username = "acidentes.auchan@siprp.pt"; + private final String mail_password = "EghRzS2l"; + + private void sendEmail(String emailTo, String login, String password, String admin_email) throws Exception + { + Properties props = new Properties(); + //props.put("mail.transport.protocol", "smtp"); + props.put("mail.smtp.host", SMTP_HOST ); + props.put("mail.from", admin_email ); + props.put("mail.smtp.auth", "true"); + props.put("mail.smtp.user", mail_username ); + props.put("mail.smtp.password", mail_password ); + Session session1 = Session.getInstance(props); + Message msg = new MimeMessage(session1); + +// try +// { + //Address Email_TO = new InternetAddress("myemail@bol.com.br"); + msg.setFrom(new InternetAddress(admin_email)); + InternetAddress[] address = {new InternetAddress(emailTo)}; + msg.setRecipients(Message.RecipientType.TO, address); + msg.setSubject("Envio da password"); + msg.setSentDate(new Date()); + Multipart multipart = new MimeMultipart(); + BodyPart msgBodyPart = new MimeBodyPart(); + String html; + html=" "; + html+=""; + html+="

Envio da password de " + login + " :

"; + html+="

Password: " + password + "

"; + html+=""; + msgBodyPart.setContent(html, "text/html"); + multipart.addBodyPart(msgBodyPart); + msg.setContent(multipart); + +// Transport.send(msg); + Transport t; + t = session1.getTransport( "smtp" ); + + t.connect( SMTP_HOST, SMTP_PORT, mail_username, mail_password ); + t.sendMessage( msg, msg.getAllRecipients() ); + + t.close(); + System.out.println("Email Enviado !!!! " + emailTo + ", " + login); +// } +// catch (Exception ex) +// { +// System.out.println("MAIL ERROR : " + ex.getMessage()); +// ErrorLogger.logException( ex ); +// } + + } + + private boolean fieldsValidationOk() + { + if(txtUtilizador.getText() != null) + { + String utilizador = (String) txtUtilizador.getText(); + if(utilizador.trim().length() == 0) + { + getSessionBean1().setMsg("Falta utilizador !"); + return false; + } + } + else + { + getSessionBean1().setMsg("Falta utilizador !"); + return false; + } + + if(txtEmail.getText() != null) + { + String email = (String) txtEmail.getText(); + if(email.trim().length() == 0) + { + getSessionBean1().setMsg("Falta email !"); + return false; + } + else + { + if(! Utils.isValidEmail(email)) + { + getSessionBean1().setMsg("Email inválido !"); + return false; + } + } + } + else + { + getSessionBean1().setMsg("Falta email !"); + return false; + } + + return true; + } + +// private boolean isValidEmail(String email){ +// boolean res = true; +// +// int indexOfAtChar=email.indexOf("@"); +// +// if(indexOfAtChar > 0) +// { +// int indexOfDotChar = +// email.indexOf(".",indexOfAtChar); +// if(indexOfDotChar > 0) +// { +// res = true; +// } +// else +// { +// res = false; +// } +// } +// else{ +// res = false; +// } +// return res; +// } + + +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RequestBean1.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RequestBean1.java new file mode 100644 index 00000000..66ece1e4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RequestBean1.java @@ -0,0 +1,100 @@ +/* + * RequestBean1.java + * + * Created on September 18, 2007, 3:14 PM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import com.sun.rave.web.ui.appbase.AbstractRequestBean; +import javax.faces.FacesException; + +/** + *

Request scope data bean for your application. Create properties + * here to represent data that should be made available across different + * pages in the same HTTP request, so that the page bean classes do not + * have to be directly linked to each other.

+ * + *

An instance of this class will be created for you automatically, + * the first time your application evaluates a value binding expression + * or method binding expression that references a managed bean using + * this class.

+ */ +public class RequestBean1 extends AbstractRequestBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + //
+ + /** + *

Construct a new request data bean instance.

+ */ + public RequestBean1() { + } + + /** + *

This method is called when this bean is initially added to + * request scope. Typically, this occurs as a result of evaluating + * a value binding or method binding expression, which utilizes the + * managed bean facility to instantiate this bean and store it into + * request scope.

+ * + *

You may customize this method to allocate resources that are required + * for the lifetime of the current request.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("RequestBean1 Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

This method is called when this bean is removed from + * request scope. This occurs automatically when the corresponding + * HTTP response has been completed and sent to the client.

+ * + *

You may customize this method to clean up resources allocated + * during the execution of the init() method, or + * at any later time during the lifetime of the request.

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/SessionBean1.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/SessionBean1.java new file mode 100644 index 00000000..0c653e57 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/SessionBean1.java @@ -0,0 +1,781 @@ +/* + * SessionBean1.java + * + * Created on September 18, 2007, 3:14 PM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import beans.Medico; +import beans.Utilizador; +import beans.Acidentado; +import beans.AnaliseAcidente; +import com.sun.rave.web.ui.appbase.AbstractSessionBean; +import global.Global; +import javax.faces.FacesException; +import pagestate.AnaliseAcidenteTrabalhoState; + +/** + *

Session scope data bean for your application. Create properties + * here to represent cached data that should be made available across + * multiple HTTP requests for an individual user.

+ * + *

An instance of this class will be created for you automatically, + * the first time your application evaluates a value binding expression + * or method binding expression that references a managed bean using + * this class.

+ */ +public class SessionBean1 extends AbstractSessionBean +{ + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + //
+ private String logoEmpresaUrl = ""; + + private Boolean canAccessEstatisticas = false; + + public Boolean getCanAccessEstatisticas() + { + if ( isLoggedIn() && getCurrentUser() != null && getCurrentUser().getTipo() != null ) + { + int tipo = getCurrentUser().getTipo().intValue(); + + canAccessEstatisticas = tipo == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP || tipo == Global.TIPO_UTILIZADOR_HS; + } + return canAccessEstatisticas; + } + + public void setCanAccessEstatisticas(Boolean canAccessEstatisticas) { + this.canAccessEstatisticas = canAccessEstatisticas; + } + + private Boolean isSearchingUtilizadores = false; + /** + *

Construct a new session data bean instance.

+ */ + public SessionBean1() + { + msg = new String(""); + currentUser = new Utilizador(); + analisesActualDataProvider = new db.providers.AnalisesActualDataProvider(); + analisesSeguimentoDataProvider = new db.providers.AnalisesSeguimentoDataProvider(); + analisesConcluidasDataProvider = new db.providers.AnalisesConcluidasDataProvider(); + trabalhadoresListDataProvider = new db.providers.TrabalhadoresListDataProvider(); + setEstadosCorrecaoDataProvider(new db.providers.EstadosCorrecaoDataProvider()); + utilizadoresActivosListDataProvider = new db.providers.UtilizadoresActivosListDataProvider(); + utilizadoresInactivosListDataProvider = new db.providers.UtilizadoresInactivosListDataProvider(); + + setNavFrom(""); + setAcidentado(null); + setCurrentAnalise(null); + setLoggedIn(false); + + modoEdicaoUtilizador = ""; + setIdSequence(1); + setNewUser(null); + setEditUser(null); + setUserDeleted(false); + setMudarPassword(false); + setFromAjuda(false); + setGravado(false); + setSubmetido(false); + setFromAnaliseDeletion(false); + setIeBug(false); + setCorrecao(null); + setCanAccessEstatisticas( false ); + setIsSearchingUtilizadores( false ); + } + + /** + *

This method is called when this bean is initially added to + * session scope. Typically, this occurs as a result of evaluating + * a value binding or method binding expression, which utilizes the + * managed bean facility to instantiate this bean and store it into + * session scope.

+ * + *

You may customize this method to initialize and cache data values + * or resources that are required for the lifetime of a particular + * user session.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("SessionBean1 Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

This method is called when the session containing it is about to be + * passivated. Typically, this occurs in a distributed servlet container + * when the session is about to be transferred to a different + * container instance, after which the activate() method + * will be called to indicate that the transfer is complete.

+ * + *

You may customize this method to release references to session data + * or resources that can not be serialized with the session itself.

+ */ + public void passivate() { + } + + /** + *

This method is called when the session containing it was + * reactivated.

+ * + *

You may customize this method to reacquire references to session + * data or resources that could not be serialized with the + * session itself.

+ */ + public void activate() { + } + + /** + *

This method is called when this bean is removed from + * session scope. Typically, this occurs as a result of + * the session timing out or being terminated by the application.

+ * + *

You may customize this method to clean up resources allocated + * during the execution of the init() method, or + * at any later time during the lifetime of the application.

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + private String msg; + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } + + private Utilizador currentUser; + + public Utilizador getCurrentUser() { + return currentUser; + } + + public void setCurrentUser(Utilizador currentUser) { + this.currentUser = currentUser; + setCanAccessEstatisticas( getCanAccessEstatisticas() ); + } + + private db.providers.AnalisesActualDataProvider analisesActualDataProvider; + private db.providers.AnalisesSeguimentoDataProvider analisesSeguimentoDataProvider; + private db.providers.AnalisesConcluidasDataProvider analisesConcluidasDataProvider; + private db.providers.TrabalhadoresListDataProvider trabalhadoresListDataProvider; + private db.providers.EstadosCorrecaoDataProvider estadosCorrecaoDataProvider; + private db.providers.UtilizadoresActivosListDataProvider utilizadoresActivosListDataProvider; + private db.providers.UtilizadoresInactivosListDataProvider utilizadoresInactivosListDataProvider; + + public db.providers.AnalisesActualDataProvider getAnalisesActualDataProvider() { + return analisesActualDataProvider; + } + + public void setAnalisesActualDataProvider(db.providers.AnalisesActualDataProvider analisesActualDataProvider) { + this.analisesActualDataProvider = analisesActualDataProvider; + } + + public db.providers.AnalisesSeguimentoDataProvider getAnalisesSeguimentoDataProvider() { + return analisesSeguimentoDataProvider; + } + + public void setAnalisesSeguimentoDataProvider(db.providers.AnalisesSeguimentoDataProvider analisesSeguimentoDataProvider) { + this.analisesSeguimentoDataProvider = analisesSeguimentoDataProvider; + } + + public db.providers.AnalisesConcluidasDataProvider getAnalisesConcluidasDataProvider() { + return analisesConcluidasDataProvider; + } + + public void setAnalisesConcluidasDataProvider(db.providers.AnalisesConcluidasDataProvider analisesConcluidasDataProvider) { + this.analisesConcluidasDataProvider = analisesConcluidasDataProvider; + } + + public db.providers.TrabalhadoresListDataProvider getTrabalhadoresListDataProvider() { + return trabalhadoresListDataProvider; + } + + public void setTrabalhadoresListDataProvider(db.providers.TrabalhadoresListDataProvider trabalhadoresListDataProvider) { + this.trabalhadoresListDataProvider = trabalhadoresListDataProvider; + } + + public db.providers.EstadosCorrecaoDataProvider getEstadosCorrecaoDataProvider() { + return estadosCorrecaoDataProvider; + } + + public void setEstadosCorrecaoDataProvider(db.providers.EstadosCorrecaoDataProvider estadosCorrecaoDataProvider) { + this.estadosCorrecaoDataProvider = estadosCorrecaoDataProvider; + } + + public db.providers.UtilizadoresActivosListDataProvider getUtilizadoresActivosListDataProvider() { + return utilizadoresActivosListDataProvider; + } + + public void setUtilizadoresActivosListDataProvider(db.providers.UtilizadoresActivosListDataProvider utilizadoresActivosListDataProvider) { + this.utilizadoresActivosListDataProvider = utilizadoresActivosListDataProvider; + } + + public db.providers.UtilizadoresInactivosListDataProvider getUtilizadoresInactivosListDataProvider() { + return utilizadoresInactivosListDataProvider; + } + + public void setUtilizadoresInactivosListDataProvider(db.providers.UtilizadoresInactivosListDataProvider utilizadoresInactivosListDataProvider) { + this.utilizadoresInactivosListDataProvider = utilizadoresInactivosListDataProvider; + } + + private com.sun.rave.web.ui.model.Option[] anoOptions; + + private Integer anoChoice; + + public Integer getAnoChoice() { + return anoChoice; + } + + public void setAnoChoice(Integer anoChoice) { + this.anoChoice = anoChoice; + } + + public com.sun.rave.web.ui.model.Option[] getAnoOptions() { + return anoOptions; + } + + public void setAnoOptions(com.sun.rave.web.ui.model.Option[] anoOptions) { + this.anoOptions = anoOptions; + } + + private com.sun.rave.web.ui.model.Option[] mesOptions; + + private Integer mesChoice; + + public Integer getMesChoice() { + return mesChoice; + } + + public void setMesChoice(Integer mesChoice) { + this.mesChoice = mesChoice; + } + + public com.sun.rave.web.ui.model.Option[] getMesOptions() { + return mesOptions; + } + + public void setMesOptions(com.sun.rave.web.ui.model.Option[] mesOptions) { + this.mesOptions = mesOptions; + } + + private com.sun.rave.web.ui.model.Option[] diaOptions; + + private Integer diaChoice; + + public Integer getDiaChoice() { + return diaChoice; + } + + public void setDiaChoice(Integer diaChoice) { + this.diaChoice = diaChoice; + } + + public com.sun.rave.web.ui.model.Option[] getDiaOptions() { + return diaOptions; + } + + public void setDiaOptions(com.sun.rave.web.ui.model.Option[] diaOptions) { + this.diaOptions = diaOptions; + } + + private com.sun.rave.web.ui.model.Option[] departamentoOptions; + + private Integer departamentoChoice; + + public Integer getDepartamentoChoice() { + return departamentoChoice; + } + + public void setDepartamentoChoice(Integer departamentoChoice) { + this.departamentoChoice = departamentoChoice; + } + + public com.sun.rave.web.ui.model.Option[] getDepartamentoOptions() { + return departamentoOptions; + } + + public void setDepartamentoOptions(com.sun.rave.web.ui.model.Option[] departamentoOptions) { + this.departamentoOptions = departamentoOptions; + } + + private com.sun.rave.web.ui.model.Option[] seccaoOptions; + + private Integer seccaoChoice; + + public Integer getSeccaoChoice() { + return seccaoChoice; + } + + public void setSeccaoChoice(Integer seccaoChoice) { + this.seccaoChoice = seccaoChoice; + } + + public com.sun.rave.web.ui.model.Option[] getSeccaoOptions() { + return seccaoOptions; + } + + public void setSeccaoOptions(com.sun.rave.web.ui.model.Option[] seccaoOptions) { + this.seccaoOptions = seccaoOptions; + } + + private String imageName; + + public String getImageName() { + return imageName; + } + + public void setImageName(String imageName) { + this.imageName = imageName; + } + + private String navFrom; + + public String getNavFrom() { + return navFrom; + } + + public void setNavFrom(String navFrom) { + this.navFrom = navFrom; + } + + private Acidentado acidentado; + + public Acidentado getAcidentado() { + return acidentado; + } + + public void setAcidentado(Acidentado acidentado) { + this.acidentado = acidentado; + } + + private AnaliseAcidenteTrabalhoState analise_acidente_trabalho_state; + + public AnaliseAcidenteTrabalhoState getAnalise_acidente_trabalho_state() { + return analise_acidente_trabalho_state; + } + + public void setAnalise_acidente_trabalho_state(AnaliseAcidenteTrabalhoState analise_acidente_trabalho_state) { + this.analise_acidente_trabalho_state = analise_acidente_trabalho_state; + } + + private AnaliseAcidente currentAnalise; + + public AnaliseAcidente getCurrentAnalise() { + return currentAnalise; + } + + public void setCurrentAnalise(AnaliseAcidente currentAnalise) { + this.currentAnalise = currentAnalise; + } + + private boolean loggedIn; + + public boolean isLoggedIn() + { + return loggedIn; + } + + public void setLoggedIn(boolean loggedIn) + { + this.loggedIn = loggedIn; + } + + private String modoEdicaoUtilizador; + + public String getModoEdicaoUtilizador() { + return modoEdicaoUtilizador; + } + + public void setModoEdicaoUtilizador(String modoEdicaoUtilizador) { + this.modoEdicaoUtilizador = modoEdicaoUtilizador; + } + + private Integer tipoChoice; + + public Integer getTipoChoice() { + return tipoChoice; + } + + public void setTipoChoice(Integer tipoChoice) { + this.tipoChoice = tipoChoice; + } + + private com.sun.rave.web.ui.model.Option[] tiposOptions; + + public com.sun.rave.web.ui.model.Option[] getTiposOptions() { + return tiposOptions; + } + + public void setTiposOptions(com.sun.rave.web.ui.model.Option[] tiposOptions) { + this.tiposOptions = tiposOptions; + } + + + private Integer estabelecimentoChoice; + + public Integer getEstabelecimentoChoice() { + return estabelecimentoChoice; + } + + public void setEstabelecimentoChoice(Integer estabelecimentoChoice) { + this.estabelecimentoChoice = estabelecimentoChoice; + } + + private com.sun.rave.web.ui.model.Option[] estabelecimentosOptions; + + public com.sun.rave.web.ui.model.Option[] getEstabelecimentosOptions() { + return estabelecimentosOptions; + } + + public void setEstabelecimentosOptions(com.sun.rave.web.ui.model.Option[] estabelecimentosOptions) { + this.estabelecimentosOptions = estabelecimentosOptions; + } + + private Integer estabelecimentoGestorChoice; + + public Integer getEstabelecimentoGestorChoice() { + return estabelecimentoGestorChoice; + } + + public void setEstabelecimentoGestorChoice(Integer estabelecimentoGestorChoice) { + this.estabelecimentoGestorChoice = estabelecimentoGestorChoice; + } + + private com.sun.rave.web.ui.model.Option[] estabelecimentosGestorOptions; + + public com.sun.rave.web.ui.model.Option[] getEstabelecimentosGestorOptions() { + return estabelecimentosGestorOptions; + } + + public void setEstabelecimentosGestorOptions(com.sun.rave.web.ui.model.Option[] estabelecimentosGestorOptions) { + this.estabelecimentosGestorOptions = estabelecimentosGestorOptions; + } + + + + // + private Integer estabelecimentoOutroChoice; + + public Integer getEstabelecimentoOutroChoice() { + return estabelecimentoOutroChoice; + } + + public void setEstabelecimentoOutroChoice(Integer estabelecimentoOutroChoice) { + this.estabelecimentoOutroChoice = estabelecimentoOutroChoice; + } + + + + private com.sun.rave.web.ui.model.Option[] estabelecimentosOutroOptions; + + public com.sun.rave.web.ui.model.Option[] getEstabelecimentosOutroOptions() { + return estabelecimentosOutroOptions; + } + + public void setEstabelecimentosOutroOptions(com.sun.rave.web.ui.model.Option[] estabelecimentosOutroOptions) { + this.estabelecimentosOutroOptions = estabelecimentosOutroOptions; + } + + + private Integer estabelecimentoMedChoice; + + public Integer getEstabelecimentoMedChoice() { + return estabelecimentoMedChoice; + } + + public void setEstabelecimentoMedChoice(Integer estabelecimentoMedChoice) { + this.estabelecimentoMedChoice = estabelecimentoMedChoice; + } + + private com.sun.rave.web.ui.model.Option[] estabelecimentosMedOptions; + + public com.sun.rave.web.ui.model.Option[] getEstabelecimentosMedOptions() { + return estabelecimentosMedOptions; + } + + public void setEstabelecimentosMedOptions(com.sun.rave.web.ui.model.Option[] estabelecimentosMedOptions) { + this.estabelecimentosMedOptions = estabelecimentosMedOptions; + } + + private Integer tecnicoChoice; + + public Integer getTecnicoChoice() { + return tecnicoChoice; + } + + public void setTecnicoChoice(Integer tecnicoChoice) { + this.tecnicoChoice = tecnicoChoice; + } + + private com.sun.rave.web.ui.model.Option[] tecnicosOptions; + + public com.sun.rave.web.ui.model.Option[] getTecnicosOptions() { + return tecnicosOptions; + } + + public void setTecnicosOptions(com.sun.rave.web.ui.model.Option[] tecnicosOptions) { + this.tecnicosOptions = tecnicosOptions; + } + + + private Integer medicoChoice; + + public Integer getMedicoChoice() { + return medicoChoice; + } + + public void setMedicoChoice(Integer medicoChoice) { + this.medicoChoice = medicoChoice; + } + + private com.sun.rave.web.ui.model.Option[] medicosOptions; + + public com.sun.rave.web.ui.model.Option[] getMedicosOptions() { + return medicosOptions; + } + + public void setMedicosOptions(com.sun.rave.web.ui.model.Option[] medicosOptions) { + this.medicosOptions = medicosOptions; + } + + + // Clock : + private Integer horaChoice; + + public Integer getHoraChoice() { + return horaChoice; + } + + public void setHoraChoice(Integer horaChoice) { + this.horaChoice = horaChoice; + } + + private com.sun.rave.web.ui.model.Option[] horasOptions; + + public com.sun.rave.web.ui.model.Option[] getHorasOptions() { + return horasOptions; + } + + public void setHorasOptions(com.sun.rave.web.ui.model.Option[] horasOptions) { + this.horasOptions = horasOptions; + } + + + private Integer minutoChoice; + + public Integer getMinutoChoice() { + return minutoChoice; + } + + public void setMinutoChoice(Integer minutoChoice) { + this.minutoChoice = minutoChoice; + } + + private com.sun.rave.web.ui.model.Option[] minutosOptions; + + public com.sun.rave.web.ui.model.Option[] getMinutosOptions() { + return minutosOptions; + } + + public void setMinutosOptions(com.sun.rave.web.ui.model.Option[] minutosOptions) { + this.minutosOptions = minutosOptions; + } + + + private Integer causaChoice; + + public Integer getCausaChoice() { + return causaChoice; + } + + public void setCausaChoice(Integer causaChoice) { + this.causaChoice = causaChoice; + } + + private com.sun.rave.web.ui.model.Option[] causasOptions; + + public com.sun.rave.web.ui.model.Option[] getCausasOptions() { + return causasOptions; + } + + public void setCausasOptions(com.sun.rave.web.ui.model.Option[] causasOptions) { + this.causasOptions = causasOptions; + } + + private int idSequence; + + public int getIdSequence() { + return idSequence; + } + + public void setIdSequence(int idSequence) { + this.idSequence = idSequence; + } + + private NewUser newUser; + + public NewUser getNewUser() { + return newUser; + } + + public void setNewUser(NewUser newUser) { + this.newUser = newUser; + } + + private Utilizador editUser; + + public Utilizador getEditUser() { + return editUser; + } + + public void setEditUser(Utilizador editUser) { + this.editUser = editUser; + } + + private boolean userDeleted; + + public boolean isUserDeleted() { + return userDeleted; + } + + public void setUserDeleted(boolean userDeleted) { + this.userDeleted = userDeleted; + } + + private boolean mudarPassword; + + public boolean isMudarPassword() { + return mudarPassword; + } + + public void setMudarPassword(boolean mudarPassword) { + this.mudarPassword = mudarPassword; + } + + private Medico medico; + + public Medico getMedico() { + return medico; + } + + public void setMedico(Medico medico) { + this.medico = medico; + } + + private boolean fromAjuda; + + public boolean isFromAjuda() { + return fromAjuda; + } + + public void setFromAjuda(boolean fromAjuda) { + this.fromAjuda = fromAjuda; + } + + private boolean submetido; + + private boolean gravado; + + public boolean isSubmetido() { + return submetido; + } + + public void setSubmetido(boolean submetido) { + this.submetido = submetido; + } + + public boolean isGravado() { + return gravado; + } + + public void setGravado(boolean gravado) { + this.gravado = gravado; + } + + private boolean fromAnaliseDeletion; + + public boolean isFromAnaliseDeletion() { + return fromAnaliseDeletion; + } + + public void setFromAnaliseDeletion(boolean fromAnaliseDeletion) { + this.fromAnaliseDeletion = fromAnaliseDeletion; + } + + private boolean ieBug; + + public boolean isIeBug() { + return ieBug; + } + + public void setIeBug(boolean ieBug) { + this.ieBug = ieBug; + } + + private beans.Correcao correcao; + + public beans.Correcao getCorrecao() { + return correcao; + } + + public void setCorrecao(beans.Correcao correcao) { + this.correcao = correcao; + } + + public String getLogoEmpresaUrl() { + return logoEmpresaUrl; + } + + public void setLogoEmpresaUrl(String logoEmpresaUrl) { + this.logoEmpresaUrl = logoEmpresaUrl; + + } + + public Boolean getIsSearchingUtilizadores() { + return isSearchingUtilizadores; + } + + public void setIsSearchingUtilizadores(Boolean isSearchingUtilizadores) { + this.isSearchingUtilizadores = isSearchingUtilizadores; + } + + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Top.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Top.java new file mode 100644 index 00000000..d183ddf6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Top.java @@ -0,0 +1,203 @@ +/* + * Top.java + * + * Created on September 20, 2007, 11:04 AM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import com.sun.rave.web.ui.appbase.AbstractFragmentBean; +import com.sun.rave.web.ui.component.Hyperlink; +import com.sun.rave.web.ui.component.ImageComponent; +import com.sun.rave.web.ui.component.PanelGroup; +import com.sun.rave.web.ui.component.StaticText; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; + +/** + *

Fragment bean that corresponds to a similarly named JSP page + * fragment. This class contains component definitions (and initialization + * code) for all components that you have defined on this fragment, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class Top extends AbstractFragmentBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private ImageComponent image1 = new ImageComponent(); + + public ImageComponent getImage1() { + return image1; + } + + public void setImage1(ImageComponent ic) { + this.image1 = ic; + } + + private ImageComponent image2 = new ImageComponent(); + + public ImageComponent getImage2() { + return image2; + } + + public void setImage2(ImageComponent ic) { + this.image2 = ic; + } + + private PanelGroup groupPanel2 = new PanelGroup(); + + public PanelGroup getGroupPanel2() { + return groupPanel2; + } + + public void setGroupPanel2(PanelGroup pg) { + this.groupPanel2 = pg; + } + + private StaticText lblUser = new StaticText(); + + public StaticText getLblUser() { + return lblUser; + } + + public void setLblUser(StaticText st) { + this.lblUser = st; + } + + private StaticText staticText2 = new StaticText(); + + public StaticText getStaticText2() { + return staticText2; + } + + public void setStaticText2(StaticText st) { + this.staticText2 = st; + } + + private Hyperlink lnkChangePassword = new Hyperlink(); + + public Hyperlink getLnkChangePassword() { + return lnkChangePassword; + } + + public void setLnkChangePassword(Hyperlink h) { + this.lnkChangePassword = h; + } + + private StaticText staticText3 = new StaticText(); + + public StaticText getStaticText3() { + return staticText3; + } + + public void setStaticText3(StaticText st) { + this.staticText3 = st; + } + + private Hyperlink lnkLogout = new Hyperlink(); + + public Hyperlink getLnkLogout() { + return lnkLogout; + } + + public void setLnkLogout(Hyperlink h) { + this.lnkLogout = h; + } + //
+ + public Top() { + } + + /** + *

Callback method that is called whenever a page containing + * this page fragment is navigated to, either directly via a URL, + * or indirectly via page navigation. Override this method to acquire + * resources that will be needed for event handlers and lifecycle methods.

+ * + *

The default implementation does nothing.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("Page1 Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called. Override this + * method to release resources acquired in the init() + * resources that will be needed for event handlers and lifecycle methods.

+ * + *

The default implementation does nothing.

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/UtilizadorFields.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/UtilizadorFields.java new file mode 100644 index 00000000..d1c29f59 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/UtilizadorFields.java @@ -0,0 +1,1649 @@ +/* + * UtilizadorFields.java + * + * Created on December 4, 2007, 3:27 PM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import beans.Permissao; +import beans.Utilizador; +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Button; +import com.sun.rave.web.ui.component.Checkbox; +import com.sun.rave.web.ui.component.DropDown; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.HiddenField; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.Hyperlink; +import com.sun.rave.web.ui.component.ImageComponent; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.component.PanelGroup; +import com.sun.rave.web.ui.component.PasswordField; +import com.sun.rave.web.ui.component.StaticText; +import com.sun.rave.web.ui.component.TextField; +import db.providers.AnalisesDataProvider; +import db.providers.UtilizadoresDataProvider; +import global.Global; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import javax.faces.context.FacesContext; +import javax.faces.event.ValueChangeEvent; +import javax.servlet.http.HttpServletRequest; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class UtilizadorFields extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridBase1() { + return gridBase1; + } + + public void setGridBase1(HtmlPanelGrid hpg) { + this.gridBase1 = hpg; + } + + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayout1() { + return gridLayout1; + } + + public void setGridLayout1(HtmlPanelGrid hpg) { + this.gridLayout1 = hpg; + } + + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel1() { + return gridPanel1; + } + + public void setGridPanel1(HtmlPanelGrid hpg) { + this.gridPanel1 = hpg; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private ImageComponent image1 = new ImageComponent(); + + public ImageComponent getImage1() { + return image1; + } + + public void setImage1(ImageComponent ic) { + this.image1 = ic; + } + + private ImageComponent image2 = new ImageComponent(); + + public ImageComponent getImage2() { + return image2; + } + + public void setImage2(ImageComponent ic) { + this.image2 = ic; + } + + private HtmlPanelGrid gridMsg1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMsg1() { + return gridMsg1; + } + + public void setGridMsg1(HtmlPanelGrid hpg) { + this.gridMsg1 = hpg; + } + + private StaticText txtMsg = new StaticText(); + + public StaticText getTxtMsg() { + return txtMsg; + } + + public void setTxtMsg(StaticText st) { + this.txtMsg = st; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel3() { + return gridPanel3; + } + + public void setGridPanel3(HtmlPanelGrid hpg) { + this.gridPanel3 = hpg; + } + + private PanelGroup groupPanel3 = new PanelGroup(); + + public PanelGroup getGroupPanel3() { + return groupPanel3; + } + + public void setGroupPanel3(PanelGroup pg) { + this.groupPanel3 = pg; + } + + private StaticText stCriarEditar = new StaticText(); + + public StaticText getStCriarEditar() { + return stCriarEditar; + } + + public void setStCriarEditar(StaticText st) { + this.stCriarEditar = st; + } + + private StaticText staticText3 = new StaticText(); + + public StaticText getStaticText3() { + return staticText3; + } + + public void setStaticText3(StaticText st) { + this.staticText3 = st; + } + + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel6() { + return gridPanel6; + } + + public void setGridPanel6(HtmlPanelGrid hpg) { + this.gridPanel6 = hpg; + } + + private PanelGroup groupPanel4 = new PanelGroup(); + + public PanelGroup getGroupPanel4() { + return groupPanel4; + } + + public void setGroupPanel4(PanelGroup pg) { + this.groupPanel4 = pg; + } + + private StaticText staticText10 = new StaticText(); + + public StaticText getStaticText10() { + return staticText10; + } + + public void setStaticText10(StaticText st) { + this.staticText10 = st; + } + + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel7() { + return gridPanel7; + } + + public void setGridPanel7(HtmlPanelGrid hpg) { + this.gridPanel7 = hpg; + } + + private Button butCancelar = new Button(); + + public Button getButCancelar() { + return butCancelar; + } + + public void setButCancelar(Button b) { + this.butCancelar = b; + } + + private PanelGroup groupPanel5 = new PanelGroup(); + + public PanelGroup getGroupPanel5() { + return groupPanel5; + } + + public void setGroupPanel5(PanelGroup pg) { + this.groupPanel5 = pg; + } + + private Button butGravar = new Button(); + + public Button getButGravar() { + return butGravar; + } + + public void setButGravar(Button b) { + this.butGravar = b; + } + + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel4() { + return gridPanel4; + } + + public void setGridPanel4(HtmlPanelGrid hpg) { + this.gridPanel4 = hpg; + } + + private StaticText staticText4 = new StaticText(); + + public StaticText getStaticText4() { + return staticText4; + } + + public void setStaticText4(StaticText st) { + this.staticText4 = st; + } + + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel5() { + return gridPanel5; + } + + public void setGridPanel5(HtmlPanelGrid hpg) { + this.gridPanel5 = hpg; + } + + private PanelGroup groupPanel6 = new PanelGroup(); + + public PanelGroup getGroupPanel6() { + return groupPanel6; + } + + public void setGroupPanel6(PanelGroup pg) { + this.groupPanel6 = pg; + } + + private PanelGroup groupPanel7 = new PanelGroup(); + + public PanelGroup getGroupPanel7() { + return groupPanel7; + } + + public void setGroupPanel7(PanelGroup pg) { + this.groupPanel7 = pg; + } + + private StaticText staticText5 = new StaticText(); + + public StaticText getStaticText5() { + return staticText5; + } + + public void setStaticText5(StaticText st) { + this.staticText5 = st; + } + + private StaticText staticText8 = new StaticText(); + + public StaticText getStaticText8() { + return staticText8; + } + + public void setStaticText8(StaticText st) { + this.staticText8 = st; + } + + private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel8() { + return gridPanel8; + } + + public void setGridPanel8(HtmlPanelGrid hpg) { + this.gridPanel8 = hpg; + } + + private DropDown drpEstabelecimentos = new DropDown(); + + public DropDown getDrpEstabelecimentos() { + return drpEstabelecimentos; + } + + public void setDrpEstabelecimentos(DropDown dd) { + this.drpEstabelecimentos = dd; + } + + private StaticText stEstabelecimento = new StaticText(); + + public StaticText getStEstabelecimento() { + return stEstabelecimento; + } + + public void setStEstabelecimento(StaticText st) { + this.stEstabelecimento = st; + } + + private StaticText staticText11 = new StaticText(); + + public StaticText getStaticText11() { + return staticText11; + } + + public void setStaticText11(StaticText st) { + this.staticText11 = st; + } + + private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel9() { + return gridPanel9; + } + + public void setGridPanel9(HtmlPanelGrid hpg) { + this.gridPanel9 = hpg; + } + + private DropDown drpNome = new DropDown(); + + public DropDown getDrpNome() { + return drpNome; + } + + public void setDrpNome(DropDown dd) { + this.drpNome = dd; + } + + private TextField txtNome = new TextField(); + + public TextField getTxtNome() { + return txtNome; + } + + public void setTxtNome(TextField tf) { + this.txtNome = tf; + } + + private StaticText stNome = new StaticText(); + + public StaticText getStNome() { + return stNome; + } + + public void setStNome(StaticText st) { + this.stNome = st; + } + + private StaticText staticText13 = new StaticText(); + + public StaticText getStaticText13() { + return staticText13; + } + + public void setStaticText13(StaticText st) { + this.staticText13 = st; + } + + private TextField txtLogin = new TextField(); + + public TextField getTxtLogin() { + return txtLogin; + } + + public void setTxtLogin(TextField tf) { + this.txtLogin = tf; + } + + private StaticText staticText14 = new StaticText(); + + public StaticText getStaticText14() { + return staticText14; + } + + public void setStaticText14(StaticText st) { + this.staticText14 = st; + } + + private PasswordField txtPassword = new PasswordField(); + + public PasswordField getTxtPassword() { + return txtPassword; + } + + public void setTxtPassword(PasswordField pf) { + this.txtPassword = pf; + } + + private StaticText staticText15 = new StaticText(); + + public StaticText getStaticText15() { + return staticText15; + } + + public void setStaticText15(StaticText st) { + this.staticText15 = st; + } + + private TextField txtEmail = new TextField(); + + public TextField getTxtEmail() { + return txtEmail; + } + + public void setTxtEmail(TextField tf) { + this.txtEmail = tf; + } + + //
+ boolean isPostback = false; + + private HiddenField hidConfDelUser = new HiddenField(); + + public HiddenField getHidConfDelUser() { + return hidConfDelUser; + } + + public void setHidConfDelUser(HiddenField hf) { + this.hidConfDelUser = hf; + } + + private StaticText staticText7 = new StaticText(); + + public StaticText getStaticText7() { + return staticText7; + } + + public void setStaticText7(StaticText st) { + this.staticText7 = st; + } + + private PasswordField txtConfPassword = new PasswordField(); + + public PasswordField getTxtConfPassword() { + return txtConfPassword; + } + + public void setTxtConfPassword(PasswordField pf) { + this.txtConfPassword = pf; + } + + private StaticText stTipo = new StaticText(); + + public StaticText getStTipo() { + return stTipo; + } + + public void setStTipo(StaticText st) { + this.stTipo = st; + } + + private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel10() { + return gridPanel10; + } + + public void setGridPanel10(HtmlPanelGrid hpg) { + this.gridPanel10 = hpg; + } + + private PanelGroup groupPanel8 = new PanelGroup(); + + public PanelGroup getGroupPanel8() { + return groupPanel8; + } + + public void setGroupPanel8(PanelGroup pg) { + this.groupPanel8 = pg; + } + + private Checkbox chkActivo = new Checkbox(); + + public Checkbox getChkActivo() { + return chkActivo; + } + + public void setChkActivo(Checkbox c) { + this.chkActivo = c; + } + + private StaticText staticText6 = new StaticText(); + + public StaticText getStaticText6() { + return staticText6; + } + + public void setStaticText6(StaticText st) { + this.staticText6 = st; + } + + private StaticText staticText9 = new StaticText(); + + public StaticText getStaticText9() { + return staticText9; + } + + public void setStaticText9(StaticText st) { + this.staticText9 = st; + } + + private StaticText lblRespLoja = new StaticText(); + + public StaticText getLblRespLoja() { + return lblRespLoja; + } + + public void setLblRespLoja(StaticText st) { + this.lblRespLoja = st; + } + + private Checkbox chkRespLoja = new Checkbox(); + + public Checkbox getChkRespLoja() { + return chkRespLoja; + } + + public void setChkRespLoja(Checkbox c) { + this.chkRespLoja = c; + } + + private StaticText lblGeral = new StaticText(); + + public StaticText getLblGeral() { + return lblGeral; + } + + public void setLblGeral(StaticText st) { + this.lblGeral = st; + } + + private Checkbox chkGeral = new Checkbox(); + + public Checkbox getChkGeral() { + return chkGeral; + } + + public void setChkGeral(Checkbox c) { + this.chkGeral = c; + } + + private HtmlPanelGrid gridPanel11 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel11() { + return gridPanel11; + } + + public void setGridPanel11(HtmlPanelGrid hpg) { + this.gridPanel11 = hpg; + } + + private PanelGroup groupPanel9 = new PanelGroup(); + + public PanelGroup getGroupPanel9() { + return groupPanel9; + } + + public void setGroupPanel9(PanelGroup pg) { + this.groupPanel9 = pg; + } + + private StaticText staticText12 = new StaticText(); + + public StaticText getStaticText12() { + return staticText12; + } + + public void setStaticText12(StaticText st) { + this.staticText12 = st; + } + + private ImageComponent image3 = new ImageComponent(); + + public ImageComponent getImage3() { + return image3; + } + + public void setImage3(ImageComponent ic) { + this.image3 = ic; + } + + private StaticText staticText16 = new StaticText(); + + public StaticText getStaticText16() { + return staticText16; + } + + public void setStaticText16(StaticText st) { + this.staticText16 = st; + } + private StaticText lblUser = new StaticText(); + + public StaticText getLblUser() { + return lblUser; + } + + public void setLblUser(StaticText st) { + this.lblUser = st; + } + private Hyperlink lnkPlanosActuacao = new Hyperlink(); + + public Hyperlink getLnkPlanosActuacao() { + return lnkPlanosActuacao; + } + + public void setLnkPlanosActuacao(Hyperlink h) { + this.lnkPlanosActuacao = h; + } + /** + *

Construct a new Page bean instance.

+ */ + public UtilizadorFields() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("UtilizadorFields Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + if (!getSessionBean1().isLoggedIn()) { + try { + getExternalContext().redirect("Login.jsp"); + } catch(Exception e) { + // . . . handle exception . . . + } + } + else + { + + lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); + HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom(referer); + if(!pageFrom.matches("UtilizadorFields.jsp")) + { + isPostback = false; + } + else + { + isPostback = true; + } + + } + + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + public void prerender() { + if(!isPostback) + { + if(getSessionBean1().getModoEdicaoUtilizador().matches("new")) + { + stCriarEditar.setText("CRIAR"); + initializeNew(); + } + else if( getSessionBean1().getModoEdicaoUtilizador().matches("edit")) + { + stCriarEditar.setText("EDITAR"); + fillPage(); + } + } + else //postback + { + String del_user = (String)getExternalContext().getRequestParameterMap().get("del_user"); + if(del_user != null) + { + if(del_user.matches("yes")) + { + hidConfDelUser.setValue(""); + try + { + deleteUser(); + getSessionBean1().setMsg("Utilizador eliminado!"); + //return "gestao_utilizadores"; + getSessionBean1().setUserDeleted(true); + try + { + getExternalContext().redirect("GestaoUtilizadores.jsp"); + } + catch(Exception e) + { + ErrorLogger.logException( e ); + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + getSessionBean1().setMsg("Erro na eliminação do utilizador!"); + } + } + else if(del_user.matches("no")) + { + hidConfDelUser.setValue(""); + fillPage(); + } + } + + } + + txtMsg.setText(getSessionBean1().getMsg()); + getSessionBean1().setMsg(""); + + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + public String lnkEditUser_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), true ); + + return null; + + } + + public void drpTipo_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public void drpNome_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public String butCancelar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + String nav_from = getSessionBean1().getNavFrom(); + if(nav_from.matches("GestaoUtilizadores")) + { + return "gestao_utilizadores"; + } + else if(nav_from.matches("NovoUtilizador")) + { + return "novo_utilizador"; + } + return null; + } + + public String butApagar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + hidConfDelUser.setValue("apagar"); + return null; + } + + public String butGravar_action() { + // TODO: Process the button click action. Return value is a navigation + // case name where null will return to the same page. + if(validationOk( getSessionBean1().getModoEdicaoUtilizador() )) + { + if(getSessionBean1().getModoEdicaoUtilizador().matches("new")) + { + try + { + Utilizador u = addUser(); + addPermissao(u); + getSessionBean1().setMsg("Utilizador criado"); + getSessionBean1().setNewUser(null); + return "gestao_utilizadores"; + } + catch(Exception ex) + { + getSessionBean1().setMsg("Erro na criação do utilizador!"); + ErrorLogger.logException( ex ); + } + } + else if( getSessionBean1().getModoEdicaoUtilizador().matches("edit") ) + { + try + { + updateUser(); + getSessionBean1().setMsg("Utilizador actualizado"); + return "gestao_utilizadores"; + } + catch(Exception ex) + { + getSessionBean1().setMsg("Erro na actualização do utilizador"); + ErrorLogger.logException( ex ); + } + } + } + return null; + } + + private void initializeNew() + { + //drpTipo.setStyleClass("hidden"); + //drpEstabelecimentos.setStyleClass("hidden"); + NewUser u = getSessionBean1().getNewUser(); + getSessionBean1().setEstabelecimentosOptions(getSessionBean1().getEstabelecimentosOutroOptions()); + if(u.getEstabelecimento() == null) + { + drpEstabelecimentos.setDisabled(true); + } + else + { + drpEstabelecimentos.setSelected(u.getEstabelecimento()); + } + + drpNome.setStyleClass("hidden"); + txtNome.setStyleClass("hidden"); + + + stTipo.setText(u.getTipo_descricao()); + //stEstabelecimento.setText(u.getEstabelecimento_descricao()); + stEstabelecimento.setStyleClass("hidden"); + stNome.setText(Utils.unicodeToHTML(u.getNome())); + + txtLogin.setText(""); + txtPassword.setText(""); + txtConfPassword.setText(""); + txtEmail.setText(""); + + + chkActivo.setSelected(new Boolean(true)); + lblGeral.setRendered(false); + chkGeral.setRendered(false); + lblRespLoja.setRendered(false); + chkRespLoja.setRendered(false); + } + + private void fillPage() + { + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //Integer permissao = udp.getPermissionCode( getSessionBean1().getCurrentUser().getId() ); + //getSessionBean1().setTiposOptions(adp.getTiposList(permissao)); + getSessionBean1().setTiposOptions(adp.getTiposList()); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + Utilizador u = getSessionBean1().getEditUser(); + //stTipo.setStyleClass("hidden"); + stEstabelecimento.setStyleClass("hidden"); + stNome.setStyleClass("hidden"); + + System.out.println("ACTIVO = " + u.getActivo()); + if(u.getActivo().matches("y")) + { + chkActivo.setSelected(new Boolean(true)); + } + else + { + chkActivo.setSelected(new Boolean(false)); + } + //drpTipo.setSelected(u.getTipo()); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + stTipo.setText(adp.getTipoDescricao(u.getTipo())); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + drpEstabelecimentos.setSelected(u.getEstabelecimento_id()); + + if(u.getTipo().intValue() == 3) //hs + { + drpNome.setStyleClass("hidden"); + txtNome.setText(Utils.unicodeToHTML(u.getNome())); + } + else if(u.getTipo().intValue() == 5) //medico + { + drpNome.setStyleClass("hidden"); + System.out.println("MEDICA : " + Utils.unicodeToHTML(u.getNome())); + txtNome.setText(Utils.unicodeToHTML(u.getNome())); + } + else + { + drpNome.setStyleClass("hidden"); + txtNome.setText(Utils.unicodeToHTML(u.getNome())); + } + + if(u.getTipo().intValue() == 6) // gestor + { + chkGeral.setSelected(new Boolean(false)); + if(u.getGestor_geral().matches("y")) + { + chkGeral.setSelected(new Boolean(true)); + } + } + else + { + lblGeral.setRendered(false); + chkGeral.setRendered(false); + } + + + if(u.getTipo().intValue() == 1 || u.getTipo().intValue() == 2) + { + chkRespLoja.setSelected(new Boolean(false)); + if(u.getResponsavel_loja().matches("y")) + { + chkRespLoja.setSelected(new Boolean(true)); + } + } + else + { + lblRespLoja.setRendered(false); + chkRespLoja.setRendered(false); + } + + txtLogin.setText(u.getLogin()); + //txtPassword.setText(u.getPassword()); + txtEmail.setText(u.getEmail()); + + } + + private boolean validationOk(String modo) + { + if(modo.matches("new")) + { + if(txtLogin.getText() == null) + { + getSessionBean1().setMsg("Tem de indicar o login!"); + return false; + } + else + { + String login = (String) txtLogin.getText(); + if(login.trim().length() == 0) + { + getSessionBean1().setMsg("Tem de indicar o login!"); + return false; + } + else + { + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + Utilizador u = udp.getUtilizador( login ); + if ( u != null && login.equals( u.getLogin() ) ) + { + getSessionBean1().setMsg("O utilizador " + login + " já existe!"); + return false; + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + } + + if(txtPassword.getText() == null) + { + getSessionBean1().setMsg("Tem de indicar a password!"); + return false; + } + else + { + String password = (String) txtPassword.getText(); + if(password.trim().length() == 0) + { + getSessionBean1().setMsg("Tem de indicar a password!"); + return false; + } + else + { + if(txtConfPassword.getText() == null) + { + getSessionBean1().setMsg("Tem de confirmar a password!"); + return false; + } + else + { + String conf_password = (String) txtConfPassword.getText(); + if(conf_password.trim().length() == 0) + { + getSessionBean1().setMsg("Tem de confirmar a password!"); + return false; + } + else + { + if(!password.equals(conf_password)) + { + getSessionBean1().setMsg("A confirmação tem de ser igual à a password!"); + return false; + } + } + } + } // + } + + if(txtEmail.getText() != null) + { + String email = (String) txtEmail.getText(); + if(email.trim().length() > 0) + { + if(! Utils.isValidEmail(email)) + { + getSessionBean1().setMsg("Email inválido!"); + return false; + } + + } + else + { + getSessionBean1().setMsg("Tem de indicar o email!"); + return false; + } + } + else + { + getSessionBean1().setMsg("Tem de indicar o email!"); + return false; + } + + } + else if(modo.matches("edit")) + { + Utilizador u = getSessionBean1().getEditUser(); + +// Integer iTipo = (Integer) drpTipo.getSelected(); +// if(iTipo.intValue() == 0) +// { +// getSessionBean1().setMsg("Falta tipo !"); +// return false; +// } + + int tipo = u.getTipo().intValue(); + + if(tipo != 3) + { + Integer estabelecimento = (Integer) drpEstabelecimentos.getSelected(); + if(estabelecimento.intValue() == -1) + { + getSessionBean1().setMsg("Falta estabelecimento!"); + return false; + } + } + +// if(tipo == 3 || tipo == 5) +// { +// Integer nome = (Integer) drpNome.getSelected(); +// if(nome.intValue() == 0) +// { +// getSessionBean1().setMsg("Falta nome !"); +// return false; +// } +// } +// else +// { + if(txtNome.getText() == null) + { + getSessionBean1().setMsg("Falta nome!"); + + return false; + } + else + { + String nome = (String) txtNome.getText(); + if(nome.trim().length() == 0) + { + getSessionBean1().setMsg("Falta nome!"); + return false; + } + } +// } + + + if(txtLogin.getText() == null) + { + getSessionBean1().setMsg("Tem de indicar o login!"); + return false; + } + else + { + String login = (String) txtLogin.getText(); + if(login.trim().length() == 0) + { + getSessionBean1().setMsg("Tem de indicar o login!"); + return false; + } + else + { + if(!login.equals(u.getLogin())) + { + + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + Utilizador ut = udp.getUtilizador(login); + if(ut.getLogin().equals(login)) + { + getSessionBean1().setMsg("O utilizador " + login + " já existe!"); + return false; + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + + } + } +// if(txtPassword.getText() == null) +// { +// getSessionBean1().setMsg("Falta password!"); +// return false; +// } +// else + if(txtPassword.getText() != null) + { + String password = (String) txtPassword.getText(); + if(password.trim().length() > 0) + { + if(! password.equals(u.getPassword())) + { + if(txtConfPassword.getText() == null) + { + getSessionBean1().setMsg("Tem de confirmar a password!"); + return false; + } + else + { + String conf_password = (String) txtConfPassword.getText(); + if(conf_password.trim().length() == 0) + { + getSessionBean1().setMsg("Tem de confirmar a password!"); + return false; + } + else + { + if(!password.equals(conf_password)) + { + getSessionBean1().setMsg("A confirmação tem de ser igual à password!"); + return false; + } + } + } + } + } + else + { + if(txtConfPassword.getText() != null) + { + String conf = (String) txtConfPassword.getText(); + if(conf.trim().length() > 0) + { + getSessionBean1().setMsg("Falta password!"); + return false; + } + } + } + } + else + { + if(txtConfPassword.getText() != null) + { + String conf = (String) txtConfPassword.getText(); + if(conf.trim().length() > 0) + { + getSessionBean1().setMsg("Falta password!"); + return false; + } + } + } + + if(txtEmail.getText() != null) + { + String email = (String) txtEmail.getText(); + if(email.trim().length() > 0) + { + if(! Utils.isValidEmail(email)) + { + getSessionBean1().setMsg("Email inválido!"); + return false; + } + + } + } + else + { + getSessionBean1().setMsg("Tem de indicar o email!"); + return false; + } + + } + return true; + } + + private Utilizador addUser() throws Exception + { + Utilizador u = fillUser(); + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + Integer id = udp.createNewUtilizador(u); + u.setId(id); + return u; + } + + private void addPermissao(Utilizador u) throws Exception + { + Permissao p = new Permissao(); + p.setUser_id(u.getId()); + p.setCodigo_permissao(u.getTipo()); + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + udp.createPermissao(p); + } + + private void updateUser() throws Exception + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + //Utilizador u = fillUser(); + Utilizador u = getSessionBean1().getEditUser(); + + + //u.setTipo((Integer) drpTipo.getSelected()); + u.setEstabelecimento_id( (Integer) drpEstabelecimentos.getSelected() ); + + int tipo = u.getTipo().intValue(); +// if(tipo == 3) +// { +// u.setFuncionario_hst_id((Integer) drpNome.getSelected()); +// u.setNome( adp.getTecnicoSaudeNome( u.getFuncionario_hst_id() ) ); +// } +// else if(tipo == 5) +// { +// u.setMedico_id( (Integer) drpNome.getSelected() ); +// u.setNome( adp.getMedicoNome(u.getMedico_id()) ); +// } + u.setActivo("n"); + if(chkActivo.getSelected() != null) + { + if(chkActivo.getSelected().equals(new Boolean(true))) + { + u.setActivo("y"); + } + } + u.setNome((String) txtNome.getText()); + u.setLogin((String) txtLogin.getText()); + if(txtPassword.getText() != null) + { + String password = (String) txtPassword.getText(); + if(password.trim().length() > 0) + { + u.setPassword(password); + } + } + + u.setEmail((String) txtEmail.getText()); + + u.setGestor_geral("n"); + try + { + if(chkGeral.getSelected() != null) + { + if(chkGeral.getSelected().equals(new Boolean(true)) ) + { + u.setGestor_geral("y"); + } + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + u.setResponsavel_loja("n"); + try + { + if(chkRespLoja.getSelected() != null) + { + if(chkRespLoja.getSelected().equals(new Boolean(true)) ) + { + u.setResponsavel_loja("y"); + } + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + u.setPrimeiro_login("n"); +// UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + udp.updateUtilizador( u ); + } + + + private Utilizador fillUser() + { + NewUser nu = getSessionBean1().getNewUser(); + Utilizador u = new Utilizador(); + u.setActivo("n"); + if(chkActivo.getSelected() != null) + { + if(chkActivo.getSelected().equals(new Boolean(true))) + { + u.setActivo("y"); + } + } + u.setAdministrador("n"); + u.setTipo(nu.getTipo()); + u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id()); + //u.setEstabelecimento_id( nu.getEstabelecimento() ); + if(nu.getEstabelecimento() != null) + { + u.setEstabelecimento_id((Integer) drpEstabelecimentos.getSelected()); + } + u.setNome(Utils.unicodeToHTML(nu.getNome())); + u.setLogin( (String) txtLogin.getText() ); + u.setPassword( (String) txtPassword.getText() ); + java.util.Date today = + new java.util.Date(); + java.sql.Date sqlToday = + new java.sql.Date(today.getTime()); + u.setData_password(sqlToday); + u.setEmail(""); + u.setNumero_mecanografico(nu.getNumero_mecanografico()); + if(txtEmail.getText() != null) + { + u.setEmail( (String) txtEmail.getText() ); + } + + Integer tipo = (Integer) nu.getTipo(); + + u.setNumero_cedula(""); + u.setCap(""); + if(tipo.intValue() == 3 || tipo.intValue() == 5) + { + if(tipo.intValue() == 3) + { + try + { + //Integer tecnico_id = (Integer) drpNome.getSelected(); + //u.setFuncionario_hst_id(tecnico_id); + //u.setNome( adp.getTecnicoSaudeNome(tecnico_id) ); + u.setFuncionario_hst_id(nu.getFuncionario_hst_id()); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + u.setCap( nu.getCap()); + } + else // medico + { + try + { + //Integer medico_id = (Integer) drpNome.getSelected(); + //u.setMedico_id(medico_id); + //u.setNome( adp.getMedicoNome(medico_id) ); + u.setMedico_id(nu.getMedico_id()); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + //u.setNumero_cedula( (String) stCedula.getText()); + u.setNumero_cedula(nu.getNumero_cedula()); + } + } +// else +// { +// u.setNome( (String) txtNome.getText() ); +// } + + u.setResponsavel_loja(nu.getResponsavel_loja()); + if(nu.getGestor_geral() == null) + { + u.setGestor_geral("n"); + } + else + { + u.setGestor_geral(nu.getGestor_geral()); + } + + +// u.setResponsavel_loja("n"); +// if(chkResponsavelLoja.getSelected() != null) +// { +// if(chkResponsavelLoja.getSelected().equals(new Boolean(true))) +// { +// u.setResponsavel_loja("y"); +// } +// } + return u; + } + + private void deleteUser() throws Exception + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + udp.deleteUser(getSessionBean1().getEditUser().getId()); + } + + public String lnkNewUser_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkAnalisesAcidente_action() { + // TODO: Replace with your code + Integer tipo_utilizador = getSessionBean1().getCurrentUser().getTipo(); + if(tipo_utilizador.intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP) + { + return "form_dir_siprp"; + } + else if(tipo_utilizador.intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH) + { + return "form_dir_ger_rh"; + } + + return null; + } + + public void drpEstabelecimentos_processValueChange(ValueChangeEvent event) { + // TODO: Replace with your code + + } + + public String lnkAjuda_action() { + // TODO: Replace with your code +// ServletContext theApplicationsServletContext = +// (ServletContext) this.getExternalContext().getContext(); +// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); +// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf"; +// +// Global global = new Global(); +// try +// { +// global.showPdf(pdfFilePath); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + return null; + } + + public String lnkPlanosActuacao_action() { + // TODO: Replace with your code + Utilizador u = getSessionBean1().getCurrentUser(); +// String curUser = "?user=" + u.getId().toString(); + FacesContext fc = getFacesContext().getCurrentInstance(); + Global.redirectToPlanos(fc, u); + return null; + } +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ViewAnaliseAcidenteTrabalho.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ViewAnaliseAcidenteTrabalho.java new file mode 100644 index 00000000..343a54ba --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ViewAnaliseAcidenteTrabalho.java @@ -0,0 +1,4654 @@ +/* + * ViewAnaliseAcidenteTrabalho.java + * + * Created on October 1, 2007, 10:48 AM + * Copyright lluis + */ +package analiseacidentestrabalho; + +import beans.Recomendacao; +import beans.Seccao; +import beans.Causa; +import beans.Medida; +import beans.Utilizador; +import beans.Acidentado; +import beans.AnaliseAcidente; +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.rave.web.ui.component.Body; +import com.sun.rave.web.ui.component.Button; +import com.sun.rave.web.ui.component.Form; +import com.sun.rave.web.ui.component.Head; +import com.sun.rave.web.ui.component.HiddenField; +import com.sun.rave.web.ui.component.Html; +import com.sun.rave.web.ui.component.ImageComponent; +import com.sun.rave.web.ui.component.Link; +import com.sun.rave.web.ui.component.Page; +import com.sun.rave.web.ui.component.PanelGroup; +import com.sun.rave.web.ui.component.StaticText; +import db.providers.AnalisesDataProvider; +import db.providers.UtilizadoresDataProvider; +import global.Global; +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Calendar; +import java.util.ListIterator; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import javax.servlet.ServletContext; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ */ +public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean { + // + private int __placeholder; + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + private Page page1 = new Page(); + + public Page getPage1() { + return page1; + } + + public void setPage1(Page p) { + this.page1 = p; + } + + private Html html1 = new Html(); + + public Html getHtml1() { + return html1; + } + + public void setHtml1(Html h) { + this.html1 = h; + } + + private Head head1 = new Head(); + + public Head getHead1() { + return head1; + } + + public void setHead1(Head h) { + this.head1 = h; + } + + private Link link1 = new Link(); + + public Link getLink1() { + return link1; + } + + public void setLink1(Link l) { + this.link1 = l; + } + + private Body body1 = new Body(); + + public Body getBody1() { + return body1; + } + + public void setBody1(Body b) { + this.body1 = b; + } + + private Form form1 = new Form(); + + public Form getForm1() { + return form1; + } + + public void setForm1(Form f) { + this.form1 = f; + } + + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridBase1() { + return gridBase1; + } + + public void setGridBase1(HtmlPanelGrid hpg) { + this.gridBase1 = hpg; + } + + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayout1() { + return gridLayout1; + } + + public void setGridLayout1(HtmlPanelGrid hpg) { + this.gridLayout1 = hpg; + } + + private HtmlPanelGrid gridMsg1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMsg1() { + return gridMsg1; + } + + public void setGridMsg1(HtmlPanelGrid hpg) { + this.gridMsg1 = hpg; + } + + private StaticText txtMsg1 = new StaticText(); + + public StaticText getTxtMsg1() { + return txtMsg1; + } + + public void setTxtMsg1(StaticText st) { + this.txtMsg1 = st; + } + + private StaticText txtComentarioConclusaoTitle = new StaticText(); + + public StaticText getTxtComentarioConclusaoTitle() { + return txtComentarioConclusaoTitle; + } + + public void setTxtComentarioConclusaoTitle(StaticText txtComentarioConclusaoTitle) { + this.txtComentarioConclusaoTitle = txtComentarioConclusaoTitle; + } + + private StaticText txtComentarioConclusao = new StaticText(); + + public StaticText getTxtComentarioConclusao() { + return txtComentarioConclusao; + } + + public void setTxtComentarioConclusao(StaticText txtComentarioConclusao) { + this.txtComentarioConclusao = txtComentarioConclusao; + } + + + + private HtmlPanelGrid gridCabecalho1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridCabecalho1() { + return gridCabecalho1; + } + + public void setGridCabecalho1(HtmlPanelGrid hpg) { + this.gridCabecalho1 = hpg; + } + + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel2() { + return gridPanel2; + } + + public void setGridPanel2(HtmlPanelGrid hpg) { + this.gridPanel2 = hpg; + } + + private StaticText lblEmpresa1 = new StaticText(); + + public StaticText getLblEmpresa1() { + return lblEmpresa1; + } + + public void setLblEmpresa1(StaticText st) { + this.lblEmpresa1 = st; + } + + private StaticText txtEmpresa = new StaticText(); + + public StaticText getTxtEmpresa() { + return txtEmpresa; + } + + public void setTxtEmpresa(StaticText st) { + this.txtEmpresa = st; + } + + private StaticText staticText4 = new StaticText(); + + public StaticText getStaticText4() { + return staticText4; + } + + public void setStaticText4(StaticText st) { + this.staticText4 = st; + } + + private StaticText txtEstabelecimento = new StaticText(); + + public StaticText getTxtEstabelecimento() { + return txtEstabelecimento; + } + + public void setTxtEstabelecimento(StaticText st) { + this.txtEstabelecimento = st; + } + + private StaticText lblTrabalhador1 = new StaticText(); + + public StaticText getLblTrabalhador1() { + return lblTrabalhador1; + } + + public void setLblTrabalhador1(StaticText st) { + this.lblTrabalhador1 = st; + } + + private StaticText txtTrabalhador = new StaticText(); + + public StaticText getTxtTrabalhador() { + return txtTrabalhador; + } + + public void setTxtTrabalhador(StaticText st) { + this.txtTrabalhador = st; + } + + private HtmlPanelGrid gridDadosAcidenteSegView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridDadosAcidenteSegView() { + return gridDadosAcidenteSegView; + } + + public void setGridDadosAcidenteSegView(HtmlPanelGrid hpg) { + this.gridDadosAcidenteSegView = hpg; + } + + private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel8() { + return gridPanel8; + } + + public void setGridPanel8(HtmlPanelGrid hpg) { + this.gridPanel8 = hpg; + } + + private StaticText staticText13 = new StaticText(); + + public StaticText getStaticText13() { + return staticText13; + } + + public void setStaticText13(StaticText st) { + this.staticText13 = st; + } + + private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel9() { + return gridPanel9; + } + + public void setGridPanel9(HtmlPanelGrid hpg) { + this.gridPanel9 = hpg; + } + + private HtmlPanelGrid gridTurnoSeccaoLocal = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridTurnoSeccaoLocal() { + return gridTurnoSeccaoLocal; + } + + public void setGridTurnoSeccaoLocal(HtmlPanelGrid hpg) { + this.gridTurnoSeccaoLocal = hpg; + } + + private HtmlPanelGrid gridTarefa = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridTarefa() { + return gridTarefa; + } + + public void setGridTarefa(HtmlPanelGrid hpg) { + this.gridTarefa = hpg; + } + + private StaticText lblTarefa = new StaticText(); + + public StaticText getLblTarefa() { + return lblTarefa; + } + + public void setLblTarefa(StaticText st) { + this.lblTarefa = st; + } + + private HtmlPanelGrid gridSubstancias = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridSubstancias() { + return gridSubstancias; + } + + public void setGridSubstancias(HtmlPanelGrid hpg) { + this.gridSubstancias = hpg; + } + + private StaticText lblSubstancias = new StaticText(); + + public StaticText getLblSubstancias() { + return lblSubstancias; + } + + public void setLblSubstancias(StaticText st) { + this.lblSubstancias = st; + } + + private HtmlPanelGrid gridCondicoes = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridCondicoes() { + return gridCondicoes; + } + + public void setGridCondicoes(HtmlPanelGrid hpg) { + this.gridCondicoes = hpg; + } + + private StaticText lblCondicoes = new StaticText(); + + public StaticText getLblCondicoes() { + return lblCondicoes; + } + + public void setLblCondicoes(StaticText st) { + this.lblCondicoes = st; + } + + private HtmlPanelGrid gridTestemunhas = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridTestemunhas() { + return gridTestemunhas; + } + + public void setGridTestemunhas(HtmlPanelGrid hpg) { + this.gridTestemunhas = hpg; + } + + private StaticText lblTestemunhas = new StaticText(); + + public StaticText getLblTestemunhas() { + return lblTestemunhas; + } + + public void setLblTestemunhas(StaticText st) { + this.lblTestemunhas = st; + } + + private HtmlPanelGrid gridCausas = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridCausas() { + return gridCausas; + } + + public void setGridCausas(HtmlPanelGrid hpg) { + this.gridCausas = hpg; + } + + private StaticText lblCausas = new StaticText(); + + public StaticText getLblCausas() { + return lblCausas; + } + + public void setLblCausas(StaticText st) { + this.lblCausas = st; + } + + private HtmlPanelGrid gridDescricao = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridDescricao() { + return gridDescricao; + } + + public void setGridDescricao(HtmlPanelGrid hpg) { + this.gridDescricao = hpg; + } + + private StaticText lblDescricao = new StaticText(); + + public StaticText getLblDescricao() { + return lblDescricao; + } + + public void setLblDescricao(StaticText st) { + this.lblDescricao = st; + } + + private HtmlPanelGrid gridFotografias = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridFotografias() { + return gridFotografias; + } + + public void setGridFotografias(HtmlPanelGrid hpg) { + this.gridFotografias = hpg; + } + + private HtmlPanelGrid gridPanel19 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel19() { + return gridPanel19; + } + + public void setGridPanel19(HtmlPanelGrid hpg) { + this.gridPanel19 = hpg; + } + + private StaticText lblFotografias = new StaticText(); + + public StaticText getLblFotografias() { + return lblFotografias; + } + + public void setLblFotografias(StaticText st) { + this.lblFotografias = st; + } + + private HtmlPanelGrid gridImages = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridImages() { + return gridImages; + } + + public void setGridImages(HtmlPanelGrid hpg) { + this.gridImages = hpg; + } + + private HtmlPanelGrid gridConclusoes = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridConclusoes() { + return gridConclusoes; + } + + public void setGridConclusoes(HtmlPanelGrid hpg) { + this.gridConclusoes = hpg; + } + + private StaticText lblConclusoes = new StaticText(); + + public StaticText getLblConclusoes() { + return lblConclusoes; + } + + public void setLblConclusoes(StaticText st) { + this.lblConclusoes = st; + } + + private HtmlPanelGrid gridAccoes = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridAccoes() { + return gridAccoes; + } + + public void setGridAccoes(HtmlPanelGrid hpg) { + this.gridAccoes = hpg; + } + + private StaticText lblAccoes = new StaticText(); + + public StaticText getLblAccoes() { + return lblAccoes; + } + + public void setLblAccoes(StaticText st) { + this.lblAccoes = st; + } + + private StaticText txtAccoes = new StaticText(); + + public StaticText getTxtAccoes() { + return txtAccoes; + } + + public void setTxtAccoes(StaticText st) { + this.txtAccoes = st; + } + + private StaticText txtConclusoes = new StaticText(); + + public StaticText getTxtConclusoes() { + return txtConclusoes; + } + + public void setTxtConclusoes(StaticText st) { + this.txtConclusoes = st; + } + + private StaticText txtDescricao = new StaticText(); + + public StaticText getTxtDescricao() { + return txtDescricao; + } + + public void setTxtDescricao(StaticText st) { + this.txtDescricao = st; + } + + private StaticText txtCausas = new StaticText(); + + public StaticText getTxtCausas() { + return txtCausas; + } + + public void setTxtCausas(StaticText st) { + this.txtCausas = st; + } + + private StaticText txtTestemunhas = new StaticText(); + + public StaticText getTxtTestemunhas() { + return txtTestemunhas; + } + + public void setTxtTestemunhas(StaticText st) { + this.txtTestemunhas = st; + } + + private StaticText txtCondicoes = new StaticText(); + + public StaticText getTxtCondicoes() { + return txtCondicoes; + } + + public void setTxtCondicoes(StaticText st) { + this.txtCondicoes = st; + } + + private StaticText txtSubstancias = new StaticText(); + + public StaticText getTxtSubstancias() { + return txtSubstancias; + } + + public void setTxtSubstancias(StaticText st) { + this.txtSubstancias = st; + } + + private StaticText txtTarefa = new StaticText(); + + public StaticText getTxtTarefa() { + return txtTarefa; + } + + public void setTxtTarefa(StaticText st) { + this.txtTarefa = st; + } + + //
+ //private String IMAGE_URL = "/resources/images"; + + private final static int IMAGE_WIDTH = 48; + private final static int IMAGE_HEIGHT = 48; + + + private HtmlPanelGrid gridDadosAcidenteRhView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridDadosAcidenteRhView() { + return gridDadosAcidenteRhView; + } + + public void setGridDadosAcidenteRhView(HtmlPanelGrid hpg) { + this.gridDadosAcidenteRhView = hpg; + } + + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel3() { + return gridPanel3; + } + + public void setGridPanel3(HtmlPanelGrid hpg) { + this.gridPanel3 = hpg; + } + + private StaticText staticText5 = new StaticText(); + + public StaticText getStaticText5() { + return staticText5; + } + + public void setStaticText5(StaticText st) { + this.staticText5 = st; + } + + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel4() { + return gridPanel4; + } + + public void setGridPanel4(HtmlPanelGrid hpg) { + this.gridPanel4 = hpg; + } + + private HtmlPanelGrid gridSHST = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridSHST() { + return gridSHST; + } + + public void setGridSHST(HtmlPanelGrid hpg) { + this.gridSHST = hpg; + } + + private HtmlPanelGrid gridColaborador = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridColaborador() { + return gridColaborador; + } + + public void setGridColaborador(HtmlPanelGrid hpg) { + this.gridColaborador = hpg; + } + + private HtmlPanelGrid gridColaboradores = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridColaboradores() { + return gridColaboradores; + } + + public void setGridColaboradores(HtmlPanelGrid hpg) { + this.gridColaboradores = hpg; + } + + private HtmlPanelGrid gridRecomendacoesViewHS = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridRecomendacoesViewHS() { + return gridRecomendacoesViewHS; + } + + public void setGridRecomendacoesViewHS(HtmlPanelGrid hpg) { + this.gridRecomendacoesViewHS = hpg; + } + + private HtmlPanelGrid gridPanel23 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel23() { + return gridPanel23; + } + + public void setGridPanel23(HtmlPanelGrid hpg) { + this.gridPanel23 = hpg; + } + + private StaticText staticText29 = new StaticText(); + + public StaticText getStaticText29() { + return staticText29; + } + + public void setStaticText29(StaticText st) { + this.staticText29 = st; + } + + private HtmlPanelGrid gridRecomendacoesView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridRecomendacoesView() { + return gridRecomendacoesView; + } + + public void setGridRecomendacoesView(HtmlPanelGrid hpg) { + this.gridRecomendacoesView = hpg; + } + + private HtmlPanelGrid gridMedidasViewRH = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMedidasViewRH() { + return gridMedidasViewRH; + } + + public void setGridMedidasViewRH(HtmlPanelGrid hpg) { + this.gridMedidasViewRH = hpg; + } + + private HtmlPanelGrid gridPanel24 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel24() { + return gridPanel24; + } + + public void setGridPanel24(HtmlPanelGrid hpg) { + this.gridPanel24 = hpg; + } + + private StaticText staticText30 = new StaticText(); + + public StaticText getStaticText30() { + return staticText30; + } + + public void setStaticText30(StaticText st) { + this.staticText30 = st; + } + + private HtmlPanelGrid gridMedidasView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMedidasView() { + return gridMedidasView; + } + + public void setGridMedidasView(HtmlPanelGrid hpg) { + this.gridMedidasView = hpg; + } + + private HtmlPanelGrid gridMedicoView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridMedicoView() { + return gridMedicoView; + } + + public void setGridMedicoView(HtmlPanelGrid hpg) { + this.gridMedicoView = hpg; + } + + private HtmlPanelGrid gridPanel25 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel25() { + return gridPanel25; + } + + public void setGridPanel25(HtmlPanelGrid hpg) { + this.gridPanel25 = hpg; + } + + private StaticText staticText31 = new StaticText(); + + public StaticText getStaticText31() { + return staticText31; + } + + public void setStaticText31(StaticText st) { + this.staticText31 = st; + } + + private HtmlPanelGrid gridLesao = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLesao() { + return gridLesao; + } + + public void setGridLesao(HtmlPanelGrid hpg) { + this.gridLesao = hpg; + } + + private StaticText lblAreasCorporais = new StaticText(); + + public StaticText getLblAreasCorporais() { + return lblAreasCorporais; + } + + public void setLblAreasCorporais(StaticText st) { + this.lblAreasCorporais = st; + } + + private HtmlPanelGrid gridPanel26 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel26() { + return gridPanel26; + } + + public void setGridPanel26(HtmlPanelGrid hpg) { + this.gridPanel26 = hpg; + } + + private StaticText staticText33 = new StaticText(); + + public StaticText getStaticText33() { + return staticText33; + } + + public void setStaticText33(StaticText st) { + this.staticText33 = st; + } + + private HtmlPanelGrid gridIncapacidade = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridIncapacidade() { + return gridIncapacidade; + } + + public void setGridIncapacidade(HtmlPanelGrid hpg) { + this.gridIncapacidade = hpg; + } + + private HtmlPanelGrid gridPanel27 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel27() { + return gridPanel27; + } + + public void setGridPanel27(HtmlPanelGrid hpg) { + this.gridPanel27 = hpg; + } + + private StaticText staticText34 = new StaticText(); + + public StaticText getStaticText34() { + return staticText34; + } + + public void setStaticText34(StaticText st) { + this.staticText34 = st; + } + + private HtmlPanelGrid gridRestricoes = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridRestricoes() { + return gridRestricoes; + } + + public void setGridRestricoes(HtmlPanelGrid hpg) { + this.gridRestricoes = hpg; + } + + private HtmlPanelGrid gridPanel28 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel28() { + return gridPanel28; + } + + public void setGridPanel28(HtmlPanelGrid hpg) { + this.gridPanel28 = hpg; + } + + private HtmlPanelGrid gridImagesRestricoes = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridImagesRestricoes() { + return gridImagesRestricoes; + } + + public void setGridImagesRestricoes(HtmlPanelGrid hpg) { + this.gridImagesRestricoes = hpg; + } + + private HtmlPanelGrid gridOutrasRestricoes = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridOutrasRestricoes() { + return gridOutrasRestricoes; + } + + public void setGridOutrasRestricoes(HtmlPanelGrid hpg) { + this.gridOutrasRestricoes = hpg; + } + + private StaticText staticText35 = new StaticText(); + + public StaticText getStaticText35() { + return staticText35; + } + + public void setStaticText35(StaticText st) { + this.staticText35 = st; + } + + private HtmlPanelGrid gridPanel29 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel29() { + return gridPanel29; + } + + public void setGridPanel29(HtmlPanelGrid hpg) { + this.gridPanel29 = hpg; + } + + private StaticText staticText36 = new StaticText(); + + public StaticText getStaticText36() { + return staticText36; + } + + public void setStaticText36(StaticText st) { + this.staticText36 = st; + } + + private StaticText stObservacoes = new StaticText(); + + public StaticText getStObservacoes() { + return stObservacoes; + } + + public void setStObservacoes(StaticText st) { + this.stObservacoes = st; + } + + private HtmlPanelGrid gridAcidentadoView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridAcidentadoView() { + return gridAcidentadoView; + } + + public void setGridAcidentadoView(HtmlPanelGrid hpg) { + this.gridAcidentadoView = hpg; + } + + private HtmlPanelGrid gridPanel30 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel30() { + return gridPanel30; + } + + public void setGridPanel30(HtmlPanelGrid hpg) { + this.gridPanel30 = hpg; + } + + private StaticText staticText37 = new StaticText(); + + public StaticText getStaticText37() { + return staticText37; + } + + public void setStaticText37(StaticText st) { + this.staticText37 = st; + } + + private HtmlPanelGrid gridPanel31 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel31() { + return gridPanel31; + } + + public void setGridPanel31(HtmlPanelGrid hpg) { + this.gridPanel31 = hpg; + } + + private HtmlPanelGrid gridDataHora = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridDataHora() { + return gridDataHora; + } + + public void setGridDataHora(HtmlPanelGrid hpg) { + this.gridDataHora = hpg; + } + + private PanelGroup groupPanel6 = new PanelGroup(); + + public PanelGroup getGroupPanel6() { + return groupPanel6; + } + + public void setGroupPanel6(PanelGroup pg) { + this.groupPanel6 = pg; + } + + private StaticText lblDataAcidente = new StaticText(); + + public StaticText getLblDataAcidente() { + return lblDataAcidente; + } + + public void setLblDataAcidente(StaticText st) { + this.lblDataAcidente = st; + } + + private StaticText stDataAcidente1 = new StaticText(); + + public StaticText getStDataAcidente1() { + return stDataAcidente1; + } + + public void setStDataAcidente1(StaticText st) { + this.stDataAcidente1 = st; + } + + private PanelGroup groupPanel7 = new PanelGroup(); + + public PanelGroup getGroupPanel7() { + return groupPanel7; + } + + public void setGroupPanel7(PanelGroup pg) { + this.groupPanel7 = pg; + } + + private StaticText lblHoraAcidente = new StaticText(); + + public StaticText getLblHoraAcidente() { + return lblHoraAcidente; + } + + public void setLblHoraAcidente(StaticText st) { + this.lblHoraAcidente = st; + } + + private StaticText stHoraAcidente1 = new StaticText(); + + public StaticText getStHoraAcidente1() { + return stHoraAcidente1; + } + + public void setStHoraAcidente1(StaticText st) { + this.stHoraAcidente1 = st; + } + + private HtmlPanelGrid gridVerificacaoView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridVerificacaoView() { + return gridVerificacaoView; + } + + public void setGridVerificacaoView(HtmlPanelGrid hpg) { + this.gridVerificacaoView = hpg; + } + + private HtmlPanelGrid gridPanel34 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel34() { + return gridPanel34; + } + + public void setGridPanel34(HtmlPanelGrid hpg) { + this.gridPanel34 = hpg; + } + + private StaticText staticText15 = new StaticText(); + + public StaticText getStaticText15() { + return staticText15; + } + + public void setStaticText15(StaticText st) { + this.staticText15 = st; + } + + private HtmlPanelGrid gridPanel35 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel35() { + return gridPanel35; + } + + public void setGridPanel35(HtmlPanelGrid hpg) { + this.gridPanel35 = hpg; + } + + private HtmlPanelGrid gridAssinaturasView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridAssinaturasView() { + return gridAssinaturasView; + } + + public void setGridAssinaturasView(HtmlPanelGrid hpg) { + this.gridAssinaturasView = hpg; + } + + private HtmlPanelGrid gridImpressaoView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridImpressaoView() { + return gridImpressaoView; + } + + public void setGridImpressaoView(HtmlPanelGrid hpg) { + this.gridImpressaoView = hpg; + } + + private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel10() { + return gridPanel10; + } + + public void setGridPanel10(HtmlPanelGrid hpg) { + this.gridPanel10 = hpg; + } + + private StaticText staticText3 = new StaticText(); + + public StaticText getStaticText3() { + return staticText3; + } + + public void setStaticText3(StaticText st) { + this.staticText3 = st; + } + + private HtmlPanelGrid gridPanel11 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel11() { + return gridPanel11; + } + + public void setGridPanel11(HtmlPanelGrid hpg) { + this.gridPanel11 = hpg; + } + + private HtmlPanelGrid gridAssSupView = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridAssSupView() { + return gridAssSupView; + } + + public void setGridAssSupView(HtmlPanelGrid hpg) { + this.gridAssSupView = hpg; + } + + private HtmlPanelGrid gridPanel12 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel12() { + return gridPanel12; + } + + public void setGridPanel12(HtmlPanelGrid hpg) { + this.gridPanel12 = hpg; + } + + private PanelGroup groupPanel5 = new PanelGroup(); + + public PanelGroup getGroupPanel5() { + return groupPanel5; + } + + public void setGroupPanel5(PanelGroup pg) { + this.groupPanel5 = pg; + } + + private HtmlPanelGrid gridPanel13 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel13() { + return gridPanel13; + } + + public void setGridPanel13(HtmlPanelGrid hpg) { + this.gridPanel13 = hpg; + } + + private PanelGroup groupPanel8 = new PanelGroup(); + + public PanelGroup getGroupPanel8() { + return groupPanel8; + } + + public void setGroupPanel8(PanelGroup pg) { + this.groupPanel8 = pg; + } + + private StaticText staticText14 = new StaticText(); + + public StaticText getStaticText14() { + return staticText14; + } + + public void setStaticText14(StaticText st) { + this.staticText14 = st; + } + + private StaticText stAveriguador = new StaticText(); + + public StaticText getStAveriguador() { + return stAveriguador; + } + + public void setStAveriguador(StaticText st) { + this.stAveriguador = st; + } + + private HtmlPanelGrid gridPanel14 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel14() { + return gridPanel14; + } + + public void setGridPanel14(HtmlPanelGrid hpg) { + this.gridPanel14 = hpg; + } + + private PanelGroup groupPanel9 = new PanelGroup(); + + public PanelGroup getGroupPanel9() { + return groupPanel9; + } + + public void setGroupPanel9(PanelGroup pg) { + this.groupPanel9 = pg; + } + + private StaticText staticText16 = new StaticText(); + + public StaticText getStaticText16() { + return staticText16; + } + + public void setStaticText16(StaticText st) { + this.staticText16 = st; + } + + private ImageComponent image3 = new ImageComponent(); + + public ImageComponent getImage3() { + return image3; + } + + public void setImage3(ImageComponent ic) { + this.image3 = ic; + } + + private StaticText staticText17 = new StaticText(); + + public StaticText getStaticText17() { + return staticText17; + } + + public void setStaticText17(StaticText st) { + this.staticText17 = st; + } + + private HtmlPanelGrid gridAveriguacaoPosterior = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridAveriguacaoPosterior() { + return gridAveriguacaoPosterior; + } + + public void setGridAveriguacaoPosterior(HtmlPanelGrid hpg) { + this.gridAveriguacaoPosterior = hpg; + } + + private StaticText lblAveriguacaoPosterior1 = new StaticText(); + + public StaticText getLblAveriguacaoPosterior1() { + return lblAveriguacaoPosterior1; + } + + public void setLblAveriguacaoPosterior1(StaticText st) { + this.lblAveriguacaoPosterior1 = st; + } + + private StaticText txtAveriguacaoPosterior = new StaticText(); + + public StaticText getTxtAveriguacaoPosterior() { + return txtAveriguacaoPosterior; + } + + public void setTxtAveriguacaoPosterior(StaticText st) { + this.txtAveriguacaoPosterior = st; + } + + private HtmlPanelGrid gridPanel15 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel15() { + return gridPanel15; + } + + public void setGridPanel15(HtmlPanelGrid hpg) { + this.gridPanel15 = hpg; + } + + private StaticText staticText18 = new StaticText(); + + public StaticText getStaticText18() { + return staticText18; + } + + public void setStaticText18(StaticText st) { + this.staticText18 = st; + } + + private HtmlPanelGrid gridPanel16 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel16() { + return gridPanel16; + } + + public void setGridPanel16(HtmlPanelGrid hpg) { + this.gridPanel16 = hpg; + } + + private PanelGroup groupPanel10 = new PanelGroup(); + + public PanelGroup getGroupPanel10() { + return groupPanel10; + } + + public void setGroupPanel10(PanelGroup pg) { + this.groupPanel10 = pg; + } + + private StaticText staticText19 = new StaticText(); + + public StaticText getStaticText19() { + return staticText19; + } + + public void setStaticText19(StaticText st) { + this.staticText19 = st; + } + + private StaticText stNomeSuperior = new StaticText(); + + public StaticText getStNomeSuperior() { + return stNomeSuperior; + } + + public void setStNomeSuperior(StaticText st) { + this.stNomeSuperior = st; + } + + private PanelGroup groupPanel11 = new PanelGroup(); + + public PanelGroup getGroupPanel11() { + return groupPanel11; + } + + public void setGroupPanel11(PanelGroup pg) { + this.groupPanel11 = pg; + } + + private StaticText staticText20 = new StaticText(); + + public StaticText getStaticText20() { + return staticText20; + } + + public void setStaticText20(StaticText st) { + this.staticText20 = st; + } + + private StaticText stEmailSuperior = new StaticText(); + + public StaticText getStEmailSuperior() { + return stEmailSuperior; + } + + public void setStEmailSuperior(StaticText st) { + this.stEmailSuperior = st; + } + + private HtmlPanelGrid gridSiprp = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridSiprp() { + return gridSiprp; + } + + public void setGridSiprp(HtmlPanelGrid hpg) { + this.gridSiprp = hpg; + } + + private HtmlPanelGrid gridPanel17 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel17() { + return gridPanel17; + } + + public void setGridPanel17(HtmlPanelGrid hpg) { + this.gridPanel17 = hpg; + } + + private StaticText staticText24 = new StaticText(); + + public StaticText getStaticText24() { + return staticText24; + } + + public void setStaticText24(StaticText st) { + this.staticText24 = st; + } + + private HtmlPanelGrid gridPanel18 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel18() { + return gridPanel18; + } + + public void setGridPanel18(HtmlPanelGrid hpg) { + this.gridPanel18 = hpg; + } + + private HtmlPanelGrid gridPanel20 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel20() { + return gridPanel20; + } + + public void setGridPanel20(HtmlPanelGrid hpg) { + this.gridPanel20 = hpg; + } + + private PanelGroup groupPanel12 = new PanelGroup(); + + public PanelGroup getGroupPanel12() { + return groupPanel12; + } + + public void setGroupPanel12(PanelGroup pg) { + this.groupPanel12 = pg; + } + + private StaticText staticText25 = new StaticText(); + + public StaticText getStaticText25() { + return staticText25; + } + + public void setStaticText25(StaticText st) { + this.staticText25 = st; + } + + private StaticText staticText26 = new StaticText(); + + public StaticText getStaticText26() { + return staticText26; + } + + public void setStaticText26(StaticText st) { + this.staticText26 = st; + } + + private PanelGroup groupPanel13 = new PanelGroup(); + + public PanelGroup getGroupPanel13() { + return groupPanel13; + } + + public void setGroupPanel13(PanelGroup pg) { + this.groupPanel13 = pg; + } + + private StaticText staticText27 = new StaticText(); + + public StaticText getStaticText27() { + return staticText27; + } + + public void setStaticText27(StaticText st) { + this.staticText27 = st; + } + + private StaticText txtTecnicoSuperior = new StaticText(); + + public StaticText getTxtTecnicoSuperior() { + return txtTecnicoSuperior; + } + + public void setTxtTecnicoSuperior(StaticText st) { + this.txtTecnicoSuperior = st; + } + + private StaticText staticText28 = new StaticText(); + + public StaticText getStaticText28() { + return staticText28; + } + + public void setStaticText28(StaticText st) { + this.staticText28 = st; + } + + private StaticText staticText47 = new StaticText(); + + public StaticText getStaticText47() { + return staticText47; + } + + public void setStaticText47(StaticText st) { + this.staticText47 = st; + } + + private StaticText txtCap1 = new StaticText(); + + public StaticText getTxtCap1() { + return txtCap1; + } + + public void setTxtCap1(StaticText st) { + this.txtCap1 = st; + } + + private PanelGroup groupPanel14 = new PanelGroup(); + + public PanelGroup getGroupPanel14() { + return groupPanel14; + } + + public void setGroupPanel14(PanelGroup pg) { + this.groupPanel14 = pg; + } + + private StaticText staticText48 = new StaticText(); + + public StaticText getStaticText48() { + return staticText48; + } + + public void setStaticText48(StaticText st) { + this.staticText48 = st; + } + + private StaticText txtMedicoTrabalho = new StaticText(); + + public StaticText getTxtMedicoTrabalho() { + return txtMedicoTrabalho; + } + + public void setTxtMedicoTrabalho(StaticText st) { + this.txtMedicoTrabalho = st; + } + + private StaticText staticText49 = new StaticText(); + + public StaticText getStaticText49() { + return staticText49; + } + + public void setStaticText49(StaticText st) { + this.staticText49 = st; + } + + private StaticText staticText50 = new StaticText(); + + public StaticText getStaticText50() { + return staticText50; + } + + public void setStaticText50(StaticText st) { + this.staticText50 = st; + } + + private StaticText txtCedula1 = new StaticText(); + + public StaticText getTxtCedula1() { + return txtCedula1; + } + + public void setTxtCedula1(StaticText st) { + this.txtCedula1 = st; + } + + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel5() { + return gridPanel5; + } + + public void setGridPanel5(HtmlPanelGrid hpg) { + this.gridPanel5 = hpg; + } + + private PanelGroup groupPanel3 = new PanelGroup(); + + public PanelGroup getGroupPanel3() { + return groupPanel3; + } + + public void setGroupPanel3(PanelGroup pg) { + this.groupPanel3 = pg; + } + + private StaticText staticText6 = new StaticText(); + + public StaticText getStaticText6() { + return staticText6; + } + + public void setStaticText6(StaticText st) { + this.staticText6 = st; + } + + private StaticText stNomeAcidentado = new StaticText(); + + public StaticText getStNomeAcidentado() { + return stNomeAcidentado; + } + + public void setStNomeAcidentado(StaticText st) { + this.stNomeAcidentado = st; + } + + private PanelGroup groupPanel4 = new PanelGroup(); + + public PanelGroup getGroupPanel4() { + return groupPanel4; + } + + public void setGroupPanel4(PanelGroup pg) { + this.groupPanel4 = pg; + } + + private StaticText staticText7 = new StaticText(); + + public StaticText getStaticText7() { + return staticText7; + } + + public void setStaticText7(StaticText st) { + this.staticText7 = st; + } + + private StaticText stEstabelecimentoOrigem = new StaticText(); + + public StaticText getStEstabelecimentoOrigem() { + return stEstabelecimentoOrigem; + } + + public void setStEstabelecimentoOrigem(StaticText st) { + this.stEstabelecimentoOrigem = st; + } + + private PanelGroup groupPanel15 = new PanelGroup(); + + public PanelGroup getGroupPanel15() { + return groupPanel15; + } + + public void setGroupPanel15(PanelGroup pg) { + this.groupPanel15 = pg; + } + + private StaticText staticText8 = new StaticText(); + + public StaticText getStaticText8() { + return staticText8; + } + + public void setStaticText8(StaticText st) { + this.staticText8 = st; + } + + private StaticText stDataNascimento = new StaticText(); + + public StaticText getStDataNascimento() { + return stDataNascimento; + } + + public void setStDataNascimento(StaticText st) { + this.stDataNascimento = st; + } + + private PanelGroup groupPanel16 = new PanelGroup(); + + public PanelGroup getGroupPanel16() { + return groupPanel16; + } + + public void setGroupPanel16(PanelGroup pg) { + this.groupPanel16 = pg; + } + + private StaticText staticText9 = new StaticText(); + + public StaticText getStaticText9() { + return staticText9; + } + + public void setStaticText9(StaticText st) { + this.staticText9 = st; + } + + private StaticText stBI = new StaticText(); + + public StaticText getStBI() { + return stBI; + } + + public void setStBI(StaticText st) { + this.stBI = st; + } + + private PanelGroup groupPanel17 = new PanelGroup(); + + public PanelGroup getGroupPanel17() { + return groupPanel17; + } + + public void setGroupPanel17(PanelGroup pg) { + this.groupPanel17 = pg; + } + + private StaticText staticText10 = new StaticText(); + + public StaticText getStaticText10() { + return staticText10; + } + + public void setStaticText10(StaticText st) { + this.staticText10 = st; + } + + private StaticText stMorada = new StaticText(); + + public StaticText getStMorada() { + return stMorada; + } + + public void setStMorada(StaticText st) { + this.stMorada = st; + } + + private StaticText staticText11 = new StaticText(); + + public StaticText getStaticText11() { + return staticText11; + } + + public void setStaticText11(StaticText st) { + this.staticText11 = st; + } + + private StaticText stCodPostal = new StaticText(); + + public StaticText getStCodPostal() { + return stCodPostal; + } + + public void setStCodPostal(StaticText st) { + this.stCodPostal = st; + } + + private PanelGroup groupPanel18 = new PanelGroup(); + + public PanelGroup getGroupPanel18() { + return groupPanel18; + } + + public void setGroupPanel18(PanelGroup pg) { + this.groupPanel18 = pg; + } + + private StaticText staticText12 = new StaticText(); + + public StaticText getStaticText12() { + return staticText12; + } + + public void setStaticText12(StaticText st) { + this.staticText12 = st; + } + + private StaticText stContactoTelefonico = new StaticText(); + + public StaticText getStContactoTelefonico() { + return stContactoTelefonico; + } + + public void setStContactoTelefonico(StaticText st) { + this.stContactoTelefonico = st; + } + + private PanelGroup groupPanel19 = new PanelGroup(); + + public PanelGroup getGroupPanel19() { + return groupPanel19; + } + + public void setGroupPanel19(PanelGroup pg) { + this.groupPanel19 = pg; + } + + private StaticText staticText51 = new StaticText(); + + public StaticText getStaticText51() { + return staticText51; + } + + public void setStaticText51(StaticText st) { + this.staticText51 = st; + } + + private StaticText stDataAdmissao = new StaticText(); + + public StaticText getStDataAdmissao() { + return stDataAdmissao; + } + + public void setStDataAdmissao(StaticText st) { + this.stDataAdmissao = st; + } + + private PanelGroup groupPanel20 = new PanelGroup(); + + public PanelGroup getGroupPanel20() { + return groupPanel20; + } + + public void setGroupPanel20(PanelGroup pg) { + this.groupPanel20 = pg; + } + + private StaticText staticText52 = new StaticText(); + + public StaticText getStaticText52() { + return staticText52; + } + + public void setStaticText52(StaticText st) { + this.staticText52 = st; + } + + private StaticText stFuncao = new StaticText(); + + public StaticText getStFuncao() { + return stFuncao; + } + + public void setStFuncao(StaticText st) { + this.stFuncao = st; + } + + private PanelGroup groupPanel21 = new PanelGroup(); + + public PanelGroup getGroupPanel21() { + return groupPanel21; + } + + public void setGroupPanel21(PanelGroup pg) { + this.groupPanel21 = pg; + } + + private StaticText staticText53 = new StaticText(); + + public StaticText getStaticText53() { + return staticText53; + } + + public void setStaticText53(StaticText st) { + this.staticText53 = st; + } + + private StaticText stTurno = new StaticText(); + + public StaticText getStTurno() { + return stTurno; + } + + public void setStTurno(StaticText st) { + this.stTurno = st; + } + + private PanelGroup groupPanel22 = new PanelGroup(); + + public PanelGroup getGroupPanel22() { + return groupPanel22; + } + + public void setGroupPanel22(PanelGroup pg) { + this.groupPanel22 = pg; + } + + private StaticText lblHorasTurno = new StaticText(); + + public StaticText getLblHorasTurno() { + return lblHorasTurno; + } + + public void setLblHorasTurno(StaticText st) { + this.lblHorasTurno = st; + } + + private StaticText txtHorasTurno = new StaticText(); + + public StaticText getTxtHorasTurno() { + return txtHorasTurno; + } + + public void setTxtHorasTurno(StaticText st) { + this.txtHorasTurno = st; + } + + private PanelGroup groupPanel23 = new PanelGroup(); + + public PanelGroup getGroupPanel23() { + return groupPanel23; + } + + public void setGroupPanel23(PanelGroup pg) { + this.groupPanel23 = pg; + } + + private StaticText lblSeccao = new StaticText(); + + public StaticText getLblSeccao() { + return lblSeccao; + } + + public void setLblSeccao(StaticText st) { + this.lblSeccao = st; + } + + private StaticText txtSeccao = new StaticText(); + + public StaticText getTxtSeccao() { + return txtSeccao; + } + + public void setTxtSeccao(StaticText st) { + this.txtSeccao = st; + } + + private PanelGroup groupPanel24 = new PanelGroup(); + + public PanelGroup getGroupPanel24() { + return groupPanel24; + } + + public void setGroupPanel24(PanelGroup pg) { + this.groupPanel24 = pg; + } + + private StaticText lblLocal = new StaticText(); + + public StaticText getLblLocal() { + return lblLocal; + } + + public void setLblLocal(StaticText st) { + this.lblLocal = st; + } + + private StaticText txtLocal = new StaticText(); + + public StaticText getTxtLocal() { + return txtLocal; + } + + public void setTxtLocal(StaticText st) { + this.txtLocal = st; + } + + private HtmlPanelGrid gridHeader1 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridHeader1() { + return gridHeader1; + } + + public void setGridHeader1(HtmlPanelGrid hpg) { + this.gridHeader1 = hpg; + } + + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel6() { + return gridPanel6; + } + + public void setGridPanel6(HtmlPanelGrid hpg) { + this.gridPanel6 = hpg; + } + + private PanelGroup groupPanel26 = new PanelGroup(); + + public PanelGroup getGroupPanel26() { + return groupPanel26; + } + + public void setGroupPanel26(PanelGroup pg) { + this.groupPanel26 = pg; + } + + private ImageComponent image4 = new ImageComponent(); + + public ImageComponent getImage4() { + return image4; + } + + public void setImage4(ImageComponent ic) { + this.image4 = ic; + } + + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel7() { + return gridPanel7; + } + + public void setGridPanel7(HtmlPanelGrid hpg) { + this.gridPanel7 = hpg; + } + + private StaticText staticText41 = new StaticText(); + + public StaticText getStaticText41() { + return staticText41; + } + + public void setStaticText41(StaticText st) { + this.staticText41 = st; + } + + private HtmlPanelGrid gridPanel21 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel21() { + return gridPanel21; + } + + public void setGridPanel21(HtmlPanelGrid hpg) { + this.gridPanel21 = hpg; + } + + private PanelGroup groupPanel27 = new PanelGroup(); + + public PanelGroup getGroupPanel27() { + return groupPanel27; + } + + public void setGroupPanel27(PanelGroup pg) { + this.groupPanel27 = pg; + } + + private StaticText staticText42 = new StaticText(); + + public StaticText getStaticText42() { + return staticText42; + } + + public void setStaticText42(StaticText st) { + this.staticText42 = st; + } + + private StaticText stHeaderNr = new StaticText(); + + public StaticText getStHeaderNr() { + return stHeaderNr; + } + + public void setStHeaderNr(StaticText st) { + this.stHeaderNr = st; + } + + private PanelGroup groupPanel28 = new PanelGroup(); + + public PanelGroup getGroupPanel28() { + return groupPanel28; + } + + public void setGroupPanel28(PanelGroup pg) { + this.groupPanel28 = pg; + } + + private StaticText staticText43 = new StaticText(); + + public StaticText getStaticText43() { + return staticText43; + } + + public void setStaticText43(StaticText st) { + this.staticText43 = st; + } + + private StaticText stHeaderDate = new StaticText(); + + public StaticText getStHeaderDate() { + return stHeaderDate; + } + + public void setStHeaderDate(StaticText st) { + this.stHeaderDate = st; + } + + private ImageComponent image5 = new ImageComponent(); + + public ImageComponent getImage5() { + return image5; + } + + public void setImage5(ImageComponent ic) { + this.image5 = ic; + } + + private HiddenField hidConfDelete = new HiddenField(); + + public HiddenField getHidConfDelete() { + return hidConfDelete; + } + + public void setHidConfDelete(HiddenField hf) { + this.hidConfDelete = hf; + } + + private PanelGroup groupPanel1 = new PanelGroup(); + + public PanelGroup getGroupPanel1() { + return groupPanel1; + } + + public void setGroupPanel1(PanelGroup pg) { + this.groupPanel1 = pg; + } + + private Button butVoltar = new Button(); + + public Button getButVoltar() { + return butVoltar; + } + + public void setButVoltar(Button b) { + this.butVoltar = b; + } + + private Button butEliminar = new Button(); + + public Button getButEliminar() { + return butEliminar; + } + + public void setButEliminar(Button b) { + this.butEliminar = b; + } + private StaticText lblUser = new StaticText(); + + public StaticText getLblUser() { + return lblUser; + } + + public void setLblUser(StaticText st) { + this.lblUser = st; + } + /** + *

Construct a new Page bean instance.

+ */ + public ViewAnaliseAcidenteTrabalho() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + @Override + public void init() + { + // Perform initializations inherited from our superclasssuperclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + log("ViewAnaliseAcidenteTrabalho Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + if (!getSessionBean1().isLoggedIn()) { + try { + getExternalContext().redirect("Login.jsp"); + } catch(Exception e) { + // . . . handle exception . . . + System.out.println("LOGGED IN = " + e.getMessage()); + } + } + else + { + lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); + initializePage(); + } + + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + @Override + public void preprocess() + { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + @Override + public void prerender() + { + getSessionBean1().setFromAnaliseDeletion(false); + String confirmacao_analise = (String)getExternalContext().getRequestParameterMap().get("confirmacao_analise"); + if(confirmacao_analise != null) + { + if(confirmacao_analise.matches("yes")) + { + hidConfDelete.setValue(""); + try + { + deleteAnalise(); + //booMsgQuizDeleted = true; + getSessionBean1().setFromAnaliseDeletion(true); + getSessionBean1().setMsg("Análise eliminada !"); + Utilizador u = getSessionBean1().getCurrentUser(); + if(u.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP) + { + + try + { + getExternalContext().redirect("FormDirSiprp.jsp"); + } + catch(Exception ex1) + { + ErrorLogger.logException( ex1 ); + } + } + else if(u.getTipo().intValue() == Global.TIPO_UTILIZADOR_HS) + { + + try + { + getExternalContext().redirect("FormHS.jsp"); + } + catch(Exception ex1) + { + ErrorLogger.logException( ex1 ); + } + } + + } + catch(Exception ex) + { + getSessionBean1().setMsg("Erro na eliminação da análise"); + ErrorLogger.logException( ex ); +// try +// { +// getExternalContext().redirect("EditarQuestionario.jsp"); +// } +// catch(Exception ex1) +// { +// ErrorLogger.logException( ex1 ); +// } + } + } + else if(confirmacao_analise.matches("no")) + { + hidConfDelete.setValue(""); + } + } + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + @Override + public void destroy() + { + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1)getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1)getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1)getBean("ApplicationBean1"); + } + + public String lnkLogout_action() + { + Utils.doLogout( getExternalContext(), true ); + return null; + } + + public String lnkNome_action() { + // TODO: Replace with your code + + return null; + } + + public String lnkDataNascimento_action() { + // TODO: Replace with your code + + return null; + } + + private void initializePage() + { + Utilizador u = getSessionBean1().getCurrentUser(); + AnaliseAcidente a = getSessionBean1().getCurrentAnalise(); + + if(! (u.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP || u.getTipo().intValue() == Global.TIPO_UTILIZADOR_HS)) + { + butEliminar.setRendered(false); + } + else + { + if(a.getEstado().intValue() == Global.ESTADO_CONCLUIDO) + { + butEliminar.setRendered(false); + } + } + + if ( a != null ) + { + if ( a.getConcluido_por_desactivacao() ) + { + txtComentarioConclusaoTitle.setRendered( true ); + txtComentarioConclusaoTitle.setText( "Processo desactivado." ); + + if ( a.getComentario_desactivacao() != null && ! "".equals( a.getComentario_desactivacao().trim() ) ) + { + txtComentarioConclusao.setRendered( true ); + txtComentarioConclusao.setText( "" + a.getComentario_desactivacao() ); + } + else + { + txtComentarioConclusao.setRendered( false ); + txtComentarioConclusao.setText( "" ); + } + } + else + { + txtComentarioConclusao.setRendered( false ); + txtComentarioConclusao.setText( "" ); + txtComentarioConclusao.setRendered( false ); + txtComentarioConclusao.setText( "" ); + } + } + + fillPage(); + //fillImages(); + } + + private void fillPage() + { + AnaliseAcidente a = getSessionBean1().getCurrentAnalise(); + fillHeader(a); + fillSIPRP(a); + + Acidentado ac = null; + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + ac = adp.getAcidentado(a.getAcidentado_id()); + //txtTrabalhador.setText(ac.getNome()); + } + catch(Exception ex) + { + ex.printStackTrace(); + } + + + int estado = a.getEstado().intValue(); + switch(estado) + { + case Global.ESTADO_SEG: + gridDadosAcidenteRhView.setRendered(false); + gridRecomendacoesViewHS.setRendered(false); + gridMedidasViewRH.setRendered(false); + gridMedicoView.setRendered(false); + gridVerificacaoView.setRendered(false); + gridImpressaoView.setRendered(false); + + fillAcidentado(ac); + fillDadosAcidenteSeg(a); + break; + case Global.ESTADO_RH1: + gridDadosAcidenteRhView.setRendered(false); + gridRecomendacoesViewHS.setRendered(false); + gridMedidasViewRH.setRendered(false); + gridMedicoView.setRendered(false); + gridVerificacaoView.setRendered(false); + gridImpressaoView.setRendered(false); + + fillAcidentado(ac); + fillDadosAcidenteSeg(a); + break; + case Global.ESTADO_HS: + gridRecomendacoesViewHS.setRendered(false); + gridMedidasViewRH.setRendered(false); + gridMedicoView.setRendered(false); + gridVerificacaoView.setRendered(false); + gridImpressaoView.setRendered(false); + + fillAcidentado(ac); + fillDadosAcidenteSeg(a); + fillDadosAcidenteRh(a); + break; + case Global.ESTADO_RH2: //medidas + gridMedidasViewRH.setRendered(false); + gridMedicoView.setRendered(false); + gridVerificacaoView.setRendered(false); + gridImpressaoView.setRendered(false); + + fillAcidentado(ac); + fillDadosAcidenteSeg(a); + fillDadosAcidenteRh(a); + fillRecomendacoesHs(a); + + break; +// case Global.ESTADO_MEDICINA: +// gridMedicoView.setRendered(false); +// gridVerificacaoView.setRendered(false); +// gridImpressaoView.setRendered(false); +// +// fillAcidentado(ac); +// fillDadosAcidenteSeg(a); +// fillDadosAcidenteRh(a); +// fillRecomendacoesHs(a); +// fillMedidasRh(a); +// break; + case Global.ESTADO_CONSOLIDACAO: + gridVerificacaoView.setRendered(false); + gridImpressaoView.setRendered(false); + + fillAcidentado(ac); + fillDadosAcidenteSeg(a); + fillDadosAcidenteRh(a); + fillRecomendacoesHs(a); + fillMedidasRh(a); + fillMedico(a); + break; + case Global.ESTADO_ASSINATURA_SEG: + //gridMedidasViewRH.setRendered(false); + //gridMedicoView.setRendered(false); + //gridVerificacaoView.setRendered(false); + gridImpressaoView.setRendered(false); + + fillAcidentado(ac); + fillDadosAcidenteSeg(a); + fillDadosAcidenteRh(a); + fillRecomendacoesHs(a); + fillMedidasRh(a); + fillMedico(a); + fillVerificacao(a); + break; + + case Global.ESTADO_ASSINATURA_RH: + //gridMedidasViewRH.setRendered(false); + //gridMedicoView.setRendered(false); + //gridVerificacaoView.setRendered(false); + gridImpressaoView.setRendered(false); + + fillAcidentado(ac); + fillDadosAcidenteSeg(a); + fillDadosAcidenteRh(a); + fillRecomendacoesHs(a); + fillMedidasRh(a); + fillMedico(a); + fillVerificacao(a); + break; + + +// case Global.ESTADO_IMPRESSAO: +// gridImpressaoView.setRendered(false); +// +// fillAcidentado(ac); +// fillDadosAcidenteSeg(a); +// fillDadosAcidenteRh(a); +// fillRecomendacoesHs(a); +// fillMedidasRh(a); +// fillMedico(a); +// fillVerificacao(a); +// break; + + case Global.ESTADO_FECHAR: + gridImpressaoView.setRendered(false); + + fillAcidentado(ac); + fillDadosAcidenteSeg(a); + fillDadosAcidenteRh(a); + fillRecomendacoesHs(a); + fillMedidasRh(a); + fillMedico(a); + fillVerificacao(a); + //fillImpressao(a); + break; + case Global.ESTADO_CONCLUIDO: + gridImpressaoView.setRendered(false); + + fillAcidentado(ac); + fillDadosAcidenteSeg(a); + fillDadosAcidenteRh(a); + fillRecomendacoesHs(a); + fillMedidasRh(a); + fillMedico(a); + fillVerificacao(a); + + break; + } + } + + private void fillHeader(AnaliseAcidente a) + { + stHeaderNr.setText(a.getAnalise_nr()); + try + { + java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime()); + stHeaderDate.setText(utils.Utils.dateToYYYYMMDD(ddate)); + } + catch ( Exception ex ) + { +// ErrorLogger.logException( ex ); + } + } + + private void fillSIPRP(AnaliseAcidente a) + { + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + + Utilizador u = udp.getUtilizador(a.getTecnico_saude_id()); + txtTecnicoSuperior.setText(Utils.unicodeToHTML(u.getNome())); + txtCap1.setText(u.getCap()); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + + Utilizador u = udp.getUtilizador(a.getMedico_id()); + txtMedicoTrabalho.setText(Utils.unicodeToHTML(u.getNome())); + txtCedula1.setText(u.getNumero_cedula()); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + + private void fillAcidentado(Acidentado a) + { + stNomeAcidentado.setText(a.getNome()); + //stDataNascimento.setText(a.getData_nascimento()); + try + { + java.util.Date ddate = new java.util.Date(a.getData_nascimento().getTime()); + stDataNascimento.setText(utils.Utils.dateToYYYYMMDD(ddate)); + } + catch ( Exception ex ) + { +// ErrorLogger.logException( ex ); + } + stBI.setText(a.getBilhete_identidade()); + stMorada.setText(a.getMorada()); + String cod_postal1 = ""; + String cod_postal2 = ""; + try + { + cod_postal1 = a.getCod_postal().substring(0, 4); + } + catch(Exception ex) + { + + } + try + { + cod_postal2 = a.getCod_postal().substring(5, 8); + } + catch(Exception ex) + { + + } + + //String cod_postal1 = a.getCod_postal().substring(0, 4); + //String cod_postal2 = a.getCod_postal().substring(5, 8); + String cod_postal = cod_postal1 + "-" + cod_postal2 + " " + a.getLocalidade(); + stCodPostal.setText(cod_postal); + stContactoTelefonico.setText(a.getContacto_telefonico()); + //stDataAdmissao1.setText(a.getData_admissao()); + try + { + java.util.Date ddate = new java.util.Date(a.getData_admissao().getTime()); + stDataAdmissao.setText(utils.Utils.dateToYYYYMMDD(ddate)); + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + stFuncao.setText(a.getFuncao()); + String turno_str = ""; + if(a.getTurno().matches("m")) + { + turno_str = "manhã"; + } + else if(a.getTurno().matches("t")) + { + turno_str += "tarde "; + } + if(a.getTurno().matches("n")) + { + turno_str += "noite"; + } + stTurno.setText(turno_str); + stNomeSuperior.setText(a.getNome_superior_hierarquico()); + stEmailSuperior.setText(a.getEmail_superior_hierarquico()); + stEstabelecimentoOrigem.setText(a.getEstabelecimento_origem()); + } + + private void fillDadosAcidenteSeg(AnaliseAcidente a) + { + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + String nome_empresa = adp.getEmpresaNome(a.getEmpresa_id()); + txtEmpresa.setText(utils.Utils.unicodeToHTML(nome_empresa)); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + txtEstabelecimento.setText(adp.getEstabelecimentoNome(a.getEstabelecimento_id())); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + +// try +// { +// //Trabalhador t = adp.getTrabalhador(a.getTrabalhador_id()); +// Acidentado ac = adp.getAcidentado(a.getAcidentado_id()); +// //txtDataNascimento.setText(ac.getData_nascimento()); +// try +// { +// java.util.Date ddate = new java.util.Date(ac.getData_nascimento().getTime()); +// txtDataNascimento.setText(utils.Utils.dateToYYYYMMDD(ddate)); +// } +// catch(Exception ex){}; +// getSessionBean1().setAcidentado(ac); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + + txtTrabalhador.setText(a.getNome_acidentado()); +// txtNomeAcidentado.setText(a.getNome_acidentado()); + + stAveriguador.setText(a.getAveriguador()); + + if(a.getData_acidente() == null) + { + lblDataAcidente.setRendered(false); + stDataAcidente1.setRendered(false); + } + else + { + try + { + java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime()); + stDataAcidente1.setText(utils.Utils.dateToYYYYMMDD(ddate)); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + + if(a.getHora_acidente() == null) + { + lblHoraAcidente.setRendered(false); + stHoraAcidente1.setRendered(false); + } + else + { + Calendar cal = Calendar.getInstance(); + + // set the calendar to have your time + cal.setTimeInMillis(a.getHora_acidente().getTime()); + + int hour = cal.get(Calendar.HOUR_OF_DAY); + int minutes = cal.get(Calendar.MINUTE); + try + { + stHoraAcidente1.setText(utils.Utils.timeToHHMM(hour + ":" + minutes)); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + + boolean booTurnoSeccaoLocal = false; + if(a.getHoras_turno() == null) + { + lblHorasTurno.setRendered(false); + txtHorasTurno.setRendered(false); + } + else if(a.getHoras_turno().intValue() == 0) + { + lblHorasTurno.setRendered(false); + txtHorasTurno.setRendered(false); + } + else + { + txtHorasTurno.setText(a.getHoras_turno().toString()); + booTurnoSeccaoLocal = true; + } + +// if(a.getSeccao() == null) +// { +// lblSeccao.setRendered(false); +// txtSeccao.setRendered(false); +// } +// else if(a.getSeccao().trim().length() == 0) +// { +// lblSeccao.setRendered(false); +// txtSeccao.setRendered(false); +// } +// else +// { +// txtSeccao.setText(a.getSeccao()); +// booTurnoSeccaoLocal = true; +// } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + Seccao s = adp.getSeccao(a.getSeccao_id()); + txtSeccao.setText(s.getDescricao()); + booTurnoSeccaoLocal = true; + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + lblSeccao.setRendered(false); + txtSeccao.setRendered(false); + } + + + if(a.getLocal_trabalho() == null) + { + lblLocal.setRendered(false); + txtLocal.setRendered(false); + } + else if(a.getLocal_trabalho().trim().length() == 0) + { + lblLocal.setRendered(false); + txtLocal.setRendered(false); + } + else + { + txtLocal.setText(a.getLocal_trabalho()); + booTurnoSeccaoLocal = true; + } + + if(!booTurnoSeccaoLocal) + { + gridTurnoSeccaoLocal.setRendered(false); + } + + if(a.getTarefa() == null) + { + gridTarefa.setRendered(false); + lblTarefa.setRendered(false); + txtTarefa.setRendered(false); + } + else if(a.getTarefa().trim().length() == 0) + { + gridTarefa.setRendered(false); + lblTarefa.setRendered(false); + txtTarefa.setRendered(false); + } + else + { + txtTarefa.setText(a.getTarefa()); + } + + if(a.getSubstancias() == null) + { + gridSubstancias.setRendered(false); + lblSubstancias.setRendered(false); + txtSubstancias.setRendered(false); + } + else if(a.getSubstancias().trim().length() == 0) + { + gridSubstancias.setRendered(false); + lblSubstancias.setRendered(false); + txtSubstancias.setRendered(false); + } + else + { + txtSubstancias.setText(a.getSubstancias()); + } + +// if(a.getSuperior_hierarquico() == null) +// { +// gridSuperior.setRendered(false); +// lblSuperior.setRendered(false); +// txtSuperior.setRendered(false); +// } +// else if(a.getSuperior_hierarquico().trim().length() == 0) +// { +// gridSuperior.setRendered(false); +// lblSuperior.setRendered(false); +// txtSuperior.setRendered(false); +// } +// else +// { +// txtSuperior.setText(a.getSuperior_hierarquico()); +// } + + if(a.getCondicoes() == null) + { + gridCondicoes.setRendered(false); + lblCondicoes.setRendered(false); + txtCondicoes.setRendered(false); + } + else if(a.getCondicoes().trim().length() == 0) + { + gridCondicoes.setRendered(false); + lblCondicoes.setRendered(false); + txtCondicoes.setRendered(false); + } + else + { + txtCondicoes.setText(a.getCondicoes()); + } + + + if(a.getTestemunhas() == null) + { + gridTestemunhas.setRendered(false); + lblTestemunhas.setRendered(false); + txtTestemunhas.setRendered(false); + } + else if(a.getTestemunhas().trim().length() == 0) + { + gridTestemunhas.setRendered(false); + lblTestemunhas.setRendered(false); + txtTestemunhas.setRendered(false); + + } + else + { + txtTestemunhas.setText(a.getTestemunhas()); + } + +// txtCausas.setText(a.getCausas()); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + Causa c = adp.getCausa(a.getCausas()); + txtCausas.setText(c.getCausa()); + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + gridCausas.setRendered(false); + } + + if(a.getDescricao() == null) + { + gridDescricao.setRendered(false); + lblDescricao.setRendered(false); + txtDescricao.setRendered(false); + } + else if(a.getTestemunhas().trim().length() == 0) + { + gridDescricao.setRendered(false); + lblDescricao.setRendered(false); + txtDescricao.setRendered(false); + } + else + { + txtDescricao.setText(a.getDescricao()); + } + + if(a.getConclusoes() == null) + { + gridConclusoes.setRendered(false); + lblConclusoes.setRendered(false); + txtConclusoes.setRendered(false); + } + else if(a.getConclusoes().trim().length() == 0) + { + gridConclusoes.setRendered(false); + lblConclusoes.setRendered(false); + txtConclusoes.setRendered(false); + } + else + { + txtConclusoes.setText(a.getConclusoes()); + } + + if(a.getAccoes() == null) + { + gridAccoes.setRendered(false); + lblAccoes.setRendered(false); + txtAccoes.setRendered(false); + } + else if(a.getAccoes().trim().length() == 0) + { + gridAccoes.setRendered(false); + lblAccoes.setRendered(false); + txtAccoes.setRendered(false); + } + else + { + txtAccoes.setText(a.getAccoes()); + } + + if(a.getAveriguacao_posterior().matches("n")) + { + gridAveriguacaoPosterior.setRendered(false); + } + else + { + if(a.getAveriguacao_obs().trim().length() > 0) + { + txtAveriguacaoPosterior.setText("Averiguação posterior: " + a.getAveriguacao_obs()); + } + } + + + + //fill images + String folderName = a.getAnalise_nr().substring(0,2) + a.getAnalise_nr().substring(3); + System.out.println("FOLDER NAME : " + folderName); + ServletContext theApplicationsServletContext = + (ServletContext) this.getExternalContext().getContext(); +// String imageFileFolder = theApplicationsServletContext.getRealPath(Global.IMAGE_FOLDER + "/" + folderName); + + + File apacheAnaliseFolder = new File(theApplicationsServletContext.getRealPath( Global.RESOURCES_IMAGE_FOLDER ) + "/analises/" + folderName); + if(apacheAnaliseFolder.exists()) + { + Global global = new Global(); + global.deleteFolderFiles(apacheAnaliseFolder); + } + else + { + apacheAnaliseFolder.mkdir(); + } + + + String imageFileFolder = Global.IMAGE_FOLDER + "/" + folderName; + try + { + File f = new File(imageFileFolder); + + if(f.exists()) + { + File images[] = f.listFiles(); + Arrays.sort(images); + for(int i=0;i 0) + { + s = new StaticText(); + s.setId("s103"); + s.setEscape(false); + s.setText(a.getNr_relatorio_acidente_colaborador1()); + pg.getChildren().add(s); + } + } + if(a.getNr_relatorio_acidente_colaborador2() != null) + { + if(a.getNr_relatorio_acidente_colaborador2().intValue() > 0) + { + s = new StaticText(); + s.setId("s104"); + s.setEscape(false); + s.setText("  " + a.getNr_relatorio_acidente_colaborador2()); + pg.getChildren().add(s); + } + + } + if(a.getNr_relatorio_acidente_colaborador3() != null) + { + if(a.getNr_relatorio_acidente_colaborador3().intValue() > 0) + { + s = new StaticText(); + s.setId("s105"); + s.setEscape(false); + s.setText("  " + a.getNr_relatorio_acidente_colaborador3()); + pg.getChildren().add(s); + } + } + if(a.getNr_relatorio_acidente_colaborador4() != null) + { + if(a.getNr_relatorio_acidente_colaborador4().intValue() > 0) + { + s = new StaticText(); + s.setId("s106"); + s.setEscape(false); + s.setText("  " + a.getNr_relatorio_acidente_colaborador4()); + pg.getChildren().add(s); + } + } + grd.getChildren().add(pg); + } + gridColaborador.getChildren().add(grd); + } + + } + else if( a.getOutros_acidentes_com_colaborador().matches("n") ) + { + st1.setText("Não se verificaram outras ocorrências/incidências no mesmo posto de trabalho com o colaborador acidentado."); + gridColaborador.getChildren().add(st1); + } + else //t + { + gridColaborador.setRendered(false); + } + + if(a.getAcidentes_outros_colaboradores().matches("y")) + { + st2.setText("Verificaram-se ocorrências/incidentes semelhantes com outros colaboradores."); + gridColaboradores.getChildren().add(st2); + boolean booShow = false; + boolean booShow1 = false; + boolean booShow2 = false; + if(a.getNr_acidentes_outros_colaboradores() != null) + { + booShow = true; + booShow1 = true; + } + if(a.getNr_relatorio_acidente_outros_colaboradores1() != null || a.getNr_relatorio_acidente_outros_colaboradores2() != null || a.getNr_relatorio_acidente_outros_colaboradores3() != null || a.getNr_relatorio_acidente_outros_colaboradores4() != null) + { + booShow = true; + booShow2 = true; + } + + if(booShow) + { + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setId("grdColaboradoresS"); + grd.setColumns(2); + grd.setColumnClasses("gridColLeft15, gridColLeft85"); + if(booShow1) + { + PanelGroup pg = new PanelGroup(); + StaticText s = new StaticText(); + s.setId("s200"); + s.setEscape(false); + s.setText("Total:  "); + pg.getChildren().add(s); + s = new StaticText(); + s.setId("s201"); + s.setEscape(false); + s.setText(a.getNr_acidentes_outros_colaboradores()); + pg.getChildren().add(s); + grd.getChildren().add(pg); + } + if(booShow2) + { + PanelGroup pg = new PanelGroup(); + StaticText s = new StaticText(); + s.setId("s202"); + s.setEscape(false); + s.setText("   Relatórios de acidente nº:  "); + pg.getChildren().add(s); + if(a.getNr_relatorio_acidente_outros_colaboradores1() != null) + { + if(a.getNr_relatorio_acidente_outros_colaboradores1().intValue() > 0) + { + s = new StaticText(); + s.setId("s203"); + s.setEscape(false); + s.setText(a.getNr_relatorio_acidente_outros_colaboradores1()); + pg.getChildren().add(s); + } + } + if(a.getNr_relatorio_acidente_outros_colaboradores2() != null) + { + if(a.getNr_relatorio_acidente_outros_colaboradores2().intValue() > 0) + { + s = new StaticText(); + s.setId("s204"); + s.setEscape(false); + s.setText("  " + a.getNr_relatorio_acidente_outros_colaboradores2()); + pg.getChildren().add(s); + } + } + if(a.getNr_relatorio_acidente_outros_colaboradores3() != null) + { + if(a.getNr_relatorio_acidente_outros_colaboradores3().intValue() > 0) + { + s = new StaticText(); + s.setId("s205"); + s.setEscape(false); + s.setText("  " + a.getNr_relatorio_acidente_outros_colaboradores3()); + pg.getChildren().add(s); + } + } + if(a.getNr_relatorio_acidente_outros_colaboradores4() != null) + { + if(a.getNr_relatorio_acidente_outros_colaboradores4().intValue() > 0) + { + s = new StaticText(); + s.setId("s206"); + s.setEscape(false); + s.setText("  " + a.getNr_relatorio_acidente_outros_colaboradores4()); + pg.getChildren().add(s); + } + } + grd.getChildren().add(pg); + } + gridColaboradores.getChildren().add(grd); + } + } + else if( a.getAcidentes_outros_colaboradores().matches("n") ) + { + st2.setText("Não se verificaram ocorrências/incidentes com outros colaboradores."); + gridColaboradores.getChildren().add(st2); + } + else //t + { + gridColaboradores.setRendered(false); + } + } + + private void fillRecomendacoesHs(AnaliseAcidente a) + { + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + ArrayList list = adp.getRecomendacoesByAnalise(a.getId()); + ListIterator iter = list.listIterator(); + int seq = 1; + while(iter.hasNext()) + { + Recomendacao r = (Recomendacao) iter.next(); + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setId("grdRecomendacaoView" + seq); + grd.setColumns(2); + grd.setColumnClasses("gridColLeft5, gridColLeft95"); + grd.setStyle("width: 100%"); + + StaticText st = new StaticText(); + st.setId("stNrRecomendacaoView" + seq); + st.setText(seq + " ."); + st.setStyle("width: 24px"); + grd.getChildren().add(st); + + st = new StaticText(); + st.setId("stRecomendacaoView" + seq); + st.setText(r.getRecomendacao()); + //st.setStyle("width: 24px"); + grd.getChildren().add(st); + + gridRecomendacoesView.getChildren().add(grd); + seq++; + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + + private void fillMedidasRh( AnaliseAcidente a ) + { + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList list = adp.getMedidasByAnalise( a.getId() ); + ListIterator iter = list.listIterator(); + int seq = 1; + while ( iter.hasNext() ) + { + Medida m = ( Medida ) iter.next(); + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setId( "grdMedidaView" + seq ); + grd.setColumns( 2 ); + grd.setColumnClasses( "gridColLeft5, gridColLeft95" ); + grd.setStyle( "width: 100%" ); + + StaticText st = new StaticText(); + st.setId( "stNrMedidaView" + seq ); + st.setText( seq + " ." ); + st.setStyle( "width: 24px" ); + grd.getChildren().add( st ); + + st = new StaticText(); + st.setId( "stMedidaView" + seq ); + st.setText( m.getMedida() ); + //st.setStyle("width: 24px"); + grd.getChildren().add( st ); + + gridMedidasView.getChildren().add( grd ); + seq++; + } + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + } + + private void fillMedico( AnaliseAcidente a ) + { + PanelGroup pg = null; + StaticText st = null; + HtmlPanelGrid grd = null; + ImageComponent img = null; + //LESAO : + +// if ( a.getLesao_cabeca().matches( "y" ) ) + if ( "y".equals( a.getLesao_cabeca() ) ) + { + st = new StaticText(); + st.setId( "stLesaoCabeca" ); + st.setEscape( false ); + st.setText( "Cabeça" ); + gridLesao.getChildren().add( st ); + } + +// if(a.getLesao_pescoco().matches("y")) + if ( "y".equals( a.getLesao_pescoco() ) ) + { + st = new StaticText(); + st.setId( "stLesaoPescoco" ); + st.setEscape( false ); + st.setText( "Pescoço" ); + gridLesao.getChildren().add( st ); + } + +// if ( a.getLesao_tronco().matches( "y" ) ) + if ( "y".equals( a.getLesao_tronco() ) ) + { + st = new StaticText(); + st.setId( "stLesaoTronco" ); + st.setEscape( false ); + st.setText( "Tronco" ); + gridLesao.getChildren().add( st ); + } + + grd = new HtmlPanelGrid(); + grd.setId("gridLesaoMembros"); + grd.setColumns(2); + grd.setColumnClasses("gridColLeft"); +// if(a.getLesao_membro_sup_dir().matches("y")) + if ( "y".equals( a.getLesao_membro_sup_dir() ) ) + { + st = new StaticText(); + st.setId("stLesaoMembroSupDir"); + st.setEscape(false); + st.setText("Membro Superior Direito"); + grd.getChildren().add(st); + if(a.getEspecif1() != null) + { + if(a.getEspecif1().trim().length() > 0) + { + st = new StaticText(); + st.setId("stEspecif1"); + st.setEscape(false); + st.setText(a.getEspecif1()); + grd.getChildren().add(st); + } + } + } + +// if(a.getLesao_membro_sup_esq().matches("y")) + if ( "y".equals( a.getLesao_membro_sup_esq() ) ) + { + st = new StaticText(); + st.setId("stLesaoMembroSupEsq"); + st.setEscape(false); + st.setText("Membro Superior Esquerdo"); + grd.getChildren().add(st); + if(a.getEspecif2() != null) + { + if(a.getEspecif2().trim().length() > 0) + { + st = new StaticText(); + st.setId("stEspecif2"); + st.setEscape(false); + st.setText(a.getEspecif2()); + grd.getChildren().add(st); + } + } + } + +// if ( a.getLesao_membro_inf_dir().matches( "y" ) ) + if ( "y".equals( a.getLesao_membro_inf_dir() ) ) + { + st = new StaticText(); + st.setId( "stLesaoMembroInfDir" ); + st.setEscape( false ); + st.setText( "Membro Inferior Direito" ); + grd.getChildren().add( st ); + if ( a.getEspecif3() != null && a.getEspecif3().trim().length() > 0 ) + { + st = new StaticText(); + st.setId("stEspecif3"); + st.setEscape(false); + st.setText(a.getEspecif3()); + grd.getChildren().add(st); + } + } + +// if ( a.getLesao_membro_inf_esq().matches( "y" ) ) + if ( "y".equals( a.getLesao_membro_inf_esq() ) ) + { + st = new StaticText(); + st.setId( "stLesaoMembroInfEsq" ); + st.setEscape( false ); + st.setText( "Membro Inferior Esquerdo" ); + grd.getChildren().add( st ); + if ( a.getEspecif4() != null ) + { + if ( a.getEspecif4().trim().length() > 0 ) + { + st = new StaticText(); + st.setId( "stEspecif4" ); + st.setEscape( false ); + st.setText( a.getEspecif4() ); + grd.getChildren().add( st ); + } + } + } + if ( grd.getChildren().size() > 0 ) + { + gridLesao.getChildren().add( grd ); + } + + if ( a.getTipo_lesao() != null && a.getTipo_lesao().trim().length() > 0 ) + { + pg = new PanelGroup(); + pg.setId( "pgTipoLesao" ); + st = new StaticText(); + st.setId( "stTipoLesaoLbl" ); + st.setEscape( false ); + st.setText( "Tipo de lesão:   " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setId( "stTipoLesao" ); + st.setEscape( false ); + st.setText( a.getTipo_lesao() ); + pg.getChildren().add( st ); + gridLesao.getChildren().add( pg ); + } + + System.out.println( "GRID LESAO : " + gridLesao.getChildren().size() ); + if ( gridLesao.getChildren().size() == 0 ) + { + lblAreasCorporais.setRendered( false ); + } + + //INCAPACIDADE : + pg = new PanelGroup(); + pg.setId("pgTipoIncapacidade"); + st = new StaticText(); + st.setId("stTipoIncapacidadeLbl1"); + st.setEscape(false); + st.setStyle("font-weight: bold"); + st.setText("Tipo de incapacidade:  "); + +// if ( a.getTipo_incapacidade().matches( "t" ) ) + if ( "t".equals( a.getTipo_incapacidade() ) ) + { + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stTipoIncapacidade"); + st.setEscape(false); + st.setText("Temporária  "); + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stTipoIncapacidadeLbl2"); + st.setStyle("font-weight: bold"); + st.setEscape(false); + st.setText("   Coeficiente de incapacidade:  "); + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stCoefIncapacidade"); + st.setEscape(false); + st.setText( a.getCoef_incapacidade() == null ? "" : a.getCoef_incapacidade().toString() + "%" ); + pg.getChildren().add(st); + } +// else if(a.getTipo_incapacidade().matches("p")) + else if ( "p".equals( a.getTipo_incapacidade() ) ) + { + pg.getChildren().add( st ); + st = new StaticText(); + st.setId("stTipoIncapacidade"); + st.setEscape( false ); + st.setText("Permanente  "); + pg.getChildren().add( st ); + st = new StaticText(); + st.setId("stTipoIncapacidadeLbl2"); + st.setStyle("font-weight: bold"); + st.setEscape( false ); + st.setText("   Coeficiente de incapacidade:  "); + pg.getChildren().add( st ); + st = new StaticText(); + st.setId("stCoefIncapacidade"); + st.setEscape( false ); + st.setText( a.getCoef_incapacidade() == null ? "" : a.getCoef_incapacidade().toString() + "%" ); + pg.getChildren().add( st ); + } + + if ( pg.getChildren().size() > 0 ) + { + gridIncapacidade.getChildren().add( pg ); + } + + pg = new PanelGroup(); + pg.setId("pgAvaliacaoIncapacidade"); + if ( a.getData_aval_incapacidade() != null ) + { + st = new StaticText(); + st.setId("stDataAvalIncapacidadeLbl1"); + st.setStyle("font-weight: bold"); + st.setEscape(false); + st.setText("Avaliação de incapacidade realizada em  "); + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stDataAvalIncapacidade"); + st.setEscape(false); + try + { + java.util.Date ddate = new java.util.Date(a.getData_aval_incapacidade().getTime()); + st.setText(utils.Utils.dateToYYYYMMDD(ddate)); + } + catch ( Exception ex ) + { +// ErrorLogger.logException( ex ); + } + pg.getChildren().add( st ); + } + + + if ( a.getData_rev_incapacidade() != null ) + { + st = new StaticText(); + st.setId("stDataRevIncapacidadeLbl1"); + st.setStyle("font-weight: bold"); + st.setEscape(false); + st.setText("Revisão de incapacidade em  "); + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stDataRevIncapacidade"); + st.setEscape(false); + try + { + java.util.Date ddate = new java.util.Date(a.getData_rev_incapacidade().getTime()); + st.setText(utils.Utils.dateToYYYYMMDD(ddate)); + } + catch ( Exception ex ) + { +// ErrorLogger.logException( ex ); + } + pg.getChildren().add( st ); + } + + if(pg.getChildren().size() > 0) + { + gridIncapacidade.getChildren().add(pg); + } + + if(a.getPeriodo_incapacidade_a() != null || a.getPeriodo_incapacidade_de() != null) + { + pg = new PanelGroup(); + pg.setId("pgPeriodoIncapacidade"); + st = new StaticText(); + st.setId("stPeriodoIncapacidadeLbl1"); + st.setStyle("font-weight: bold"); + st.setEscape(false); + st.setText("Período de incapacidade temporária de  "); + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stPeriodoIncapacidadeDe"); + st.setEscape(false); + //st.setText(a.getPeriodo_incapacidade_de()); + try + { + java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_de().getTime()); + st.setText(utils.Utils.dateToYYYYMMDD(ddate)); + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stPeriodoIncapacidadeLbl2"); + st.setStyle("font-weight: bold"); + st.setEscape(false); + st.setText("  a  "); + pg.getChildren().add(st); + st = new StaticText(); + st.setId("stPeriodoIncapacidadeA"); + st.setEscape(false); + //st.setText(a.getPeriodo_incapacidade_a()); + try + { + java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_a().getTime()); + st.setText(utils.Utils.dateToYYYYMMDD(ddate)); + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + pg.getChildren().add(st); + gridIncapacidade.getChildren().add(pg); + } + + + +// //RESTRICOES +// +// if(a.getImg_flexao().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgFlexao"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// pg = new PanelGroup(); +// pg.setId("pgImgFlexao"); +// img = new ImageComponent(); +// img.setId("imgRestricoes1000"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/fle1.gif"); +// pg.getChildren().add(img); +// img = new ImageComponent(); +// img.setId("imgRestricoes1001"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/fle2.gif"); +// pg.getChildren().add(img); +// img = new ImageComponent(); +// img.setId("imgRestricoes1002"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/fle3.gif"); +// pg.getChildren().add(img); +// img = new ImageComponent(); +// img.setId("imgRestricoes1003"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/fle4.gif"); +// pg.getChildren().add(img); +// grd.getChildren().add(pg); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl1"); +// st.setEscape(false); +// st.setText("Flexão"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_rot1().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgRot1"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes1005"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/rot1.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl2"); +// st.setEscape(false); +// st.setText("Flexão Lateral"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_rot2().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgRot2"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes1006"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/rot2.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl3"); +// st.setEscape(false); +// st.setText("Rotação"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ext1().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgExt1"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes1007"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ext1.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl4"); +// st.setEscape(false); +// st.setText("Extensão"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ext2().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgExt2"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// pg = new PanelGroup(); +// pg.setId("pgImgExt2"); +// img = new ImageComponent(); +// img.setId("imgRestricoes1008"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ext2.gif"); +// pg.getChildren().add(img); +// img = new ImageComponent(); +// img.setId("imgRestricoes1009"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ext3.gif"); +// pg.getChildren().add(img); +// img = new ImageComponent(); +// img.setId("imgRestricoes1010"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ext4.gif"); +// pg.getChildren().add(img); +// grd.getChildren().add(pg); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl5"); +// st.setEscape(false); +// st.setText("Flexão/Extensão Lateral + Rotação"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_cab1().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgCab1"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10011"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ca1.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl6"); +// st.setEscape(false); +// st.setText("Flexão"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_cab2().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgCab2"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10012"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ca2.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl7"); +// st.setEscape(false); +// st.setText("Extensão"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_cab3().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgCab3"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10013"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ca3.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl8"); +// st.setEscape(false); +// st.setText("Flexão Lateral"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_cab4().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgCab4"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10014"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ca4.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl9"); +// st.setEscape(false); +// st.setText("Rotação"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma1().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa1"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10015"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma1.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl10"); +// st.setEscape(false); +// st.setText("Poronação"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma2().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa2"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10016"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma2.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl11"); +// st.setEscape(false); +// st.setText("Supinação"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma3().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa3"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10017"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma3.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl12"); +// st.setEscape(false); +// st.setText("Flexão"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma4().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa4"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10018"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma4.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl13"); +// st.setEscape(false); +// st.setText("Extensão"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma5().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa5"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10019"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma5.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl14"); +// st.setEscape(false); +// st.setText("Desvio Ulnar"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma6().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa6"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10020"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma6.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl15"); +// st.setEscape(false); +// st.setText("Desvio Radial"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma7().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa7"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10021"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma7.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl16"); +// st.setEscape(false); +// st.setText("Pinça Digital"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma8().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa8"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10022"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma8.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl17"); +// st.setEscape(false); +// st.setText("Segurar objectos entre os dedos"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma9().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa9"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10023"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma9.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl18"); +// st.setEscape(false); +// st.setText("Dedos em extensão"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getImg_ma10().matches("y")) +// { +// grd = new HtmlPanelGrid(); +// grd.setId("grdImgMa10"); +// grd.setColumns(1); +// grd.setColumnClasses("gridColCenter"); +// grd.setStyleClass("centerBlock"); +// +// img = new ImageComponent(); +// img.setId("imgRestricoes10024"); +// img.setWidth(IMAGE_WIDTH); +// img.setHeight(IMAGE_HEIGHT); +// img.setUrl("/resources/images/medico/ma10.gif"); +// grd.getChildren().add(img); +// st = new StaticText(); +// st.setId("stImgRestricaoLbl19"); +// st.setEscape(false); +// st.setText("Pega palmar"); +// grd.getChildren().add(st); +// gridImagesRestricoes.getChildren().add(grd); +// } +// +// if(a.getRestricao_carga() != null) +// { +// if(a.getRestricao_carga().intValue() > 0) +// { +// pg = new PanelGroup(); +// st = new StaticText(); +// st.setId("stRestricaoCargaLbl"); +// st.setEscape(false); +// st.setText("Movimentação e manipulação de cargas com mais de  "); +// pg.getChildren().add(st); +// st = new StaticText(); +// st.setId("stRestricaoCargaKgs"); +// st.setEscape(false); +// st.setText(a.getRestricao_carga().toString()); +// pg.getChildren().add(st); +// st = new StaticText(); +// st.setId("stRestricaoCargaLbl1"); +// st.setEscape(false); +// st.setText("Kg"); +// pg.getChildren().add(st); +// gridOutrasRestricoes.getChildren().add(pg); +// } +// +// if(a.getRestricao_motricidade().matches("y")) +// { +// st = new StaticText(); +// st.setId("stRestricaoMotricidadeLbl"); +// st.setEscape(false); +// st.setText("Operações que requeiram motricidade fina."); +// gridOutrasRestricoes.getChildren().add(st); +// } +// +// if(a.getRestricao_conducao().matches("y")) +// { +// st = new StaticText(); +// st.setId("stRestricaoConducaoLbl"); +// st.setEscape(false); +// st.setText("Condução/interacção com veículos ou outros equipamentos."); +// gridOutrasRestricoes.getChildren().add(st); +// } +// +// if(a.getRestricao_vibracoes().matches("y")) +// { +// st = new StaticText(); +// st.setId("stRestricaoVibracoesLbl"); +// st.setEscape(false); +// st.setText("Utilizaçõo de equipamentos/ferramentas que impliquem exposição a vibrações ou impactos."); +// gridOutrasRestricoes.getChildren().add(st); +// } +// +// if(a.getRestricao_outras().trim().length() > 0) +// { +// st = new StaticText(); +// st.setId("stRestricaoOutras"); +// st.setEscape(false); +// st.setText(a.getRestricao_outras()); +// gridOutrasRestricoes.getChildren().add(st); +// } +// +// if(a.getMed_observ().trim().length() > 0) +// { +// stObservacoes.setText(a.getMed_observ()); +// } +// } + + } + + private void fillVerificacao(AnaliseAcidente a) + { +// StaticText st = new StaticText(); +// st.setId("stVerificacao1"); +// st.setEscape(false); +// String txtVer = "Verificado por " + a.getNome_resp_seg() + " a "; +// //txtVer += a.getData_assinatura_seg(); +// +// try +// { +// java.util.Date ddate = new java.util.Date(a.getData_assinatura_seg().getTime()); +// txtVer += utils.Utils.dateToYYYYMMDD(ddate); +// } +// catch(Exception ex){}; +// st.setText(txtVer); +// gridAssinaturasView.getChildren().add(st); +// +// st = new StaticText(); +// st.setId("stVerificacao2"); +// st.setEscape(false); +// txtVer = "Verificado por " + a.getNome_resp_rh() + " a "; +// //txtVer += a.getData_assinatura_rh(); +// try +// { +// java.util.Date ddate = new java.util.Date(a.getData_assinatura_rh().getTime()); +// txtVer += utils.Utils.dateToYYYYMMDD(ddate); +// } +// catch(Exception ex){}; +// st.setText(txtVer); +// gridAssinaturasView.getChildren().add(st); + + StaticText st = null; + String txtVer = null; + if(a.getAveriguador() != null) + { + if(a.getAveriguador().trim().length() > 0) + { + st = new StaticText(); + st.setId("stVerificacao1"); + st.setEscape(false); + txtVer = "Averiguado por " + a.getAveriguador() + " (Departamento de Segurança) a "; + //txtVer += a.getData_assinatura_seg(); + + try + { + java.util.Date ddate = new java.util.Date(a.getData_inicio_processo().getTime()); + txtVer += utils.Utils.dateToYYYYMMDD(ddate) + "."; + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + st.setText(txtVer); + gridAssinaturasView.getChildren().add(st); + } + } + + if(a.getAss_consolidacao().matches("y")) + { + st = new StaticText(); + st.setId("stVerificacao2"); + st.setEscape(false); + txtVer = "Verificado por " + a.getNome_resp_consolidacao() + " (Técnico de SHST) a "; + //txtVer += a.getData_assinatura_rh(); + try + { + java.util.Date ddate = new java.util.Date(a.getData_consolidacao().getTime()); + txtVer += utils.Utils.dateToYYYYMMDD(ddate) + "."; + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + st.setText(txtVer); + gridAssinaturasView.getChildren().add(st); + } + + if(a.getAss_resp_seg().matches("y")) + { + st = new StaticText(); + st.setId("stVerificacao3"); + st.setEscape(false); + txtVer = "Verificado por " + a.getNome_resp_seg() + " (Responsável de Segurança) a "; + //txtVer += a.getData_assinatura_rh(); + try + { + java.util.Date ddate = new java.util.Date(a.getData_assinatura_seg().getTime()); + txtVer += utils.Utils.dateToYYYYMMDD(ddate) + "."; + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + st.setText(txtVer); + gridAssinaturasView.getChildren().add(st); + } + + if(a.getAss_resp_rh().matches("y")) + { + st = new StaticText(); + st.setId("stVerificacao4"); + st.setEscape(false); + txtVer = "Verificado por " + a.getNome_resp_rh() + " (Responsável de RH) a "; + //txtVer += a.getData_assinatura_rh(); + try + { + java.util.Date ddate = new java.util.Date(a.getData_assinatura_rh().getTime()); + txtVer += utils.Utils.dateToYYYYMMDD(ddate) + "."; + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + st.setText(txtVer); + gridAssinaturasView.getChildren().add(st); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + Acidentado ac = adp.getAcidentado(a.getAcidentado_id()); + if(ac.getNome_superior_hierarquico() != null) + { + if(ac.getNome_superior_hierarquico().trim().length() > 0) + { + st = new StaticText(); + st.setId("stVerificacao5"); + st.setEscape(false); + txtVer = "Com conhecimento de " + ac.getNome_superior_hierarquico() + " (Responsável hierárquico)"; + + if(ac.getEmail_superior_hierarquico() != null) + { + if(ac.getEmail_superior_hierarquico().trim().length() > 0) + { + try + { + java.util.Date ddate = new java.util.Date(ac.getData_email_superior_hierarquico().getTime()); + txtVer += " a " + utils.Utils.dateToYYYYMMDD(ddate); + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + } + } + txtVer += "."; + st.setText(txtVer); + gridAssinaturasView.getChildren().add(st); + } + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + HtmlPanelGrid grid = new HtmlPanelGrid(); + grid.setId("rodape1"); + grid.setColumns(1); + grid.setStyle("width: 100%"); + grid.setColumnClasses("gridColCenter"); + st = new StaticText(); + st.setId("stRodape1"); + st.setEscape(false); + st.setText("- processamento informático - acesso autenticado -"); + grid.getChildren().add(st); + gridAssinaturasView.getChildren().add(grid); + } + + private void fillImpressao(AnaliseAcidente a) + { + StaticText st = new StaticText(); + st.setId("stImpressaoView1"); + st.setEscape(false); + String stData = ""; + try + { + java.util.Date ddate = new java.util.Date(a.getData_assinatura_superior().getTime()); + stData += utils.Utils.dateToYYYYMMDD(ddate); + } + catch(Exception ex) + { +// ErrorLogger.logException( ex ); + } + + String txt = "Assinado na Ficha de Análise de Acidente em papel por " + a.getNome_superior() + ", superior hierárquico / superior de "; + txt += getSessionBean1().getAcidentado().getNome() + ", a " + stData; + gridAssSupView.getChildren().add(st); + } + + private void fillImages() + { + ServletContext theApplicationsServletContext = + (ServletContext) this.getExternalContext().getContext(); + try + { +// String imageFileFolder = theApplicationsServletContext.getRealPath(Global.IMAGE_FOLDER + "/" + getSessionBean1().getCurrentAnalise().getId()); + String imageFileFolder = Global.IMAGE_FOLDER + "/" + getSessionBean1().getCurrentAnalise().getId(); + File f = new File(imageFileFolder); + if( f.exists() ) + { + File files[] = f.listFiles(); + + for(int i=0;i (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Acidentados extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Acidentados.ID, Acidentados.ID_INDEX ); + FIELD_INDEXES.put( Acidentados.ID_FULL, Acidentados.ID_INDEX ); + FIELD_INDEXES.put( Acidentados.NOME, Acidentados.NOME_INDEX ); + FIELD_INDEXES.put( Acidentados.NOME_FULL, Acidentados.NOME_INDEX ); + FIELD_INDEXES.put( Acidentados.DATA_NASCIMENTO, Acidentados.DATA_NASCIMENTO_INDEX ); + FIELD_INDEXES.put( Acidentados.DATA_NASCIMENTO_FULL, Acidentados.DATA_NASCIMENTO_INDEX ); + FIELD_INDEXES.put( Acidentados.BILHETE_IDENTIDADE, Acidentados.BILHETE_IDENTIDADE_INDEX ); + FIELD_INDEXES.put( Acidentados.BILHETE_IDENTIDADE_FULL, Acidentados.BILHETE_IDENTIDADE_INDEX ); + FIELD_INDEXES.put( Acidentados.MORADA, Acidentados.MORADA_INDEX ); + FIELD_INDEXES.put( Acidentados.MORADA_FULL, Acidentados.MORADA_INDEX ); + FIELD_INDEXES.put( Acidentados.COD_POSTAL, Acidentados.COD_POSTAL_INDEX ); + FIELD_INDEXES.put( Acidentados.COD_POSTAL_FULL, Acidentados.COD_POSTAL_INDEX ); + FIELD_INDEXES.put( Acidentados.LOCALIDADE, Acidentados.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( Acidentados.LOCALIDADE_FULL, Acidentados.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( Acidentados.CONTACTO_TELEFONICO, Acidentados.CONTACTO_TELEFONICO_INDEX ); + FIELD_INDEXES.put( Acidentados.CONTACTO_TELEFONICO_FULL, Acidentados.CONTACTO_TELEFONICO_INDEX ); + FIELD_INDEXES.put( Acidentados.DATA_ADMISSAO, Acidentados.DATA_ADMISSAO_INDEX ); + FIELD_INDEXES.put( Acidentados.DATA_ADMISSAO_FULL, Acidentados.DATA_ADMISSAO_INDEX ); + FIELD_INDEXES.put( Acidentados.FUNCAO, Acidentados.FUNCAO_INDEX ); + FIELD_INDEXES.put( Acidentados.FUNCAO_FULL, Acidentados.FUNCAO_INDEX ); + FIELD_INDEXES.put( Acidentados.TRABALHADOR_ID, Acidentados.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( Acidentados.TRABALHADOR_ID_FULL, Acidentados.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( Acidentados.TURNO, Acidentados.TURNO_INDEX ); + FIELD_INDEXES.put( Acidentados.TURNO_FULL, Acidentados.TURNO_INDEX ); + FIELD_INDEXES.put( Acidentados.NUMERO_MECANOGRAFICO, Acidentados.NUMERO_MECANOGRAFICO_INDEX ); + FIELD_INDEXES.put( Acidentados.NUMERO_MECANOGRAFICO_FULL, Acidentados.NUMERO_MECANOGRAFICO_INDEX ); + FIELD_INDEXES.put( Acidentados.NOME_SUPERIOR_HIERARQUICO, Acidentados.NOME_SUPERIOR_HIERARQUICO_INDEX ); + FIELD_INDEXES.put( Acidentados.NOME_SUPERIOR_HIERARQUICO_FULL, Acidentados.NOME_SUPERIOR_HIERARQUICO_INDEX ); + FIELD_INDEXES.put( Acidentados.EMAIL_SUPERIOR_HIERARQUICO, Acidentados.EMAIL_SUPERIOR_HIERARQUICO_INDEX ); + FIELD_INDEXES.put( Acidentados.EMAIL_SUPERIOR_HIERARQUICO_FULL, Acidentados.EMAIL_SUPERIOR_HIERARQUICO_INDEX ); + FIELD_INDEXES.put( Acidentados.ESTABELECIMENTO_ORIGEM, Acidentados.ESTABELECIMENTO_ORIGEM_INDEX ); + FIELD_INDEXES.put( Acidentados.ESTABELECIMENTO_ORIGEM_FULL, Acidentados.ESTABELECIMENTO_ORIGEM_INDEX ); + FIELD_INDEXES.put( Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO, Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO_INDEX ); + FIELD_INDEXES.put( Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO_FULL, Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "acidentados"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.acidentados"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "acidentados.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "acidentados.nome"; + public static final int NOME_INDEX = 1; + public static final String DATA_NASCIMENTO = "data_nascimento"; + public static final String DATA_NASCIMENTO_FULL = "acidentados.data_nascimento"; + public static final int DATA_NASCIMENTO_INDEX = 2; + public static final String BILHETE_IDENTIDADE = "bilhete_identidade"; + public static final String BILHETE_IDENTIDADE_FULL = "acidentados.bilhete_identidade"; + public static final int BILHETE_IDENTIDADE_INDEX = 3; + public static final String MORADA = "morada"; + public static final String MORADA_FULL = "acidentados.morada"; + public static final int MORADA_INDEX = 4; + public static final String COD_POSTAL = "cod_postal"; + public static final String COD_POSTAL_FULL = "acidentados.cod_postal"; + public static final int COD_POSTAL_INDEX = 5; + public static final String LOCALIDADE = "localidade"; + public static final String LOCALIDADE_FULL = "acidentados.localidade"; + public static final int LOCALIDADE_INDEX = 6; + public static final String CONTACTO_TELEFONICO = "contacto_telefonico"; + public static final String CONTACTO_TELEFONICO_FULL = "acidentados.contacto_telefonico"; + public static final int CONTACTO_TELEFONICO_INDEX = 7; + public static final String DATA_ADMISSAO = "data_admissao"; + public static final String DATA_ADMISSAO_FULL = "acidentados.data_admissao"; + public static final int DATA_ADMISSAO_INDEX = 8; + public static final String FUNCAO = "funcao"; + public static final String FUNCAO_FULL = "acidentados.funcao"; + public static final int FUNCAO_INDEX = 9; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "acidentados.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 10; + public static final String TURNO = "turno"; + public static final String TURNO_FULL = "acidentados.turno"; + public static final int TURNO_INDEX = 11; + public static final String NUMERO_MECANOGRAFICO = "numero_mecanografico"; + public static final String NUMERO_MECANOGRAFICO_FULL = "acidentados.numero_mecanografico"; + public static final int NUMERO_MECANOGRAFICO_INDEX = 12; + public static final String NOME_SUPERIOR_HIERARQUICO = "nome_superior_hierarquico"; + public static final String NOME_SUPERIOR_HIERARQUICO_FULL = "acidentados.nome_superior_hierarquico"; + public static final int NOME_SUPERIOR_HIERARQUICO_INDEX = 13; + public static final String EMAIL_SUPERIOR_HIERARQUICO = "email_superior_hierarquico"; + public static final String EMAIL_SUPERIOR_HIERARQUICO_FULL = "acidentados.email_superior_hierarquico"; + public static final int EMAIL_SUPERIOR_HIERARQUICO_INDEX = 14; + public static final String ESTABELECIMENTO_ORIGEM = "estabelecimento_origem"; + public static final String ESTABELECIMENTO_ORIGEM_FULL = "acidentados.estabelecimento_origem"; + public static final int ESTABELECIMENTO_ORIGEM_INDEX = 15; + public static final String DATA_EMAIL_SUPERIOR_HIERARQUICO = "data_email_superior_hierarquico"; + public static final String DATA_EMAIL_SUPERIOR_HIERARQUICO_FULL = "acidentados.data_email_superior_hierarquico"; + public static final int DATA_EMAIL_SUPERIOR_HIERARQUICO_INDEX = 16; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, DATA_NASCIMENTO, BILHETE_IDENTIDADE, MORADA, COD_POSTAL, LOCALIDADE, + CONTACTO_TELEFONICO, DATA_ADMISSAO, FUNCAO, TRABALHADOR_ID, TURNO, + NUMERO_MECANOGRAFICO, NOME_SUPERIOR_HIERARQUICO, + EMAIL_SUPERIOR_HIERARQUICO, ESTABELECIMENTO_ORIGEM, + DATA_EMAIL_SUPERIOR_HIERARQUICO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + DATA_NASCIMENTO, TABLENAME + "." + BILHETE_IDENTIDADE, TABLENAME + "." + MORADA, TABLENAME + "." + COD_POSTAL, TABLENAME + "." + LOCALIDADE, + TABLENAME + "." + CONTACTO_TELEFONICO, TABLENAME + "." + DATA_ADMISSAO, TABLENAME + "." + FUNCAO, TABLENAME + "." + TRABALHADOR_ID, TABLENAME + "." + TURNO, + TABLENAME + "." + NUMERO_MECANOGRAFICO, TABLENAME + "." + NOME_SUPERIOR_HIERARQUICO, + TABLENAME + "." + EMAIL_SUPERIOR_HIERARQUICO, TABLENAME + "." + ESTABELECIMENTO_ORIGEM, + TABLENAME + "." + DATA_EMAIL_SUPERIOR_HIERARQUICO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, DATA_NASCIMENTO, BILHETE_IDENTIDADE, MORADA, COD_POSTAL, LOCALIDADE, + CONTACTO_TELEFONICO, DATA_ADMISSAO, FUNCAO, TRABALHADOR_ID, TURNO, + NUMERO_MECANOGRAFICO, NOME_SUPERIOR_HIERARQUICO, + EMAIL_SUPERIOR_HIERARQUICO, ESTABELECIMENTO_ORIGEM, + DATA_EMAIL_SUPERIOR_HIERARQUICO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, DATA_NASCIMENTO, BILHETE_IDENTIDADE, MORADA, COD_POSTAL, LOCALIDADE, + CONTACTO_TELEFONICO, DATA_ADMISSAO, FUNCAO, TRABALHADOR_ID, TURNO, + NUMERO_MECANOGRAFICO, NOME_SUPERIOR_HIERARQUICO, + EMAIL_SUPERIOR_HIERARQUICO, ESTABELECIMENTO_ORIGEM, + DATA_EMAIL_SUPERIOR_HIERARQUICO, }; + + private Integer id; + private String nome; + private java.util.Date data_nascimento; + private String bilhete_identidade; + private String morada; + private String cod_postal; + private String localidade; + private String contacto_telefonico; + private java.util.Date data_admissao; + private String funcao; + private Integer trabalhador_id; + private String turno; + private String numero_mecanografico; + private String nome_superior_hierarquico; + private String email_superior_hierarquico; + private String estabelecimento_origem; + private java.util.Date data_email_superior_hierarquico; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Acidentados() + { + super(); + dirtyProperties = new boolean[]{ 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.ListfromAnalisesAcidentes_acidentado_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.AnalisesAcidentesData.class , getPrimaryKey().getMap().get("id"), "acidentado_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 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 getBilhete_identidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( BILHETE_IDENTIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.bilhete_identidade; + } + + public void setBilhete_identidade( String bilhete_identidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( BILHETE_IDENTIDADE, bilhete_identidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.bilhete_identidade = bilhete_identidade; + LAZY_LOADED_OBJECTS.put( BILHETE_IDENTIDADE, 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 getCod_postal() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( COD_POSTAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.cod_postal; + } + + public void setCod_postal( String cod_postal ) + { + try + { + setLockedForRefresh( true ); + preProcess( COD_POSTAL, cod_postal ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.cod_postal = cod_postal; + LAZY_LOADED_OBJECTS.put( COD_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 getContacto_telefonico() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONTACTO_TELEFONICO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.contacto_telefonico; + } + + public void setContacto_telefonico( String contacto_telefonico ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONTACTO_TELEFONICO, contacto_telefonico ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.contacto_telefonico = contacto_telefonico; + LAZY_LOADED_OBJECTS.put( CONTACTO_TELEFONICO, 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 getFuncao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FUNCAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.funcao; + } + + public void setFuncao( String funcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( FUNCAO, funcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.funcao = funcao; + LAZY_LOADED_OBJECTS.put( FUNCAO, 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 String getTurno() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TURNO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.turno; + } + + public void setTurno( String turno ) + { + try + { + setLockedForRefresh( true ); + preProcess( TURNO, turno ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.turno = turno; + LAZY_LOADED_OBJECTS.put( TURNO, 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 String getNome_superior_hierarquico() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_SUPERIOR_HIERARQUICO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_superior_hierarquico; + } + + public void setNome_superior_hierarquico( String nome_superior_hierarquico ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_SUPERIOR_HIERARQUICO, nome_superior_hierarquico ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_superior_hierarquico = nome_superior_hierarquico; + LAZY_LOADED_OBJECTS.put( NOME_SUPERIOR_HIERARQUICO, Boolean.TRUE ); + } + + public String getEmail_superior_hierarquico() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( EMAIL_SUPERIOR_HIERARQUICO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.email_superior_hierarquico; + } + + public void setEmail_superior_hierarquico( String email_superior_hierarquico ) + { + try + { + setLockedForRefresh( true ); + preProcess( EMAIL_SUPERIOR_HIERARQUICO, email_superior_hierarquico ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.email_superior_hierarquico = email_superior_hierarquico; + LAZY_LOADED_OBJECTS.put( EMAIL_SUPERIOR_HIERARQUICO, Boolean.TRUE ); + } + + public String getEstabelecimento_origem() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTABELECIMENTO_ORIGEM ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estabelecimento_origem; + } + + public void setEstabelecimento_origem( String estabelecimento_origem ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTABELECIMENTO_ORIGEM, estabelecimento_origem ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estabelecimento_origem = estabelecimento_origem; + LAZY_LOADED_OBJECTS.put( ESTABELECIMENTO_ORIGEM, Boolean.TRUE ); + } + + public java.util.Date getData_email_superior_hierarquico() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_EMAIL_SUPERIOR_HIERARQUICO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_email_superior_hierarquico; + } + + public void setData_email_superior_hierarquico( java.util.Date data_email_superior_hierarquico ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_EMAIL_SUPERIOR_HIERARQUICO, data_email_superior_hierarquico ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_email_superior_hierarquico = data_email_superior_hierarquico; + LAZY_LOADED_OBJECTS.put( DATA_EMAIL_SUPERIOR_HIERARQUICO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Acidentados.ID_INDEX: + value = getId(); + break; + case Acidentados.NOME_INDEX: + value = getNome(); + break; + case Acidentados.DATA_NASCIMENTO_INDEX: + value = getData_nascimento(); + break; + case Acidentados.BILHETE_IDENTIDADE_INDEX: + value = getBilhete_identidade(); + break; + case Acidentados.MORADA_INDEX: + value = getMorada(); + break; + case Acidentados.COD_POSTAL_INDEX: + value = getCod_postal(); + break; + case Acidentados.LOCALIDADE_INDEX: + value = getLocalidade(); + break; + case Acidentados.CONTACTO_TELEFONICO_INDEX: + value = getContacto_telefonico(); + break; + case Acidentados.DATA_ADMISSAO_INDEX: + value = getData_admissao(); + break; + case Acidentados.FUNCAO_INDEX: + value = getFuncao(); + break; + case Acidentados.TRABALHADOR_ID_INDEX: + value = getTrabalhador_id(); + break; + case Acidentados.TURNO_INDEX: + value = getTurno(); + break; + case Acidentados.NUMERO_MECANOGRAFICO_INDEX: + value = getNumero_mecanografico(); + break; + case Acidentados.NOME_SUPERIOR_HIERARQUICO_INDEX: + value = getNome_superior_hierarquico(); + break; + case Acidentados.EMAIL_SUPERIOR_HIERARQUICO_INDEX: + value = getEmail_superior_hierarquico(); + break; + case Acidentados.ESTABELECIMENTO_ORIGEM_INDEX: + value = getEstabelecimento_origem(); + break; + case Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO_INDEX: + value = getData_email_superior_hierarquico(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Acidentados.ID_INDEX: + value = this.id; + break; + case Acidentados.NOME_INDEX: + value = this.nome; + break; + case Acidentados.DATA_NASCIMENTO_INDEX: + value = this.data_nascimento; + break; + case Acidentados.BILHETE_IDENTIDADE_INDEX: + value = this.bilhete_identidade; + break; + case Acidentados.MORADA_INDEX: + value = this.morada; + break; + case Acidentados.COD_POSTAL_INDEX: + value = this.cod_postal; + break; + case Acidentados.LOCALIDADE_INDEX: + value = this.localidade; + break; + case Acidentados.CONTACTO_TELEFONICO_INDEX: + value = this.contacto_telefonico; + break; + case Acidentados.DATA_ADMISSAO_INDEX: + value = this.data_admissao; + break; + case Acidentados.FUNCAO_INDEX: + value = this.funcao; + break; + case Acidentados.TRABALHADOR_ID_INDEX: + value = this.trabalhador_id; + break; + case Acidentados.TURNO_INDEX: + value = this.turno; + break; + case Acidentados.NUMERO_MECANOGRAFICO_INDEX: + value = this.numero_mecanografico; + break; + case Acidentados.NOME_SUPERIOR_HIERARQUICO_INDEX: + value = this.nome_superior_hierarquico; + break; + case Acidentados.EMAIL_SUPERIOR_HIERARQUICO_INDEX: + value = this.email_superior_hierarquico; + break; + case Acidentados.ESTABELECIMENTO_ORIGEM_INDEX: + value = this.estabelecimento_origem; + break; + case Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO_INDEX: + value = this.data_email_superior_hierarquico; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Acidentados.ID_INDEX: + setId( ( Integer ) value ); + break; + case Acidentados.NOME_INDEX: + setNome( ( String ) value ); + break; + case Acidentados.DATA_NASCIMENTO_INDEX: + setData_nascimento( ( java.util.Date ) value ); + break; + case Acidentados.BILHETE_IDENTIDADE_INDEX: + setBilhete_identidade( ( String ) value ); + break; + case Acidentados.MORADA_INDEX: + setMorada( ( String ) value ); + break; + case Acidentados.COD_POSTAL_INDEX: + setCod_postal( ( String ) value ); + break; + case Acidentados.LOCALIDADE_INDEX: + setLocalidade( ( String ) value ); + break; + case Acidentados.CONTACTO_TELEFONICO_INDEX: + setContacto_telefonico( ( String ) value ); + break; + case Acidentados.DATA_ADMISSAO_INDEX: + setData_admissao( ( java.util.Date ) value ); + break; + case Acidentados.FUNCAO_INDEX: + setFuncao( ( String ) value ); + break; + case Acidentados.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case Acidentados.TURNO_INDEX: + setTurno( ( String ) value ); + break; + case Acidentados.NUMERO_MECANOGRAFICO_INDEX: + setNumero_mecanografico( ( String ) value ); + break; + case Acidentados.NOME_SUPERIOR_HIERARQUICO_INDEX: + setNome_superior_hierarquico( ( String ) value ); + break; + case Acidentados.EMAIL_SUPERIOR_HIERARQUICO_INDEX: + setEmail_superior_hierarquico( ( String ) value ); + break; + case Acidentados.ESTABELECIMENTO_ORIGEM_INDEX: + setEstabelecimento_origem( ( String ) value ); + break; + case Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO_INDEX: + setData_email_superior_hierarquico( ( java.util.Date ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Acidentados.ID_INDEX: + this.id = ( Integer ) value; + break; + case Acidentados.NOME_INDEX: + this.nome = ( String ) value; + break; + case Acidentados.DATA_NASCIMENTO_INDEX: + this.data_nascimento = ( java.util.Date ) value; + break; + case Acidentados.BILHETE_IDENTIDADE_INDEX: + this.bilhete_identidade = ( String ) value; + break; + case Acidentados.MORADA_INDEX: + this.morada = ( String ) value; + break; + case Acidentados.COD_POSTAL_INDEX: + this.cod_postal = ( String ) value; + break; + case Acidentados.LOCALIDADE_INDEX: + this.localidade = ( String ) value; + break; + case Acidentados.CONTACTO_TELEFONICO_INDEX: + this.contacto_telefonico = ( String ) value; + break; + case Acidentados.DATA_ADMISSAO_INDEX: + this.data_admissao = ( java.util.Date ) value; + break; + case Acidentados.FUNCAO_INDEX: + this.funcao = ( String ) value; + break; + case Acidentados.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case Acidentados.TURNO_INDEX: + this.turno = ( String ) value; + break; + case Acidentados.NUMERO_MECANOGRAFICO_INDEX: + this.numero_mecanografico = ( String ) value; + break; + case Acidentados.NOME_SUPERIOR_HIERARQUICO_INDEX: + this.nome_superior_hierarquico = ( String ) value; + break; + case Acidentados.EMAIL_SUPERIOR_HIERARQUICO_INDEX: + this.email_superior_hierarquico = ( String ) value; + break; + case Acidentados.ESTABELECIMENTO_ORIGEM_INDEX: + this.estabelecimento_origem = ( String ) value; + break; + case Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO_INDEX: + this.data_email_superior_hierarquico = ( 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 Acidentados.ID_INDEX: + theClass = Integer.class; + break; + case Acidentados.NOME_INDEX: + theClass = String.class; + break; + case Acidentados.DATA_NASCIMENTO_INDEX: + theClass = java.util.Date.class; + break; + case Acidentados.BILHETE_IDENTIDADE_INDEX: + theClass = String.class; + break; + case Acidentados.MORADA_INDEX: + theClass = String.class; + break; + case Acidentados.COD_POSTAL_INDEX: + theClass = String.class; + break; + case Acidentados.LOCALIDADE_INDEX: + theClass = String.class; + break; + case Acidentados.CONTACTO_TELEFONICO_INDEX: + theClass = String.class; + break; + case Acidentados.DATA_ADMISSAO_INDEX: + theClass = java.util.Date.class; + break; + case Acidentados.FUNCAO_INDEX: + theClass = String.class; + break; + case Acidentados.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case Acidentados.TURNO_INDEX: + theClass = String.class; + break; + case Acidentados.NUMERO_MECANOGRAFICO_INDEX: + theClass = String.class; + break; + case Acidentados.NOME_SUPERIOR_HIERARQUICO_INDEX: + theClass = String.class; + break; + case Acidentados.EMAIL_SUPERIOR_HIERARQUICO_INDEX: + theClass = String.class; + break; + case Acidentados.ESTABELECIMENTO_ORIGEM_INDEX: + theClass = String.class; + break; + case Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO_INDEX: + theClass = java.util.Date.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Acidentados._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, Acidentados.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Actualizacao.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Actualizacao.java new file mode 100644 index 00000000..bd8499be --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Actualizacao.java @@ -0,0 +1,178 @@ +/* +* Actualizacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Actualizacao extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "actualizacao"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.actualizacao"; + + public static final int _INVALID__INDEX = -1; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + }; + + + protected com.evolute.entity.utils.ObjectPrimaryKey primaryKey; + + public Actualizacao() + { + super(); + dirtyProperties = new boolean[]{ }; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + throw new RuntimeException( "getPrimaryKeyName on Actualizacao is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Actualizacao._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.ObjectPrimaryKey( TABLENAME, Actualizacao.PK_FIELD_NAMES ); + } + } + + @Override + public com.evolute.entity.utils.ObjectPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/AnalisesAcidentes.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/AnalisesAcidentes.java new file mode 100644 index 00000000..4159182e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/AnalisesAcidentes.java @@ -0,0 +1,5780 @@ +/* +* AnalisesAcidentes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class AnalisesAcidentes extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( AnalisesAcidentes.ID, AnalisesAcidentes.ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ID_FULL, AnalisesAcidentes.ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_ACIDENTE, AnalisesAcidentes.DATA_ACIDENTE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_ACIDENTE_FULL, AnalisesAcidentes.DATA_ACIDENTE_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AnalisesAcidentes.CLASS_IDENTIFIER, AnalisesAcidentes.ACIDENTADO_ID, AnalisesAcidentes.TO_ACIDENTADO_ID ); + FIELD_INDEXES.put( AnalisesAcidentes.ACIDENTADO_ID, AnalisesAcidentes.ACIDENTADO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ACIDENTADO_ID_FULL, AnalisesAcidentes.ACIDENTADO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TO_ACIDENTADO_ID, AnalisesAcidentes.TO_ACIDENTADO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESTADO, AnalisesAcidentes.ESTADO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESTADO_FULL, AnalisesAcidentes.ESTADO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESTABELECIMENTO_ID, AnalisesAcidentes.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESTABELECIMENTO_ID_FULL, AnalisesAcidentes.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.HORAS_TURNO, AnalisesAcidentes.HORAS_TURNO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.HORAS_TURNO_FULL, AnalisesAcidentes.HORAS_TURNO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.SECCAO, AnalisesAcidentes.SECCAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.SECCAO_FULL, AnalisesAcidentes.SECCAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LOCAL_TRABALHO, AnalisesAcidentes.LOCAL_TRABALHO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LOCAL_TRABALHO_FULL, AnalisesAcidentes.LOCAL_TRABALHO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TAREFA, AnalisesAcidentes.TAREFA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TAREFA_FULL, AnalisesAcidentes.TAREFA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.SUBSTANCIAS, AnalisesAcidentes.SUBSTANCIAS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.SUBSTANCIAS_FULL, AnalisesAcidentes.SUBSTANCIAS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.SUPERIOR_HIERARQUICO, AnalisesAcidentes.SUPERIOR_HIERARQUICO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.SUPERIOR_HIERARQUICO_FULL, AnalisesAcidentes.SUPERIOR_HIERARQUICO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CONDICOES, AnalisesAcidentes.CONDICOES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CONDICOES_FULL, AnalisesAcidentes.CONDICOES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TESTEMUNHAS, AnalisesAcidentes.TESTEMUNHAS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TESTEMUNHAS_FULL, AnalisesAcidentes.TESTEMUNHAS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DESCRICAO, AnalisesAcidentes.DESCRICAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DESCRICAO_FULL, AnalisesAcidentes.DESCRICAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CONCLUSOES, AnalisesAcidentes.CONCLUSOES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CONCLUSOES_FULL, AnalisesAcidentes.CONCLUSOES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ACCOES, AnalisesAcidentes.ACCOES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ACCOES_FULL, AnalisesAcidentes.ACCOES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.HORA_ACIDENTE, AnalisesAcidentes.HORA_ACIDENTE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.HORA_ACIDENTE_FULL, AnalisesAcidentes.HORA_ACIDENTE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.FORMACAO_SHST, AnalisesAcidentes.FORMACAO_SHST_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.FORMACAO_SHST_FULL, AnalisesAcidentes.FORMACAO_SHST_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE, AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE_FULL, AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR, AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR_FULL, AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR, AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR_FULL, AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1_FULL, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2_FULL, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3_FULL, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4_FULL, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES, AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES_FULL, AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES, AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES_FULL, AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_FULL, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_FULL, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_FULL, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_FULL, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_CABECA, AnalisesAcidentes.LESAO_CABECA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_CABECA_FULL, AnalisesAcidentes.LESAO_CABECA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_PESCOCO, AnalisesAcidentes.LESAO_PESCOCO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_PESCOCO_FULL, AnalisesAcidentes.LESAO_PESCOCO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_TRONCO, AnalisesAcidentes.LESAO_TRONCO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_TRONCO_FULL, AnalisesAcidentes.LESAO_TRONCO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR, AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR_FULL, AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ, AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ_FULL, AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_MEMBRO_INF_DIR, AnalisesAcidentes.LESAO_MEMBRO_INF_DIR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_MEMBRO_INF_DIR_FULL, AnalisesAcidentes.LESAO_MEMBRO_INF_DIR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ, AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ_FULL, AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESPECIF1, AnalisesAcidentes.ESPECIF1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESPECIF1_FULL, AnalisesAcidentes.ESPECIF1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESPECIF2, AnalisesAcidentes.ESPECIF2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESPECIF2_FULL, AnalisesAcidentes.ESPECIF2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESPECIF3, AnalisesAcidentes.ESPECIF3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESPECIF3_FULL, AnalisesAcidentes.ESPECIF3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESPECIF4, AnalisesAcidentes.ESPECIF4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESPECIF4_FULL, AnalisesAcidentes.ESPECIF4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TIPO_INCAPACIDADE, AnalisesAcidentes.TIPO_INCAPACIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TIPO_INCAPACIDADE_FULL, AnalisesAcidentes.TIPO_INCAPACIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.COEF_INCAPACIDADE, AnalisesAcidentes.COEF_INCAPACIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.COEF_INCAPACIDADE_FULL, AnalisesAcidentes.COEF_INCAPACIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_AVAL_INCAPACIDADE, AnalisesAcidentes.DATA_AVAL_INCAPACIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_AVAL_INCAPACIDADE_FULL, AnalisesAcidentes.DATA_AVAL_INCAPACIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_REV_INCAPACIDADE, AnalisesAcidentes.DATA_REV_INCAPACIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_REV_INCAPACIDADE_FULL, AnalisesAcidentes.DATA_REV_INCAPACIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.PERIODO_INCAPACIDADE_DE, AnalisesAcidentes.PERIODO_INCAPACIDADE_DE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.PERIODO_INCAPACIDADE_DE_FULL, AnalisesAcidentes.PERIODO_INCAPACIDADE_DE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.PERIODO_INCAPACIDADE_A, AnalisesAcidentes.PERIODO_INCAPACIDADE_A_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.PERIODO_INCAPACIDADE_A_FULL, AnalisesAcidentes.PERIODO_INCAPACIDADE_A_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_FLEXAO, AnalisesAcidentes.IMG_FLEXAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_FLEXAO_FULL, AnalisesAcidentes.IMG_FLEXAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_EXT1, AnalisesAcidentes.IMG_EXT1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_EXT1_FULL, AnalisesAcidentes.IMG_EXT1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_EXT2, AnalisesAcidentes.IMG_EXT2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_EXT2_FULL, AnalisesAcidentes.IMG_EXT2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_CAB2, AnalisesAcidentes.IMG_CAB2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_CAB2_FULL, AnalisesAcidentes.IMG_CAB2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_CAB3, AnalisesAcidentes.IMG_CAB3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_CAB3_FULL, AnalisesAcidentes.IMG_CAB3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA2, AnalisesAcidentes.IMG_MA2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA2_FULL, AnalisesAcidentes.IMG_MA2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA3, AnalisesAcidentes.IMG_MA3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA3_FULL, AnalisesAcidentes.IMG_MA3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA5, AnalisesAcidentes.IMG_MA5_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA5_FULL, AnalisesAcidentes.IMG_MA5_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA6, AnalisesAcidentes.IMG_MA6_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA6_FULL, AnalisesAcidentes.IMG_MA6_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA8, AnalisesAcidentes.IMG_MA8_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA8_FULL, AnalisesAcidentes.IMG_MA8_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA10, AnalisesAcidentes.IMG_MA10_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA10_FULL, AnalisesAcidentes.IMG_MA10_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_CARGA, AnalisesAcidentes.RESTRICAO_CARGA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_CARGA_FULL, AnalisesAcidentes.RESTRICAO_CARGA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_MOTRICIDADE, AnalisesAcidentes.RESTRICAO_MOTRICIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_MOTRICIDADE_FULL, AnalisesAcidentes.RESTRICAO_MOTRICIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_CONDUCAO, AnalisesAcidentes.RESTRICAO_CONDUCAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_CONDUCAO_FULL, AnalisesAcidentes.RESTRICAO_CONDUCAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_VIBRACOES, AnalisesAcidentes.RESTRICAO_VIBRACOES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_VIBRACOES_FULL, AnalisesAcidentes.RESTRICAO_VIBRACOES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_OUTRAS, AnalisesAcidentes.RESTRICAO_OUTRAS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_OUTRAS_FULL, AnalisesAcidentes.RESTRICAO_OUTRAS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.MED_OBSERV, AnalisesAcidentes.MED_OBSERV_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.MED_OBSERV_FULL, AnalisesAcidentes.MED_OBSERV_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TIPO_LESAO, AnalisesAcidentes.TIPO_LESAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TIPO_LESAO_FULL, AnalisesAcidentes.TIPO_LESAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_ROT1, AnalisesAcidentes.IMG_ROT1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_ROT1_FULL, AnalisesAcidentes.IMG_ROT1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_ROT2, AnalisesAcidentes.IMG_ROT2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_ROT2_FULL, AnalisesAcidentes.IMG_ROT2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_CAB1, AnalisesAcidentes.IMG_CAB1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_CAB1_FULL, AnalisesAcidentes.IMG_CAB1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_CAB4, AnalisesAcidentes.IMG_CAB4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_CAB4_FULL, AnalisesAcidentes.IMG_CAB4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA1, AnalisesAcidentes.IMG_MA1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA1_FULL, AnalisesAcidentes.IMG_MA1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA4, AnalisesAcidentes.IMG_MA4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA4_FULL, AnalisesAcidentes.IMG_MA4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA7, AnalisesAcidentes.IMG_MA7_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA7_FULL, AnalisesAcidentes.IMG_MA7_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA9, AnalisesAcidentes.IMG_MA9_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA9_FULL, AnalisesAcidentes.IMG_MA9_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.EMPRESA_ID, AnalisesAcidentes.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.EMPRESA_ID_FULL, AnalisesAcidentes.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.MEDICO_ID, AnalisesAcidentes.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.MEDICO_ID_FULL, AnalisesAcidentes.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TECNICO_SAUDE_ID, AnalisesAcidentes.TECNICO_SAUDE_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TECNICO_SAUDE_ID_FULL, AnalisesAcidentes.TECNICO_SAUDE_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ANALISE_NR, AnalisesAcidentes.ANALISE_NR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ANALISE_NR_FULL, AnalisesAcidentes.ANALISE_NR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESTADO_ASSINATURA, AnalisesAcidentes.ESTADO_ASSINATURA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESTADO_ASSINATURA_FULL, AnalisesAcidentes.ESTADO_ASSINATURA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ASS_RESP_SEG, AnalisesAcidentes.ASS_RESP_SEG_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ASS_RESP_SEG_FULL, AnalisesAcidentes.ASS_RESP_SEG_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ASS_RESP_RH, AnalisesAcidentes.ASS_RESP_RH_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ASS_RESP_RH_FULL, AnalisesAcidentes.ASS_RESP_RH_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_CONSOLIDACAO, AnalisesAcidentes.DATA_CONSOLIDACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_CONSOLIDACAO_FULL, AnalisesAcidentes.DATA_CONSOLIDACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_ASSINATURA_SEG, AnalisesAcidentes.DATA_ASSINATURA_SEG_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_ASSINATURA_SEG_FULL, AnalisesAcidentes.DATA_ASSINATURA_SEG_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_ASSINATURA_RH, AnalisesAcidentes.DATA_ASSINATURA_RH_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_ASSINATURA_RH_FULL, AnalisesAcidentes.DATA_ASSINATURA_RH_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ASS_CONSOLIDACAO, AnalisesAcidentes.ASS_CONSOLIDACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ASS_CONSOLIDACAO_FULL, AnalisesAcidentes.ASS_CONSOLIDACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NOME_RESP_SEG, AnalisesAcidentes.NOME_RESP_SEG_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NOME_RESP_SEG_FULL, AnalisesAcidentes.NOME_RESP_SEG_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NOME_RESP_RH, AnalisesAcidentes.NOME_RESP_RH_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NOME_RESP_RH_FULL, AnalisesAcidentes.NOME_RESP_RH_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CAUSAS, AnalisesAcidentes.CAUSAS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CAUSAS_FULL, AnalisesAcidentes.CAUSAS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESTADO_ANTES_CORRECAO, AnalisesAcidentes.ESTADO_ANTES_CORRECAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESTADO_ANTES_CORRECAO_FULL, AnalisesAcidentes.ESTADO_ANTES_CORRECAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.OBSERVACOES_CORRECAO, AnalisesAcidentes.OBSERVACOES_CORRECAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.OBSERVACOES_CORRECAO_FULL, AnalisesAcidentes.OBSERVACOES_CORRECAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CORRECAO, AnalisesAcidentes.CORRECAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CORRECAO_FULL, AnalisesAcidentes.CORRECAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ASS_SUPERIOR, AnalisesAcidentes.ASS_SUPERIOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ASS_SUPERIOR_FULL, AnalisesAcidentes.ASS_SUPERIOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NOME_SUPERIOR, AnalisesAcidentes.NOME_SUPERIOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NOME_SUPERIOR_FULL, AnalisesAcidentes.NOME_SUPERIOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR, AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR_FULL, AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.AVERIGUADOR, AnalisesAcidentes.AVERIGUADOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.AVERIGUADOR_FULL, AnalisesAcidentes.AVERIGUADOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.AVERIGUACAO_POSTERIOR, AnalisesAcidentes.AVERIGUACAO_POSTERIOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.AVERIGUACAO_POSTERIOR_FULL, AnalisesAcidentes.AVERIGUACAO_POSTERIOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.AVERIGUACAO_OBS, AnalisesAcidentes.AVERIGUACAO_OBS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.AVERIGUACAO_OBS_FULL, AnalisesAcidentes.AVERIGUACAO_OBS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NOME_RESP_CONSOLIDACAO, AnalisesAcidentes.NOME_RESP_CONSOLIDACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NOME_RESP_CONSOLIDACAO_FULL, AnalisesAcidentes.NOME_RESP_CONSOLIDACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_INICIO_PROCESSO, AnalisesAcidentes.DATA_INICIO_PROCESSO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_INICIO_PROCESSO_FULL, AnalisesAcidentes.DATA_INICIO_PROCESSO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AnalisesAcidentes.CLASS_IDENTIFIER, AnalisesAcidentes.DEPARTAMENTO_ID, AnalisesAcidentes.TO_DEPARTAMENTO_ID ); + FIELD_INDEXES.put( AnalisesAcidentes.DEPARTAMENTO_ID, AnalisesAcidentes.DEPARTAMENTO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DEPARTAMENTO_ID_FULL, AnalisesAcidentes.DEPARTAMENTO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TO_DEPARTAMENTO_ID, AnalisesAcidentes.TO_DEPARTAMENTO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AnalisesAcidentes.CLASS_IDENTIFIER, AnalisesAcidentes.SECCAO_ID, AnalisesAcidentes.TO_SECCAO_ID ); + FIELD_INDEXES.put( AnalisesAcidentes.SECCAO_ID, AnalisesAcidentes.SECCAO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.SECCAO_ID_FULL, AnalisesAcidentes.SECCAO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TO_SECCAO_ID, AnalisesAcidentes.TO_SECCAO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RH_FASE4, AnalisesAcidentes.RH_FASE4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RH_FASE4_FULL, AnalisesAcidentes.RH_FASE4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.APAGADA, AnalisesAcidentes.APAGADA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.APAGADA_FULL, AnalisesAcidentes.APAGADA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO, AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO_FULL, AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_DESACTIVACAO, AnalisesAcidentes.DATA_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_DESACTIVACAO_FULL, AnalisesAcidentes.DATA_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.COMENTARIO_DESACTIVACAO, AnalisesAcidentes.COMENTARIO_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.COMENTARIO_DESACTIVACAO_FULL, AnalisesAcidentes.COMENTARIO_DESACTIVACAO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyacidentado_idToacidentados = + new com.evolute.entity.ForeignKey( AnalisesAcidentes.class, AnalisesAcidentes.ACIDENTADO_ID, db.data.siprp.outer.AcidentadosData.class, db.data.siprp.outer.AcidentadosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeydepartamento_idTodepartamentos = + new com.evolute.entity.ForeignKey( AnalisesAcidentes.class, AnalisesAcidentes.DEPARTAMENTO_ID, db.data.siprp.outer.DepartamentosData.class, db.data.siprp.outer.DepartamentosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyseccao_idToseccoes = + new com.evolute.entity.ForeignKey( AnalisesAcidentes.class, AnalisesAcidentes.SECCAO_ID, db.data.siprp.outer.SeccoesData.class, db.data.siprp.outer.SeccoesData.ID ); + + public static final String TABLENAME = "analises_acidentes"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.analises_acidentes"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "analises_acidentes.id"; + public static final int ID_INDEX = 0; + public static final String DATA_ACIDENTE = "data_acidente"; + public static final String DATA_ACIDENTE_FULL = "analises_acidentes.data_acidente"; + public static final int DATA_ACIDENTE_INDEX = 1; + public static final String ACIDENTADO_ID = "acidentado_id"; + public static final String ACIDENTADO_ID_FULL = "analises_acidentes.acidentado_id"; + public static final int ACIDENTADO_ID_INDEX = 2; + public static final String TO_ACIDENTADO_ID = "to_acidentado_id"; + public static final String TO_ACIDENTADO_ID_FULL = "analises_acidentes.to_acidentado_id"; + public static final int TO_ACIDENTADO_ID_INDEX = 3; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "analises_acidentes.estado"; + public static final int ESTADO_INDEX = 4; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "analises_acidentes.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 5; + public static final String HORAS_TURNO = "horas_turno"; + public static final String HORAS_TURNO_FULL = "analises_acidentes.horas_turno"; + public static final int HORAS_TURNO_INDEX = 6; + public static final String SECCAO = "seccao"; + public static final String SECCAO_FULL = "analises_acidentes.seccao"; + public static final int SECCAO_INDEX = 7; + public static final String LOCAL_TRABALHO = "local_trabalho"; + public static final String LOCAL_TRABALHO_FULL = "analises_acidentes.local_trabalho"; + public static final int LOCAL_TRABALHO_INDEX = 8; + public static final String TAREFA = "tarefa"; + public static final String TAREFA_FULL = "analises_acidentes.tarefa"; + public static final int TAREFA_INDEX = 9; + public static final String SUBSTANCIAS = "substancias"; + public static final String SUBSTANCIAS_FULL = "analises_acidentes.substancias"; + public static final int SUBSTANCIAS_INDEX = 10; + public static final String SUPERIOR_HIERARQUICO = "superior_hierarquico"; + public static final String SUPERIOR_HIERARQUICO_FULL = "analises_acidentes.superior_hierarquico"; + public static final int SUPERIOR_HIERARQUICO_INDEX = 11; + public static final String CONDICOES = "condicoes"; + public static final String CONDICOES_FULL = "analises_acidentes.condicoes"; + public static final int CONDICOES_INDEX = 12; + public static final String TESTEMUNHAS = "testemunhas"; + public static final String TESTEMUNHAS_FULL = "analises_acidentes.testemunhas"; + public static final int TESTEMUNHAS_INDEX = 13; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "analises_acidentes.descricao"; + public static final int DESCRICAO_INDEX = 14; + public static final String CONCLUSOES = "conclusoes"; + public static final String CONCLUSOES_FULL = "analises_acidentes.conclusoes"; + public static final int CONCLUSOES_INDEX = 15; + public static final String ACCOES = "accoes"; + public static final String ACCOES_FULL = "analises_acidentes.accoes"; + public static final int ACCOES_INDEX = 16; + public static final String HORA_ACIDENTE = "hora_acidente"; + public static final String HORA_ACIDENTE_FULL = "analises_acidentes.hora_acidente"; + public static final int HORA_ACIDENTE_INDEX = 17; + public static final String FORMACAO_SHST = "formacao_shst"; + public static final String FORMACAO_SHST_FULL = "analises_acidentes.formacao_shst"; + public static final int FORMACAO_SHST_INDEX = 18; + public static final String FORMACAO_SHST_NAO_PORQUE = "formacao_shst_nao_porque"; + public static final String FORMACAO_SHST_NAO_PORQUE_FULL = "analises_acidentes.formacao_shst_nao_porque"; + public static final int FORMACAO_SHST_NAO_PORQUE_INDEX = 19; + public static final String OUTROS_ACIDENTES_COM_COLABORADOR = "outros_acidentes_com_colaborador"; + public static final String OUTROS_ACIDENTES_COM_COLABORADOR_FULL = "analises_acidentes.outros_acidentes_com_colaborador"; + public static final int OUTROS_ACIDENTES_COM_COLABORADOR_INDEX = 20; + public static final String NR_ACIDENTES_COM_COLABORADOR = "nr_acidentes_com_colaborador"; + public static final String NR_ACIDENTES_COM_COLABORADOR_FULL = "analises_acidentes.nr_acidentes_com_colaborador"; + public static final int NR_ACIDENTES_COM_COLABORADOR_INDEX = 21; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR1 = "nr_relatorio_acidente_colaborador1"; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR1_FULL = "analises_acidentes.nr_relatorio_acidente_colaborador1"; + public static final int NR_RELATORIO_ACIDENTE_COLABORADOR1_INDEX = 22; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR2 = "nr_relatorio_acidente_colaborador2"; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR2_FULL = "analises_acidentes.nr_relatorio_acidente_colaborador2"; + public static final int NR_RELATORIO_ACIDENTE_COLABORADOR2_INDEX = 23; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR3 = "nr_relatorio_acidente_colaborador3"; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR3_FULL = "analises_acidentes.nr_relatorio_acidente_colaborador3"; + public static final int NR_RELATORIO_ACIDENTE_COLABORADOR3_INDEX = 24; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR4 = "nr_relatorio_acidente_colaborador4"; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR4_FULL = "analises_acidentes.nr_relatorio_acidente_colaborador4"; + public static final int NR_RELATORIO_ACIDENTE_COLABORADOR4_INDEX = 25; + public static final String ACIDENTES_OUTROS_COLABORADORES = "acidentes_outros_colaboradores"; + public static final String ACIDENTES_OUTROS_COLABORADORES_FULL = "analises_acidentes.acidentes_outros_colaboradores"; + public static final int ACIDENTES_OUTROS_COLABORADORES_INDEX = 26; + public static final String NR_ACIDENTES_OUTROS_COLABORADORES = "nr_acidentes_outros_colaboradores"; + public static final String NR_ACIDENTES_OUTROS_COLABORADORES_FULL = "analises_acidentes.nr_acidentes_outros_colaboradores"; + public static final int NR_ACIDENTES_OUTROS_COLABORADORES_INDEX = 27; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1 = "nr_relatorio_acidente_outros_colaboradores1"; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_FULL = "analises_acidentes.nr_relatorio_acidente_outros_colaboradores1"; + public static final int NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_INDEX = 28; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2 = "nr_relatorio_acidente_outros_colaboradores2"; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_FULL = "analises_acidentes.nr_relatorio_acidente_outros_colaboradores2"; + public static final int NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_INDEX = 29; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3 = "nr_relatorio_acidente_outros_colaboradores3"; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_FULL = "analises_acidentes.nr_relatorio_acidente_outros_colaboradores3"; + public static final int NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_INDEX = 30; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4 = "nr_relatorio_acidente_outros_colaboradores4"; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_FULL = "analises_acidentes.nr_relatorio_acidente_outros_colaboradores4"; + public static final int NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_INDEX = 31; + public static final String LESAO_CABECA = "lesao_cabeca"; + public static final String LESAO_CABECA_FULL = "analises_acidentes.lesao_cabeca"; + public static final int LESAO_CABECA_INDEX = 32; + public static final String LESAO_PESCOCO = "lesao_pescoco"; + public static final String LESAO_PESCOCO_FULL = "analises_acidentes.lesao_pescoco"; + public static final int LESAO_PESCOCO_INDEX = 33; + public static final String LESAO_TRONCO = "lesao_tronco"; + public static final String LESAO_TRONCO_FULL = "analises_acidentes.lesao_tronco"; + public static final int LESAO_TRONCO_INDEX = 34; + public static final String LESAO_MEMBRO_SUP_DIR = "lesao_membro_sup_dir"; + public static final String LESAO_MEMBRO_SUP_DIR_FULL = "analises_acidentes.lesao_membro_sup_dir"; + public static final int LESAO_MEMBRO_SUP_DIR_INDEX = 35; + public static final String LESAO_MEMBRO_SUP_ESQ = "lesao_membro_sup_esq"; + public static final String LESAO_MEMBRO_SUP_ESQ_FULL = "analises_acidentes.lesao_membro_sup_esq"; + public static final int LESAO_MEMBRO_SUP_ESQ_INDEX = 36; + public static final String LESAO_MEMBRO_INF_DIR = "lesao_membro_inf_dir"; + public static final String LESAO_MEMBRO_INF_DIR_FULL = "analises_acidentes.lesao_membro_inf_dir"; + public static final int LESAO_MEMBRO_INF_DIR_INDEX = 37; + public static final String LESAO_MEMBRO_INF_ESQ = "lesao_membro_inf_esq"; + public static final String LESAO_MEMBRO_INF_ESQ_FULL = "analises_acidentes.lesao_membro_inf_esq"; + public static final int LESAO_MEMBRO_INF_ESQ_INDEX = 38; + public static final String ESPECIF1 = "especif1"; + public static final String ESPECIF1_FULL = "analises_acidentes.especif1"; + public static final int ESPECIF1_INDEX = 39; + public static final String ESPECIF2 = "especif2"; + public static final String ESPECIF2_FULL = "analises_acidentes.especif2"; + public static final int ESPECIF2_INDEX = 40; + public static final String ESPECIF3 = "especif3"; + public static final String ESPECIF3_FULL = "analises_acidentes.especif3"; + public static final int ESPECIF3_INDEX = 41; + public static final String ESPECIF4 = "especif4"; + public static final String ESPECIF4_FULL = "analises_acidentes.especif4"; + public static final int ESPECIF4_INDEX = 42; + public static final String TIPO_INCAPACIDADE = "tipo_incapacidade"; + public static final String TIPO_INCAPACIDADE_FULL = "analises_acidentes.tipo_incapacidade"; + public static final int TIPO_INCAPACIDADE_INDEX = 43; + public static final String COEF_INCAPACIDADE = "coef_incapacidade"; + public static final String COEF_INCAPACIDADE_FULL = "analises_acidentes.coef_incapacidade"; + public static final int COEF_INCAPACIDADE_INDEX = 44; + public static final String DATA_AVAL_INCAPACIDADE = "data_aval_incapacidade"; + public static final String DATA_AVAL_INCAPACIDADE_FULL = "analises_acidentes.data_aval_incapacidade"; + public static final int DATA_AVAL_INCAPACIDADE_INDEX = 45; + public static final String DATA_REV_INCAPACIDADE = "data_rev_incapacidade"; + public static final String DATA_REV_INCAPACIDADE_FULL = "analises_acidentes.data_rev_incapacidade"; + public static final int DATA_REV_INCAPACIDADE_INDEX = 46; + public static final String PERIODO_INCAPACIDADE_DE = "periodo_incapacidade_de"; + public static final String PERIODO_INCAPACIDADE_DE_FULL = "analises_acidentes.periodo_incapacidade_de"; + public static final int PERIODO_INCAPACIDADE_DE_INDEX = 47; + public static final String PERIODO_INCAPACIDADE_A = "periodo_incapacidade_a"; + public static final String PERIODO_INCAPACIDADE_A_FULL = "analises_acidentes.periodo_incapacidade_a"; + public static final int PERIODO_INCAPACIDADE_A_INDEX = 48; + public static final String IMG_FLEXAO = "img_flexao"; + public static final String IMG_FLEXAO_FULL = "analises_acidentes.img_flexao"; + public static final int IMG_FLEXAO_INDEX = 49; + public static final String IMG_EXT1 = "img_ext1"; + public static final String IMG_EXT1_FULL = "analises_acidentes.img_ext1"; + public static final int IMG_EXT1_INDEX = 50; + public static final String IMG_EXT2 = "img_ext2"; + public static final String IMG_EXT2_FULL = "analises_acidentes.img_ext2"; + public static final int IMG_EXT2_INDEX = 51; + public static final String IMG_CAB2 = "img_cab2"; + public static final String IMG_CAB2_FULL = "analises_acidentes.img_cab2"; + public static final int IMG_CAB2_INDEX = 52; + public static final String IMG_CAB3 = "img_cab3"; + public static final String IMG_CAB3_FULL = "analises_acidentes.img_cab3"; + public static final int IMG_CAB3_INDEX = 53; + public static final String IMG_MA2 = "img_ma2"; + public static final String IMG_MA2_FULL = "analises_acidentes.img_ma2"; + public static final int IMG_MA2_INDEX = 54; + public static final String IMG_MA3 = "img_ma3"; + public static final String IMG_MA3_FULL = "analises_acidentes.img_ma3"; + public static final int IMG_MA3_INDEX = 55; + public static final String IMG_MA5 = "img_ma5"; + public static final String IMG_MA5_FULL = "analises_acidentes.img_ma5"; + public static final int IMG_MA5_INDEX = 56; + public static final String IMG_MA6 = "img_ma6"; + public static final String IMG_MA6_FULL = "analises_acidentes.img_ma6"; + public static final int IMG_MA6_INDEX = 57; + public static final String IMG_MA8 = "img_ma8"; + public static final String IMG_MA8_FULL = "analises_acidentes.img_ma8"; + public static final int IMG_MA8_INDEX = 58; + public static final String IMG_MA10 = "img_ma10"; + public static final String IMG_MA10_FULL = "analises_acidentes.img_ma10"; + public static final int IMG_MA10_INDEX = 59; + public static final String RESTRICAO_CARGA = "restricao_carga"; + public static final String RESTRICAO_CARGA_FULL = "analises_acidentes.restricao_carga"; + public static final int RESTRICAO_CARGA_INDEX = 60; + public static final String RESTRICAO_MOTRICIDADE = "restricao_motricidade"; + public static final String RESTRICAO_MOTRICIDADE_FULL = "analises_acidentes.restricao_motricidade"; + public static final int RESTRICAO_MOTRICIDADE_INDEX = 61; + public static final String RESTRICAO_CONDUCAO = "restricao_conducao"; + public static final String RESTRICAO_CONDUCAO_FULL = "analises_acidentes.restricao_conducao"; + public static final int RESTRICAO_CONDUCAO_INDEX = 62; + public static final String RESTRICAO_VIBRACOES = "restricao_vibracoes"; + public static final String RESTRICAO_VIBRACOES_FULL = "analises_acidentes.restricao_vibracoes"; + public static final int RESTRICAO_VIBRACOES_INDEX = 63; + public static final String RESTRICAO_OUTRAS = "restricao_outras"; + public static final String RESTRICAO_OUTRAS_FULL = "analises_acidentes.restricao_outras"; + public static final int RESTRICAO_OUTRAS_INDEX = 64; + public static final String MED_OBSERV = "med_observ"; + public static final String MED_OBSERV_FULL = "analises_acidentes.med_observ"; + public static final int MED_OBSERV_INDEX = 65; + public static final String TIPO_LESAO = "tipo_lesao"; + public static final String TIPO_LESAO_FULL = "analises_acidentes.tipo_lesao"; + public static final int TIPO_LESAO_INDEX = 66; + public static final String IMG_ROT1 = "img_rot1"; + public static final String IMG_ROT1_FULL = "analises_acidentes.img_rot1"; + public static final int IMG_ROT1_INDEX = 67; + public static final String IMG_ROT2 = "img_rot2"; + public static final String IMG_ROT2_FULL = "analises_acidentes.img_rot2"; + public static final int IMG_ROT2_INDEX = 68; + public static final String IMG_CAB1 = "img_cab1"; + public static final String IMG_CAB1_FULL = "analises_acidentes.img_cab1"; + public static final int IMG_CAB1_INDEX = 69; + public static final String IMG_CAB4 = "img_cab4"; + public static final String IMG_CAB4_FULL = "analises_acidentes.img_cab4"; + public static final int IMG_CAB4_INDEX = 70; + public static final String IMG_MA1 = "img_ma1"; + public static final String IMG_MA1_FULL = "analises_acidentes.img_ma1"; + public static final int IMG_MA1_INDEX = 71; + public static final String IMG_MA4 = "img_ma4"; + public static final String IMG_MA4_FULL = "analises_acidentes.img_ma4"; + public static final int IMG_MA4_INDEX = 72; + public static final String IMG_MA7 = "img_ma7"; + public static final String IMG_MA7_FULL = "analises_acidentes.img_ma7"; + public static final int IMG_MA7_INDEX = 73; + public static final String IMG_MA9 = "img_ma9"; + public static final String IMG_MA9_FULL = "analises_acidentes.img_ma9"; + public static final int IMG_MA9_INDEX = 74; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "analises_acidentes.empresa_id"; + public static final int EMPRESA_ID_INDEX = 75; + public static final String MEDICO_ID = "medico_id"; + public static final String MEDICO_ID_FULL = "analises_acidentes.medico_id"; + public static final int MEDICO_ID_INDEX = 76; + public static final String TECNICO_SAUDE_ID = "tecnico_saude_id"; + public static final String TECNICO_SAUDE_ID_FULL = "analises_acidentes.tecnico_saude_id"; + public static final int TECNICO_SAUDE_ID_INDEX = 77; + public static final String ANALISE_NR = "analise_nr"; + public static final String ANALISE_NR_FULL = "analises_acidentes.analise_nr"; + public static final int ANALISE_NR_INDEX = 78; + public static final String ESTADO_ASSINATURA = "estado_assinatura"; + public static final String ESTADO_ASSINATURA_FULL = "analises_acidentes.estado_assinatura"; + public static final int ESTADO_ASSINATURA_INDEX = 79; + public static final String ASS_RESP_SEG = "ass_resp_seg"; + public static final String ASS_RESP_SEG_FULL = "analises_acidentes.ass_resp_seg"; + public static final int ASS_RESP_SEG_INDEX = 80; + public static final String ASS_RESP_RH = "ass_resp_rh"; + public static final String ASS_RESP_RH_FULL = "analises_acidentes.ass_resp_rh"; + public static final int ASS_RESP_RH_INDEX = 81; + public static final String DATA_CONSOLIDACAO = "data_consolidacao"; + public static final String DATA_CONSOLIDACAO_FULL = "analises_acidentes.data_consolidacao"; + public static final int DATA_CONSOLIDACAO_INDEX = 82; + public static final String DATA_ASSINATURA_SEG = "data_assinatura_seg"; + public static final String DATA_ASSINATURA_SEG_FULL = "analises_acidentes.data_assinatura_seg"; + public static final int DATA_ASSINATURA_SEG_INDEX = 83; + public static final String DATA_ASSINATURA_RH = "data_assinatura_rh"; + public static final String DATA_ASSINATURA_RH_FULL = "analises_acidentes.data_assinatura_rh"; + public static final int DATA_ASSINATURA_RH_INDEX = 84; + public static final String ASS_CONSOLIDACAO = "ass_consolidacao"; + public static final String ASS_CONSOLIDACAO_FULL = "analises_acidentes.ass_consolidacao"; + public static final int ASS_CONSOLIDACAO_INDEX = 85; + public static final String NOME_RESP_SEG = "nome_resp_seg"; + public static final String NOME_RESP_SEG_FULL = "analises_acidentes.nome_resp_seg"; + public static final int NOME_RESP_SEG_INDEX = 86; + public static final String NOME_RESP_RH = "nome_resp_rh"; + public static final String NOME_RESP_RH_FULL = "analises_acidentes.nome_resp_rh"; + public static final int NOME_RESP_RH_INDEX = 87; + public static final String CAUSAS = "causas"; + public static final String CAUSAS_FULL = "analises_acidentes.causas"; + public static final int CAUSAS_INDEX = 88; + public static final String ESTADO_ANTES_CORRECAO = "estado_antes_correcao"; + public static final String ESTADO_ANTES_CORRECAO_FULL = "analises_acidentes.estado_antes_correcao"; + public static final int ESTADO_ANTES_CORRECAO_INDEX = 89; + public static final String OBSERVACOES_CORRECAO = "observacoes_correcao"; + public static final String OBSERVACOES_CORRECAO_FULL = "analises_acidentes.observacoes_correcao"; + public static final int OBSERVACOES_CORRECAO_INDEX = 90; + public static final String CORRECAO = "correcao"; + public static final String CORRECAO_FULL = "analises_acidentes.correcao"; + public static final int CORRECAO_INDEX = 91; + public static final String ASS_SUPERIOR = "ass_superior"; + public static final String ASS_SUPERIOR_FULL = "analises_acidentes.ass_superior"; + public static final int ASS_SUPERIOR_INDEX = 92; + public static final String NOME_SUPERIOR = "nome_superior"; + public static final String NOME_SUPERIOR_FULL = "analises_acidentes.nome_superior"; + public static final int NOME_SUPERIOR_INDEX = 93; + public static final String DATA_ASSINATURA_SUPERIOR = "data_assinatura_superior"; + public static final String DATA_ASSINATURA_SUPERIOR_FULL = "analises_acidentes.data_assinatura_superior"; + public static final int DATA_ASSINATURA_SUPERIOR_INDEX = 94; + public static final String AVERIGUADOR = "averiguador"; + public static final String AVERIGUADOR_FULL = "analises_acidentes.averiguador"; + public static final int AVERIGUADOR_INDEX = 95; + public static final String AVERIGUACAO_POSTERIOR = "averiguacao_posterior"; + public static final String AVERIGUACAO_POSTERIOR_FULL = "analises_acidentes.averiguacao_posterior"; + public static final int AVERIGUACAO_POSTERIOR_INDEX = 96; + public static final String AVERIGUACAO_OBS = "averiguacao_obs"; + public static final String AVERIGUACAO_OBS_FULL = "analises_acidentes.averiguacao_obs"; + public static final int AVERIGUACAO_OBS_INDEX = 97; + public static final String NOME_RESP_CONSOLIDACAO = "nome_resp_consolidacao"; + public static final String NOME_RESP_CONSOLIDACAO_FULL = "analises_acidentes.nome_resp_consolidacao"; + public static final int NOME_RESP_CONSOLIDACAO_INDEX = 98; + public static final String DATA_INICIO_PROCESSO = "data_inicio_processo"; + public static final String DATA_INICIO_PROCESSO_FULL = "analises_acidentes.data_inicio_processo"; + public static final int DATA_INICIO_PROCESSO_INDEX = 99; + public static final String DEPARTAMENTO_ID = "departamento_id"; + public static final String DEPARTAMENTO_ID_FULL = "analises_acidentes.departamento_id"; + public static final int DEPARTAMENTO_ID_INDEX = 100; + public static final String TO_DEPARTAMENTO_ID = "to_departamento_id"; + public static final String TO_DEPARTAMENTO_ID_FULL = "analises_acidentes.to_departamento_id"; + public static final int TO_DEPARTAMENTO_ID_INDEX = 101; + public static final String SECCAO_ID = "seccao_id"; + public static final String SECCAO_ID_FULL = "analises_acidentes.seccao_id"; + public static final int SECCAO_ID_INDEX = 102; + public static final String TO_SECCAO_ID = "to_seccao_id"; + public static final String TO_SECCAO_ID_FULL = "analises_acidentes.to_seccao_id"; + public static final int TO_SECCAO_ID_INDEX = 103; + public static final String RH_FASE4 = "rh_fase4"; + public static final String RH_FASE4_FULL = "analises_acidentes.rh_fase4"; + public static final int RH_FASE4_INDEX = 104; + public static final String APAGADA = "apagada"; + public static final String APAGADA_FULL = "analises_acidentes.apagada"; + public static final int APAGADA_INDEX = 105; + public static final String CONCLUIDO_POR_DESACTIVACAO = "concluido_por_desactivacao"; + public static final String CONCLUIDO_POR_DESACTIVACAO_FULL = "analises_acidentes.concluido_por_desactivacao"; + public static final int CONCLUIDO_POR_DESACTIVACAO_INDEX = 106; + public static final String DATA_DESACTIVACAO = "data_desactivacao"; + public static final String DATA_DESACTIVACAO_FULL = "analises_acidentes.data_desactivacao"; + public static final int DATA_DESACTIVACAO_INDEX = 107; + public static final String COMENTARIO_DESACTIVACAO = "comentario_desactivacao"; + public static final String COMENTARIO_DESACTIVACAO_FULL = "analises_acidentes.comentario_desactivacao"; + public static final int COMENTARIO_DESACTIVACAO_INDEX = 108; + + public static final String FIELD_NAMES[] = new String[]{ + DATA_ACIDENTE, ACIDENTADO_ID, TO_ACIDENTADO_ID, ESTADO, ESTABELECIMENTO_ID, + HORAS_TURNO, SECCAO, LOCAL_TRABALHO, TAREFA, SUBSTANCIAS, SUPERIOR_HIERARQUICO, + CONDICOES, TESTEMUNHAS, DESCRICAO, CONCLUSOES, ACCOES, HORA_ACIDENTE, + FORMACAO_SHST, FORMACAO_SHST_NAO_PORQUE, OUTROS_ACIDENTES_COM_COLABORADOR, + NR_ACIDENTES_COM_COLABORADOR, NR_RELATORIO_ACIDENTE_COLABORADOR1, + NR_RELATORIO_ACIDENTE_COLABORADOR2, NR_RELATORIO_ACIDENTE_COLABORADOR3, + NR_RELATORIO_ACIDENTE_COLABORADOR4, ACIDENTES_OUTROS_COLABORADORES, + NR_ACIDENTES_OUTROS_COLABORADORES, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, LESAO_CABECA, LESAO_PESCOCO, + LESAO_TRONCO, LESAO_MEMBRO_SUP_DIR, LESAO_MEMBRO_SUP_ESQ, + LESAO_MEMBRO_INF_DIR, LESAO_MEMBRO_INF_ESQ, ESPECIF1, ESPECIF2, ESPECIF3, + ESPECIF4, TIPO_INCAPACIDADE, COEF_INCAPACIDADE, DATA_AVAL_INCAPACIDADE, + DATA_REV_INCAPACIDADE, PERIODO_INCAPACIDADE_DE, PERIODO_INCAPACIDADE_A, + IMG_FLEXAO, IMG_EXT1, IMG_EXT2, IMG_CAB2, IMG_CAB3, IMG_MA2, IMG_MA3, IMG_MA5, IMG_MA6, + IMG_MA8, IMG_MA10, RESTRICAO_CARGA, RESTRICAO_MOTRICIDADE, RESTRICAO_CONDUCAO, + RESTRICAO_VIBRACOES, RESTRICAO_OUTRAS, MED_OBSERV, TIPO_LESAO, IMG_ROT1, + IMG_ROT2, IMG_CAB1, IMG_CAB4, IMG_MA1, IMG_MA4, IMG_MA7, IMG_MA9, EMPRESA_ID, + MEDICO_ID, TECNICO_SAUDE_ID, ANALISE_NR, ESTADO_ASSINATURA, ASS_RESP_SEG, + ASS_RESP_RH, DATA_CONSOLIDACAO, DATA_ASSINATURA_SEG, DATA_ASSINATURA_RH, + ASS_CONSOLIDACAO, NOME_RESP_SEG, NOME_RESP_RH, CAUSAS, ESTADO_ANTES_CORRECAO, + OBSERVACOES_CORRECAO, CORRECAO, ASS_SUPERIOR, NOME_SUPERIOR, + DATA_ASSINATURA_SUPERIOR, AVERIGUADOR, AVERIGUACAO_POSTERIOR, + AVERIGUACAO_OBS, NOME_RESP_CONSOLIDACAO, DATA_INICIO_PROCESSO, + DEPARTAMENTO_ID, TO_DEPARTAMENTO_ID, SECCAO_ID, TO_SECCAO_ID, RH_FASE4, APAGADA, + CONCLUIDO_POR_DESACTIVACAO, DATA_DESACTIVACAO, COMENTARIO_DESACTIVACAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA_ACIDENTE, TABLENAME + "." + ACIDENTADO_ID, TABLENAME + "." + TO_ACIDENTADO_ID, TABLENAME + "." + ESTADO, TABLENAME + "." + ESTABELECIMENTO_ID, + TABLENAME + "." + HORAS_TURNO, TABLENAME + "." + SECCAO, TABLENAME + "." + LOCAL_TRABALHO, TABLENAME + "." + TAREFA, TABLENAME + "." + SUBSTANCIAS, TABLENAME + "." + SUPERIOR_HIERARQUICO, + TABLENAME + "." + CONDICOES, TABLENAME + "." + TESTEMUNHAS, TABLENAME + "." + DESCRICAO, TABLENAME + "." + CONCLUSOES, TABLENAME + "." + ACCOES, TABLENAME + "." + HORA_ACIDENTE, + TABLENAME + "." + FORMACAO_SHST, TABLENAME + "." + FORMACAO_SHST_NAO_PORQUE, TABLENAME + "." + OUTROS_ACIDENTES_COM_COLABORADOR, + TABLENAME + "." + NR_ACIDENTES_COM_COLABORADOR, TABLENAME + "." + NR_RELATORIO_ACIDENTE_COLABORADOR1, + TABLENAME + "." + NR_RELATORIO_ACIDENTE_COLABORADOR2, TABLENAME + "." + NR_RELATORIO_ACIDENTE_COLABORADOR3, + TABLENAME + "." + NR_RELATORIO_ACIDENTE_COLABORADOR4, TABLENAME + "." + ACIDENTES_OUTROS_COLABORADORES, + TABLENAME + "." + NR_ACIDENTES_OUTROS_COLABORADORES, + TABLENAME + "." + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, + TABLENAME + "." + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, + TABLENAME + "." + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, + TABLENAME + "." + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, TABLENAME + "." + LESAO_CABECA, TABLENAME + "." + LESAO_PESCOCO, + TABLENAME + "." + LESAO_TRONCO, TABLENAME + "." + LESAO_MEMBRO_SUP_DIR, TABLENAME + "." + LESAO_MEMBRO_SUP_ESQ, + TABLENAME + "." + LESAO_MEMBRO_INF_DIR, TABLENAME + "." + LESAO_MEMBRO_INF_ESQ, TABLENAME + "." + ESPECIF1, TABLENAME + "." + ESPECIF2, TABLENAME + "." + ESPECIF3, + TABLENAME + "." + ESPECIF4, TABLENAME + "." + TIPO_INCAPACIDADE, TABLENAME + "." + COEF_INCAPACIDADE, TABLENAME + "." + DATA_AVAL_INCAPACIDADE, + TABLENAME + "." + DATA_REV_INCAPACIDADE, TABLENAME + "." + PERIODO_INCAPACIDADE_DE, TABLENAME + "." + PERIODO_INCAPACIDADE_A, + TABLENAME + "." + IMG_FLEXAO, TABLENAME + "." + IMG_EXT1, TABLENAME + "." + IMG_EXT2, TABLENAME + "." + IMG_CAB2, TABLENAME + "." + IMG_CAB3, TABLENAME + "." + IMG_MA2, TABLENAME + "." + IMG_MA3, TABLENAME + "." + IMG_MA5, TABLENAME + "." + IMG_MA6, + TABLENAME + "." + IMG_MA8, TABLENAME + "." + IMG_MA10, TABLENAME + "." + RESTRICAO_CARGA, TABLENAME + "." + RESTRICAO_MOTRICIDADE, TABLENAME + "." + RESTRICAO_CONDUCAO, + TABLENAME + "." + RESTRICAO_VIBRACOES, TABLENAME + "." + RESTRICAO_OUTRAS, TABLENAME + "." + MED_OBSERV, TABLENAME + "." + TIPO_LESAO, TABLENAME + "." + IMG_ROT1, + TABLENAME + "." + IMG_ROT2, TABLENAME + "." + IMG_CAB1, TABLENAME + "." + IMG_CAB4, TABLENAME + "." + IMG_MA1, TABLENAME + "." + IMG_MA4, TABLENAME + "." + IMG_MA7, TABLENAME + "." + IMG_MA9, TABLENAME + "." + EMPRESA_ID, + TABLENAME + "." + MEDICO_ID, TABLENAME + "." + TECNICO_SAUDE_ID, TABLENAME + "." + ANALISE_NR, TABLENAME + "." + ESTADO_ASSINATURA, TABLENAME + "." + ASS_RESP_SEG, + TABLENAME + "." + ASS_RESP_RH, TABLENAME + "." + DATA_CONSOLIDACAO, TABLENAME + "." + DATA_ASSINATURA_SEG, TABLENAME + "." + DATA_ASSINATURA_RH, + TABLENAME + "." + ASS_CONSOLIDACAO, TABLENAME + "." + NOME_RESP_SEG, TABLENAME + "." + NOME_RESP_RH, TABLENAME + "." + CAUSAS, TABLENAME + "." + ESTADO_ANTES_CORRECAO, + TABLENAME + "." + OBSERVACOES_CORRECAO, TABLENAME + "." + CORRECAO, TABLENAME + "." + ASS_SUPERIOR, TABLENAME + "." + NOME_SUPERIOR, + TABLENAME + "." + DATA_ASSINATURA_SUPERIOR, TABLENAME + "." + AVERIGUADOR, TABLENAME + "." + AVERIGUACAO_POSTERIOR, + TABLENAME + "." + AVERIGUACAO_OBS, TABLENAME + "." + NOME_RESP_CONSOLIDACAO, TABLENAME + "." + DATA_INICIO_PROCESSO, + TABLENAME + "." + DEPARTAMENTO_ID, TABLENAME + "." + TO_DEPARTAMENTO_ID, TABLENAME + "." + SECCAO_ID, TABLENAME + "." + TO_SECCAO_ID, TABLENAME + "." + RH_FASE4, TABLENAME + "." + APAGADA, + TABLENAME + "." + CONCLUIDO_POR_DESACTIVACAO, TABLENAME + "." + DATA_DESACTIVACAO, TABLENAME + "." + COMENTARIO_DESACTIVACAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA_ACIDENTE, ACIDENTADO_ID, ESTADO, ESTABELECIMENTO_ID, HORAS_TURNO, SECCAO, + LOCAL_TRABALHO, TAREFA, SUBSTANCIAS, SUPERIOR_HIERARQUICO, CONDICOES, + TESTEMUNHAS, DESCRICAO, CONCLUSOES, ACCOES, HORA_ACIDENTE, FORMACAO_SHST, + FORMACAO_SHST_NAO_PORQUE, OUTROS_ACIDENTES_COM_COLABORADOR, + NR_ACIDENTES_COM_COLABORADOR, NR_RELATORIO_ACIDENTE_COLABORADOR1, + NR_RELATORIO_ACIDENTE_COLABORADOR2, NR_RELATORIO_ACIDENTE_COLABORADOR3, + NR_RELATORIO_ACIDENTE_COLABORADOR4, ACIDENTES_OUTROS_COLABORADORES, + NR_ACIDENTES_OUTROS_COLABORADORES, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, LESAO_CABECA, LESAO_PESCOCO, + LESAO_TRONCO, LESAO_MEMBRO_SUP_DIR, LESAO_MEMBRO_SUP_ESQ, + LESAO_MEMBRO_INF_DIR, LESAO_MEMBRO_INF_ESQ, ESPECIF1, ESPECIF2, ESPECIF3, + ESPECIF4, TIPO_INCAPACIDADE, COEF_INCAPACIDADE, DATA_AVAL_INCAPACIDADE, + DATA_REV_INCAPACIDADE, PERIODO_INCAPACIDADE_DE, PERIODO_INCAPACIDADE_A, + IMG_FLEXAO, IMG_EXT1, IMG_EXT2, IMG_CAB2, IMG_CAB3, IMG_MA2, IMG_MA3, IMG_MA5, IMG_MA6, + IMG_MA8, IMG_MA10, RESTRICAO_CARGA, RESTRICAO_MOTRICIDADE, RESTRICAO_CONDUCAO, + RESTRICAO_VIBRACOES, RESTRICAO_OUTRAS, MED_OBSERV, TIPO_LESAO, IMG_ROT1, + IMG_ROT2, IMG_CAB1, IMG_CAB4, IMG_MA1, IMG_MA4, IMG_MA7, IMG_MA9, EMPRESA_ID, + MEDICO_ID, TECNICO_SAUDE_ID, ANALISE_NR, ESTADO_ASSINATURA, ASS_RESP_SEG, + ASS_RESP_RH, DATA_CONSOLIDACAO, DATA_ASSINATURA_SEG, DATA_ASSINATURA_RH, + ASS_CONSOLIDACAO, NOME_RESP_SEG, NOME_RESP_RH, CAUSAS, ESTADO_ANTES_CORRECAO, + OBSERVACOES_CORRECAO, CORRECAO, ASS_SUPERIOR, NOME_SUPERIOR, + DATA_ASSINATURA_SUPERIOR, AVERIGUADOR, AVERIGUACAO_POSTERIOR, + AVERIGUACAO_OBS, NOME_RESP_CONSOLIDACAO, DATA_INICIO_PROCESSO, + DEPARTAMENTO_ID, SECCAO_ID, RH_FASE4, APAGADA, CONCLUIDO_POR_DESACTIVACAO, + DATA_DESACTIVACAO, COMENTARIO_DESACTIVACAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA_ACIDENTE, ACIDENTADO_ID, ESTADO, ESTABELECIMENTO_ID, HORAS_TURNO, SECCAO, + LOCAL_TRABALHO, TAREFA, SUBSTANCIAS, SUPERIOR_HIERARQUICO, CONDICOES, + TESTEMUNHAS, DESCRICAO, CONCLUSOES, ACCOES, HORA_ACIDENTE, FORMACAO_SHST, + FORMACAO_SHST_NAO_PORQUE, OUTROS_ACIDENTES_COM_COLABORADOR, + NR_ACIDENTES_COM_COLABORADOR, NR_RELATORIO_ACIDENTE_COLABORADOR1, + NR_RELATORIO_ACIDENTE_COLABORADOR2, NR_RELATORIO_ACIDENTE_COLABORADOR3, + NR_RELATORIO_ACIDENTE_COLABORADOR4, ACIDENTES_OUTROS_COLABORADORES, + NR_ACIDENTES_OUTROS_COLABORADORES, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, LESAO_CABECA, LESAO_PESCOCO, + LESAO_TRONCO, LESAO_MEMBRO_SUP_DIR, LESAO_MEMBRO_SUP_ESQ, + LESAO_MEMBRO_INF_DIR, LESAO_MEMBRO_INF_ESQ, ESPECIF1, ESPECIF2, ESPECIF3, + ESPECIF4, TIPO_INCAPACIDADE, COEF_INCAPACIDADE, DATA_AVAL_INCAPACIDADE, + DATA_REV_INCAPACIDADE, PERIODO_INCAPACIDADE_DE, PERIODO_INCAPACIDADE_A, + IMG_FLEXAO, IMG_EXT1, IMG_EXT2, IMG_CAB2, IMG_CAB3, IMG_MA2, IMG_MA3, IMG_MA5, IMG_MA6, + IMG_MA8, IMG_MA10, RESTRICAO_CARGA, RESTRICAO_MOTRICIDADE, RESTRICAO_CONDUCAO, + RESTRICAO_VIBRACOES, RESTRICAO_OUTRAS, MED_OBSERV, TIPO_LESAO, IMG_ROT1, + IMG_ROT2, IMG_CAB1, IMG_CAB4, IMG_MA1, IMG_MA4, IMG_MA7, IMG_MA9, EMPRESA_ID, + MEDICO_ID, TECNICO_SAUDE_ID, ANALISE_NR, ESTADO_ASSINATURA, ASS_RESP_SEG, + ASS_RESP_RH, DATA_CONSOLIDACAO, DATA_ASSINATURA_SEG, DATA_ASSINATURA_RH, + ASS_CONSOLIDACAO, NOME_RESP_SEG, NOME_RESP_RH, CAUSAS, ESTADO_ANTES_CORRECAO, + OBSERVACOES_CORRECAO, CORRECAO, ASS_SUPERIOR, NOME_SUPERIOR, + DATA_ASSINATURA_SUPERIOR, AVERIGUADOR, AVERIGUACAO_POSTERIOR, + AVERIGUACAO_OBS, NOME_RESP_CONSOLIDACAO, DATA_INICIO_PROCESSO, + DEPARTAMENTO_ID, SECCAO_ID, RH_FASE4, APAGADA, CONCLUIDO_POR_DESACTIVACAO, + DATA_DESACTIVACAO, COMENTARIO_DESACTIVACAO, }; + + private Integer id; + private java.util.Date data_acidente; + private Integer acidentado_id; + private db.data.siprp.outer.AcidentadosData to_acidentado_id; + private Integer estado; + private Integer estabelecimento_id; + private Integer horas_turno; + private String seccao; + private String local_trabalho; + private String tarefa; + private String substancias; + private String superior_hierarquico; + private String condicoes; + private String testemunhas; + private String descricao; + private String conclusoes; + private String accoes; + private java.sql.Time hora_acidente; + private String formacao_shst; + private String formacao_shst_nao_porque; + private String outros_acidentes_com_colaborador; + private Integer nr_acidentes_com_colaborador; + private Integer nr_relatorio_acidente_colaborador1; + private Integer nr_relatorio_acidente_colaborador2; + private Integer nr_relatorio_acidente_colaborador3; + private Integer nr_relatorio_acidente_colaborador4; + private String acidentes_outros_colaboradores; + private Integer nr_acidentes_outros_colaboradores; + private Integer nr_relatorio_acidente_outros_colaboradores1; + private Integer nr_relatorio_acidente_outros_colaboradores2; + private Integer nr_relatorio_acidente_outros_colaboradores3; + private Integer nr_relatorio_acidente_outros_colaboradores4; + private String lesao_cabeca; + private String lesao_pescoco; + private String lesao_tronco; + private String lesao_membro_sup_dir; + private String lesao_membro_sup_esq; + private String lesao_membro_inf_dir; + private String lesao_membro_inf_esq; + private String especif1; + private String especif2; + private String especif3; + private String especif4; + private String tipo_incapacidade; + private Integer coef_incapacidade; + private java.util.Date data_aval_incapacidade; + private java.util.Date data_rev_incapacidade; + private java.util.Date periodo_incapacidade_de; + private java.util.Date periodo_incapacidade_a; + private String img_flexao; + private String img_ext1; + private String img_ext2; + private String img_cab2; + private String img_cab3; + private String img_ma2; + private String img_ma3; + private String img_ma5; + private String img_ma6; + private String img_ma8; + private String img_ma10; + private Integer restricao_carga; + private String restricao_motricidade; + private String restricao_conducao; + private String restricao_vibracoes; + private String restricao_outras; + private String med_observ; + private String tipo_lesao; + private String img_rot1; + private String img_rot2; + private String img_cab1; + private String img_cab4; + private String img_ma1; + private String img_ma4; + private String img_ma7; + private String img_ma9; + private Integer empresa_id; + private Integer medico_id; + private Integer tecnico_saude_id; + private String analise_nr; + private Integer estado_assinatura; + private String ass_resp_seg; + private String ass_resp_rh; + private java.util.Date data_consolidacao; + private java.util.Date data_assinatura_seg; + private java.util.Date data_assinatura_rh; + private String ass_consolidacao; + private String nome_resp_seg; + private String nome_resp_rh; + private Integer causas; + private Integer estado_antes_correcao; + private String observacoes_correcao; + private String correcao; + private String ass_superior; + private String nome_superior; + private java.util.Date data_assinatura_superior; + private String averiguador; + private String averiguacao_posterior; + private String averiguacao_obs; + private String nome_resp_consolidacao; + private java.util.Date data_inicio_processo; + private Integer departamento_id; + private db.data.siprp.outer.DepartamentosData to_departamento_id; + private Integer seccao_id; + private db.data.siprp.outer.SeccoesData to_seccao_id; + private Integer rh_fase4; + private String apagada; + private Boolean concluido_por_desactivacao; + private java.util.Date data_desactivacao; + private String comentario_desactivacao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public AnalisesAcidentes() + { + 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, 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, 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.ListfromMedidas_analise_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.MedidasData.class , getPrimaryKey().getMap().get("id"), "analise_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromRecomendacoes_analise_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.RecomendacoesData.class , getPrimaryKey().getMap().get("id"), "analise_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.Date getData_acidente() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ACIDENTE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_acidente; + } + + public void setData_acidente( java.util.Date data_acidente ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ACIDENTE, data_acidente ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_acidente = data_acidente; + LAZY_LOADED_OBJECTS.put( DATA_ACIDENTE, Boolean.TRUE ); + } + + public Integer getAcidentado_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACIDENTADO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.acidentado_id; + } + + public void setAcidentado_id( Integer acidentado_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACIDENTADO_ID, acidentado_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.acidentado_id = acidentado_id; + LAZY_LOADED_OBJECTS.put( ACIDENTADO_ID, Boolean.TRUE ); + } + + public db.data.siprp.outer.AcidentadosData toAcidentado_id() + { + try + { + prepare( TO_ACIDENTADO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_acidentado_id; + } + + public void setToAcidentado_id( db.data.siprp.outer.AcidentadosData to_acidentado_id ) + { + try + { + preProcess( TO_ACIDENTADO_ID, to_acidentado_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_acidentado_id = to_acidentado_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 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 Integer getHoras_turno() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HORAS_TURNO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.horas_turno; + } + + public void setHoras_turno( Integer horas_turno ) + { + try + { + setLockedForRefresh( true ); + preProcess( HORAS_TURNO, horas_turno ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.horas_turno = horas_turno; + LAZY_LOADED_OBJECTS.put( HORAS_TURNO, Boolean.TRUE ); + } + + public String getSeccao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SECCAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.seccao; + } + + public void setSeccao( String seccao ) + { + try + { + setLockedForRefresh( true ); + preProcess( SECCAO, seccao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.seccao = seccao; + LAZY_LOADED_OBJECTS.put( SECCAO, 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 getTarefa() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TAREFA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tarefa; + } + + public void setTarefa( String tarefa ) + { + try + { + setLockedForRefresh( true ); + preProcess( TAREFA, tarefa ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tarefa = tarefa; + LAZY_LOADED_OBJECTS.put( TAREFA, Boolean.TRUE ); + } + + public String getSubstancias() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SUBSTANCIAS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.substancias; + } + + public void setSubstancias( String substancias ) + { + try + { + setLockedForRefresh( true ); + preProcess( SUBSTANCIAS, substancias ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.substancias = substancias; + LAZY_LOADED_OBJECTS.put( SUBSTANCIAS, Boolean.TRUE ); + } + + public String getSuperior_hierarquico() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SUPERIOR_HIERARQUICO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.superior_hierarquico; + } + + public void setSuperior_hierarquico( String superior_hierarquico ) + { + try + { + setLockedForRefresh( true ); + preProcess( SUPERIOR_HIERARQUICO, superior_hierarquico ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.superior_hierarquico = superior_hierarquico; + LAZY_LOADED_OBJECTS.put( SUPERIOR_HIERARQUICO, Boolean.TRUE ); + } + + public String getCondicoes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONDICOES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.condicoes; + } + + public void setCondicoes( String condicoes ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONDICOES, condicoes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.condicoes = condicoes; + LAZY_LOADED_OBJECTS.put( CONDICOES, Boolean.TRUE ); + } + + public String getTestemunhas() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TESTEMUNHAS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.testemunhas; + } + + public void setTestemunhas( String testemunhas ) + { + try + { + setLockedForRefresh( true ); + preProcess( TESTEMUNHAS, testemunhas ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.testemunhas = testemunhas; + LAZY_LOADED_OBJECTS.put( TESTEMUNHAS, 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 getConclusoes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONCLUSOES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.conclusoes; + } + + public void setConclusoes( String conclusoes ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONCLUSOES, conclusoes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.conclusoes = conclusoes; + LAZY_LOADED_OBJECTS.put( CONCLUSOES, Boolean.TRUE ); + } + + public String getAccoes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACCOES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.accoes; + } + + public void setAccoes( String accoes ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACCOES, accoes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.accoes = accoes; + LAZY_LOADED_OBJECTS.put( ACCOES, Boolean.TRUE ); + } + + public java.sql.Time getHora_acidente() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HORA_ACIDENTE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.hora_acidente; + } + + public void setHora_acidente( java.sql.Time hora_acidente ) + { + try + { + setLockedForRefresh( true ); + preProcess( HORA_ACIDENTE, hora_acidente ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.hora_acidente = hora_acidente; + LAZY_LOADED_OBJECTS.put( HORA_ACIDENTE, Boolean.TRUE ); + } + + public String getFormacao_shst() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMACAO_SHST ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formacao_shst; + } + + public void setFormacao_shst( String formacao_shst ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMACAO_SHST, formacao_shst ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formacao_shst = formacao_shst; + LAZY_LOADED_OBJECTS.put( FORMACAO_SHST, Boolean.TRUE ); + } + + public String getFormacao_shst_nao_porque() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMACAO_SHST_NAO_PORQUE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formacao_shst_nao_porque; + } + + public void setFormacao_shst_nao_porque( String formacao_shst_nao_porque ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMACAO_SHST_NAO_PORQUE, formacao_shst_nao_porque ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formacao_shst_nao_porque = formacao_shst_nao_porque; + LAZY_LOADED_OBJECTS.put( FORMACAO_SHST_NAO_PORQUE, Boolean.TRUE ); + } + + public String getOutros_acidentes_com_colaborador() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OUTROS_ACIDENTES_COM_COLABORADOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.outros_acidentes_com_colaborador; + } + + public void setOutros_acidentes_com_colaborador( String outros_acidentes_com_colaborador ) + { + try + { + setLockedForRefresh( true ); + preProcess( OUTROS_ACIDENTES_COM_COLABORADOR, outros_acidentes_com_colaborador ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.outros_acidentes_com_colaborador = outros_acidentes_com_colaborador; + LAZY_LOADED_OBJECTS.put( OUTROS_ACIDENTES_COM_COLABORADOR, Boolean.TRUE ); + } + + public Integer getNr_acidentes_com_colaborador() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_ACIDENTES_COM_COLABORADOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_acidentes_com_colaborador; + } + + public void setNr_acidentes_com_colaborador( Integer nr_acidentes_com_colaborador ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_ACIDENTES_COM_COLABORADOR, nr_acidentes_com_colaborador ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_acidentes_com_colaborador = nr_acidentes_com_colaborador; + LAZY_LOADED_OBJECTS.put( NR_ACIDENTES_COM_COLABORADOR, Boolean.TRUE ); + } + + public Integer getNr_relatorio_acidente_colaborador1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_RELATORIO_ACIDENTE_COLABORADOR1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_relatorio_acidente_colaborador1; + } + + public void setNr_relatorio_acidente_colaborador1( Integer nr_relatorio_acidente_colaborador1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_RELATORIO_ACIDENTE_COLABORADOR1, nr_relatorio_acidente_colaborador1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_relatorio_acidente_colaborador1 = nr_relatorio_acidente_colaborador1; + LAZY_LOADED_OBJECTS.put( NR_RELATORIO_ACIDENTE_COLABORADOR1, Boolean.TRUE ); + } + + public Integer getNr_relatorio_acidente_colaborador2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_RELATORIO_ACIDENTE_COLABORADOR2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_relatorio_acidente_colaborador2; + } + + public void setNr_relatorio_acidente_colaborador2( Integer nr_relatorio_acidente_colaborador2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_RELATORIO_ACIDENTE_COLABORADOR2, nr_relatorio_acidente_colaborador2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_relatorio_acidente_colaborador2 = nr_relatorio_acidente_colaborador2; + LAZY_LOADED_OBJECTS.put( NR_RELATORIO_ACIDENTE_COLABORADOR2, Boolean.TRUE ); + } + + public Integer getNr_relatorio_acidente_colaborador3() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_RELATORIO_ACIDENTE_COLABORADOR3 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_relatorio_acidente_colaborador3; + } + + public void setNr_relatorio_acidente_colaborador3( Integer nr_relatorio_acidente_colaborador3 ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_RELATORIO_ACIDENTE_COLABORADOR3, nr_relatorio_acidente_colaborador3 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_relatorio_acidente_colaborador3 = nr_relatorio_acidente_colaborador3; + LAZY_LOADED_OBJECTS.put( NR_RELATORIO_ACIDENTE_COLABORADOR3, Boolean.TRUE ); + } + + public Integer getNr_relatorio_acidente_colaborador4() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_RELATORIO_ACIDENTE_COLABORADOR4 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_relatorio_acidente_colaborador4; + } + + public void setNr_relatorio_acidente_colaborador4( Integer nr_relatorio_acidente_colaborador4 ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_RELATORIO_ACIDENTE_COLABORADOR4, nr_relatorio_acidente_colaborador4 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_relatorio_acidente_colaborador4 = nr_relatorio_acidente_colaborador4; + LAZY_LOADED_OBJECTS.put( NR_RELATORIO_ACIDENTE_COLABORADOR4, Boolean.TRUE ); + } + + public String getAcidentes_outros_colaboradores() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACIDENTES_OUTROS_COLABORADORES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.acidentes_outros_colaboradores; + } + + public void setAcidentes_outros_colaboradores( String acidentes_outros_colaboradores ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACIDENTES_OUTROS_COLABORADORES, acidentes_outros_colaboradores ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.acidentes_outros_colaboradores = acidentes_outros_colaboradores; + LAZY_LOADED_OBJECTS.put( ACIDENTES_OUTROS_COLABORADORES, Boolean.TRUE ); + } + + public Integer getNr_acidentes_outros_colaboradores() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_ACIDENTES_OUTROS_COLABORADORES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_acidentes_outros_colaboradores; + } + + public void setNr_acidentes_outros_colaboradores( Integer nr_acidentes_outros_colaboradores ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_ACIDENTES_OUTROS_COLABORADORES, nr_acidentes_outros_colaboradores ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_acidentes_outros_colaboradores = nr_acidentes_outros_colaboradores; + LAZY_LOADED_OBJECTS.put( NR_ACIDENTES_OUTROS_COLABORADORES, Boolean.TRUE ); + } + + public Integer getNr_relatorio_acidente_outros_colaboradores1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_relatorio_acidente_outros_colaboradores1; + } + + public void setNr_relatorio_acidente_outros_colaboradores1( Integer nr_relatorio_acidente_outros_colaboradores1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, nr_relatorio_acidente_outros_colaboradores1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_relatorio_acidente_outros_colaboradores1 = nr_relatorio_acidente_outros_colaboradores1; + LAZY_LOADED_OBJECTS.put( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, Boolean.TRUE ); + } + + public Integer getNr_relatorio_acidente_outros_colaboradores2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_relatorio_acidente_outros_colaboradores2; + } + + public void setNr_relatorio_acidente_outros_colaboradores2( Integer nr_relatorio_acidente_outros_colaboradores2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, nr_relatorio_acidente_outros_colaboradores2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_relatorio_acidente_outros_colaboradores2 = nr_relatorio_acidente_outros_colaboradores2; + LAZY_LOADED_OBJECTS.put( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, Boolean.TRUE ); + } + + public Integer getNr_relatorio_acidente_outros_colaboradores3() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_relatorio_acidente_outros_colaboradores3; + } + + public void setNr_relatorio_acidente_outros_colaboradores3( Integer nr_relatorio_acidente_outros_colaboradores3 ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, nr_relatorio_acidente_outros_colaboradores3 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_relatorio_acidente_outros_colaboradores3 = nr_relatorio_acidente_outros_colaboradores3; + LAZY_LOADED_OBJECTS.put( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, Boolean.TRUE ); + } + + public Integer getNr_relatorio_acidente_outros_colaboradores4() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_relatorio_acidente_outros_colaboradores4; + } + + public void setNr_relatorio_acidente_outros_colaboradores4( Integer nr_relatorio_acidente_outros_colaboradores4 ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, nr_relatorio_acidente_outros_colaboradores4 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_relatorio_acidente_outros_colaboradores4 = nr_relatorio_acidente_outros_colaboradores4; + LAZY_LOADED_OBJECTS.put( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, Boolean.TRUE ); + } + + public String getLesao_cabeca() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LESAO_CABECA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.lesao_cabeca; + } + + public void setLesao_cabeca( String lesao_cabeca ) + { + try + { + setLockedForRefresh( true ); + preProcess( LESAO_CABECA, lesao_cabeca ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.lesao_cabeca = lesao_cabeca; + LAZY_LOADED_OBJECTS.put( LESAO_CABECA, Boolean.TRUE ); + } + + public String getLesao_pescoco() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LESAO_PESCOCO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.lesao_pescoco; + } + + public void setLesao_pescoco( String lesao_pescoco ) + { + try + { + setLockedForRefresh( true ); + preProcess( LESAO_PESCOCO, lesao_pescoco ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.lesao_pescoco = lesao_pescoco; + LAZY_LOADED_OBJECTS.put( LESAO_PESCOCO, Boolean.TRUE ); + } + + public String getLesao_tronco() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LESAO_TRONCO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.lesao_tronco; + } + + public void setLesao_tronco( String lesao_tronco ) + { + try + { + setLockedForRefresh( true ); + preProcess( LESAO_TRONCO, lesao_tronco ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.lesao_tronco = lesao_tronco; + LAZY_LOADED_OBJECTS.put( LESAO_TRONCO, Boolean.TRUE ); + } + + public String getLesao_membro_sup_dir() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LESAO_MEMBRO_SUP_DIR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.lesao_membro_sup_dir; + } + + public void setLesao_membro_sup_dir( String lesao_membro_sup_dir ) + { + try + { + setLockedForRefresh( true ); + preProcess( LESAO_MEMBRO_SUP_DIR, lesao_membro_sup_dir ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.lesao_membro_sup_dir = lesao_membro_sup_dir; + LAZY_LOADED_OBJECTS.put( LESAO_MEMBRO_SUP_DIR, Boolean.TRUE ); + } + + public String getLesao_membro_sup_esq() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LESAO_MEMBRO_SUP_ESQ ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.lesao_membro_sup_esq; + } + + public void setLesao_membro_sup_esq( String lesao_membro_sup_esq ) + { + try + { + setLockedForRefresh( true ); + preProcess( LESAO_MEMBRO_SUP_ESQ, lesao_membro_sup_esq ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.lesao_membro_sup_esq = lesao_membro_sup_esq; + LAZY_LOADED_OBJECTS.put( LESAO_MEMBRO_SUP_ESQ, Boolean.TRUE ); + } + + public String getLesao_membro_inf_dir() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LESAO_MEMBRO_INF_DIR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.lesao_membro_inf_dir; + } + + public void setLesao_membro_inf_dir( String lesao_membro_inf_dir ) + { + try + { + setLockedForRefresh( true ); + preProcess( LESAO_MEMBRO_INF_DIR, lesao_membro_inf_dir ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.lesao_membro_inf_dir = lesao_membro_inf_dir; + LAZY_LOADED_OBJECTS.put( LESAO_MEMBRO_INF_DIR, Boolean.TRUE ); + } + + public String getLesao_membro_inf_esq() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LESAO_MEMBRO_INF_ESQ ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.lesao_membro_inf_esq; + } + + public void setLesao_membro_inf_esq( String lesao_membro_inf_esq ) + { + try + { + setLockedForRefresh( true ); + preProcess( LESAO_MEMBRO_INF_ESQ, lesao_membro_inf_esq ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.lesao_membro_inf_esq = lesao_membro_inf_esq; + LAZY_LOADED_OBJECTS.put( LESAO_MEMBRO_INF_ESQ, Boolean.TRUE ); + } + + public String getEspecif1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESPECIF1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.especif1; + } + + public void setEspecif1( String especif1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESPECIF1, especif1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.especif1 = especif1; + LAZY_LOADED_OBJECTS.put( ESPECIF1, Boolean.TRUE ); + } + + public String getEspecif2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESPECIF2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.especif2; + } + + public void setEspecif2( String especif2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESPECIF2, especif2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.especif2 = especif2; + LAZY_LOADED_OBJECTS.put( ESPECIF2, Boolean.TRUE ); + } + + public String getEspecif3() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESPECIF3 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.especif3; + } + + public void setEspecif3( String especif3 ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESPECIF3, especif3 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.especif3 = especif3; + LAZY_LOADED_OBJECTS.put( ESPECIF3, Boolean.TRUE ); + } + + public String getEspecif4() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESPECIF4 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.especif4; + } + + public void setEspecif4( String especif4 ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESPECIF4, especif4 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.especif4 = especif4; + LAZY_LOADED_OBJECTS.put( ESPECIF4, Boolean.TRUE ); + } + + public String getTipo_incapacidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TIPO_INCAPACIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tipo_incapacidade; + } + + public void setTipo_incapacidade( String tipo_incapacidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( TIPO_INCAPACIDADE, tipo_incapacidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tipo_incapacidade = tipo_incapacidade; + LAZY_LOADED_OBJECTS.put( TIPO_INCAPACIDADE, Boolean.TRUE ); + } + + public Integer getCoef_incapacidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( COEF_INCAPACIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.coef_incapacidade; + } + + public void setCoef_incapacidade( Integer coef_incapacidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( COEF_INCAPACIDADE, coef_incapacidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.coef_incapacidade = coef_incapacidade; + LAZY_LOADED_OBJECTS.put( COEF_INCAPACIDADE, Boolean.TRUE ); + } + + public java.util.Date getData_aval_incapacidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_AVAL_INCAPACIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_aval_incapacidade; + } + + public void setData_aval_incapacidade( java.util.Date data_aval_incapacidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_AVAL_INCAPACIDADE, data_aval_incapacidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_aval_incapacidade = data_aval_incapacidade; + LAZY_LOADED_OBJECTS.put( DATA_AVAL_INCAPACIDADE, Boolean.TRUE ); + } + + public java.util.Date getData_rev_incapacidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_REV_INCAPACIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_rev_incapacidade; + } + + public void setData_rev_incapacidade( java.util.Date data_rev_incapacidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_REV_INCAPACIDADE, data_rev_incapacidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_rev_incapacidade = data_rev_incapacidade; + LAZY_LOADED_OBJECTS.put( DATA_REV_INCAPACIDADE, Boolean.TRUE ); + } + + public java.util.Date getPeriodo_incapacidade_de() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PERIODO_INCAPACIDADE_DE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.periodo_incapacidade_de; + } + + public void setPeriodo_incapacidade_de( java.util.Date periodo_incapacidade_de ) + { + try + { + setLockedForRefresh( true ); + preProcess( PERIODO_INCAPACIDADE_DE, periodo_incapacidade_de ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.periodo_incapacidade_de = periodo_incapacidade_de; + LAZY_LOADED_OBJECTS.put( PERIODO_INCAPACIDADE_DE, Boolean.TRUE ); + } + + public java.util.Date getPeriodo_incapacidade_a() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PERIODO_INCAPACIDADE_A ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.periodo_incapacidade_a; + } + + public void setPeriodo_incapacidade_a( java.util.Date periodo_incapacidade_a ) + { + try + { + setLockedForRefresh( true ); + preProcess( PERIODO_INCAPACIDADE_A, periodo_incapacidade_a ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.periodo_incapacidade_a = periodo_incapacidade_a; + LAZY_LOADED_OBJECTS.put( PERIODO_INCAPACIDADE_A, Boolean.TRUE ); + } + + public String getImg_flexao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_FLEXAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_flexao; + } + + public void setImg_flexao( String img_flexao ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_FLEXAO, img_flexao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_flexao = img_flexao; + LAZY_LOADED_OBJECTS.put( IMG_FLEXAO, Boolean.TRUE ); + } + + public String getImg_ext1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_EXT1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ext1; + } + + public void setImg_ext1( String img_ext1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_EXT1, img_ext1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ext1 = img_ext1; + LAZY_LOADED_OBJECTS.put( IMG_EXT1, Boolean.TRUE ); + } + + public String getImg_ext2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_EXT2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ext2; + } + + public void setImg_ext2( String img_ext2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_EXT2, img_ext2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ext2 = img_ext2; + LAZY_LOADED_OBJECTS.put( IMG_EXT2, Boolean.TRUE ); + } + + public String getImg_cab2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_CAB2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_cab2; + } + + public void setImg_cab2( String img_cab2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_CAB2, img_cab2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_cab2 = img_cab2; + LAZY_LOADED_OBJECTS.put( IMG_CAB2, Boolean.TRUE ); + } + + public String getImg_cab3() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_CAB3 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_cab3; + } + + public void setImg_cab3( String img_cab3 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_CAB3, img_cab3 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_cab3 = img_cab3; + LAZY_LOADED_OBJECTS.put( IMG_CAB3, Boolean.TRUE ); + } + + public String getImg_ma2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma2; + } + + public void setImg_ma2( String img_ma2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA2, img_ma2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma2 = img_ma2; + LAZY_LOADED_OBJECTS.put( IMG_MA2, Boolean.TRUE ); + } + + public String getImg_ma3() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA3 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma3; + } + + public void setImg_ma3( String img_ma3 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA3, img_ma3 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma3 = img_ma3; + LAZY_LOADED_OBJECTS.put( IMG_MA3, Boolean.TRUE ); + } + + public String getImg_ma5() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA5 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma5; + } + + public void setImg_ma5( String img_ma5 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA5, img_ma5 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma5 = img_ma5; + LAZY_LOADED_OBJECTS.put( IMG_MA5, Boolean.TRUE ); + } + + public String getImg_ma6() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA6 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma6; + } + + public void setImg_ma6( String img_ma6 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA6, img_ma6 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma6 = img_ma6; + LAZY_LOADED_OBJECTS.put( IMG_MA6, Boolean.TRUE ); + } + + public String getImg_ma8() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA8 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma8; + } + + public void setImg_ma8( String img_ma8 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA8, img_ma8 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma8 = img_ma8; + LAZY_LOADED_OBJECTS.put( IMG_MA8, Boolean.TRUE ); + } + + public String getImg_ma10() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA10 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma10; + } + + public void setImg_ma10( String img_ma10 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA10, img_ma10 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma10 = img_ma10; + LAZY_LOADED_OBJECTS.put( IMG_MA10, Boolean.TRUE ); + } + + public Integer getRestricao_carga() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESTRICAO_CARGA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.restricao_carga; + } + + public void setRestricao_carga( Integer restricao_carga ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESTRICAO_CARGA, restricao_carga ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.restricao_carga = restricao_carga; + LAZY_LOADED_OBJECTS.put( RESTRICAO_CARGA, Boolean.TRUE ); + } + + public String getRestricao_motricidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESTRICAO_MOTRICIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.restricao_motricidade; + } + + public void setRestricao_motricidade( String restricao_motricidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESTRICAO_MOTRICIDADE, restricao_motricidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.restricao_motricidade = restricao_motricidade; + LAZY_LOADED_OBJECTS.put( RESTRICAO_MOTRICIDADE, Boolean.TRUE ); + } + + public String getRestricao_conducao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESTRICAO_CONDUCAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.restricao_conducao; + } + + public void setRestricao_conducao( String restricao_conducao ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESTRICAO_CONDUCAO, restricao_conducao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.restricao_conducao = restricao_conducao; + LAZY_LOADED_OBJECTS.put( RESTRICAO_CONDUCAO, Boolean.TRUE ); + } + + public String getRestricao_vibracoes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESTRICAO_VIBRACOES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.restricao_vibracoes; + } + + public void setRestricao_vibracoes( String restricao_vibracoes ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESTRICAO_VIBRACOES, restricao_vibracoes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.restricao_vibracoes = restricao_vibracoes; + LAZY_LOADED_OBJECTS.put( RESTRICAO_VIBRACOES, Boolean.TRUE ); + } + + public String getRestricao_outras() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESTRICAO_OUTRAS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.restricao_outras; + } + + public void setRestricao_outras( String restricao_outras ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESTRICAO_OUTRAS, restricao_outras ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.restricao_outras = restricao_outras; + LAZY_LOADED_OBJECTS.put( RESTRICAO_OUTRAS, Boolean.TRUE ); + } + + public String getMed_observ() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MED_OBSERV ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.med_observ; + } + + public void setMed_observ( String med_observ ) + { + try + { + setLockedForRefresh( true ); + preProcess( MED_OBSERV, med_observ ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.med_observ = med_observ; + LAZY_LOADED_OBJECTS.put( MED_OBSERV, Boolean.TRUE ); + } + + public String getTipo_lesao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TIPO_LESAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tipo_lesao; + } + + public void setTipo_lesao( String tipo_lesao ) + { + try + { + setLockedForRefresh( true ); + preProcess( TIPO_LESAO, tipo_lesao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tipo_lesao = tipo_lesao; + LAZY_LOADED_OBJECTS.put( TIPO_LESAO, Boolean.TRUE ); + } + + public String getImg_rot1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_ROT1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_rot1; + } + + public void setImg_rot1( String img_rot1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_ROT1, img_rot1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_rot1 = img_rot1; + LAZY_LOADED_OBJECTS.put( IMG_ROT1, Boolean.TRUE ); + } + + public String getImg_rot2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_ROT2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_rot2; + } + + public void setImg_rot2( String img_rot2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_ROT2, img_rot2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_rot2 = img_rot2; + LAZY_LOADED_OBJECTS.put( IMG_ROT2, Boolean.TRUE ); + } + + public String getImg_cab1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_CAB1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_cab1; + } + + public void setImg_cab1( String img_cab1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_CAB1, img_cab1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_cab1 = img_cab1; + LAZY_LOADED_OBJECTS.put( IMG_CAB1, Boolean.TRUE ); + } + + public String getImg_cab4() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_CAB4 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_cab4; + } + + public void setImg_cab4( String img_cab4 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_CAB4, img_cab4 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_cab4 = img_cab4; + LAZY_LOADED_OBJECTS.put( IMG_CAB4, Boolean.TRUE ); + } + + public String getImg_ma1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma1; + } + + public void setImg_ma1( String img_ma1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA1, img_ma1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma1 = img_ma1; + LAZY_LOADED_OBJECTS.put( IMG_MA1, Boolean.TRUE ); + } + + public String getImg_ma4() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA4 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma4; + } + + public void setImg_ma4( String img_ma4 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA4, img_ma4 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma4 = img_ma4; + LAZY_LOADED_OBJECTS.put( IMG_MA4, Boolean.TRUE ); + } + + public String getImg_ma7() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA7 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma7; + } + + public void setImg_ma7( String img_ma7 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA7, img_ma7 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma7 = img_ma7; + LAZY_LOADED_OBJECTS.put( IMG_MA7, Boolean.TRUE ); + } + + public String getImg_ma9() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA9 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma9; + } + + public void setImg_ma9( String img_ma9 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA9, img_ma9 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma9 = img_ma9; + LAZY_LOADED_OBJECTS.put( IMG_MA9, 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 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 Integer getTecnico_saude_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TECNICO_SAUDE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tecnico_saude_id; + } + + public void setTecnico_saude_id( Integer tecnico_saude_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TECNICO_SAUDE_ID, tecnico_saude_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tecnico_saude_id = tecnico_saude_id; + LAZY_LOADED_OBJECTS.put( TECNICO_SAUDE_ID, Boolean.TRUE ); + } + + public String getAnalise_nr() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ANALISE_NR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.analise_nr; + } + + public void setAnalise_nr( String analise_nr ) + { + try + { + setLockedForRefresh( true ); + preProcess( ANALISE_NR, analise_nr ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.analise_nr = analise_nr; + LAZY_LOADED_OBJECTS.put( ANALISE_NR, Boolean.TRUE ); + } + + public Integer getEstado_assinatura() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTADO_ASSINATURA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estado_assinatura; + } + + public void setEstado_assinatura( Integer estado_assinatura ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTADO_ASSINATURA, estado_assinatura ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estado_assinatura = estado_assinatura; + LAZY_LOADED_OBJECTS.put( ESTADO_ASSINATURA, Boolean.TRUE ); + } + + public String getAss_resp_seg() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ASS_RESP_SEG ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ass_resp_seg; + } + + public void setAss_resp_seg( String ass_resp_seg ) + { + try + { + setLockedForRefresh( true ); + preProcess( ASS_RESP_SEG, ass_resp_seg ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ass_resp_seg = ass_resp_seg; + LAZY_LOADED_OBJECTS.put( ASS_RESP_SEG, Boolean.TRUE ); + } + + public String getAss_resp_rh() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ASS_RESP_RH ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ass_resp_rh; + } + + public void setAss_resp_rh( String ass_resp_rh ) + { + try + { + setLockedForRefresh( true ); + preProcess( ASS_RESP_RH, ass_resp_rh ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ass_resp_rh = ass_resp_rh; + LAZY_LOADED_OBJECTS.put( ASS_RESP_RH, Boolean.TRUE ); + } + + public java.util.Date getData_consolidacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_CONSOLIDACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_consolidacao; + } + + public void setData_consolidacao( java.util.Date data_consolidacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_CONSOLIDACAO, data_consolidacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_consolidacao = data_consolidacao; + LAZY_LOADED_OBJECTS.put( DATA_CONSOLIDACAO, Boolean.TRUE ); + } + + public java.util.Date getData_assinatura_seg() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ASSINATURA_SEG ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_assinatura_seg; + } + + public void setData_assinatura_seg( java.util.Date data_assinatura_seg ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ASSINATURA_SEG, data_assinatura_seg ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_assinatura_seg = data_assinatura_seg; + LAZY_LOADED_OBJECTS.put( DATA_ASSINATURA_SEG, Boolean.TRUE ); + } + + public java.util.Date getData_assinatura_rh() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ASSINATURA_RH ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_assinatura_rh; + } + + public void setData_assinatura_rh( java.util.Date data_assinatura_rh ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ASSINATURA_RH, data_assinatura_rh ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_assinatura_rh = data_assinatura_rh; + LAZY_LOADED_OBJECTS.put( DATA_ASSINATURA_RH, Boolean.TRUE ); + } + + public String getAss_consolidacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ASS_CONSOLIDACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ass_consolidacao; + } + + public void setAss_consolidacao( String ass_consolidacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( ASS_CONSOLIDACAO, ass_consolidacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ass_consolidacao = ass_consolidacao; + LAZY_LOADED_OBJECTS.put( ASS_CONSOLIDACAO, Boolean.TRUE ); + } + + public String getNome_resp_seg() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_RESP_SEG ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_resp_seg; + } + + public void setNome_resp_seg( String nome_resp_seg ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_RESP_SEG, nome_resp_seg ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_resp_seg = nome_resp_seg; + LAZY_LOADED_OBJECTS.put( NOME_RESP_SEG, Boolean.TRUE ); + } + + public String getNome_resp_rh() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_RESP_RH ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_resp_rh; + } + + public void setNome_resp_rh( String nome_resp_rh ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_RESP_RH, nome_resp_rh ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_resp_rh = nome_resp_rh; + LAZY_LOADED_OBJECTS.put( NOME_RESP_RH, Boolean.TRUE ); + } + + public Integer getCausas() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CAUSAS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.causas; + } + + public void setCausas( Integer causas ) + { + try + { + setLockedForRefresh( true ); + preProcess( CAUSAS, causas ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.causas = causas; + LAZY_LOADED_OBJECTS.put( CAUSAS, Boolean.TRUE ); + } + + public Integer getEstado_antes_correcao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTADO_ANTES_CORRECAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estado_antes_correcao; + } + + public void setEstado_antes_correcao( Integer estado_antes_correcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTADO_ANTES_CORRECAO, estado_antes_correcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estado_antes_correcao = estado_antes_correcao; + LAZY_LOADED_OBJECTS.put( ESTADO_ANTES_CORRECAO, Boolean.TRUE ); + } + + public String getObservacoes_correcao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OBSERVACOES_CORRECAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.observacoes_correcao; + } + + public void setObservacoes_correcao( String observacoes_correcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( OBSERVACOES_CORRECAO, observacoes_correcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.observacoes_correcao = observacoes_correcao; + LAZY_LOADED_OBJECTS.put( OBSERVACOES_CORRECAO, Boolean.TRUE ); + } + + public String getCorrecao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CORRECAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.correcao; + } + + public void setCorrecao( String correcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( CORRECAO, correcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.correcao = correcao; + LAZY_LOADED_OBJECTS.put( CORRECAO, Boolean.TRUE ); + } + + public String getAss_superior() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ASS_SUPERIOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ass_superior; + } + + public void setAss_superior( String ass_superior ) + { + try + { + setLockedForRefresh( true ); + preProcess( ASS_SUPERIOR, ass_superior ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ass_superior = ass_superior; + LAZY_LOADED_OBJECTS.put( ASS_SUPERIOR, Boolean.TRUE ); + } + + public String getNome_superior() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_SUPERIOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_superior; + } + + public void setNome_superior( String nome_superior ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_SUPERIOR, nome_superior ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_superior = nome_superior; + LAZY_LOADED_OBJECTS.put( NOME_SUPERIOR, Boolean.TRUE ); + } + + public java.util.Date getData_assinatura_superior() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ASSINATURA_SUPERIOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_assinatura_superior; + } + + public void setData_assinatura_superior( java.util.Date data_assinatura_superior ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ASSINATURA_SUPERIOR, data_assinatura_superior ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_assinatura_superior = data_assinatura_superior; + LAZY_LOADED_OBJECTS.put( DATA_ASSINATURA_SUPERIOR, Boolean.TRUE ); + } + + public String getAveriguador() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( AVERIGUADOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.averiguador; + } + + public void setAveriguador( String averiguador ) + { + try + { + setLockedForRefresh( true ); + preProcess( AVERIGUADOR, averiguador ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.averiguador = averiguador; + LAZY_LOADED_OBJECTS.put( AVERIGUADOR, Boolean.TRUE ); + } + + public String getAveriguacao_posterior() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( AVERIGUACAO_POSTERIOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.averiguacao_posterior; + } + + public void setAveriguacao_posterior( String averiguacao_posterior ) + { + try + { + setLockedForRefresh( true ); + preProcess( AVERIGUACAO_POSTERIOR, averiguacao_posterior ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.averiguacao_posterior = averiguacao_posterior; + LAZY_LOADED_OBJECTS.put( AVERIGUACAO_POSTERIOR, Boolean.TRUE ); + } + + public String getAveriguacao_obs() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( AVERIGUACAO_OBS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.averiguacao_obs; + } + + public void setAveriguacao_obs( String averiguacao_obs ) + { + try + { + setLockedForRefresh( true ); + preProcess( AVERIGUACAO_OBS, averiguacao_obs ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.averiguacao_obs = averiguacao_obs; + LAZY_LOADED_OBJECTS.put( AVERIGUACAO_OBS, Boolean.TRUE ); + } + + public String getNome_resp_consolidacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_RESP_CONSOLIDACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_resp_consolidacao; + } + + public void setNome_resp_consolidacao( String nome_resp_consolidacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_RESP_CONSOLIDACAO, nome_resp_consolidacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_resp_consolidacao = nome_resp_consolidacao; + LAZY_LOADED_OBJECTS.put( NOME_RESP_CONSOLIDACAO, Boolean.TRUE ); + } + + public java.util.Date getData_inicio_processo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_INICIO_PROCESSO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_inicio_processo; + } + + public void setData_inicio_processo( java.util.Date data_inicio_processo ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_INICIO_PROCESSO, data_inicio_processo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_inicio_processo = data_inicio_processo; + LAZY_LOADED_OBJECTS.put( DATA_INICIO_PROCESSO, Boolean.TRUE ); + } + + public Integer getDepartamento_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DEPARTAMENTO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.departamento_id; + } + + public void setDepartamento_id( Integer departamento_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( DEPARTAMENTO_ID, departamento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.departamento_id = departamento_id; + LAZY_LOADED_OBJECTS.put( DEPARTAMENTO_ID, Boolean.TRUE ); + } + + public db.data.siprp.outer.DepartamentosData toDepartamento_id() + { + try + { + prepare( TO_DEPARTAMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_departamento_id; + } + + public void setToDepartamento_id( db.data.siprp.outer.DepartamentosData to_departamento_id ) + { + try + { + preProcess( TO_DEPARTAMENTO_ID, to_departamento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_departamento_id = to_departamento_id; + } + + public Integer getSeccao_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SECCAO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.seccao_id; + } + + public void setSeccao_id( Integer seccao_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( SECCAO_ID, seccao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.seccao_id = seccao_id; + LAZY_LOADED_OBJECTS.put( SECCAO_ID, Boolean.TRUE ); + } + + public db.data.siprp.outer.SeccoesData toSeccao_id() + { + try + { + prepare( TO_SECCAO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_seccao_id; + } + + public void setToSeccao_id( db.data.siprp.outer.SeccoesData to_seccao_id ) + { + try + { + preProcess( TO_SECCAO_ID, to_seccao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_seccao_id = to_seccao_id; + } + + public Integer getRh_fase4() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RH_FASE4 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.rh_fase4; + } + + public void setRh_fase4( Integer rh_fase4 ) + { + try + { + setLockedForRefresh( true ); + preProcess( RH_FASE4, rh_fase4 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.rh_fase4 = rh_fase4; + LAZY_LOADED_OBJECTS.put( RH_FASE4, Boolean.TRUE ); + } + + public String getApagada() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( APAGADA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.apagada; + } + + public void setApagada( String apagada ) + { + try + { + setLockedForRefresh( true ); + preProcess( APAGADA, apagada ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.apagada = apagada; + LAZY_LOADED_OBJECTS.put( APAGADA, Boolean.TRUE ); + } + + public Boolean getConcluido_por_desactivacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONCLUIDO_POR_DESACTIVACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.concluido_por_desactivacao; + } + + public void setConcluido_por_desactivacao( Boolean concluido_por_desactivacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONCLUIDO_POR_DESACTIVACAO, concluido_por_desactivacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.concluido_por_desactivacao = concluido_por_desactivacao; + LAZY_LOADED_OBJECTS.put( CONCLUIDO_POR_DESACTIVACAO, Boolean.TRUE ); + } + + public java.util.Date getData_desactivacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_DESACTIVACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_desactivacao; + } + + public void setData_desactivacao( java.util.Date data_desactivacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_DESACTIVACAO, data_desactivacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_desactivacao = data_desactivacao; + LAZY_LOADED_OBJECTS.put( DATA_DESACTIVACAO, Boolean.TRUE ); + } + + public String getComentario_desactivacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( COMENTARIO_DESACTIVACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.comentario_desactivacao; + } + + public void setComentario_desactivacao( String comentario_desactivacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( COMENTARIO_DESACTIVACAO, comentario_desactivacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.comentario_desactivacao = comentario_desactivacao; + LAZY_LOADED_OBJECTS.put( COMENTARIO_DESACTIVACAO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AnalisesAcidentes.ID_INDEX: + value = getId(); + break; + case AnalisesAcidentes.DATA_ACIDENTE_INDEX: + value = getData_acidente(); + break; + case AnalisesAcidentes.ACIDENTADO_ID_INDEX: + value = getAcidentado_id(); + break; + case AnalisesAcidentes.TO_ACIDENTADO_ID_INDEX: + value = toAcidentado_id(); + break; + case AnalisesAcidentes.ESTADO_INDEX: + value = getEstado(); + break; + case AnalisesAcidentes.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case AnalisesAcidentes.HORAS_TURNO_INDEX: + value = getHoras_turno(); + break; + case AnalisesAcidentes.SECCAO_INDEX: + value = getSeccao(); + break; + case AnalisesAcidentes.LOCAL_TRABALHO_INDEX: + value = getLocal_trabalho(); + break; + case AnalisesAcidentes.TAREFA_INDEX: + value = getTarefa(); + break; + case AnalisesAcidentes.SUBSTANCIAS_INDEX: + value = getSubstancias(); + break; + case AnalisesAcidentes.SUPERIOR_HIERARQUICO_INDEX: + value = getSuperior_hierarquico(); + break; + case AnalisesAcidentes.CONDICOES_INDEX: + value = getCondicoes(); + break; + case AnalisesAcidentes.TESTEMUNHAS_INDEX: + value = getTestemunhas(); + break; + case AnalisesAcidentes.DESCRICAO_INDEX: + value = getDescricao(); + break; + case AnalisesAcidentes.CONCLUSOES_INDEX: + value = getConclusoes(); + break; + case AnalisesAcidentes.ACCOES_INDEX: + value = getAccoes(); + break; + case AnalisesAcidentes.HORA_ACIDENTE_INDEX: + value = getHora_acidente(); + break; + case AnalisesAcidentes.FORMACAO_SHST_INDEX: + value = getFormacao_shst(); + break; + case AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE_INDEX: + value = getFormacao_shst_nao_porque(); + break; + case AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR_INDEX: + value = getOutros_acidentes_com_colaborador(); + break; + case AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR_INDEX: + value = getNr_acidentes_com_colaborador(); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1_INDEX: + value = getNr_relatorio_acidente_colaborador1(); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2_INDEX: + value = getNr_relatorio_acidente_colaborador2(); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3_INDEX: + value = getNr_relatorio_acidente_colaborador3(); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4_INDEX: + value = getNr_relatorio_acidente_colaborador4(); + break; + case AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES_INDEX: + value = getAcidentes_outros_colaboradores(); + break; + case AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES_INDEX: + value = getNr_acidentes_outros_colaboradores(); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_INDEX: + value = getNr_relatorio_acidente_outros_colaboradores1(); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_INDEX: + value = getNr_relatorio_acidente_outros_colaboradores2(); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_INDEX: + value = getNr_relatorio_acidente_outros_colaboradores3(); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_INDEX: + value = getNr_relatorio_acidente_outros_colaboradores4(); + break; + case AnalisesAcidentes.LESAO_CABECA_INDEX: + value = getLesao_cabeca(); + break; + case AnalisesAcidentes.LESAO_PESCOCO_INDEX: + value = getLesao_pescoco(); + break; + case AnalisesAcidentes.LESAO_TRONCO_INDEX: + value = getLesao_tronco(); + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR_INDEX: + value = getLesao_membro_sup_dir(); + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ_INDEX: + value = getLesao_membro_sup_esq(); + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_DIR_INDEX: + value = getLesao_membro_inf_dir(); + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ_INDEX: + value = getLesao_membro_inf_esq(); + break; + case AnalisesAcidentes.ESPECIF1_INDEX: + value = getEspecif1(); + break; + case AnalisesAcidentes.ESPECIF2_INDEX: + value = getEspecif2(); + break; + case AnalisesAcidentes.ESPECIF3_INDEX: + value = getEspecif3(); + break; + case AnalisesAcidentes.ESPECIF4_INDEX: + value = getEspecif4(); + break; + case AnalisesAcidentes.TIPO_INCAPACIDADE_INDEX: + value = getTipo_incapacidade(); + break; + case AnalisesAcidentes.COEF_INCAPACIDADE_INDEX: + value = getCoef_incapacidade(); + break; + case AnalisesAcidentes.DATA_AVAL_INCAPACIDADE_INDEX: + value = getData_aval_incapacidade(); + break; + case AnalisesAcidentes.DATA_REV_INCAPACIDADE_INDEX: + value = getData_rev_incapacidade(); + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_DE_INDEX: + value = getPeriodo_incapacidade_de(); + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_A_INDEX: + value = getPeriodo_incapacidade_a(); + break; + case AnalisesAcidentes.IMG_FLEXAO_INDEX: + value = getImg_flexao(); + break; + case AnalisesAcidentes.IMG_EXT1_INDEX: + value = getImg_ext1(); + break; + case AnalisesAcidentes.IMG_EXT2_INDEX: + value = getImg_ext2(); + break; + case AnalisesAcidentes.IMG_CAB2_INDEX: + value = getImg_cab2(); + break; + case AnalisesAcidentes.IMG_CAB3_INDEX: + value = getImg_cab3(); + break; + case AnalisesAcidentes.IMG_MA2_INDEX: + value = getImg_ma2(); + break; + case AnalisesAcidentes.IMG_MA3_INDEX: + value = getImg_ma3(); + break; + case AnalisesAcidentes.IMG_MA5_INDEX: + value = getImg_ma5(); + break; + case AnalisesAcidentes.IMG_MA6_INDEX: + value = getImg_ma6(); + break; + case AnalisesAcidentes.IMG_MA8_INDEX: + value = getImg_ma8(); + break; + case AnalisesAcidentes.IMG_MA10_INDEX: + value = getImg_ma10(); + break; + case AnalisesAcidentes.RESTRICAO_CARGA_INDEX: + value = getRestricao_carga(); + break; + case AnalisesAcidentes.RESTRICAO_MOTRICIDADE_INDEX: + value = getRestricao_motricidade(); + break; + case AnalisesAcidentes.RESTRICAO_CONDUCAO_INDEX: + value = getRestricao_conducao(); + break; + case AnalisesAcidentes.RESTRICAO_VIBRACOES_INDEX: + value = getRestricao_vibracoes(); + break; + case AnalisesAcidentes.RESTRICAO_OUTRAS_INDEX: + value = getRestricao_outras(); + break; + case AnalisesAcidentes.MED_OBSERV_INDEX: + value = getMed_observ(); + break; + case AnalisesAcidentes.TIPO_LESAO_INDEX: + value = getTipo_lesao(); + break; + case AnalisesAcidentes.IMG_ROT1_INDEX: + value = getImg_rot1(); + break; + case AnalisesAcidentes.IMG_ROT2_INDEX: + value = getImg_rot2(); + break; + case AnalisesAcidentes.IMG_CAB1_INDEX: + value = getImg_cab1(); + break; + case AnalisesAcidentes.IMG_CAB4_INDEX: + value = getImg_cab4(); + break; + case AnalisesAcidentes.IMG_MA1_INDEX: + value = getImg_ma1(); + break; + case AnalisesAcidentes.IMG_MA4_INDEX: + value = getImg_ma4(); + break; + case AnalisesAcidentes.IMG_MA7_INDEX: + value = getImg_ma7(); + break; + case AnalisesAcidentes.IMG_MA9_INDEX: + value = getImg_ma9(); + break; + case AnalisesAcidentes.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case AnalisesAcidentes.MEDICO_ID_INDEX: + value = getMedico_id(); + break; + case AnalisesAcidentes.TECNICO_SAUDE_ID_INDEX: + value = getTecnico_saude_id(); + break; + case AnalisesAcidentes.ANALISE_NR_INDEX: + value = getAnalise_nr(); + break; + case AnalisesAcidentes.ESTADO_ASSINATURA_INDEX: + value = getEstado_assinatura(); + break; + case AnalisesAcidentes.ASS_RESP_SEG_INDEX: + value = getAss_resp_seg(); + break; + case AnalisesAcidentes.ASS_RESP_RH_INDEX: + value = getAss_resp_rh(); + break; + case AnalisesAcidentes.DATA_CONSOLIDACAO_INDEX: + value = getData_consolidacao(); + break; + case AnalisesAcidentes.DATA_ASSINATURA_SEG_INDEX: + value = getData_assinatura_seg(); + break; + case AnalisesAcidentes.DATA_ASSINATURA_RH_INDEX: + value = getData_assinatura_rh(); + break; + case AnalisesAcidentes.ASS_CONSOLIDACAO_INDEX: + value = getAss_consolidacao(); + break; + case AnalisesAcidentes.NOME_RESP_SEG_INDEX: + value = getNome_resp_seg(); + break; + case AnalisesAcidentes.NOME_RESP_RH_INDEX: + value = getNome_resp_rh(); + break; + case AnalisesAcidentes.CAUSAS_INDEX: + value = getCausas(); + break; + case AnalisesAcidentes.ESTADO_ANTES_CORRECAO_INDEX: + value = getEstado_antes_correcao(); + break; + case AnalisesAcidentes.OBSERVACOES_CORRECAO_INDEX: + value = getObservacoes_correcao(); + break; + case AnalisesAcidentes.CORRECAO_INDEX: + value = getCorrecao(); + break; + case AnalisesAcidentes.ASS_SUPERIOR_INDEX: + value = getAss_superior(); + break; + case AnalisesAcidentes.NOME_SUPERIOR_INDEX: + value = getNome_superior(); + break; + case AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR_INDEX: + value = getData_assinatura_superior(); + break; + case AnalisesAcidentes.AVERIGUADOR_INDEX: + value = getAveriguador(); + break; + case AnalisesAcidentes.AVERIGUACAO_POSTERIOR_INDEX: + value = getAveriguacao_posterior(); + break; + case AnalisesAcidentes.AVERIGUACAO_OBS_INDEX: + value = getAveriguacao_obs(); + break; + case AnalisesAcidentes.NOME_RESP_CONSOLIDACAO_INDEX: + value = getNome_resp_consolidacao(); + break; + case AnalisesAcidentes.DATA_INICIO_PROCESSO_INDEX: + value = getData_inicio_processo(); + break; + case AnalisesAcidentes.DEPARTAMENTO_ID_INDEX: + value = getDepartamento_id(); + break; + case AnalisesAcidentes.TO_DEPARTAMENTO_ID_INDEX: + value = toDepartamento_id(); + break; + case AnalisesAcidentes.SECCAO_ID_INDEX: + value = getSeccao_id(); + break; + case AnalisesAcidentes.TO_SECCAO_ID_INDEX: + value = toSeccao_id(); + break; + case AnalisesAcidentes.RH_FASE4_INDEX: + value = getRh_fase4(); + break; + case AnalisesAcidentes.APAGADA_INDEX: + value = getApagada(); + break; + case AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO_INDEX: + value = getConcluido_por_desactivacao(); + break; + case AnalisesAcidentes.DATA_DESACTIVACAO_INDEX: + value = getData_desactivacao(); + break; + case AnalisesAcidentes.COMENTARIO_DESACTIVACAO_INDEX: + value = getComentario_desactivacao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AnalisesAcidentes.ID_INDEX: + value = this.id; + break; + case AnalisesAcidentes.DATA_ACIDENTE_INDEX: + value = this.data_acidente; + break; + case AnalisesAcidentes.ACIDENTADO_ID_INDEX: + value = this.acidentado_id; + break; + case AnalisesAcidentes.TO_ACIDENTADO_ID_INDEX: + value = this.to_acidentado_id; + break; + case AnalisesAcidentes.ESTADO_INDEX: + value = this.estado; + break; + case AnalisesAcidentes.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + case AnalisesAcidentes.HORAS_TURNO_INDEX: + value = this.horas_turno; + break; + case AnalisesAcidentes.SECCAO_INDEX: + value = this.seccao; + break; + case AnalisesAcidentes.LOCAL_TRABALHO_INDEX: + value = this.local_trabalho; + break; + case AnalisesAcidentes.TAREFA_INDEX: + value = this.tarefa; + break; + case AnalisesAcidentes.SUBSTANCIAS_INDEX: + value = this.substancias; + break; + case AnalisesAcidentes.SUPERIOR_HIERARQUICO_INDEX: + value = this.superior_hierarquico; + break; + case AnalisesAcidentes.CONDICOES_INDEX: + value = this.condicoes; + break; + case AnalisesAcidentes.TESTEMUNHAS_INDEX: + value = this.testemunhas; + break; + case AnalisesAcidentes.DESCRICAO_INDEX: + value = this.descricao; + break; + case AnalisesAcidentes.CONCLUSOES_INDEX: + value = this.conclusoes; + break; + case AnalisesAcidentes.ACCOES_INDEX: + value = this.accoes; + break; + case AnalisesAcidentes.HORA_ACIDENTE_INDEX: + value = this.hora_acidente; + break; + case AnalisesAcidentes.FORMACAO_SHST_INDEX: + value = this.formacao_shst; + break; + case AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE_INDEX: + value = this.formacao_shst_nao_porque; + break; + case AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR_INDEX: + value = this.outros_acidentes_com_colaborador; + break; + case AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR_INDEX: + value = this.nr_acidentes_com_colaborador; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1_INDEX: + value = this.nr_relatorio_acidente_colaborador1; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2_INDEX: + value = this.nr_relatorio_acidente_colaborador2; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3_INDEX: + value = this.nr_relatorio_acidente_colaborador3; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4_INDEX: + value = this.nr_relatorio_acidente_colaborador4; + break; + case AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES_INDEX: + value = this.acidentes_outros_colaboradores; + break; + case AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES_INDEX: + value = this.nr_acidentes_outros_colaboradores; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_INDEX: + value = this.nr_relatorio_acidente_outros_colaboradores1; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_INDEX: + value = this.nr_relatorio_acidente_outros_colaboradores2; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_INDEX: + value = this.nr_relatorio_acidente_outros_colaboradores3; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_INDEX: + value = this.nr_relatorio_acidente_outros_colaboradores4; + break; + case AnalisesAcidentes.LESAO_CABECA_INDEX: + value = this.lesao_cabeca; + break; + case AnalisesAcidentes.LESAO_PESCOCO_INDEX: + value = this.lesao_pescoco; + break; + case AnalisesAcidentes.LESAO_TRONCO_INDEX: + value = this.lesao_tronco; + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR_INDEX: + value = this.lesao_membro_sup_dir; + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ_INDEX: + value = this.lesao_membro_sup_esq; + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_DIR_INDEX: + value = this.lesao_membro_inf_dir; + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ_INDEX: + value = this.lesao_membro_inf_esq; + break; + case AnalisesAcidentes.ESPECIF1_INDEX: + value = this.especif1; + break; + case AnalisesAcidentes.ESPECIF2_INDEX: + value = this.especif2; + break; + case AnalisesAcidentes.ESPECIF3_INDEX: + value = this.especif3; + break; + case AnalisesAcidentes.ESPECIF4_INDEX: + value = this.especif4; + break; + case AnalisesAcidentes.TIPO_INCAPACIDADE_INDEX: + value = this.tipo_incapacidade; + break; + case AnalisesAcidentes.COEF_INCAPACIDADE_INDEX: + value = this.coef_incapacidade; + break; + case AnalisesAcidentes.DATA_AVAL_INCAPACIDADE_INDEX: + value = this.data_aval_incapacidade; + break; + case AnalisesAcidentes.DATA_REV_INCAPACIDADE_INDEX: + value = this.data_rev_incapacidade; + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_DE_INDEX: + value = this.periodo_incapacidade_de; + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_A_INDEX: + value = this.periodo_incapacidade_a; + break; + case AnalisesAcidentes.IMG_FLEXAO_INDEX: + value = this.img_flexao; + break; + case AnalisesAcidentes.IMG_EXT1_INDEX: + value = this.img_ext1; + break; + case AnalisesAcidentes.IMG_EXT2_INDEX: + value = this.img_ext2; + break; + case AnalisesAcidentes.IMG_CAB2_INDEX: + value = this.img_cab2; + break; + case AnalisesAcidentes.IMG_CAB3_INDEX: + value = this.img_cab3; + break; + case AnalisesAcidentes.IMG_MA2_INDEX: + value = this.img_ma2; + break; + case AnalisesAcidentes.IMG_MA3_INDEX: + value = this.img_ma3; + break; + case AnalisesAcidentes.IMG_MA5_INDEX: + value = this.img_ma5; + break; + case AnalisesAcidentes.IMG_MA6_INDEX: + value = this.img_ma6; + break; + case AnalisesAcidentes.IMG_MA8_INDEX: + value = this.img_ma8; + break; + case AnalisesAcidentes.IMG_MA10_INDEX: + value = this.img_ma10; + break; + case AnalisesAcidentes.RESTRICAO_CARGA_INDEX: + value = this.restricao_carga; + break; + case AnalisesAcidentes.RESTRICAO_MOTRICIDADE_INDEX: + value = this.restricao_motricidade; + break; + case AnalisesAcidentes.RESTRICAO_CONDUCAO_INDEX: + value = this.restricao_conducao; + break; + case AnalisesAcidentes.RESTRICAO_VIBRACOES_INDEX: + value = this.restricao_vibracoes; + break; + case AnalisesAcidentes.RESTRICAO_OUTRAS_INDEX: + value = this.restricao_outras; + break; + case AnalisesAcidentes.MED_OBSERV_INDEX: + value = this.med_observ; + break; + case AnalisesAcidentes.TIPO_LESAO_INDEX: + value = this.tipo_lesao; + break; + case AnalisesAcidentes.IMG_ROT1_INDEX: + value = this.img_rot1; + break; + case AnalisesAcidentes.IMG_ROT2_INDEX: + value = this.img_rot2; + break; + case AnalisesAcidentes.IMG_CAB1_INDEX: + value = this.img_cab1; + break; + case AnalisesAcidentes.IMG_CAB4_INDEX: + value = this.img_cab4; + break; + case AnalisesAcidentes.IMG_MA1_INDEX: + value = this.img_ma1; + break; + case AnalisesAcidentes.IMG_MA4_INDEX: + value = this.img_ma4; + break; + case AnalisesAcidentes.IMG_MA7_INDEX: + value = this.img_ma7; + break; + case AnalisesAcidentes.IMG_MA9_INDEX: + value = this.img_ma9; + break; + case AnalisesAcidentes.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case AnalisesAcidentes.MEDICO_ID_INDEX: + value = this.medico_id; + break; + case AnalisesAcidentes.TECNICO_SAUDE_ID_INDEX: + value = this.tecnico_saude_id; + break; + case AnalisesAcidentes.ANALISE_NR_INDEX: + value = this.analise_nr; + break; + case AnalisesAcidentes.ESTADO_ASSINATURA_INDEX: + value = this.estado_assinatura; + break; + case AnalisesAcidentes.ASS_RESP_SEG_INDEX: + value = this.ass_resp_seg; + break; + case AnalisesAcidentes.ASS_RESP_RH_INDEX: + value = this.ass_resp_rh; + break; + case AnalisesAcidentes.DATA_CONSOLIDACAO_INDEX: + value = this.data_consolidacao; + break; + case AnalisesAcidentes.DATA_ASSINATURA_SEG_INDEX: + value = this.data_assinatura_seg; + break; + case AnalisesAcidentes.DATA_ASSINATURA_RH_INDEX: + value = this.data_assinatura_rh; + break; + case AnalisesAcidentes.ASS_CONSOLIDACAO_INDEX: + value = this.ass_consolidacao; + break; + case AnalisesAcidentes.NOME_RESP_SEG_INDEX: + value = this.nome_resp_seg; + break; + case AnalisesAcidentes.NOME_RESP_RH_INDEX: + value = this.nome_resp_rh; + break; + case AnalisesAcidentes.CAUSAS_INDEX: + value = this.causas; + break; + case AnalisesAcidentes.ESTADO_ANTES_CORRECAO_INDEX: + value = this.estado_antes_correcao; + break; + case AnalisesAcidentes.OBSERVACOES_CORRECAO_INDEX: + value = this.observacoes_correcao; + break; + case AnalisesAcidentes.CORRECAO_INDEX: + value = this.correcao; + break; + case AnalisesAcidentes.ASS_SUPERIOR_INDEX: + value = this.ass_superior; + break; + case AnalisesAcidentes.NOME_SUPERIOR_INDEX: + value = this.nome_superior; + break; + case AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR_INDEX: + value = this.data_assinatura_superior; + break; + case AnalisesAcidentes.AVERIGUADOR_INDEX: + value = this.averiguador; + break; + case AnalisesAcidentes.AVERIGUACAO_POSTERIOR_INDEX: + value = this.averiguacao_posterior; + break; + case AnalisesAcidentes.AVERIGUACAO_OBS_INDEX: + value = this.averiguacao_obs; + break; + case AnalisesAcidentes.NOME_RESP_CONSOLIDACAO_INDEX: + value = this.nome_resp_consolidacao; + break; + case AnalisesAcidentes.DATA_INICIO_PROCESSO_INDEX: + value = this.data_inicio_processo; + break; + case AnalisesAcidentes.DEPARTAMENTO_ID_INDEX: + value = this.departamento_id; + break; + case AnalisesAcidentes.TO_DEPARTAMENTO_ID_INDEX: + value = this.to_departamento_id; + break; + case AnalisesAcidentes.SECCAO_ID_INDEX: + value = this.seccao_id; + break; + case AnalisesAcidentes.TO_SECCAO_ID_INDEX: + value = this.to_seccao_id; + break; + case AnalisesAcidentes.RH_FASE4_INDEX: + value = this.rh_fase4; + break; + case AnalisesAcidentes.APAGADA_INDEX: + value = this.apagada; + break; + case AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO_INDEX: + value = this.concluido_por_desactivacao; + break; + case AnalisesAcidentes.DATA_DESACTIVACAO_INDEX: + value = this.data_desactivacao; + break; + case AnalisesAcidentes.COMENTARIO_DESACTIVACAO_INDEX: + value = this.comentario_desactivacao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AnalisesAcidentes.ID_INDEX: + setId( ( Integer ) value ); + break; + case AnalisesAcidentes.DATA_ACIDENTE_INDEX: + setData_acidente( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.ACIDENTADO_ID_INDEX: + setAcidentado_id( ( Integer ) value ); + break; + case AnalisesAcidentes.TO_ACIDENTADO_ID_INDEX: + setToAcidentado_id( ( db.data.siprp.outer.AcidentadosData ) value ); + break; + case AnalisesAcidentes.ESTADO_INDEX: + setEstado( ( Integer ) value ); + break; + case AnalisesAcidentes.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case AnalisesAcidentes.HORAS_TURNO_INDEX: + setHoras_turno( ( Integer ) value ); + break; + case AnalisesAcidentes.SECCAO_INDEX: + setSeccao( ( String ) value ); + break; + case AnalisesAcidentes.LOCAL_TRABALHO_INDEX: + setLocal_trabalho( ( String ) value ); + break; + case AnalisesAcidentes.TAREFA_INDEX: + setTarefa( ( String ) value ); + break; + case AnalisesAcidentes.SUBSTANCIAS_INDEX: + setSubstancias( ( String ) value ); + break; + case AnalisesAcidentes.SUPERIOR_HIERARQUICO_INDEX: + setSuperior_hierarquico( ( String ) value ); + break; + case AnalisesAcidentes.CONDICOES_INDEX: + setCondicoes( ( String ) value ); + break; + case AnalisesAcidentes.TESTEMUNHAS_INDEX: + setTestemunhas( ( String ) value ); + break; + case AnalisesAcidentes.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case AnalisesAcidentes.CONCLUSOES_INDEX: + setConclusoes( ( String ) value ); + break; + case AnalisesAcidentes.ACCOES_INDEX: + setAccoes( ( String ) value ); + break; + case AnalisesAcidentes.HORA_ACIDENTE_INDEX: + setHora_acidente( ( java.sql.Time ) value ); + break; + case AnalisesAcidentes.FORMACAO_SHST_INDEX: + setFormacao_shst( ( String ) value ); + break; + case AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE_INDEX: + setFormacao_shst_nao_porque( ( String ) value ); + break; + case AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR_INDEX: + setOutros_acidentes_com_colaborador( ( String ) value ); + break; + case AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR_INDEX: + setNr_acidentes_com_colaborador( ( Integer ) value ); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1_INDEX: + setNr_relatorio_acidente_colaborador1( ( Integer ) value ); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2_INDEX: + setNr_relatorio_acidente_colaborador2( ( Integer ) value ); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3_INDEX: + setNr_relatorio_acidente_colaborador3( ( Integer ) value ); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4_INDEX: + setNr_relatorio_acidente_colaborador4( ( Integer ) value ); + break; + case AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES_INDEX: + setAcidentes_outros_colaboradores( ( String ) value ); + break; + case AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES_INDEX: + setNr_acidentes_outros_colaboradores( ( Integer ) value ); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_INDEX: + setNr_relatorio_acidente_outros_colaboradores1( ( Integer ) value ); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_INDEX: + setNr_relatorio_acidente_outros_colaboradores2( ( Integer ) value ); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_INDEX: + setNr_relatorio_acidente_outros_colaboradores3( ( Integer ) value ); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_INDEX: + setNr_relatorio_acidente_outros_colaboradores4( ( Integer ) value ); + break; + case AnalisesAcidentes.LESAO_CABECA_INDEX: + setLesao_cabeca( ( String ) value ); + break; + case AnalisesAcidentes.LESAO_PESCOCO_INDEX: + setLesao_pescoco( ( String ) value ); + break; + case AnalisesAcidentes.LESAO_TRONCO_INDEX: + setLesao_tronco( ( String ) value ); + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR_INDEX: + setLesao_membro_sup_dir( ( String ) value ); + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ_INDEX: + setLesao_membro_sup_esq( ( String ) value ); + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_DIR_INDEX: + setLesao_membro_inf_dir( ( String ) value ); + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ_INDEX: + setLesao_membro_inf_esq( ( String ) value ); + break; + case AnalisesAcidentes.ESPECIF1_INDEX: + setEspecif1( ( String ) value ); + break; + case AnalisesAcidentes.ESPECIF2_INDEX: + setEspecif2( ( String ) value ); + break; + case AnalisesAcidentes.ESPECIF3_INDEX: + setEspecif3( ( String ) value ); + break; + case AnalisesAcidentes.ESPECIF4_INDEX: + setEspecif4( ( String ) value ); + break; + case AnalisesAcidentes.TIPO_INCAPACIDADE_INDEX: + setTipo_incapacidade( ( String ) value ); + break; + case AnalisesAcidentes.COEF_INCAPACIDADE_INDEX: + setCoef_incapacidade( ( Integer ) value ); + break; + case AnalisesAcidentes.DATA_AVAL_INCAPACIDADE_INDEX: + setData_aval_incapacidade( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.DATA_REV_INCAPACIDADE_INDEX: + setData_rev_incapacidade( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_DE_INDEX: + setPeriodo_incapacidade_de( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_A_INDEX: + setPeriodo_incapacidade_a( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.IMG_FLEXAO_INDEX: + setImg_flexao( ( String ) value ); + break; + case AnalisesAcidentes.IMG_EXT1_INDEX: + setImg_ext1( ( String ) value ); + break; + case AnalisesAcidentes.IMG_EXT2_INDEX: + setImg_ext2( ( String ) value ); + break; + case AnalisesAcidentes.IMG_CAB2_INDEX: + setImg_cab2( ( String ) value ); + break; + case AnalisesAcidentes.IMG_CAB3_INDEX: + setImg_cab3( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA2_INDEX: + setImg_ma2( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA3_INDEX: + setImg_ma3( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA5_INDEX: + setImg_ma5( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA6_INDEX: + setImg_ma6( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA8_INDEX: + setImg_ma8( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA10_INDEX: + setImg_ma10( ( String ) value ); + break; + case AnalisesAcidentes.RESTRICAO_CARGA_INDEX: + setRestricao_carga( ( Integer ) value ); + break; + case AnalisesAcidentes.RESTRICAO_MOTRICIDADE_INDEX: + setRestricao_motricidade( ( String ) value ); + break; + case AnalisesAcidentes.RESTRICAO_CONDUCAO_INDEX: + setRestricao_conducao( ( String ) value ); + break; + case AnalisesAcidentes.RESTRICAO_VIBRACOES_INDEX: + setRestricao_vibracoes( ( String ) value ); + break; + case AnalisesAcidentes.RESTRICAO_OUTRAS_INDEX: + setRestricao_outras( ( String ) value ); + break; + case AnalisesAcidentes.MED_OBSERV_INDEX: + setMed_observ( ( String ) value ); + break; + case AnalisesAcidentes.TIPO_LESAO_INDEX: + setTipo_lesao( ( String ) value ); + break; + case AnalisesAcidentes.IMG_ROT1_INDEX: + setImg_rot1( ( String ) value ); + break; + case AnalisesAcidentes.IMG_ROT2_INDEX: + setImg_rot2( ( String ) value ); + break; + case AnalisesAcidentes.IMG_CAB1_INDEX: + setImg_cab1( ( String ) value ); + break; + case AnalisesAcidentes.IMG_CAB4_INDEX: + setImg_cab4( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA1_INDEX: + setImg_ma1( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA4_INDEX: + setImg_ma4( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA7_INDEX: + setImg_ma7( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA9_INDEX: + setImg_ma9( ( String ) value ); + break; + case AnalisesAcidentes.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case AnalisesAcidentes.MEDICO_ID_INDEX: + setMedico_id( ( Integer ) value ); + break; + case AnalisesAcidentes.TECNICO_SAUDE_ID_INDEX: + setTecnico_saude_id( ( Integer ) value ); + break; + case AnalisesAcidentes.ANALISE_NR_INDEX: + setAnalise_nr( ( String ) value ); + break; + case AnalisesAcidentes.ESTADO_ASSINATURA_INDEX: + setEstado_assinatura( ( Integer ) value ); + break; + case AnalisesAcidentes.ASS_RESP_SEG_INDEX: + setAss_resp_seg( ( String ) value ); + break; + case AnalisesAcidentes.ASS_RESP_RH_INDEX: + setAss_resp_rh( ( String ) value ); + break; + case AnalisesAcidentes.DATA_CONSOLIDACAO_INDEX: + setData_consolidacao( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.DATA_ASSINATURA_SEG_INDEX: + setData_assinatura_seg( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.DATA_ASSINATURA_RH_INDEX: + setData_assinatura_rh( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.ASS_CONSOLIDACAO_INDEX: + setAss_consolidacao( ( String ) value ); + break; + case AnalisesAcidentes.NOME_RESP_SEG_INDEX: + setNome_resp_seg( ( String ) value ); + break; + case AnalisesAcidentes.NOME_RESP_RH_INDEX: + setNome_resp_rh( ( String ) value ); + break; + case AnalisesAcidentes.CAUSAS_INDEX: + setCausas( ( Integer ) value ); + break; + case AnalisesAcidentes.ESTADO_ANTES_CORRECAO_INDEX: + setEstado_antes_correcao( ( Integer ) value ); + break; + case AnalisesAcidentes.OBSERVACOES_CORRECAO_INDEX: + setObservacoes_correcao( ( String ) value ); + break; + case AnalisesAcidentes.CORRECAO_INDEX: + setCorrecao( ( String ) value ); + break; + case AnalisesAcidentes.ASS_SUPERIOR_INDEX: + setAss_superior( ( String ) value ); + break; + case AnalisesAcidentes.NOME_SUPERIOR_INDEX: + setNome_superior( ( String ) value ); + break; + case AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR_INDEX: + setData_assinatura_superior( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.AVERIGUADOR_INDEX: + setAveriguador( ( String ) value ); + break; + case AnalisesAcidentes.AVERIGUACAO_POSTERIOR_INDEX: + setAveriguacao_posterior( ( String ) value ); + break; + case AnalisesAcidentes.AVERIGUACAO_OBS_INDEX: + setAveriguacao_obs( ( String ) value ); + break; + case AnalisesAcidentes.NOME_RESP_CONSOLIDACAO_INDEX: + setNome_resp_consolidacao( ( String ) value ); + break; + case AnalisesAcidentes.DATA_INICIO_PROCESSO_INDEX: + setData_inicio_processo( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.DEPARTAMENTO_ID_INDEX: + setDepartamento_id( ( Integer ) value ); + break; + case AnalisesAcidentes.TO_DEPARTAMENTO_ID_INDEX: + setToDepartamento_id( ( db.data.siprp.outer.DepartamentosData ) value ); + break; + case AnalisesAcidentes.SECCAO_ID_INDEX: + setSeccao_id( ( Integer ) value ); + break; + case AnalisesAcidentes.TO_SECCAO_ID_INDEX: + setToSeccao_id( ( db.data.siprp.outer.SeccoesData ) value ); + break; + case AnalisesAcidentes.RH_FASE4_INDEX: + setRh_fase4( ( Integer ) value ); + break; + case AnalisesAcidentes.APAGADA_INDEX: + setApagada( ( String ) value ); + break; + case AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO_INDEX: + setConcluido_por_desactivacao( ( Boolean ) value ); + break; + case AnalisesAcidentes.DATA_DESACTIVACAO_INDEX: + setData_desactivacao( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.COMENTARIO_DESACTIVACAO_INDEX: + setComentario_desactivacao( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AnalisesAcidentes.ID_INDEX: + this.id = ( Integer ) value; + break; + case AnalisesAcidentes.DATA_ACIDENTE_INDEX: + this.data_acidente = ( java.util.Date ) value; + break; + case AnalisesAcidentes.ACIDENTADO_ID_INDEX: + this.acidentado_id = ( Integer ) value; + break; + case AnalisesAcidentes.TO_ACIDENTADO_ID_INDEX: + this.to_acidentado_id = ( db.data.siprp.outer.AcidentadosData ) value; + break; + case AnalisesAcidentes.ESTADO_INDEX: + this.estado = ( Integer ) value; + break; + case AnalisesAcidentes.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case AnalisesAcidentes.HORAS_TURNO_INDEX: + this.horas_turno = ( Integer ) value; + break; + case AnalisesAcidentes.SECCAO_INDEX: + this.seccao = ( String ) value; + break; + case AnalisesAcidentes.LOCAL_TRABALHO_INDEX: + this.local_trabalho = ( String ) value; + break; + case AnalisesAcidentes.TAREFA_INDEX: + this.tarefa = ( String ) value; + break; + case AnalisesAcidentes.SUBSTANCIAS_INDEX: + this.substancias = ( String ) value; + break; + case AnalisesAcidentes.SUPERIOR_HIERARQUICO_INDEX: + this.superior_hierarquico = ( String ) value; + break; + case AnalisesAcidentes.CONDICOES_INDEX: + this.condicoes = ( String ) value; + break; + case AnalisesAcidentes.TESTEMUNHAS_INDEX: + this.testemunhas = ( String ) value; + break; + case AnalisesAcidentes.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case AnalisesAcidentes.CONCLUSOES_INDEX: + this.conclusoes = ( String ) value; + break; + case AnalisesAcidentes.ACCOES_INDEX: + this.accoes = ( String ) value; + break; + case AnalisesAcidentes.HORA_ACIDENTE_INDEX: + this.hora_acidente = ( java.sql.Time ) value; + break; + case AnalisesAcidentes.FORMACAO_SHST_INDEX: + this.formacao_shst = ( String ) value; + break; + case AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE_INDEX: + this.formacao_shst_nao_porque = ( String ) value; + break; + case AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR_INDEX: + this.outros_acidentes_com_colaborador = ( String ) value; + break; + case AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR_INDEX: + this.nr_acidentes_com_colaborador = ( Integer ) value; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1_INDEX: + this.nr_relatorio_acidente_colaborador1 = ( Integer ) value; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2_INDEX: + this.nr_relatorio_acidente_colaborador2 = ( Integer ) value; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3_INDEX: + this.nr_relatorio_acidente_colaborador3 = ( Integer ) value; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4_INDEX: + this.nr_relatorio_acidente_colaborador4 = ( Integer ) value; + break; + case AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES_INDEX: + this.acidentes_outros_colaboradores = ( String ) value; + break; + case AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES_INDEX: + this.nr_acidentes_outros_colaboradores = ( Integer ) value; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_INDEX: + this.nr_relatorio_acidente_outros_colaboradores1 = ( Integer ) value; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_INDEX: + this.nr_relatorio_acidente_outros_colaboradores2 = ( Integer ) value; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_INDEX: + this.nr_relatorio_acidente_outros_colaboradores3 = ( Integer ) value; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_INDEX: + this.nr_relatorio_acidente_outros_colaboradores4 = ( Integer ) value; + break; + case AnalisesAcidentes.LESAO_CABECA_INDEX: + this.lesao_cabeca = ( String ) value; + break; + case AnalisesAcidentes.LESAO_PESCOCO_INDEX: + this.lesao_pescoco = ( String ) value; + break; + case AnalisesAcidentes.LESAO_TRONCO_INDEX: + this.lesao_tronco = ( String ) value; + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR_INDEX: + this.lesao_membro_sup_dir = ( String ) value; + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ_INDEX: + this.lesao_membro_sup_esq = ( String ) value; + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_DIR_INDEX: + this.lesao_membro_inf_dir = ( String ) value; + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ_INDEX: + this.lesao_membro_inf_esq = ( String ) value; + break; + case AnalisesAcidentes.ESPECIF1_INDEX: + this.especif1 = ( String ) value; + break; + case AnalisesAcidentes.ESPECIF2_INDEX: + this.especif2 = ( String ) value; + break; + case AnalisesAcidentes.ESPECIF3_INDEX: + this.especif3 = ( String ) value; + break; + case AnalisesAcidentes.ESPECIF4_INDEX: + this.especif4 = ( String ) value; + break; + case AnalisesAcidentes.TIPO_INCAPACIDADE_INDEX: + this.tipo_incapacidade = ( String ) value; + break; + case AnalisesAcidentes.COEF_INCAPACIDADE_INDEX: + this.coef_incapacidade = ( Integer ) value; + break; + case AnalisesAcidentes.DATA_AVAL_INCAPACIDADE_INDEX: + this.data_aval_incapacidade = ( java.util.Date ) value; + break; + case AnalisesAcidentes.DATA_REV_INCAPACIDADE_INDEX: + this.data_rev_incapacidade = ( java.util.Date ) value; + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_DE_INDEX: + this.periodo_incapacidade_de = ( java.util.Date ) value; + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_A_INDEX: + this.periodo_incapacidade_a = ( java.util.Date ) value; + break; + case AnalisesAcidentes.IMG_FLEXAO_INDEX: + this.img_flexao = ( String ) value; + break; + case AnalisesAcidentes.IMG_EXT1_INDEX: + this.img_ext1 = ( String ) value; + break; + case AnalisesAcidentes.IMG_EXT2_INDEX: + this.img_ext2 = ( String ) value; + break; + case AnalisesAcidentes.IMG_CAB2_INDEX: + this.img_cab2 = ( String ) value; + break; + case AnalisesAcidentes.IMG_CAB3_INDEX: + this.img_cab3 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA2_INDEX: + this.img_ma2 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA3_INDEX: + this.img_ma3 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA5_INDEX: + this.img_ma5 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA6_INDEX: + this.img_ma6 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA8_INDEX: + this.img_ma8 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA10_INDEX: + this.img_ma10 = ( String ) value; + break; + case AnalisesAcidentes.RESTRICAO_CARGA_INDEX: + this.restricao_carga = ( Integer ) value; + break; + case AnalisesAcidentes.RESTRICAO_MOTRICIDADE_INDEX: + this.restricao_motricidade = ( String ) value; + break; + case AnalisesAcidentes.RESTRICAO_CONDUCAO_INDEX: + this.restricao_conducao = ( String ) value; + break; + case AnalisesAcidentes.RESTRICAO_VIBRACOES_INDEX: + this.restricao_vibracoes = ( String ) value; + break; + case AnalisesAcidentes.RESTRICAO_OUTRAS_INDEX: + this.restricao_outras = ( String ) value; + break; + case AnalisesAcidentes.MED_OBSERV_INDEX: + this.med_observ = ( String ) value; + break; + case AnalisesAcidentes.TIPO_LESAO_INDEX: + this.tipo_lesao = ( String ) value; + break; + case AnalisesAcidentes.IMG_ROT1_INDEX: + this.img_rot1 = ( String ) value; + break; + case AnalisesAcidentes.IMG_ROT2_INDEX: + this.img_rot2 = ( String ) value; + break; + case AnalisesAcidentes.IMG_CAB1_INDEX: + this.img_cab1 = ( String ) value; + break; + case AnalisesAcidentes.IMG_CAB4_INDEX: + this.img_cab4 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA1_INDEX: + this.img_ma1 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA4_INDEX: + this.img_ma4 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA7_INDEX: + this.img_ma7 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA9_INDEX: + this.img_ma9 = ( String ) value; + break; + case AnalisesAcidentes.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case AnalisesAcidentes.MEDICO_ID_INDEX: + this.medico_id = ( Integer ) value; + break; + case AnalisesAcidentes.TECNICO_SAUDE_ID_INDEX: + this.tecnico_saude_id = ( Integer ) value; + break; + case AnalisesAcidentes.ANALISE_NR_INDEX: + this.analise_nr = ( String ) value; + break; + case AnalisesAcidentes.ESTADO_ASSINATURA_INDEX: + this.estado_assinatura = ( Integer ) value; + break; + case AnalisesAcidentes.ASS_RESP_SEG_INDEX: + this.ass_resp_seg = ( String ) value; + break; + case AnalisesAcidentes.ASS_RESP_RH_INDEX: + this.ass_resp_rh = ( String ) value; + break; + case AnalisesAcidentes.DATA_CONSOLIDACAO_INDEX: + this.data_consolidacao = ( java.util.Date ) value; + break; + case AnalisesAcidentes.DATA_ASSINATURA_SEG_INDEX: + this.data_assinatura_seg = ( java.util.Date ) value; + break; + case AnalisesAcidentes.DATA_ASSINATURA_RH_INDEX: + this.data_assinatura_rh = ( java.util.Date ) value; + break; + case AnalisesAcidentes.ASS_CONSOLIDACAO_INDEX: + this.ass_consolidacao = ( String ) value; + break; + case AnalisesAcidentes.NOME_RESP_SEG_INDEX: + this.nome_resp_seg = ( String ) value; + break; + case AnalisesAcidentes.NOME_RESP_RH_INDEX: + this.nome_resp_rh = ( String ) value; + break; + case AnalisesAcidentes.CAUSAS_INDEX: + this.causas = ( Integer ) value; + break; + case AnalisesAcidentes.ESTADO_ANTES_CORRECAO_INDEX: + this.estado_antes_correcao = ( Integer ) value; + break; + case AnalisesAcidentes.OBSERVACOES_CORRECAO_INDEX: + this.observacoes_correcao = ( String ) value; + break; + case AnalisesAcidentes.CORRECAO_INDEX: + this.correcao = ( String ) value; + break; + case AnalisesAcidentes.ASS_SUPERIOR_INDEX: + this.ass_superior = ( String ) value; + break; + case AnalisesAcidentes.NOME_SUPERIOR_INDEX: + this.nome_superior = ( String ) value; + break; + case AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR_INDEX: + this.data_assinatura_superior = ( java.util.Date ) value; + break; + case AnalisesAcidentes.AVERIGUADOR_INDEX: + this.averiguador = ( String ) value; + break; + case AnalisesAcidentes.AVERIGUACAO_POSTERIOR_INDEX: + this.averiguacao_posterior = ( String ) value; + break; + case AnalisesAcidentes.AVERIGUACAO_OBS_INDEX: + this.averiguacao_obs = ( String ) value; + break; + case AnalisesAcidentes.NOME_RESP_CONSOLIDACAO_INDEX: + this.nome_resp_consolidacao = ( String ) value; + break; + case AnalisesAcidentes.DATA_INICIO_PROCESSO_INDEX: + this.data_inicio_processo = ( java.util.Date ) value; + break; + case AnalisesAcidentes.DEPARTAMENTO_ID_INDEX: + this.departamento_id = ( Integer ) value; + break; + case AnalisesAcidentes.TO_DEPARTAMENTO_ID_INDEX: + this.to_departamento_id = ( db.data.siprp.outer.DepartamentosData ) value; + break; + case AnalisesAcidentes.SECCAO_ID_INDEX: + this.seccao_id = ( Integer ) value; + break; + case AnalisesAcidentes.TO_SECCAO_ID_INDEX: + this.to_seccao_id = ( db.data.siprp.outer.SeccoesData ) value; + break; + case AnalisesAcidentes.RH_FASE4_INDEX: + this.rh_fase4 = ( Integer ) value; + break; + case AnalisesAcidentes.APAGADA_INDEX: + this.apagada = ( String ) value; + break; + case AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO_INDEX: + this.concluido_por_desactivacao = ( Boolean ) value; + break; + case AnalisesAcidentes.DATA_DESACTIVACAO_INDEX: + this.data_desactivacao = ( java.util.Date ) value; + break; + case AnalisesAcidentes.COMENTARIO_DESACTIVACAO_INDEX: + this.comentario_desactivacao = ( 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 AnalisesAcidentes.ID_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.DATA_ACIDENTE_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.ACIDENTADO_ID_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.TO_ACIDENTADO_ID_INDEX: + theClass = db.data.siprp.outer.AcidentadosData.class; + break; + case AnalisesAcidentes.ESTADO_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.HORAS_TURNO_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.SECCAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.LOCAL_TRABALHO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.TAREFA_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.SUBSTANCIAS_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.SUPERIOR_HIERARQUICO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.CONDICOES_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.TESTEMUNHAS_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.DESCRICAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.CONCLUSOES_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.ACCOES_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.HORA_ACIDENTE_INDEX: + theClass = java.sql.Time.class; + break; + case AnalisesAcidentes.FORMACAO_SHST_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.LESAO_CABECA_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.LESAO_PESCOCO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.LESAO_TRONCO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_DIR_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.ESPECIF1_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.ESPECIF2_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.ESPECIF3_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.ESPECIF4_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.TIPO_INCAPACIDADE_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.COEF_INCAPACIDADE_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.DATA_AVAL_INCAPACIDADE_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.DATA_REV_INCAPACIDADE_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_DE_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_A_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.IMG_FLEXAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_EXT1_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_EXT2_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_CAB2_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_CAB3_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA2_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA3_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA5_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA6_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA8_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA10_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.RESTRICAO_CARGA_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.RESTRICAO_MOTRICIDADE_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.RESTRICAO_CONDUCAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.RESTRICAO_VIBRACOES_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.RESTRICAO_OUTRAS_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.MED_OBSERV_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.TIPO_LESAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_ROT1_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_ROT2_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_CAB1_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_CAB4_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA1_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA4_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA7_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA9_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.MEDICO_ID_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.TECNICO_SAUDE_ID_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.ANALISE_NR_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.ESTADO_ASSINATURA_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.ASS_RESP_SEG_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.ASS_RESP_RH_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.DATA_CONSOLIDACAO_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.DATA_ASSINATURA_SEG_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.DATA_ASSINATURA_RH_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.ASS_CONSOLIDACAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.NOME_RESP_SEG_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.NOME_RESP_RH_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.CAUSAS_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.ESTADO_ANTES_CORRECAO_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.OBSERVACOES_CORRECAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.CORRECAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.ASS_SUPERIOR_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.NOME_SUPERIOR_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.AVERIGUADOR_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.AVERIGUACAO_POSTERIOR_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.AVERIGUACAO_OBS_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.NOME_RESP_CONSOLIDACAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.DATA_INICIO_PROCESSO_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.DEPARTAMENTO_ID_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.TO_DEPARTAMENTO_ID_INDEX: + theClass = db.data.siprp.outer.DepartamentosData.class; + break; + case AnalisesAcidentes.SECCAO_ID_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.TO_SECCAO_ID_INDEX: + theClass = db.data.siprp.outer.SeccoesData.class; + break; + case AnalisesAcidentes.RH_FASE4_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.APAGADA_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO_INDEX: + theClass = Boolean.class; + break; + case AnalisesAcidentes.DATA_DESACTIVACAO_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.COMENTARIO_DESACTIVACAO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : AnalisesAcidentes._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, AnalisesAcidentes.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Avisos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Avisos.java new file mode 100644 index 00000000..3a068632 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Avisos.java @@ -0,0 +1,785 @@ +/* +* Avisos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Avisos extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp.outer.EmpresasData.class, db.data.siprp.outer.EmpresasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( Avisos.class, Avisos.ESTABELECIMENTO_ID, db.data.siprp.outer.EstabelecimentosData.class, db.data.siprp.outer.EstabelecimentosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores = + new com.evolute.entity.ForeignKey( Avisos.class, Avisos.TRABALHADOR_ID, db.data.siprp.outer.TrabalhadoresData.class, db.data.siprp.outer.TrabalhadoresData.ID ); + + public static final String TABLENAME = "avisos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.avisos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "avisos.id"; + public static final int ID_INDEX = 0; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "avisos.tipo"; + public static final int TIPO_INDEX = 1; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "avisos.empresa_id"; + public static final int EMPRESA_ID_INDEX = 2; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final String TO_EMPRESA_ID_FULL = "avisos.to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 3; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "avisos.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 4; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID_FULL = "avisos.to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 5; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "avisos.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 6; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final String TO_TRABALHADOR_ID_FULL = "avisos.to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 7; + public static final String EVENTO_ID = "evento_id"; + public static final String EVENTO_ID_FULL = "avisos.evento_id"; + public static final int EVENTO_ID_INDEX = 8; + public static final String DATA_AVISO = "data_aviso"; + public static final String DATA_AVISO_FULL = "avisos.data_aviso"; + public static final int DATA_AVISO_INDEX = 9; + public static final String DATA_EVENTO = "data_evento"; + public static final String DATA_EVENTO_FULL = "avisos.data_evento"; + public static final int DATA_EVENTO_INDEX = 10; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "avisos.descricao"; + public static final int DESCRICAO_INDEX = 11; + + public static final String FIELD_NAMES[] = new String[]{ + TIPO, EMPRESA_ID, TO_EMPRESA_ID, ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, + TRABALHADOR_ID, TO_TRABALHADOR_ID, EVENTO_ID, DATA_AVISO, DATA_EVENTO, DESCRICAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TIPO, TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID, + TABLENAME + "." + TRABALHADOR_ID, TABLENAME + "." + TO_TRABALHADOR_ID, TABLENAME + "." + EVENTO_ID, TABLENAME + "." + DATA_AVISO, TABLENAME + "." + DATA_EVENTO, TABLENAME + "." + DESCRICAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TIPO, EMPRESA_ID, ESTABELECIMENTO_ID, TRABALHADOR_ID, EVENTO_ID, DATA_AVISO, + DATA_EVENTO, DESCRICAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TIPO, EMPRESA_ID, ESTABELECIMENTO_ID, TRABALHADOR_ID, EVENTO_ID, DATA_AVISO, + DATA_EVENTO, DESCRICAO, }; + + private Integer id; + private Integer tipo; + private Integer empresa_id; + private db.data.siprp.outer.EmpresasData to_empresa_id; + private Integer estabelecimento_id; + private db.data.siprp.outer.EstabelecimentosData to_estabelecimento_id; + private Integer trabalhador_id; + private db.data.siprp.outer.TrabalhadoresData to_trabalhador_id; + private Integer evento_id; + private java.util.Date data_aviso; + private java.util.Date data_evento; + private String descricao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Avisos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false, false, false, false, false, false, false, + false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 db.data.siprp.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp.outer.EmpresasData to_empresa_id ) + { + try + { + preProcess( TO_EMPRESA_ID, to_empresa_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_empresa_id = to_empresa_id; + } + + public Integer getEstabelecimento_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTABELECIMENTO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estabelecimento_id; + } + + public void setEstabelecimento_id( Integer estabelecimento_id ) + { + try + { + 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 db.data.siprp.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp.outer.EstabelecimentosData to_estabelecimento_id ) + { + try + { + preProcess( TO_ESTABELECIMENTO_ID, to_estabelecimento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_estabelecimento_id = to_estabelecimento_id; + } + + public Integer getTrabalhador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TRABALHADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.trabalhador_id; + } + + public void setTrabalhador_id( Integer trabalhador_id ) + { + try + { + 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 db.data.siprp.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp.outer.TrabalhadoresData to_trabalhador_id ) + { + try + { + preProcess( TO_TRABALHADOR_ID, to_trabalhador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_trabalhador_id = to_trabalhador_id; + } + + public Integer getEvento_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( EVENTO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.evento_id; + } + + public void setEvento_id( Integer evento_id ) + { + try + { + 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( ( db.data.siprp.outer.EmpresasData ) value ); + break; + case Avisos.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case Avisos.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp.outer.EstabelecimentosData ) value ); + break; + case Avisos.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case Avisos.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( db.data.siprp.outer.TrabalhadoresData ) value ); + break; + case Avisos.EVENTO_ID_INDEX: + setEvento_id( ( Integer ) value ); + break; + case Avisos.DATA_AVISO_INDEX: + setData_aviso( ( java.util.Date ) value ); + break; + case Avisos.DATA_EVENTO_INDEX: + setData_evento( ( java.util.Date ) value ); + break; + case Avisos.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Avisos.ID_INDEX: + this.id = ( Integer ) value; + break; + case Avisos.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case Avisos.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case Avisos.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( db.data.siprp.outer.EmpresasData ) value; + break; + case Avisos.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case Avisos.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( db.data.siprp.outer.EstabelecimentosData ) value; + break; + case Avisos.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case Avisos.TO_TRABALHADOR_ID_INDEX: + this.to_trabalhador_id = ( db.data.siprp.outer.TrabalhadoresData ) value; + break; + case Avisos.EVENTO_ID_INDEX: + this.evento_id = ( Integer ) value; + break; + case Avisos.DATA_AVISO_INDEX: + this.data_aviso = ( java.util.Date ) value; + break; + case Avisos.DATA_EVENTO_INDEX: + this.data_evento = ( java.util.Date ) value; + break; + case Avisos.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Avisos.ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TIPO_INDEX: + theClass = Integer.class; + break; + case Avisos.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp.outer.EmpresasData.class; + break; + case Avisos.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp.outer.EstabelecimentosData.class; + break; + case Avisos.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TO_TRABALHADOR_ID_INDEX: + theClass = db.data.siprp.outer.TrabalhadoresData.class; + break; + case Avisos.EVENTO_ID_INDEX: + theClass = Integer.class; + break; + case Avisos.DATA_AVISO_INDEX: + theClass = java.util.Date.class; + break; + case Avisos.DATA_EVENTO_INDEX: + theClass = java.util.Date.class; + break; + case Avisos.DESCRICAO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Avisos._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Avisos.PK_FIELD_NAMES ); + primaryKey.set( 0, getId() ); + } + } + + @Override + public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Causas.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Causas.java new file mode 100644 index 00000000..0a5db08d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Causas.java @@ -0,0 +1,330 @@ +/* +* Causas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Causas extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Causas.ID, Causas.ID_INDEX ); + FIELD_INDEXES.put( Causas.ID_FULL, Causas.ID_INDEX ); + FIELD_INDEXES.put( Causas.CAUSA, Causas.CAUSA_INDEX ); + FIELD_INDEXES.put( Causas.CAUSA_FULL, Causas.CAUSA_INDEX ); + FIELD_INDEXES.put( Causas.ACTIVA, Causas.ACTIVA_INDEX ); + FIELD_INDEXES.put( Causas.ACTIVA_FULL, Causas.ACTIVA_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "causas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.causas"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "causas.id"; + public static final int ID_INDEX = 0; + public static final String CAUSA = "causa"; + public static final String CAUSA_FULL = "causas.causa"; + public static final int CAUSA_INDEX = 1; + public static final String ACTIVA = "activa"; + public static final String ACTIVA_FULL = "causas.activa"; + public static final int ACTIVA_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + CAUSA, ACTIVA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + CAUSA, TABLENAME + "." + ACTIVA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, CAUSA, ACTIVA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, CAUSA, ACTIVA, }; + + private Integer id; + private String causa; + private String activa; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Causas() + { + super(); + dirtyProperties = new boolean[]{ false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 getCausa() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CAUSA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.causa; + } + + public void setCausa( String causa ) + { + try + { + setLockedForRefresh( true ); + preProcess( CAUSA, causa ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.causa = causa; + LAZY_LOADED_OBJECTS.put( CAUSA, Boolean.TRUE ); + } + + public String getActiva() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACTIVA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.activa; + } + + public void setActiva( String activa ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACTIVA, activa ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.activa = activa; + LAZY_LOADED_OBJECTS.put( ACTIVA, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Causas.ID_INDEX: + value = getId(); + break; + case Causas.CAUSA_INDEX: + value = getCausa(); + break; + case Causas.ACTIVA_INDEX: + value = getActiva(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Causas.ID_INDEX: + value = this.id; + break; + case Causas.CAUSA_INDEX: + value = this.causa; + break; + case Causas.ACTIVA_INDEX: + value = this.activa; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Causas.ID_INDEX: + setId( ( Integer ) value ); + break; + case Causas.CAUSA_INDEX: + setCausa( ( String ) value ); + break; + case Causas.ACTIVA_INDEX: + setActiva( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Causas.ID_INDEX: + this.id = ( Integer ) value; + break; + case Causas.CAUSA_INDEX: + this.causa = ( String ) value; + break; + case Causas.ACTIVA_INDEX: + this.activa = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Causas.ID_INDEX: + theClass = Integer.class; + break; + case Causas.CAUSA_INDEX: + theClass = String.class; + break; + case Causas.ACTIVA_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Causas._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Causas.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Contactos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Contactos.java new file mode 100644 index 00000000..4f16629d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Contactos.java @@ -0,0 +1,530 @@ +/* +* Contactos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Contactos extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp.inner.contactos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "contactos.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "contactos.nome"; + public static final int NOME_INDEX = 1; + public static final String TELEFONE = "telefone"; + public static final String TELEFONE_FULL = "contactos.telefone"; + public static final int TELEFONE_INDEX = 2; + public static final String TELEMOVEL = "telemovel"; + public static final String TELEMOVEL_FULL = "contactos.telemovel"; + public static final int TELEMOVEL_INDEX = 3; + public static final String FAX = "fax"; + public static final String FAX_FULL = "contactos.fax"; + public static final int FAX_INDEX = 4; + public static final String EMAIL = "email"; + public static final String EMAIL_FULL = "contactos.email"; + public static final int EMAIL_INDEX = 5; + public static final String CARGO = "cargo"; + public static final String CARGO_FULL = "contactos.cargo"; + public static final int CARGO_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + TELEFONE, TABLENAME + "." + TELEMOVEL, TABLENAME + "." + FAX, TABLENAME + "." + EMAIL, TABLENAME + "." + CARGO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, }; + + private Integer id; + private String nome; + private String telefone; + private String telemovel; + private String fax; + private String email; + private String cargo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Contactos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Controle.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Controle.java new file mode 100644 index 00000000..a4904c80 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Controle.java @@ -0,0 +1,330 @@ +/* +* Controle.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Controle extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Controle.ID, Controle.ID_INDEX ); + FIELD_INDEXES.put( Controle.ID_FULL, Controle.ID_INDEX ); + FIELD_INDEXES.put( Controle.ANALISE_YEAR, Controle.ANALISE_YEAR_INDEX ); + FIELD_INDEXES.put( Controle.ANALISE_YEAR_FULL, Controle.ANALISE_YEAR_INDEX ); + FIELD_INDEXES.put( Controle.LAST_ANALISE_NR, Controle.LAST_ANALISE_NR_INDEX ); + FIELD_INDEXES.put( Controle.LAST_ANALISE_NR_FULL, Controle.LAST_ANALISE_NR_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "controle"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.controle"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "controle.id"; + public static final int ID_INDEX = 0; + public static final String ANALISE_YEAR = "analise_year"; + public static final String ANALISE_YEAR_FULL = "controle.analise_year"; + public static final int ANALISE_YEAR_INDEX = 1; + public static final String LAST_ANALISE_NR = "last_analise_nr"; + public static final String LAST_ANALISE_NR_FULL = "controle.last_analise_nr"; + public static final int LAST_ANALISE_NR_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + ANALISE_YEAR, LAST_ANALISE_NR, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ANALISE_YEAR, TABLENAME + "." + LAST_ANALISE_NR, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ANALISE_YEAR, LAST_ANALISE_NR, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ANALISE_YEAR, LAST_ANALISE_NR, }; + + private Integer id; + private Integer analise_year; + private Integer last_analise_nr; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Controle() + { + super(); + dirtyProperties = new boolean[]{ false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 getAnalise_year() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ANALISE_YEAR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.analise_year; + } + + public void setAnalise_year( Integer analise_year ) + { + try + { + setLockedForRefresh( true ); + preProcess( ANALISE_YEAR, analise_year ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.analise_year = analise_year; + LAZY_LOADED_OBJECTS.put( ANALISE_YEAR, Boolean.TRUE ); + } + + public Integer getLast_analise_nr() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LAST_ANALISE_NR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.last_analise_nr; + } + + public void setLast_analise_nr( Integer last_analise_nr ) + { + try + { + setLockedForRefresh( true ); + preProcess( LAST_ANALISE_NR, last_analise_nr ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.last_analise_nr = last_analise_nr; + LAZY_LOADED_OBJECTS.put( LAST_ANALISE_NR, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Controle.ID_INDEX: + value = getId(); + break; + case Controle.ANALISE_YEAR_INDEX: + value = getAnalise_year(); + break; + case Controle.LAST_ANALISE_NR_INDEX: + value = getLast_analise_nr(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Controle.ID_INDEX: + value = this.id; + break; + case Controle.ANALISE_YEAR_INDEX: + value = this.analise_year; + break; + case Controle.LAST_ANALISE_NR_INDEX: + value = this.last_analise_nr; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Controle.ID_INDEX: + setId( ( Integer ) value ); + break; + case Controle.ANALISE_YEAR_INDEX: + setAnalise_year( ( Integer ) value ); + break; + case Controle.LAST_ANALISE_NR_INDEX: + setLast_analise_nr( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Controle.ID_INDEX: + this.id = ( Integer ) value; + break; + case Controle.ANALISE_YEAR_INDEX: + this.analise_year = ( Integer ) value; + break; + case Controle.LAST_ANALISE_NR_INDEX: + this.last_analise_nr = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Controle.ID_INDEX: + theClass = Integer.class; + break; + case Controle.ANALISE_YEAR_INDEX: + theClass = Integer.class; + break; + case Controle.LAST_ANALISE_NR_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Controle._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Controle.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Departamentos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Departamentos.java new file mode 100644 index 00000000..187c19e2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Departamentos.java @@ -0,0 +1,358 @@ +/* +* Departamentos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Departamentos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Departamentos.ID, Departamentos.ID_INDEX ); + FIELD_INDEXES.put( Departamentos.ID_FULL, Departamentos.ID_INDEX ); + FIELD_INDEXES.put( Departamentos.DESCRICAO, Departamentos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( Departamentos.DESCRICAO_FULL, Departamentos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( Departamentos.ACTIVO, Departamentos.ACTIVO_INDEX ); + FIELD_INDEXES.put( Departamentos.ACTIVO_FULL, Departamentos.ACTIVO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "departamentos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.departamentos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "departamentos.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "departamentos.descricao"; + public static final int DESCRICAO_INDEX = 1; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "departamentos.activo"; + public static final int ACTIVO_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, ACTIVO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + ACTIVO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, ACTIVO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRICAO, ACTIVO, }; + + private Integer id; + private String descricao; + private String activo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Departamentos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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.ListfromAnalisesAcidentes_departamento_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.AnalisesAcidentesData.class , getPrimaryKey().getMap().get("id"), "departamento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromSeccoes_departamento_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.SeccoesData.class , getPrimaryKey().getMap().get("id"), "departamento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public String getDescricao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao; + } + + public void setDescricao( String descricao ) + { + try + { + 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 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 Departamentos.ID_INDEX: + value = getId(); + break; + case Departamentos.DESCRICAO_INDEX: + value = getDescricao(); + break; + case Departamentos.ACTIVO_INDEX: + value = getActivo(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Departamentos.ID_INDEX: + value = this.id; + break; + case Departamentos.DESCRICAO_INDEX: + value = this.descricao; + break; + case Departamentos.ACTIVO_INDEX: + value = this.activo; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Departamentos.ID_INDEX: + setId( ( Integer ) value ); + break; + case Departamentos.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case Departamentos.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Departamentos.ID_INDEX: + this.id = ( Integer ) value; + break; + case Departamentos.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case Departamentos.ACTIVO_INDEX: + this.activo = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Departamentos.ID_INDEX: + theClass = Integer.class; + break; + case Departamentos.DESCRICAO_INDEX: + theClass = String.class; + break; + case Departamentos.ACTIVO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Departamentos._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Departamentos.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Empresas.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Empresas.java new file mode 100644 index 00000000..db903c06 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Empresas.java @@ -0,0 +1,1029 @@ +/* +* Empresas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Empresas extends com.evolute.entity.evo.EvoDataObject +{ + 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.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.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.CODIGO, Empresas.CODIGO_INDEX ); + FIELD_INDEXES.put( Empresas.CODIGO_FULL, Empresas.CODIGO_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.ACTIVIDADE, Empresas.ACTIVIDADE_INDEX ); + FIELD_INDEXES.put( Empresas.ACTIVIDADE_FULL, Empresas.ACTIVIDADE_INDEX ); + FIELD_INDEXES.put( Empresas.SERVICOS, Empresas.SERVICOS_INDEX ); + FIELD_INDEXES.put( Empresas.SERVICOS_FULL, Empresas.SERVICOS_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.EMAIL, Empresas.EMAIL_INDEX ); + FIELD_INDEXES.put( Empresas.EMAIL_FULL, Empresas.EMAIL_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "empresas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.empresas"; + + 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 MORADA = "morada"; + public static final String MORADA_FULL = "empresas.morada"; + public static final int MORADA_INDEX = 1; + 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 = 2; + public static final String LOCALIDADE = "localidade"; + public static final String LOCALIDADE_FULL = "empresas.localidade"; + public static final int LOCALIDADE_INDEX = 3; + public static final String DISTRITO = "distrito"; + public static final String DISTRITO_FULL = "empresas.distrito"; + public static final int DISTRITO_INDEX = 4; + public static final String CONCELHO = "concelho"; + public static final String CONCELHO_FULL = "empresas.concelho"; + public static final int CONCELHO_INDEX = 5; + 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 = 6; + 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 = 7; + public static final String CODIGO = "codigo"; + public static final String CODIGO_FULL = "empresas.codigo"; + public static final int CODIGO_INDEX = 8; + public static final String CAE = "cae"; + public static final String CAE_FULL = "empresas.cae"; + public static final int CAE_INDEX = 9; + public static final String CONTRIBUINTE = "contribuinte"; + public static final String CONTRIBUINTE_FULL = "empresas.contribuinte"; + public static final int CONTRIBUINTE_INDEX = 10; + 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 = 11; + public static final String ACTIVIDADE = "actividade"; + public static final String ACTIVIDADE_FULL = "empresas.actividade"; + public static final int ACTIVIDADE_INDEX = 12; + public static final String SERVICOS = "servicos"; + public static final String SERVICOS_FULL = "empresas.servicos"; + public static final int SERVICOS_INDEX = 13; + 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 = 14; + public static final String EMAIL = "email"; + public static final String EMAIL_FULL = "empresas.email"; + public static final int EMAIL_INDEX = 15; + + public static final String FIELD_NAMES[] = new String[]{ + MORADA, CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, PERFIL_1, PERFIL_2, CODIGO, CAE, + CONTRIBUINTE, SEGURANCA_SOCIAL, ACTIVIDADE, SERVICOS, DESIGNACAO_SOCIAL, EMAIL, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + MORADA, TABLENAME + "." + CODIGO_POSTAL, TABLENAME + "." + LOCALIDADE, TABLENAME + "." + DISTRITO, TABLENAME + "." + CONCELHO, TABLENAME + "." + PERFIL_1, TABLENAME + "." + PERFIL_2, TABLENAME + "." + CODIGO, TABLENAME + "." + CAE, + TABLENAME + "." + CONTRIBUINTE, TABLENAME + "." + SEGURANCA_SOCIAL, TABLENAME + "." + ACTIVIDADE, TABLENAME + "." + SERVICOS, TABLENAME + "." + DESIGNACAO_SOCIAL, TABLENAME + "." + EMAIL, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, MORADA, CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, PERFIL_1, PERFIL_2, CODIGO, + CAE, CONTRIBUINTE, SEGURANCA_SOCIAL, ACTIVIDADE, SERVICOS, DESIGNACAO_SOCIAL, + EMAIL, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, MORADA, CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, PERFIL_1, PERFIL_2, CODIGO, + CAE, CONTRIBUINTE, SEGURANCA_SOCIAL, ACTIVIDADE, SERVICOS, DESIGNACAO_SOCIAL, + EMAIL, }; + + private Integer id; + private String morada; + private String codigo_postal; + private String localidade; + private String distrito; + private String concelho; + private Integer perfil_1; + private Integer perfil_2; + private String codigo; + private String cae; + private String contribuinte; + private String seguranca_social; + private String actividade; + private Integer servicos; + private String designacao_social; + private String email; + + 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 }; + } + + 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( db.data.siprp.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( db.data.siprp.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.ListfromMarcacoesEmpresa_empresa_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.MarcacoesEmpresaData.class , getPrimaryKey().getMap().get("id"), "empresa_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 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( Integer 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 Integer 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( Integer 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 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 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 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 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 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 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 Empresas.ID_INDEX: + value = getId(); + 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.PERFIL_1_INDEX: + value = getPerfil_1(); + break; + case Empresas.PERFIL_2_INDEX: + value = getPerfil_2(); + break; + case Empresas.CODIGO_INDEX: + value = getCodigo(); + 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.ACTIVIDADE_INDEX: + value = getActividade(); + break; + case Empresas.SERVICOS_INDEX: + value = getServicos(); + break; + case Empresas.DESIGNACAO_SOCIAL_INDEX: + value = getDesignacao_social(); + break; + case Empresas.EMAIL_INDEX: + value = getEmail(); + 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.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.PERFIL_1_INDEX: + value = this.perfil_1; + break; + case Empresas.PERFIL_2_INDEX: + value = this.perfil_2; + break; + case Empresas.CODIGO_INDEX: + value = this.codigo; + 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.ACTIVIDADE_INDEX: + value = this.actividade; + break; + case Empresas.SERVICOS_INDEX: + value = this.servicos; + break; + case Empresas.DESIGNACAO_SOCIAL_INDEX: + value = this.designacao_social; + break; + case Empresas.EMAIL_INDEX: + value = this.email; + 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.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.PERFIL_1_INDEX: + setPerfil_1( ( Integer ) value ); + break; + case Empresas.PERFIL_2_INDEX: + setPerfil_2( ( Integer ) value ); + break; + case Empresas.CODIGO_INDEX: + setCodigo( ( String ) 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.ACTIVIDADE_INDEX: + setActividade( ( String ) value ); + break; + case Empresas.SERVICOS_INDEX: + setServicos( ( Integer ) value ); + break; + case Empresas.DESIGNACAO_SOCIAL_INDEX: + setDesignacao_social( ( String ) value ); + break; + case Empresas.EMAIL_INDEX: + setEmail( ( String ) 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.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.PERFIL_1_INDEX: + this.perfil_1 = ( Integer ) value; + break; + case Empresas.PERFIL_2_INDEX: + this.perfil_2 = ( Integer ) value; + break; + case Empresas.CODIGO_INDEX: + this.codigo = ( String ) 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.ACTIVIDADE_INDEX: + this.actividade = ( String ) value; + break; + case Empresas.SERVICOS_INDEX: + this.servicos = ( Integer ) value; + break; + case Empresas.DESIGNACAO_SOCIAL_INDEX: + this.designacao_social = ( String ) value; + break; + case Empresas.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 Empresas.ID_INDEX: + theClass = Integer.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.PERFIL_1_INDEX: + theClass = Integer.class; + break; + case Empresas.PERFIL_2_INDEX: + theClass = Integer.class; + break; + case Empresas.CODIGO_INDEX: + theClass = String.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.ACTIVIDADE_INDEX: + theClass = String.class; + break; + case Empresas.SERVICOS_INDEX: + theClass = Integer.class; + break; + case Empresas.DESIGNACAO_SOCIAL_INDEX: + theClass = String.class; + break; + case Empresas.EMAIL_INDEX: + theClass = String.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Errors.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Errors.java new file mode 100644 index 00000000..37c345ff --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Errors.java @@ -0,0 +1,430 @@ +/* +* Errors.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Errors extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp.inner.errors"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "errors.id"; + public static final int ID_INDEX = 0; + public static final String DATE = "date"; + public static final String DATE_FULL = "errors.date"; + public static final int DATE_INDEX = 1; + public static final String TYPE = "type"; + public static final String TYPE_FULL = "errors.type"; + public static final int TYPE_INDEX = 2; + public static final String ENVIRONMENT = "environment"; + public static final String ENVIRONMENT_FULL = "errors.environment"; + public static final int ENVIRONMENT_INDEX = 3; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "errors.description"; + public static final int DESCRIPTION_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DATE, TYPE, ENVIRONMENT, DESCRIPTION, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATE, TABLENAME + "." + TYPE, TABLENAME + "." + ENVIRONMENT, TABLENAME + "." + DESCRIPTION, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATE, TYPE, ENVIRONMENT, DESCRIPTION, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATE, TYPE, ENVIRONMENT, DESCRIPTION, }; + + private Integer id; + private java.sql.Timestamp date; + private String type; + private String environment; + private String description; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Errors() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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, 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Estabelecimentos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Estabelecimentos.java new file mode 100644 index 00000000..b576d642 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Estabelecimentos.java @@ -0,0 +1,776 @@ +/* +* Estabelecimentos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Estabelecimentos extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + com.evolute.entity.evo.EvoDataObject.register( Estabelecimentos.CLASS_IDENTIFIER, Estabelecimentos.EMPRESA_ID, Estabelecimentos.TO_EMPRESA_ID ); + FIELD_INDEXES.put( Estabelecimentos.EMPRESA_ID, Estabelecimentos.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.EMPRESA_ID_FULL, Estabelecimentos.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.TO_EMPRESA_ID, Estabelecimentos.TO_EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.MORADA, Estabelecimentos.MORADA_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.MORADA_FULL, Estabelecimentos.MORADA_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.CODIGO_POSTAL, Estabelecimentos.CODIGO_POSTAL_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.CODIGO_POSTAL_FULL, Estabelecimentos.CODIGO_POSTAL_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.LOCALIDADE, Estabelecimentos.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.LOCALIDADE_FULL, Estabelecimentos.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.ULTIMA_VISITA, Estabelecimentos.ULTIMA_VISITA_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.ULTIMA_VISITA_FULL, Estabelecimentos.ULTIMA_VISITA_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.REALIZADA, Estabelecimentos.REALIZADA_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.REALIZADA_FULL, Estabelecimentos.REALIZADA_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.PROXIMA_VISITA, Estabelecimentos.PROXIMA_VISITA_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.PROXIMA_VISITA_FULL, Estabelecimentos.PROXIMA_VISITA_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.NOME, Estabelecimentos.NOME_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.NOME_FULL, Estabelecimentos.NOME_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.MEDICO_ID, Estabelecimentos.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.MEDICO_ID_FULL, Estabelecimentos.MEDICO_ID_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( Estabelecimentos.class, Estabelecimentos.EMPRESA_ID, db.data.siprp.outer.EmpresasData.class, db.data.siprp.outer.EmpresasData.ID ); + + public static final String TABLENAME = "estabelecimentos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.estabelecimentos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "estabelecimentos.id"; + public static final int ID_INDEX = 0; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "estabelecimentos.empresa_id"; + public static final int EMPRESA_ID_INDEX = 1; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final String TO_EMPRESA_ID_FULL = "estabelecimentos.to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 2; + public static final String MORADA = "morada"; + public static final String MORADA_FULL = "estabelecimentos.morada"; + public static final int MORADA_INDEX = 3; + public static final String CODIGO_POSTAL = "codigo_postal"; + public static final String CODIGO_POSTAL_FULL = "estabelecimentos.codigo_postal"; + public static final int CODIGO_POSTAL_INDEX = 4; + public static final String LOCALIDADE = "localidade"; + public static final String LOCALIDADE_FULL = "estabelecimentos.localidade"; + public static final int LOCALIDADE_INDEX = 5; + public static final String ULTIMA_VISITA = "ultima_visita"; + public static final String ULTIMA_VISITA_FULL = "estabelecimentos.ultima_visita"; + public static final int ULTIMA_VISITA_INDEX = 6; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "estabelecimentos.realizada"; + public static final int REALIZADA_INDEX = 7; + public static final String PROXIMA_VISITA = "proxima_visita"; + public static final String PROXIMA_VISITA_FULL = "estabelecimentos.proxima_visita"; + public static final int PROXIMA_VISITA_INDEX = 8; + public static final String NOME = "nome"; + public static final String NOME_FULL = "estabelecimentos.nome"; + public static final int NOME_INDEX = 9; + public static final String MEDICO_ID = "medico_id"; + public static final String MEDICO_ID_FULL = "estabelecimentos.medico_id"; + public static final int MEDICO_ID_INDEX = 10; + + public static final String FIELD_NAMES[] = new String[]{ + EMPRESA_ID, TO_EMPRESA_ID, MORADA, CODIGO_POSTAL, LOCALIDADE, ULTIMA_VISITA, + REALIZADA, PROXIMA_VISITA, NOME, MEDICO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + MORADA, TABLENAME + "." + CODIGO_POSTAL, TABLENAME + "." + LOCALIDADE, TABLENAME + "." + ULTIMA_VISITA, + TABLENAME + "." + REALIZADA, TABLENAME + "." + PROXIMA_VISITA, TABLENAME + "." + NOME, TABLENAME + "." + MEDICO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, EMPRESA_ID, MORADA, CODIGO_POSTAL, LOCALIDADE, ULTIMA_VISITA, REALIZADA, + PROXIMA_VISITA, NOME, MEDICO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, EMPRESA_ID, MORADA, CODIGO_POSTAL, LOCALIDADE, ULTIMA_VISITA, REALIZADA, + PROXIMA_VISITA, NOME, MEDICO_ID, }; + + private Integer id; + private Integer empresa_id; + private db.data.siprp.outer.EmpresasData to_empresa_id; + private String morada; + private String codigo_postal; + private String localidade; + private java.util.Date ultima_visita; + private String realizada; + private java.util.Date proxima_visita; + private String nome; + private Integer medico_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Estabelecimentos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false, false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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( db.data.siprp.outer.AvisosData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHistoricoEstabelecimento_estabelecimento_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.HistoricoEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadores_estabelecimento_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.TrabalhadoresData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public Integer getEmpresa_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( EMPRESA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.empresa_id; + } + + public void setEmpresa_id( Integer empresa_id ) + { + try + { + 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 db.data.siprp.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp.outer.EmpresasData to_empresa_id ) + { + try + { + preProcess( TO_EMPRESA_ID, to_empresa_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_empresa_id = to_empresa_id; + } + + public String getMorada() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MORADA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.morada; + } + + public void setMorada( String morada ) + { + try + { + 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 java.util.Date getUltima_visita() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ULTIMA_VISITA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ultima_visita; + } + + public void setUltima_visita( java.util.Date ultima_visita ) + { + try + { + setLockedForRefresh( true ); + preProcess( ULTIMA_VISITA, ultima_visita ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ultima_visita = ultima_visita; + LAZY_LOADED_OBJECTS.put( ULTIMA_VISITA, Boolean.TRUE ); + } + + public String getRealizada() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( REALIZADA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.realizada; + } + + public void setRealizada( String realizada ) + { + try + { + 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 getProxima_visita() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROXIMA_VISITA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.proxima_visita; + } + + public void setProxima_visita( java.util.Date proxima_visita ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROXIMA_VISITA, proxima_visita ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.proxima_visita = proxima_visita; + LAZY_LOADED_OBJECTS.put( PROXIMA_VISITA, Boolean.TRUE ); + } + + public String getNome() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome; + } + + public void setNome( String nome ) + { + try + { + 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 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Estabelecimentos.ID_INDEX: + value = getId(); + break; + case Estabelecimentos.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case Estabelecimentos.TO_EMPRESA_ID_INDEX: + value = toEmpresa_id(); + break; + case Estabelecimentos.MORADA_INDEX: + value = getMorada(); + break; + case Estabelecimentos.CODIGO_POSTAL_INDEX: + value = getCodigo_postal(); + break; + case Estabelecimentos.LOCALIDADE_INDEX: + value = getLocalidade(); + break; + case Estabelecimentos.ULTIMA_VISITA_INDEX: + value = getUltima_visita(); + break; + case Estabelecimentos.REALIZADA_INDEX: + value = getRealizada(); + break; + case Estabelecimentos.PROXIMA_VISITA_INDEX: + value = getProxima_visita(); + break; + case Estabelecimentos.NOME_INDEX: + value = getNome(); + break; + case Estabelecimentos.MEDICO_ID_INDEX: + value = getMedico_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Estabelecimentos.ID_INDEX: + value = this.id; + break; + case Estabelecimentos.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case Estabelecimentos.TO_EMPRESA_ID_INDEX: + value = this.to_empresa_id; + break; + case Estabelecimentos.MORADA_INDEX: + value = this.morada; + break; + case Estabelecimentos.CODIGO_POSTAL_INDEX: + value = this.codigo_postal; + break; + case Estabelecimentos.LOCALIDADE_INDEX: + value = this.localidade; + break; + case Estabelecimentos.ULTIMA_VISITA_INDEX: + value = this.ultima_visita; + break; + case Estabelecimentos.REALIZADA_INDEX: + value = this.realizada; + break; + case Estabelecimentos.PROXIMA_VISITA_INDEX: + value = this.proxima_visita; + break; + case Estabelecimentos.NOME_INDEX: + value = this.nome; + break; + case Estabelecimentos.MEDICO_ID_INDEX: + value = this.medico_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Estabelecimentos.ID_INDEX: + setId( ( Integer ) value ); + break; + case Estabelecimentos.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case Estabelecimentos.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( db.data.siprp.outer.EmpresasData ) value ); + break; + case Estabelecimentos.MORADA_INDEX: + setMorada( ( String ) value ); + break; + case Estabelecimentos.CODIGO_POSTAL_INDEX: + setCodigo_postal( ( String ) value ); + break; + case Estabelecimentos.LOCALIDADE_INDEX: + setLocalidade( ( String ) value ); + break; + case Estabelecimentos.ULTIMA_VISITA_INDEX: + setUltima_visita( ( java.util.Date ) value ); + break; + case Estabelecimentos.REALIZADA_INDEX: + setRealizada( ( String ) value ); + break; + case Estabelecimentos.PROXIMA_VISITA_INDEX: + setProxima_visita( ( java.util.Date ) value ); + break; + case Estabelecimentos.NOME_INDEX: + setNome( ( String ) value ); + break; + case Estabelecimentos.MEDICO_ID_INDEX: + setMedico_id( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Estabelecimentos.ID_INDEX: + this.id = ( Integer ) value; + break; + case Estabelecimentos.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case Estabelecimentos.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( db.data.siprp.outer.EmpresasData ) value; + break; + case Estabelecimentos.MORADA_INDEX: + this.morada = ( String ) value; + break; + case Estabelecimentos.CODIGO_POSTAL_INDEX: + this.codigo_postal = ( String ) value; + break; + case Estabelecimentos.LOCALIDADE_INDEX: + this.localidade = ( String ) value; + break; + case Estabelecimentos.ULTIMA_VISITA_INDEX: + this.ultima_visita = ( java.util.Date ) value; + break; + case Estabelecimentos.REALIZADA_INDEX: + this.realizada = ( String ) value; + break; + case Estabelecimentos.PROXIMA_VISITA_INDEX: + this.proxima_visita = ( java.util.Date ) value; + break; + case Estabelecimentos.NOME_INDEX: + this.nome = ( String ) value; + break; + case Estabelecimentos.MEDICO_ID_INDEX: + this.medico_id = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Estabelecimentos.ID_INDEX: + theClass = Integer.class; + break; + case Estabelecimentos.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case Estabelecimentos.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp.outer.EmpresasData.class; + break; + case Estabelecimentos.MORADA_INDEX: + theClass = String.class; + break; + case Estabelecimentos.CODIGO_POSTAL_INDEX: + theClass = String.class; + break; + case Estabelecimentos.LOCALIDADE_INDEX: + theClass = String.class; + break; + case Estabelecimentos.ULTIMA_VISITA_INDEX: + theClass = java.util.Date.class; + break; + case Estabelecimentos.REALIZADA_INDEX: + theClass = String.class; + break; + case Estabelecimentos.PROXIMA_VISITA_INDEX: + theClass = java.util.Date.class; + break; + case Estabelecimentos.NOME_INDEX: + theClass = String.class; + break; + case Estabelecimentos.MEDICO_ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Estabelecimentos._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Estabelecimentos.PK_FIELD_NAMES ); + primaryKey.set( 0, getId() ); + } + } + + @Override + public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/EstadoMedidas.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/EstadoMedidas.java new file mode 100644 index 00000000..2408c8e4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/EstadoMedidas.java @@ -0,0 +1,395 @@ +/* +* EstadoMedidas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class EstadoMedidas extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EstadoMedidas.ID, EstadoMedidas.ID_INDEX ); + FIELD_INDEXES.put( EstadoMedidas.ID_FULL, EstadoMedidas.ID_INDEX ); + FIELD_INDEXES.put( EstadoMedidas.DESCRICAO, EstadoMedidas.DESCRICAO_INDEX ); + FIELD_INDEXES.put( EstadoMedidas.DESCRICAO_FULL, EstadoMedidas.DESCRICAO_INDEX ); + FIELD_INDEXES.put( EstadoMedidas.ORDEM, EstadoMedidas.ORDEM_INDEX ); + FIELD_INDEXES.put( EstadoMedidas.ORDEM_FULL, EstadoMedidas.ORDEM_INDEX ); + FIELD_INDEXES.put( EstadoMedidas.ACTIVO, EstadoMedidas.ACTIVO_INDEX ); + FIELD_INDEXES.put( EstadoMedidas.ACTIVO_FULL, EstadoMedidas.ACTIVO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "estado_medidas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.estado_medidas"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "estado_medidas.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "estado_medidas.descricao"; + public static final int DESCRICAO_INDEX = 1; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "estado_medidas.ordem"; + public static final int ORDEM_INDEX = 2; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "estado_medidas.activo"; + public static final int ACTIVO_INDEX = 3; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, ORDEM, ACTIVO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + ORDEM, TABLENAME + "." + ACTIVO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, ORDEM, ACTIVO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRICAO, ORDEM, ACTIVO, }; + + private Integer id; + private String descricao; + private Integer ordem; + private String activo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EstadoMedidas() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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.ListfromPlanoMedidas_estado_medidas_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.PlanoMedidasData.class , getPrimaryKey().getMap().get("id"), "estado_medidas_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public String getDescricao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao; + } + + public void setDescricao( String descricao ) + { + try + { + 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 EstadoMedidas.ID_INDEX: + value = getId(); + break; + case EstadoMedidas.DESCRICAO_INDEX: + value = getDescricao(); + break; + case EstadoMedidas.ORDEM_INDEX: + value = getOrdem(); + break; + case EstadoMedidas.ACTIVO_INDEX: + value = getActivo(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EstadoMedidas.ID_INDEX: + value = this.id; + break; + case EstadoMedidas.DESCRICAO_INDEX: + value = this.descricao; + break; + case EstadoMedidas.ORDEM_INDEX: + value = this.ordem; + break; + case EstadoMedidas.ACTIVO_INDEX: + value = this.activo; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EstadoMedidas.ID_INDEX: + setId( ( Integer ) value ); + break; + case EstadoMedidas.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case EstadoMedidas.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + case EstadoMedidas.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EstadoMedidas.ID_INDEX: + this.id = ( Integer ) value; + break; + case EstadoMedidas.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case EstadoMedidas.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + case EstadoMedidas.ACTIVO_INDEX: + this.activo = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case EstadoMedidas.ID_INDEX: + theClass = Integer.class; + break; + case EstadoMedidas.DESCRICAO_INDEX: + theClass = String.class; + break; + case EstadoMedidas.ORDEM_INDEX: + theClass = Integer.class; + break; + case EstadoMedidas.ACTIVO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EstadoMedidas._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, EstadoMedidas.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Exames.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Exames.java new file mode 100644 index 00000000..04f0a3fd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Exames.java @@ -0,0 +1,1096 @@ +/* +* Exames.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Exames extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + } + + 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, db.data.siprp.outer.TrabalhadoresData.class, db.data.siprp.outer.TrabalhadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedico_idTomedicos = + new com.evolute.entity.ForeignKey( Exames.class, Exames.MEDICO_ID, db.data.siprp.outer.MedicosData.class, db.data.siprp.outer.MedicosData.ID ); + + public static final String TABLENAME = "exames"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.exames"; + + 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 String TO_TRABALHADOR_ID_FULL = "exames.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 String TO_MEDICO_ID_FULL = "exames.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 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, }; + + 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, }; + + 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, }; + + + 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 db.data.siprp.outer.TrabalhadoresData to_trabalhador_id; + private Integer medico_id; + private db.data.siprp.outer.MedicosData to_medico_id; + private byte[] pdf; + + 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 }; + } + + 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 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 db.data.siprp.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp.outer.TrabalhadoresData to_trabalhador_id ) + { + try + { + preProcess( TO_TRABALHADOR_ID, to_trabalhador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_trabalhador_id = to_trabalhador_id; + } + + public Integer 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 db.data.siprp.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( db.data.siprp.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 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; + } + 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; + } + 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( ( db.data.siprp.outer.TrabalhadoresData ) value ); + break; + case Exames.MEDICO_ID_INDEX: + setMedico_id( ( Integer ) value ); + break; + case Exames.TO_MEDICO_ID_INDEX: + setToMedico_id( ( db.data.siprp.outer.MedicosData ) value ); + break; + case Exames.PDF_INDEX: + setPdf( ( 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 = ( db.data.siprp.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 = ( db.data.siprp.outer.MedicosData ) value; + break; + case Exames.PDF_INDEX: + this.pdf = ( 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 = db.data.siprp.outer.TrabalhadoresData.class; + break; + case Exames.MEDICO_ID_INDEX: + theClass = Integer.class; + break; + case Exames.TO_MEDICO_ID_INDEX: + theClass = db.data.siprp.outer.MedicosData.class; + break; + case Exames.PDF_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 ); + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/ExamesPerfis.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/ExamesPerfis.java new file mode 100644 index 00000000..c81ab08c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/ExamesPerfis.java @@ -0,0 +1,430 @@ +/* +* ExamesPerfis.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class ExamesPerfis extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp.outer.TiposExamesCompData.class, db.data.siprp.outer.TiposExamesCompData.ID ); + + public static final String TABLENAME = "exames_perfis"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.exames_perfis"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "exames_perfis.id"; + public static final int ID_INDEX = 0; + public static final String PERFIL = "perfil"; + public static final String PERFIL_FULL = "exames_perfis.perfil"; + public static final int PERFIL_INDEX = 1; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "exames_perfis.tipo"; + public static final int TIPO_INDEX = 2; + public static final String TO_TIPO = "to_tipo"; + public static final String TO_TIPO_FULL = "exames_perfis.to_tipo"; + public static final int TO_TIPO_INDEX = 3; + public static final String MULTIPLICADOR = "multiplicador"; + public static final String MULTIPLICADOR_FULL = "exames_perfis.multiplicador"; + public static final int MULTIPLICADOR_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + PERFIL, TIPO, TO_TIPO, MULTIPLICADOR, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + PERFIL, TABLENAME + "." + TIPO, TABLENAME + "." + TO_TIPO, TABLENAME + "." + MULTIPLICADOR, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, PERFIL, TIPO, MULTIPLICADOR, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, PERFIL, TIPO, MULTIPLICADOR, }; + + private Integer id; + private Integer perfil; + private Integer tipo; + private db.data.siprp.outer.TiposExamesCompData to_tipo; + private Integer multiplicador; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public ExamesPerfis() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 db.data.siprp.outer.TiposExamesCompData toTipo() + { + try + { + prepare( TO_TIPO ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_tipo; + } + + public void setToTipo( db.data.siprp.outer.TiposExamesCompData to_tipo ) + { + try + { + preProcess( TO_TIPO, to_tipo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_tipo = to_tipo; + } + + public Integer getMultiplicador() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MULTIPLICADOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.multiplicador; + } + + public void setMultiplicador( Integer multiplicador ) + { + try + { + 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( ( db.data.siprp.outer.TiposExamesCompData ) value ); + break; + case ExamesPerfis.MULTIPLICADOR_INDEX: + setMultiplicador( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case ExamesPerfis.ID_INDEX: + this.id = ( Integer ) value; + break; + case ExamesPerfis.PERFIL_INDEX: + this.perfil = ( Integer ) value; + break; + case ExamesPerfis.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case ExamesPerfis.TO_TIPO_INDEX: + this.to_tipo = ( db.data.siprp.outer.TiposExamesCompData ) value; + break; + case ExamesPerfis.MULTIPLICADOR_INDEX: + this.multiplicador = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case ExamesPerfis.ID_INDEX: + theClass = Integer.class; + break; + case ExamesPerfis.PERFIL_INDEX: + theClass = Integer.class; + break; + case ExamesPerfis.TIPO_INDEX: + theClass = Integer.class; + break; + case ExamesPerfis.TO_TIPO_INDEX: + theClass = db.data.siprp.outer.TiposExamesCompData.class; + break; + case ExamesPerfis.MULTIPLICADOR_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : ExamesPerfis._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, ExamesPerfis.PK_FIELD_NAMES ); + primaryKey.set( 0, getId() ); + } + } + + @Override + public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/HistoricoEstabelecimento.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/HistoricoEstabelecimento.java new file mode 100644 index 00000000..4c876346 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/HistoricoEstabelecimento.java @@ -0,0 +1,430 @@ +/* +* HistoricoEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class HistoricoEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp.outer.EstabelecimentosData.class, db.data.siprp.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "historico_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.historico_estabelecimento"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "historico_estabelecimento.id"; + public static final int ID_INDEX = 0; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "historico_estabelecimento.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 1; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID_FULL = "historico_estabelecimento.to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 2; + public static final String DATA = "data"; + public static final String DATA_FULL = "historico_estabelecimento.data"; + public static final int DATA_INDEX = 3; + public static final String TEXTO = "texto"; + public static final String TEXTO_FULL = "historico_estabelecimento.texto"; + public static final int TEXTO_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, DATA, TEXTO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID, TABLENAME + "." + DATA, TABLENAME + "." + TEXTO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ESTABELECIMENTO_ID, DATA, TEXTO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ESTABELECIMENTO_ID, DATA, TEXTO, }; + + private Integer id; + private Integer estabelecimento_id; + private db.data.siprp.outer.EstabelecimentosData to_estabelecimento_id; + private java.util.Date data; + private String texto; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HistoricoEstabelecimento() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 db.data.siprp.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp.outer.EstabelecimentosData to_estabelecimento_id ) + { + try + { + preProcess( TO_ESTABELECIMENTO_ID, to_estabelecimento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_estabelecimento_id = to_estabelecimento_id; + } + + public java.util.Date getData() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data; + } + + public void setData( java.util.Date data ) + { + try + { + 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( ( db.data.siprp.outer.EstabelecimentosData ) value ); + break; + case HistoricoEstabelecimento.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case HistoricoEstabelecimento.TEXTO_INDEX: + setTexto( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HistoricoEstabelecimento.ID_INDEX: + this.id = ( Integer ) value; + break; + case HistoricoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case HistoricoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( db.data.siprp.outer.EstabelecimentosData ) value; + break; + case HistoricoEstabelecimento.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case HistoricoEstabelecimento.TEXTO_INDEX: + this.texto = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HistoricoEstabelecimento.ID_INDEX: + theClass = Integer.class; + break; + case HistoricoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case HistoricoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp.outer.EstabelecimentosData.class; + break; + case HistoricoEstabelecimento.DATA_INDEX: + theClass = java.util.Date.class; + break; + case HistoricoEstabelecimento.TEXTO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HistoricoEstabelecimento._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, HistoricoEstabelecimento.PK_FIELD_NAMES ); + primaryKey.set( 0, getId() ); + } + } + + @Override + public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/MarcacoesEmpresa.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/MarcacoesEmpresa.java new file mode 100644 index 00000000..14a69140 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/MarcacoesEmpresa.java @@ -0,0 +1,480 @@ +/* +* MarcacoesEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class MarcacoesEmpresa extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp.outer.EmpresasData.class, db.data.siprp.outer.EmpresasData.ID ); + + public static final String TABLENAME = "marcacoes_empresa"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.marcacoes_empresa"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_empresa.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_empresa.data"; + public static final int DATA_INDEX = 1; + public static final String TEXTO = "texto"; + public static final String TEXTO_FULL = "marcacoes_empresa.texto"; + public static final int TEXTO_INDEX = 2; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "marcacoes_empresa.empresa_id"; + public static final int EMPRESA_ID_INDEX = 3; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final String TO_EMPRESA_ID_FULL = "marcacoes_empresa.to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 4; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "marcacoes_empresa.realizada"; + public static final int REALIZADA_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, TEXTO, EMPRESA_ID, TO_EMPRESA_ID, REALIZADA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA, TABLENAME + "." + TEXTO, TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + REALIZADA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, TEXTO, EMPRESA_ID, REALIZADA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA, TEXTO, EMPRESA_ID, REALIZADA, }; + + private Integer id; + private java.util.Date data; + private String texto; + private Integer empresa_id; + private db.data.siprp.outer.EmpresasData to_empresa_id; + private String realizada; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public MarcacoesEmpresa() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 db.data.siprp.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp.outer.EmpresasData to_empresa_id ) + { + try + { + preProcess( TO_EMPRESA_ID, to_empresa_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_empresa_id = to_empresa_id; + } + + public String getRealizada() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( REALIZADA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.realizada; + } + + public void setRealizada( String realizada ) + { + try + { + 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( ( db.data.siprp.outer.EmpresasData ) value ); + break; + case MarcacoesEmpresa.REALIZADA_INDEX: + setRealizada( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesEmpresa.ID_INDEX: + this.id = ( Integer ) value; + break; + case MarcacoesEmpresa.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case MarcacoesEmpresa.TEXTO_INDEX: + this.texto = ( String ) value; + break; + case MarcacoesEmpresa.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case MarcacoesEmpresa.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( db.data.siprp.outer.EmpresasData ) value; + break; + case MarcacoesEmpresa.REALIZADA_INDEX: + this.realizada = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case MarcacoesEmpresa.ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesEmpresa.DATA_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesEmpresa.TEXTO_INDEX: + theClass = String.class; + break; + case MarcacoesEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesEmpresa.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp.outer.EmpresasData.class; + break; + case MarcacoesEmpresa.REALIZADA_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : MarcacoesEmpresa._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, MarcacoesEmpresa.PK_FIELD_NAMES ); + primaryKey.set( 0, getId() ); + } + } + + @Override + public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/MarcacoesEstabelecimento.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/MarcacoesEstabelecimento.java new file mode 100644 index 00000000..4028cd6c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/MarcacoesEstabelecimento.java @@ -0,0 +1,480 @@ +/* +* MarcacoesEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.ESTABELECIMENTO_ID, MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.ESTABELECIMENTO_ID_FULL, MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "marcacoes_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.marcacoes_estabelecimento"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_estabelecimento.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_estabelecimento.data"; + public static final int DATA_INDEX = 1; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "marcacoes_estabelecimento.realizada"; + public static final int REALIZADA_INDEX = 2; + public static final String DATA_EMAIL = "data_email"; + public static final String DATA_EMAIL_FULL = "marcacoes_estabelecimento.data_email"; + public static final int DATA_EMAIL_INDEX = 3; + public static final String DATA_RELATORIO = "data_relatorio"; + public static final String DATA_RELATORIO_FULL = "marcacoes_estabelecimento.data_relatorio"; + public static final int DATA_RELATORIO_INDEX = 4; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "marcacoes_estabelecimento.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA, TABLENAME + "." + REALIZADA, TABLENAME + "." + DATA_EMAIL, TABLENAME + "." + DATA_RELATORIO, TABLENAME + "." + ESTABELECIMENTO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO_ID, }; + + private Integer id; + private java.util.Date data; + private String realizada; + private java.util.Date data_email; + private java.util.Date data_relatorio; + private Integer estabelecimento_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public MarcacoesEstabelecimento() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesEstabelecimento.ID_INDEX: + value = getId(); + break; + case MarcacoesEstabelecimento.DATA_INDEX: + value = getData(); + break; + case MarcacoesEstabelecimento.REALIZADA_INDEX: + value = getRealizada(); + break; + case MarcacoesEstabelecimento.DATA_EMAIL_INDEX: + value = getData_email(); + break; + case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX: + value = getData_relatorio(); + break; + case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesEstabelecimento.ID_INDEX: + value = this.id; + break; + case MarcacoesEstabelecimento.DATA_INDEX: + value = this.data; + break; + case MarcacoesEstabelecimento.REALIZADA_INDEX: + value = this.realizada; + break; + case MarcacoesEstabelecimento.DATA_EMAIL_INDEX: + value = this.data_email; + break; + case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX: + value = this.data_relatorio; + break; + case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesEstabelecimento.ID_INDEX: + setId( ( Integer ) value ); + break; + case MarcacoesEstabelecimento.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case MarcacoesEstabelecimento.REALIZADA_INDEX: + setRealizada( ( String ) value ); + break; + case MarcacoesEstabelecimento.DATA_EMAIL_INDEX: + setData_email( ( java.util.Date ) value ); + break; + case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX: + setData_relatorio( ( java.util.Date ) value ); + break; + case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesEstabelecimento.ID_INDEX: + this.id = ( Integer ) value; + break; + case MarcacoesEstabelecimento.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case MarcacoesEstabelecimento.REALIZADA_INDEX: + this.realizada = ( String ) value; + break; + case MarcacoesEstabelecimento.DATA_EMAIL_INDEX: + this.data_email = ( java.util.Date ) value; + break; + case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX: + this.data_relatorio = ( java.util.Date ) value; + break; + case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case MarcacoesEstabelecimento.ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesEstabelecimento.DATA_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesEstabelecimento.REALIZADA_INDEX: + theClass = String.class; + break; + case MarcacoesEstabelecimento.DATA_EMAIL_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : MarcacoesEstabelecimento._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, MarcacoesEstabelecimento.PK_FIELD_NAMES ); + primaryKey.set( 0, getId() ); + } + } + + @Override + public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/MarcacoesTrabalhador.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/MarcacoesTrabalhador.java new file mode 100644 index 00000000..b45dc69a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/MarcacoesTrabalhador.java @@ -0,0 +1,582 @@ +/* +* MarcacoesTrabalhador.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class MarcacoesTrabalhador extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores = + new com.evolute.entity.ForeignKey( MarcacoesTrabalhador.class, MarcacoesTrabalhador.TRABALHADOR_ID, db.data.siprp.outer.TrabalhadoresData.class, db.data.siprp.outer.TrabalhadoresData.ID ); + + public static final String TABLENAME = "marcacoes_trabalhador"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.marcacoes_trabalhador"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_trabalhador.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_trabalhador.data"; + public static final int DATA_INDEX = 1; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "marcacoes_trabalhador.realizada"; + public static final int REALIZADA_INDEX = 2; + public static final String DATA_EMAIL = "data_email"; + public static final String DATA_EMAIL_FULL = "marcacoes_trabalhador.data_email"; + public static final int DATA_EMAIL_INDEX = 3; + public static final String DATA_RELATORIO = "data_relatorio"; + public static final String DATA_RELATORIO_FULL = "marcacoes_trabalhador.data_relatorio"; + public static final int DATA_RELATORIO_INDEX = 4; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "marcacoes_trabalhador.tipo"; + public static final int TIPO_INDEX = 5; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "marcacoes_trabalhador.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 6; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final String TO_TRABALHADOR_ID_FULL = "marcacoes_trabalhador.to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 7; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR_ID, + TO_TRABALHADOR_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA, TABLENAME + "." + REALIZADA, TABLENAME + "." + DATA_EMAIL, TABLENAME + "." + DATA_RELATORIO, TABLENAME + "." + TIPO, TABLENAME + "." + TRABALHADOR_ID, + TABLENAME + "." + TO_TRABALHADOR_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR_ID, }; + + private Integer id; + private java.util.Date data; + private String realizada; + private java.util.Date data_email; + private java.util.Date data_relatorio; + private Integer tipo; + private Integer trabalhador_id; + private db.data.siprp.outer.TrabalhadoresData to_trabalhador_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public MarcacoesTrabalhador() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 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 db.data.siprp.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp.outer.TrabalhadoresData to_trabalhador_id ) + { + try + { + preProcess( TO_TRABALHADOR_ID, to_trabalhador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_trabalhador_id = to_trabalhador_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTrabalhador.ID_INDEX: + value = getId(); + break; + case MarcacoesTrabalhador.DATA_INDEX: + value = getData(); + break; + case MarcacoesTrabalhador.REALIZADA_INDEX: + value = getRealizada(); + break; + case MarcacoesTrabalhador.DATA_EMAIL_INDEX: + value = getData_email(); + break; + case MarcacoesTrabalhador.DATA_RELATORIO_INDEX: + value = getData_relatorio(); + break; + case MarcacoesTrabalhador.TIPO_INDEX: + value = getTipo(); + break; + case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX: + value = getTrabalhador_id(); + break; + case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX: + value = toTrabalhador_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTrabalhador.ID_INDEX: + value = this.id; + break; + case MarcacoesTrabalhador.DATA_INDEX: + value = this.data; + break; + case MarcacoesTrabalhador.REALIZADA_INDEX: + value = this.realizada; + break; + case MarcacoesTrabalhador.DATA_EMAIL_INDEX: + value = this.data_email; + break; + case MarcacoesTrabalhador.DATA_RELATORIO_INDEX: + value = this.data_relatorio; + break; + case MarcacoesTrabalhador.TIPO_INDEX: + value = this.tipo; + break; + case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX: + value = this.trabalhador_id; + break; + case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX: + value = this.to_trabalhador_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTrabalhador.ID_INDEX: + setId( ( Integer ) value ); + break; + case MarcacoesTrabalhador.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case MarcacoesTrabalhador.REALIZADA_INDEX: + setRealizada( ( String ) value ); + break; + case MarcacoesTrabalhador.DATA_EMAIL_INDEX: + setData_email( ( java.util.Date ) value ); + break; + case MarcacoesTrabalhador.DATA_RELATORIO_INDEX: + setData_relatorio( ( java.util.Date ) value ); + break; + case MarcacoesTrabalhador.TIPO_INDEX: + setTipo( ( Integer ) value ); + break; + case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( db.data.siprp.outer.TrabalhadoresData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTrabalhador.ID_INDEX: + this.id = ( Integer ) value; + break; + case MarcacoesTrabalhador.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case MarcacoesTrabalhador.REALIZADA_INDEX: + this.realizada = ( String ) value; + break; + case MarcacoesTrabalhador.DATA_EMAIL_INDEX: + this.data_email = ( java.util.Date ) value; + break; + case MarcacoesTrabalhador.DATA_RELATORIO_INDEX: + this.data_relatorio = ( java.util.Date ) value; + break; + case MarcacoesTrabalhador.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX: + this.to_trabalhador_id = ( db.data.siprp.outer.TrabalhadoresData ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case MarcacoesTrabalhador.ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.DATA_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesTrabalhador.REALIZADA_INDEX: + theClass = String.class; + break; + case MarcacoesTrabalhador.DATA_EMAIL_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesTrabalhador.DATA_RELATORIO_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesTrabalhador.TIPO_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX: + theClass = db.data.siprp.outer.TrabalhadoresData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : MarcacoesTrabalhador._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, MarcacoesTrabalhador.PK_FIELD_NAMES ); + primaryKey.set( 0, getId() ); + } + } + + @Override + public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Medicos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Medicos.java new file mode 100644 index 00000000..944d99da --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Medicos.java @@ -0,0 +1,394 @@ +/* +* Medicos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Medicos extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp.inner.medicos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "medicos.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "medicos.nome"; + public static final int NOME_INDEX = 1; + public static final String NUMERO_CEDULA = "numero_cedula"; + public static final String NUMERO_CEDULA_FULL = "medicos.numero_cedula"; + public static final int NUMERO_CEDULA_INDEX = 2; + public static final String INACTIVO = "inactivo"; + public static final String INACTIVO_FULL = "medicos.inactivo"; + public static final int INACTIVO_INDEX = 3; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, NUMERO_CEDULA, INACTIVO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + NUMERO_CEDULA, TABLENAME + "." + INACTIVO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, NUMERO_CEDULA, INACTIVO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, NUMERO_CEDULA, INACTIVO, }; + + private Integer id; + private String nome; + private String numero_cedula; + private String inactivo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Medicos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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.ListfromExames_medico_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.ExamesData.class , getPrimaryKey().getMap().get("id"), "medico_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public String getNome() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome; + } + + public void setNome( String nome ) + { + try + { + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Medidas.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Medidas.java new file mode 100644 index 00000000..bbc281d0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Medidas.java @@ -0,0 +1,381 @@ +/* +* Medidas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Medidas extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Medidas.ID, Medidas.ID_INDEX ); + FIELD_INDEXES.put( Medidas.ID_FULL, Medidas.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Medidas.CLASS_IDENTIFIER, Medidas.ANALISE_ID, Medidas.TO_ANALISE_ID ); + FIELD_INDEXES.put( Medidas.ANALISE_ID, Medidas.ANALISE_ID_INDEX ); + FIELD_INDEXES.put( Medidas.ANALISE_ID_FULL, Medidas.ANALISE_ID_INDEX ); + FIELD_INDEXES.put( Medidas.TO_ANALISE_ID, Medidas.TO_ANALISE_ID_INDEX ); + FIELD_INDEXES.put( Medidas.MEDIDA, Medidas.MEDIDA_INDEX ); + FIELD_INDEXES.put( Medidas.MEDIDA_FULL, Medidas.MEDIDA_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyanalise_idToanalises_acidentes = + new com.evolute.entity.ForeignKey( Medidas.class, Medidas.ANALISE_ID, db.data.siprp.outer.AnalisesAcidentesData.class, db.data.siprp.outer.AnalisesAcidentesData.ID ); + + public static final String TABLENAME = "medidas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.medidas"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "medidas.id"; + public static final int ID_INDEX = 0; + public static final String ANALISE_ID = "analise_id"; + public static final String ANALISE_ID_FULL = "medidas.analise_id"; + public static final int ANALISE_ID_INDEX = 1; + public static final String TO_ANALISE_ID = "to_analise_id"; + public static final String TO_ANALISE_ID_FULL = "medidas.to_analise_id"; + public static final int TO_ANALISE_ID_INDEX = 2; + public static final String MEDIDA = "medida"; + public static final String MEDIDA_FULL = "medidas.medida"; + public static final int MEDIDA_INDEX = 3; + + public static final String FIELD_NAMES[] = new String[]{ + ANALISE_ID, TO_ANALISE_ID, MEDIDA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ANALISE_ID, TABLENAME + "." + TO_ANALISE_ID, TABLENAME + "." + MEDIDA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ANALISE_ID, MEDIDA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ANALISE_ID, MEDIDA, }; + + private Integer id; + private Integer analise_id; + private db.data.siprp.outer.AnalisesAcidentesData to_analise_id; + private String medida; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Medidas() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 getAnalise_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ANALISE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.analise_id; + } + + public void setAnalise_id( Integer analise_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ANALISE_ID, analise_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.analise_id = analise_id; + LAZY_LOADED_OBJECTS.put( ANALISE_ID, Boolean.TRUE ); + } + + public db.data.siprp.outer.AnalisesAcidentesData toAnalise_id() + { + try + { + prepare( TO_ANALISE_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_analise_id; + } + + public void setToAnalise_id( db.data.siprp.outer.AnalisesAcidentesData to_analise_id ) + { + try + { + preProcess( TO_ANALISE_ID, to_analise_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_analise_id = to_analise_id; + } + + public String getMedida() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MEDIDA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.medida; + } + + public void setMedida( String medida ) + { + try + { + setLockedForRefresh( true ); + preProcess( MEDIDA, medida ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.medida = medida; + LAZY_LOADED_OBJECTS.put( MEDIDA, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Medidas.ID_INDEX: + value = getId(); + break; + case Medidas.ANALISE_ID_INDEX: + value = getAnalise_id(); + break; + case Medidas.TO_ANALISE_ID_INDEX: + value = toAnalise_id(); + break; + case Medidas.MEDIDA_INDEX: + value = getMedida(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Medidas.ID_INDEX: + value = this.id; + break; + case Medidas.ANALISE_ID_INDEX: + value = this.analise_id; + break; + case Medidas.TO_ANALISE_ID_INDEX: + value = this.to_analise_id; + break; + case Medidas.MEDIDA_INDEX: + value = this.medida; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Medidas.ID_INDEX: + setId( ( Integer ) value ); + break; + case Medidas.ANALISE_ID_INDEX: + setAnalise_id( ( Integer ) value ); + break; + case Medidas.TO_ANALISE_ID_INDEX: + setToAnalise_id( ( db.data.siprp.outer.AnalisesAcidentesData ) value ); + break; + case Medidas.MEDIDA_INDEX: + setMedida( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Medidas.ID_INDEX: + this.id = ( Integer ) value; + break; + case Medidas.ANALISE_ID_INDEX: + this.analise_id = ( Integer ) value; + break; + case Medidas.TO_ANALISE_ID_INDEX: + this.to_analise_id = ( db.data.siprp.outer.AnalisesAcidentesData ) value; + break; + case Medidas.MEDIDA_INDEX: + this.medida = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Medidas.ID_INDEX: + theClass = Integer.class; + break; + case Medidas.ANALISE_ID_INDEX: + theClass = Integer.class; + break; + case Medidas.TO_ANALISE_ID_INDEX: + theClass = db.data.siprp.outer.AnalisesAcidentesData.class; + break; + case Medidas.MEDIDA_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Medidas._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Medidas.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/NotNoticias.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/NotNoticias.java new file mode 100644 index 00000000..74589834 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/NotNoticias.java @@ -0,0 +1,431 @@ +/* +* NotNoticias.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class NotNoticias extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( NotNoticias.ID, NotNoticias.ID_INDEX ); + FIELD_INDEXES.put( NotNoticias.ID_FULL, NotNoticias.ID_INDEX ); + FIELD_INDEXES.put( NotNoticias.DATA, NotNoticias.DATA_INDEX ); + FIELD_INDEXES.put( NotNoticias.DATA_FULL, NotNoticias.DATA_INDEX ); + FIELD_INDEXES.put( NotNoticias.STAMP, NotNoticias.STAMP_INDEX ); + FIELD_INDEXES.put( NotNoticias.STAMP_FULL, NotNoticias.STAMP_INDEX ); + FIELD_INDEXES.put( NotNoticias.UTILIZADOR, NotNoticias.UTILIZADOR_INDEX ); + FIELD_INDEXES.put( NotNoticias.UTILIZADOR_FULL, NotNoticias.UTILIZADOR_INDEX ); + FIELD_INDEXES.put( NotNoticias.NOTICIA, NotNoticias.NOTICIA_INDEX ); + FIELD_INDEXES.put( NotNoticias.NOTICIA_FULL, NotNoticias.NOTICIA_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "not_noticias"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.not_noticias"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "not_noticias.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "not_noticias.data"; + public static final int DATA_INDEX = 1; + public static final String STAMP = "stamp"; + public static final String STAMP_FULL = "not_noticias.stamp"; + public static final int STAMP_INDEX = 2; + public static final String UTILIZADOR = "utilizador"; + public static final String UTILIZADOR_FULL = "not_noticias.utilizador"; + public static final int UTILIZADOR_INDEX = 3; + public static final String NOTICIA = "noticia"; + public static final String NOTICIA_FULL = "not_noticias.noticia"; + public static final int NOTICIA_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, STAMP, UTILIZADOR, NOTICIA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA, TABLENAME + "." + STAMP, TABLENAME + "." + UTILIZADOR, TABLENAME + "." + NOTICIA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, STAMP, UTILIZADOR, NOTICIA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA, STAMP, UTILIZADOR, NOTICIA, }; + + private Integer id; + private java.util.Date data; + private java.sql.Timestamp stamp; + private String utilizador; + private String noticia; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public NotNoticias() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 java.sql.Timestamp getStamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.stamp; + } + + public void setStamp( java.sql.Timestamp stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( STAMP, stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.stamp = stamp; + LAZY_LOADED_OBJECTS.put( STAMP, Boolean.TRUE ); + } + + public String getUtilizador() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( UTILIZADOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.utilizador; + } + + public void setUtilizador( String utilizador ) + { + try + { + setLockedForRefresh( true ); + preProcess( UTILIZADOR, utilizador ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.utilizador = utilizador; + LAZY_LOADED_OBJECTS.put( UTILIZADOR, Boolean.TRUE ); + } + + public String getNoticia() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOTICIA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.noticia; + } + + public void setNoticia( String noticia ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOTICIA, noticia ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.noticia = noticia; + LAZY_LOADED_OBJECTS.put( NOTICIA, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case NotNoticias.ID_INDEX: + value = getId(); + break; + case NotNoticias.DATA_INDEX: + value = getData(); + break; + case NotNoticias.STAMP_INDEX: + value = getStamp(); + break; + case NotNoticias.UTILIZADOR_INDEX: + value = getUtilizador(); + break; + case NotNoticias.NOTICIA_INDEX: + value = getNoticia(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case NotNoticias.ID_INDEX: + value = this.id; + break; + case NotNoticias.DATA_INDEX: + value = this.data; + break; + case NotNoticias.STAMP_INDEX: + value = this.stamp; + break; + case NotNoticias.UTILIZADOR_INDEX: + value = this.utilizador; + break; + case NotNoticias.NOTICIA_INDEX: + value = this.noticia; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case NotNoticias.ID_INDEX: + setId( ( Integer ) value ); + break; + case NotNoticias.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case NotNoticias.STAMP_INDEX: + setStamp( ( java.sql.Timestamp ) value ); + break; + case NotNoticias.UTILIZADOR_INDEX: + setUtilizador( ( String ) value ); + break; + case NotNoticias.NOTICIA_INDEX: + setNoticia( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case NotNoticias.ID_INDEX: + this.id = ( Integer ) value; + break; + case NotNoticias.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case NotNoticias.STAMP_INDEX: + this.stamp = ( java.sql.Timestamp ) value; + break; + case NotNoticias.UTILIZADOR_INDEX: + this.utilizador = ( String ) value; + break; + case NotNoticias.NOTICIA_INDEX: + this.noticia = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case NotNoticias.ID_INDEX: + theClass = Integer.class; + break; + case NotNoticias.DATA_INDEX: + theClass = java.util.Date.class; + break; + case NotNoticias.STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + case NotNoticias.UTILIZADOR_INDEX: + theClass = String.class; + break; + case NotNoticias.NOTICIA_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : NotNoticias._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, NotNoticias.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Permissoes.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Permissoes.java new file mode 100644 index 00000000..c1b739cd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Permissoes.java @@ -0,0 +1,330 @@ +/* +* Permissoes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Permissoes extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Permissoes.ID, Permissoes.ID_INDEX ); + FIELD_INDEXES.put( Permissoes.ID_FULL, Permissoes.ID_INDEX ); + FIELD_INDEXES.put( Permissoes.USER_ID, Permissoes.USER_ID_INDEX ); + FIELD_INDEXES.put( Permissoes.USER_ID_FULL, Permissoes.USER_ID_INDEX ); + FIELD_INDEXES.put( Permissoes.CODIGO_PERMISSAO, Permissoes.CODIGO_PERMISSAO_INDEX ); + FIELD_INDEXES.put( Permissoes.CODIGO_PERMISSAO_FULL, Permissoes.CODIGO_PERMISSAO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "permissoes"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.permissoes"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "permissoes.id"; + public static final int ID_INDEX = 0; + public static final String USER_ID = "user_id"; + public static final String USER_ID_FULL = "permissoes.user_id"; + public static final int USER_ID_INDEX = 1; + public static final String CODIGO_PERMISSAO = "codigo_permissao"; + public static final String CODIGO_PERMISSAO_FULL = "permissoes.codigo_permissao"; + public static final int CODIGO_PERMISSAO_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + USER_ID, CODIGO_PERMISSAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + USER_ID, TABLENAME + "." + CODIGO_PERMISSAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, USER_ID, CODIGO_PERMISSAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, USER_ID, CODIGO_PERMISSAO, }; + + private Integer id; + private Integer user_id; + private Integer codigo_permissao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Permissoes() + { + super(); + dirtyProperties = new boolean[]{ false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 getUser_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( USER_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.user_id; + } + + public void setUser_id( Integer user_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( USER_ID, user_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.user_id = user_id; + LAZY_LOADED_OBJECTS.put( USER_ID, Boolean.TRUE ); + } + + public Integer getCodigo_permissao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CODIGO_PERMISSAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.codigo_permissao; + } + + public void setCodigo_permissao( Integer codigo_permissao ) + { + try + { + setLockedForRefresh( true ); + preProcess( CODIGO_PERMISSAO, codigo_permissao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.codigo_permissao = codigo_permissao; + LAZY_LOADED_OBJECTS.put( CODIGO_PERMISSAO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Permissoes.ID_INDEX: + value = getId(); + break; + case Permissoes.USER_ID_INDEX: + value = getUser_id(); + break; + case Permissoes.CODIGO_PERMISSAO_INDEX: + value = getCodigo_permissao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Permissoes.ID_INDEX: + value = this.id; + break; + case Permissoes.USER_ID_INDEX: + value = this.user_id; + break; + case Permissoes.CODIGO_PERMISSAO_INDEX: + value = this.codigo_permissao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Permissoes.ID_INDEX: + setId( ( Integer ) value ); + break; + case Permissoes.USER_ID_INDEX: + setUser_id( ( Integer ) value ); + break; + case Permissoes.CODIGO_PERMISSAO_INDEX: + setCodigo_permissao( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Permissoes.ID_INDEX: + this.id = ( Integer ) value; + break; + case Permissoes.USER_ID_INDEX: + this.user_id = ( Integer ) value; + break; + case Permissoes.CODIGO_PERMISSAO_INDEX: + this.codigo_permissao = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Permissoes.ID_INDEX: + theClass = Integer.class; + break; + case Permissoes.USER_ID_INDEX: + theClass = Integer.class; + break; + case Permissoes.CODIGO_PERMISSAO_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Permissoes._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Permissoes.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/PlanoAreas.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/PlanoAreas.java new file mode 100644 index 00000000..f00dbb55 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/PlanoAreas.java @@ -0,0 +1,445 @@ +/* +* PlanoAreas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class PlanoAreas extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PlanoAreas.DESCRICAO, PlanoAreas.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PlanoAreas.DESCRICAO_FULL, PlanoAreas.DESCRICAO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PlanoAreas.CLASS_IDENTIFIER, PlanoAreas.PLANO_ID, PlanoAreas.TO_PLANO_ID ); + FIELD_INDEXES.put( PlanoAreas.PLANO_ID, PlanoAreas.PLANO_ID_INDEX ); + FIELD_INDEXES.put( PlanoAreas.PLANO_ID_FULL, PlanoAreas.PLANO_ID_INDEX ); + FIELD_INDEXES.put( PlanoAreas.TO_PLANO_ID, PlanoAreas.TO_PLANO_ID_INDEX ); + FIELD_INDEXES.put( PlanoAreas.ID, PlanoAreas.ID_INDEX ); + FIELD_INDEXES.put( PlanoAreas.ID_FULL, PlanoAreas.ID_INDEX ); + FIELD_INDEXES.put( PlanoAreas.AREA_ID, PlanoAreas.AREA_ID_INDEX ); + FIELD_INDEXES.put( PlanoAreas.AREA_ID_FULL, PlanoAreas.AREA_ID_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyplano_idToplanos_actuacao = + new com.evolute.entity.ForeignKey( PlanoAreas.class, PlanoAreas.PLANO_ID, db.data.siprp.outer.PlanosActuacaoData.class, db.data.siprp.outer.PlanosActuacaoData.ID ); + + public static final String TABLENAME = "plano_areas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.plano_areas"; + + public static final int _INVALID__INDEX = -1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "plano_areas.descricao"; + public static final int DESCRICAO_INDEX = 0; + public static final String PLANO_ID = "plano_id"; + public static final String PLANO_ID_FULL = "plano_areas.plano_id"; + public static final int PLANO_ID_INDEX = 1; + public static final String TO_PLANO_ID = "to_plano_id"; + public static final String TO_PLANO_ID_FULL = "plano_areas.to_plano_id"; + public static final int TO_PLANO_ID_INDEX = 2; + public static final String ID = "id"; + public static final String ID_FULL = "plano_areas.id"; + public static final int ID_INDEX = 3; + public static final String AREA_ID = "area_id"; + public static final String AREA_ID_FULL = "plano_areas.area_id"; + public static final int AREA_ID_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, PLANO_ID, TO_PLANO_ID, AREA_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + PLANO_ID, TABLENAME + "." + TO_PLANO_ID, TABLENAME + "." + AREA_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + DESCRICAO, PLANO_ID, ID, AREA_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + DESCRICAO, PLANO_ID, ID, AREA_ID, }; + + private String descricao; + private Integer plano_id; + private db.data.siprp.outer.PlanosActuacaoData to_plano_id; + private Integer id; + private Integer area_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PlanoAreas() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false }; + } + + public String getDescricao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao; + } + + public void setDescricao( String descricao ) + { + try + { + 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 getPlano_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PLANO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.plano_id; + } + + public void setPlano_id( Integer plano_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PLANO_ID, plano_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.plano_id = plano_id; + LAZY_LOADED_OBJECTS.put( PLANO_ID, Boolean.TRUE ); + } + + public db.data.siprp.outer.PlanosActuacaoData toPlano_id() + { + try + { + prepare( TO_PLANO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_plano_id; + } + + public void setToPlano_id( db.data.siprp.outer.PlanosActuacaoData to_plano_id ) + { + try + { + preProcess( TO_PLANO_ID, to_plano_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_plano_id = to_plano_id; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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.ListfromPlanoRiscos_area_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.PlanoRiscosData.class , getPrimaryKey().getMap().get("id"), "area_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public Integer getArea_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( AREA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.area_id; + } + + public void setArea_id( Integer area_id ) + { + try + { + 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoAreas.DESCRICAO_INDEX: + value = getDescricao(); + break; + case PlanoAreas.PLANO_ID_INDEX: + value = getPlano_id(); + break; + case PlanoAreas.TO_PLANO_ID_INDEX: + value = toPlano_id(); + break; + case PlanoAreas.ID_INDEX: + value = getId(); + break; + case PlanoAreas.AREA_ID_INDEX: + value = getArea_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoAreas.DESCRICAO_INDEX: + value = this.descricao; + break; + case PlanoAreas.PLANO_ID_INDEX: + value = this.plano_id; + break; + case PlanoAreas.TO_PLANO_ID_INDEX: + value = this.to_plano_id; + break; + case PlanoAreas.ID_INDEX: + value = this.id; + break; + case PlanoAreas.AREA_ID_INDEX: + value = this.area_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoAreas.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case PlanoAreas.PLANO_ID_INDEX: + setPlano_id( ( Integer ) value ); + break; + case PlanoAreas.TO_PLANO_ID_INDEX: + setToPlano_id( ( db.data.siprp.outer.PlanosActuacaoData ) value ); + break; + case PlanoAreas.ID_INDEX: + setId( ( Integer ) value ); + break; + case PlanoAreas.AREA_ID_INDEX: + setArea_id( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoAreas.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case PlanoAreas.PLANO_ID_INDEX: + this.plano_id = ( Integer ) value; + break; + case PlanoAreas.TO_PLANO_ID_INDEX: + this.to_plano_id = ( db.data.siprp.outer.PlanosActuacaoData ) value; + break; + case PlanoAreas.ID_INDEX: + this.id = ( Integer ) value; + break; + case PlanoAreas.AREA_ID_INDEX: + this.area_id = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case PlanoAreas.DESCRICAO_INDEX: + theClass = String.class; + break; + case PlanoAreas.PLANO_ID_INDEX: + theClass = Integer.class; + break; + case PlanoAreas.TO_PLANO_ID_INDEX: + theClass = db.data.siprp.outer.PlanosActuacaoData.class; + break; + case PlanoAreas.ID_INDEX: + theClass = Integer.class; + break; + case PlanoAreas.AREA_ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PlanoAreas._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, PlanoAreas.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/PlanoMedidas.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/PlanoMedidas.java new file mode 100644 index 00000000..edcfc121 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/PlanoMedidas.java @@ -0,0 +1,547 @@ +/* +* PlanoMedidas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class PlanoMedidas extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PlanoMedidas.DESCRICAO, PlanoMedidas.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.DESCRICAO_FULL, PlanoMedidas.DESCRICAO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PlanoMedidas.CLASS_IDENTIFIER, PlanoMedidas.RISCO_ID, PlanoMedidas.TO_RISCO_ID ); + FIELD_INDEXES.put( PlanoMedidas.RISCO_ID, PlanoMedidas.RISCO_ID_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.RISCO_ID_FULL, PlanoMedidas.RISCO_ID_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.TO_RISCO_ID, PlanoMedidas.TO_RISCO_ID_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.ID, PlanoMedidas.ID_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.ID_FULL, PlanoMedidas.ID_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.MEDIDA_ID, PlanoMedidas.MEDIDA_ID_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.MEDIDA_ID_FULL, PlanoMedidas.MEDIDA_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PlanoMedidas.CLASS_IDENTIFIER, PlanoMedidas.ESTADO_MEDIDAS_ID, PlanoMedidas.TO_ESTADO_MEDIDAS_ID ); + FIELD_INDEXES.put( PlanoMedidas.ESTADO_MEDIDAS_ID, PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.ESTADO_MEDIDAS_ID_FULL, PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.TO_ESTADO_MEDIDAS_ID, PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyrisco_idToplano_riscos = + new com.evolute.entity.ForeignKey( PlanoMedidas.class, PlanoMedidas.RISCO_ID, db.data.siprp.outer.PlanoRiscosData.class, db.data.siprp.outer.PlanoRiscosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestado_medidas_idToestado_medidas = + new com.evolute.entity.ForeignKey( PlanoMedidas.class, PlanoMedidas.ESTADO_MEDIDAS_ID, db.data.siprp.outer.EstadoMedidasData.class, db.data.siprp.outer.EstadoMedidasData.ID ); + + public static final String TABLENAME = "plano_medidas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.plano_medidas"; + + public static final int _INVALID__INDEX = -1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "plano_medidas.descricao"; + public static final int DESCRICAO_INDEX = 0; + public static final String RISCO_ID = "risco_id"; + public static final String RISCO_ID_FULL = "plano_medidas.risco_id"; + public static final int RISCO_ID_INDEX = 1; + public static final String TO_RISCO_ID = "to_risco_id"; + public static final String TO_RISCO_ID_FULL = "plano_medidas.to_risco_id"; + public static final int TO_RISCO_ID_INDEX = 2; + public static final String ID = "id"; + public static final String ID_FULL = "plano_medidas.id"; + public static final int ID_INDEX = 3; + public static final String MEDIDA_ID = "medida_id"; + public static final String MEDIDA_ID_FULL = "plano_medidas.medida_id"; + public static final int MEDIDA_ID_INDEX = 4; + public static final String ESTADO_MEDIDAS_ID = "estado_medidas_id"; + public static final String ESTADO_MEDIDAS_ID_FULL = "plano_medidas.estado_medidas_id"; + public static final int ESTADO_MEDIDAS_ID_INDEX = 5; + public static final String TO_ESTADO_MEDIDAS_ID = "to_estado_medidas_id"; + public static final String TO_ESTADO_MEDIDAS_ID_FULL = "plano_medidas.to_estado_medidas_id"; + public static final int TO_ESTADO_MEDIDAS_ID_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, RISCO_ID, TO_RISCO_ID, MEDIDA_ID, ESTADO_MEDIDAS_ID, + TO_ESTADO_MEDIDAS_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + RISCO_ID, TABLENAME + "." + TO_RISCO_ID, TABLENAME + "." + MEDIDA_ID, TABLENAME + "." + ESTADO_MEDIDAS_ID, + TABLENAME + "." + TO_ESTADO_MEDIDAS_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + DESCRICAO, RISCO_ID, ID, MEDIDA_ID, ESTADO_MEDIDAS_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + DESCRICAO, RISCO_ID, ID, MEDIDA_ID, ESTADO_MEDIDAS_ID, }; + + private String descricao; + private Integer risco_id; + private db.data.siprp.outer.PlanoRiscosData to_risco_id; + private Integer id; + private Integer medida_id; + private Integer estado_medidas_id; + private db.data.siprp.outer.EstadoMedidasData to_estado_medidas_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PlanoMedidas() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false }; + } + + public String getDescricao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao; + } + + public void setDescricao( String descricao ) + { + try + { + 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 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 db.data.siprp.outer.PlanoRiscosData toRisco_id() + { + try + { + prepare( TO_RISCO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_risco_id; + } + + public void setToRisco_id( db.data.siprp.outer.PlanoRiscosData to_risco_id ) + { + try + { + preProcess( TO_RISCO_ID, to_risco_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_risco_id = to_risco_id; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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.ListfromPlanoPostosTrabalho_medida_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.PlanoPostosTrabalhoData.class , getPrimaryKey().getMap().get("id"), "medida_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public Integer getMedida_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MEDIDA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.medida_id; + } + + public void setMedida_id( Integer medida_id ) + { + try + { + 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 Integer getEstado_medidas_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTADO_MEDIDAS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estado_medidas_id; + } + + public void setEstado_medidas_id( Integer estado_medidas_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTADO_MEDIDAS_ID, estado_medidas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estado_medidas_id = estado_medidas_id; + LAZY_LOADED_OBJECTS.put( ESTADO_MEDIDAS_ID, Boolean.TRUE ); + } + + public db.data.siprp.outer.EstadoMedidasData toEstado_medidas_id() + { + try + { + prepare( TO_ESTADO_MEDIDAS_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estado_medidas_id; + } + + public void setToEstado_medidas_id( db.data.siprp.outer.EstadoMedidasData to_estado_medidas_id ) + { + try + { + preProcess( TO_ESTADO_MEDIDAS_ID, to_estado_medidas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_estado_medidas_id = to_estado_medidas_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoMedidas.DESCRICAO_INDEX: + value = getDescricao(); + break; + case PlanoMedidas.RISCO_ID_INDEX: + value = getRisco_id(); + break; + case PlanoMedidas.TO_RISCO_ID_INDEX: + value = toRisco_id(); + break; + case PlanoMedidas.ID_INDEX: + value = getId(); + break; + case PlanoMedidas.MEDIDA_ID_INDEX: + value = getMedida_id(); + break; + case PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX: + value = getEstado_medidas_id(); + break; + case PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX: + value = toEstado_medidas_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoMedidas.DESCRICAO_INDEX: + value = this.descricao; + break; + case PlanoMedidas.RISCO_ID_INDEX: + value = this.risco_id; + break; + case PlanoMedidas.TO_RISCO_ID_INDEX: + value = this.to_risco_id; + break; + case PlanoMedidas.ID_INDEX: + value = this.id; + break; + case PlanoMedidas.MEDIDA_ID_INDEX: + value = this.medida_id; + break; + case PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX: + value = this.estado_medidas_id; + break; + case PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX: + value = this.to_estado_medidas_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoMedidas.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case PlanoMedidas.RISCO_ID_INDEX: + setRisco_id( ( Integer ) value ); + break; + case PlanoMedidas.TO_RISCO_ID_INDEX: + setToRisco_id( ( db.data.siprp.outer.PlanoRiscosData ) value ); + break; + case PlanoMedidas.ID_INDEX: + setId( ( Integer ) value ); + break; + case PlanoMedidas.MEDIDA_ID_INDEX: + setMedida_id( ( Integer ) value ); + break; + case PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX: + setEstado_medidas_id( ( Integer ) value ); + break; + case PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX: + setToEstado_medidas_id( ( db.data.siprp.outer.EstadoMedidasData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoMedidas.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case PlanoMedidas.RISCO_ID_INDEX: + this.risco_id = ( Integer ) value; + break; + case PlanoMedidas.TO_RISCO_ID_INDEX: + this.to_risco_id = ( db.data.siprp.outer.PlanoRiscosData ) value; + break; + case PlanoMedidas.ID_INDEX: + this.id = ( Integer ) value; + break; + case PlanoMedidas.MEDIDA_ID_INDEX: + this.medida_id = ( Integer ) value; + break; + case PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX: + this.estado_medidas_id = ( Integer ) value; + break; + case PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX: + this.to_estado_medidas_id = ( db.data.siprp.outer.EstadoMedidasData ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case PlanoMedidas.DESCRICAO_INDEX: + theClass = String.class; + break; + case PlanoMedidas.RISCO_ID_INDEX: + theClass = Integer.class; + break; + case PlanoMedidas.TO_RISCO_ID_INDEX: + theClass = db.data.siprp.outer.PlanoRiscosData.class; + break; + case PlanoMedidas.ID_INDEX: + theClass = Integer.class; + break; + case PlanoMedidas.MEDIDA_ID_INDEX: + theClass = Integer.class; + break; + case PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX: + theClass = Integer.class; + break; + case PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX: + theClass = db.data.siprp.outer.EstadoMedidasData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PlanoMedidas._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, PlanoMedidas.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/PlanoPostosTrabalho.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/PlanoPostosTrabalho.java new file mode 100644 index 00000000..5de651e4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/PlanoPostosTrabalho.java @@ -0,0 +1,431 @@ +/* +* PlanoPostosTrabalho.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class PlanoPostosTrabalho extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PlanoPostosTrabalho.DESCRICAO, PlanoPostosTrabalho.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PlanoPostosTrabalho.DESCRICAO_FULL, PlanoPostosTrabalho.DESCRICAO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PlanoPostosTrabalho.CLASS_IDENTIFIER, PlanoPostosTrabalho.MEDIDA_ID, PlanoPostosTrabalho.TO_MEDIDA_ID ); + FIELD_INDEXES.put( PlanoPostosTrabalho.MEDIDA_ID, PlanoPostosTrabalho.MEDIDA_ID_INDEX ); + FIELD_INDEXES.put( PlanoPostosTrabalho.MEDIDA_ID_FULL, PlanoPostosTrabalho.MEDIDA_ID_INDEX ); + FIELD_INDEXES.put( PlanoPostosTrabalho.TO_MEDIDA_ID, PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX ); + FIELD_INDEXES.put( PlanoPostosTrabalho.ID, PlanoPostosTrabalho.ID_INDEX ); + FIELD_INDEXES.put( PlanoPostosTrabalho.ID_FULL, PlanoPostosTrabalho.ID_INDEX ); + FIELD_INDEXES.put( PlanoPostosTrabalho.POSTO_ID, PlanoPostosTrabalho.POSTO_ID_INDEX ); + FIELD_INDEXES.put( PlanoPostosTrabalho.POSTO_ID_FULL, PlanoPostosTrabalho.POSTO_ID_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeymedida_idToplano_medidas = + new com.evolute.entity.ForeignKey( PlanoPostosTrabalho.class, PlanoPostosTrabalho.MEDIDA_ID, db.data.siprp.outer.PlanoMedidasData.class, db.data.siprp.outer.PlanoMedidasData.ID ); + + public static final String TABLENAME = "plano_postos_trabalho"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.plano_postos_trabalho"; + + public static final int _INVALID__INDEX = -1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "plano_postos_trabalho.descricao"; + public static final int DESCRICAO_INDEX = 0; + public static final String MEDIDA_ID = "medida_id"; + public static final String MEDIDA_ID_FULL = "plano_postos_trabalho.medida_id"; + public static final int MEDIDA_ID_INDEX = 1; + public static final String TO_MEDIDA_ID = "to_medida_id"; + public static final String TO_MEDIDA_ID_FULL = "plano_postos_trabalho.to_medida_id"; + public static final int TO_MEDIDA_ID_INDEX = 2; + public static final String ID = "id"; + public static final String ID_FULL = "plano_postos_trabalho.id"; + public static final int ID_INDEX = 3; + public static final String POSTO_ID = "posto_id"; + public static final String POSTO_ID_FULL = "plano_postos_trabalho.posto_id"; + public static final int POSTO_ID_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, MEDIDA_ID, TO_MEDIDA_ID, POSTO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + MEDIDA_ID, TABLENAME + "." + TO_MEDIDA_ID, TABLENAME + "." + POSTO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + DESCRICAO, MEDIDA_ID, ID, POSTO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + DESCRICAO, MEDIDA_ID, ID, POSTO_ID, }; + + private String descricao; + private Integer medida_id; + private db.data.siprp.outer.PlanoMedidasData to_medida_id; + private Integer id; + private Integer posto_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PlanoPostosTrabalho() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false }; + } + + public String getDescricao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao; + } + + public void setDescricao( String descricao ) + { + try + { + 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 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 db.data.siprp.outer.PlanoMedidasData toMedida_id() + { + try + { + prepare( TO_MEDIDA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_medida_id; + } + + public void setToMedida_id( db.data.siprp.outer.PlanoMedidasData to_medida_id ) + { + try + { + preProcess( TO_MEDIDA_ID, to_medida_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_medida_id = to_medida_id; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoPostosTrabalho.DESCRICAO_INDEX: + value = getDescricao(); + break; + case PlanoPostosTrabalho.MEDIDA_ID_INDEX: + value = getMedida_id(); + break; + case PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX: + value = toMedida_id(); + break; + case PlanoPostosTrabalho.ID_INDEX: + value = getId(); + break; + case PlanoPostosTrabalho.POSTO_ID_INDEX: + value = getPosto_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoPostosTrabalho.DESCRICAO_INDEX: + value = this.descricao; + break; + case PlanoPostosTrabalho.MEDIDA_ID_INDEX: + value = this.medida_id; + break; + case PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX: + value = this.to_medida_id; + break; + case PlanoPostosTrabalho.ID_INDEX: + value = this.id; + break; + case PlanoPostosTrabalho.POSTO_ID_INDEX: + value = this.posto_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoPostosTrabalho.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case PlanoPostosTrabalho.MEDIDA_ID_INDEX: + setMedida_id( ( Integer ) value ); + break; + case PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX: + setToMedida_id( ( db.data.siprp.outer.PlanoMedidasData ) value ); + break; + case PlanoPostosTrabalho.ID_INDEX: + setId( ( Integer ) value ); + break; + case PlanoPostosTrabalho.POSTO_ID_INDEX: + setPosto_id( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoPostosTrabalho.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case PlanoPostosTrabalho.MEDIDA_ID_INDEX: + this.medida_id = ( Integer ) value; + break; + case PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX: + this.to_medida_id = ( db.data.siprp.outer.PlanoMedidasData ) value; + break; + case PlanoPostosTrabalho.ID_INDEX: + this.id = ( Integer ) value; + break; + case PlanoPostosTrabalho.POSTO_ID_INDEX: + this.posto_id = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case PlanoPostosTrabalho.DESCRICAO_INDEX: + theClass = String.class; + break; + case PlanoPostosTrabalho.MEDIDA_ID_INDEX: + theClass = Integer.class; + break; + case PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX: + theClass = db.data.siprp.outer.PlanoMedidasData.class; + break; + case PlanoPostosTrabalho.ID_INDEX: + theClass = Integer.class; + break; + case PlanoPostosTrabalho.POSTO_ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PlanoPostosTrabalho._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, PlanoPostosTrabalho.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/PlanoRiscos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/PlanoRiscos.java new file mode 100644 index 00000000..a13ad77b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/PlanoRiscos.java @@ -0,0 +1,952 @@ +/* +* PlanoRiscos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class PlanoRiscos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PlanoRiscos.DESCRICAO, PlanoRiscos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.DESCRICAO_FULL, PlanoRiscos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.ACTIVO, PlanoRiscos.ACTIVO_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.ACTIVO_FULL, PlanoRiscos.ACTIVO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PlanoRiscos.CLASS_IDENTIFIER, PlanoRiscos.AREA_ID, PlanoRiscos.TO_AREA_ID ); + FIELD_INDEXES.put( PlanoRiscos.AREA_ID, PlanoRiscos.AREA_ID_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.AREA_ID_FULL, PlanoRiscos.AREA_ID_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.TO_AREA_ID, PlanoRiscos.TO_AREA_ID_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.ID, PlanoRiscos.ID_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.ID_FULL, PlanoRiscos.ID_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.VALOR, PlanoRiscos.VALOR_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.VALOR_FULL, PlanoRiscos.VALOR_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.RESPONSAVEL_EXECUCAO, PlanoRiscos.RESPONSAVEL_EXECUCAO_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.RESPONSAVEL_EXECUCAO_FULL, PlanoRiscos.RESPONSAVEL_EXECUCAO_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.RECURSOS_NECESSARIOS, PlanoRiscos.RECURSOS_NECESSARIOS_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.RECURSOS_NECESSARIOS_FULL, PlanoRiscos.RECURSOS_NECESSARIOS_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.DATA_INICIO, PlanoRiscos.DATA_INICIO_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.DATA_INICIO_FULL, PlanoRiscos.DATA_INICIO_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.DATA_FIM, PlanoRiscos.DATA_FIM_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.DATA_FIM_FULL, PlanoRiscos.DATA_FIM_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.PARECER_DL, PlanoRiscos.PARECER_DL_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.PARECER_DL_FULL, PlanoRiscos.PARECER_DL_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.PARECER_DNS, PlanoRiscos.PARECER_DNS_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.PARECER_DNS_FULL, PlanoRiscos.PARECER_DNS_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.VERIFICACAO_SIPRP, PlanoRiscos.VERIFICACAO_SIPRP_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.VERIFICACAO_SIPRP_FULL, PlanoRiscos.VERIFICACAO_SIPRP_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.RISCO_ID, PlanoRiscos.RISCO_ID_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.RISCO_ID_FULL, PlanoRiscos.RISCO_ID_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.POR, PlanoRiscos.POR_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.POR_FULL, PlanoRiscos.POR_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_idToplano_areas = + new com.evolute.entity.ForeignKey( PlanoRiscos.class, PlanoRiscos.AREA_ID, db.data.siprp.outer.PlanoAreasData.class, db.data.siprp.outer.PlanoAreasData.ID ); + + public static final String TABLENAME = "plano_riscos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.plano_riscos"; + + public static final int _INVALID__INDEX = -1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "plano_riscos.descricao"; + public static final int DESCRICAO_INDEX = 0; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "plano_riscos.activo"; + public static final int ACTIVO_INDEX = 1; + public static final String AREA_ID = "area_id"; + public static final String AREA_ID_FULL = "plano_riscos.area_id"; + public static final int AREA_ID_INDEX = 2; + public static final String TO_AREA_ID = "to_area_id"; + public static final String TO_AREA_ID_FULL = "plano_riscos.to_area_id"; + public static final int TO_AREA_ID_INDEX = 3; + public static final String ID = "id"; + public static final String ID_FULL = "plano_riscos.id"; + public static final int ID_INDEX = 4; + public static final String VALOR = "valor"; + public static final String VALOR_FULL = "plano_riscos.valor"; + public static final int VALOR_INDEX = 5; + public static final String RESPONSAVEL_EXECUCAO = "responsavel_execucao"; + public static final String RESPONSAVEL_EXECUCAO_FULL = "plano_riscos.responsavel_execucao"; + public static final int RESPONSAVEL_EXECUCAO_INDEX = 6; + public static final String RECURSOS_NECESSARIOS = "recursos_necessarios"; + public static final String RECURSOS_NECESSARIOS_FULL = "plano_riscos.recursos_necessarios"; + public static final int RECURSOS_NECESSARIOS_INDEX = 7; + public static final String DATA_INICIO = "data_inicio"; + public static final String DATA_INICIO_FULL = "plano_riscos.data_inicio"; + public static final int DATA_INICIO_INDEX = 8; + public static final String DATA_FIM = "data_fim"; + public static final String DATA_FIM_FULL = "plano_riscos.data_fim"; + public static final int DATA_FIM_INDEX = 9; + public static final String PARECER_DL = "parecer_dl"; + public static final String PARECER_DL_FULL = "plano_riscos.parecer_dl"; + public static final int PARECER_DL_INDEX = 10; + public static final String PARECER_DNS = "parecer_dns"; + public static final String PARECER_DNS_FULL = "plano_riscos.parecer_dns"; + public static final int PARECER_DNS_INDEX = 11; + public static final String VERIFICACAO_SIPRP = "verificacao_siprp"; + public static final String VERIFICACAO_SIPRP_FULL = "plano_riscos.verificacao_siprp"; + public static final int VERIFICACAO_SIPRP_INDEX = 12; + public static final String RISCO_ID = "risco_id"; + public static final String RISCO_ID_FULL = "plano_riscos.risco_id"; + public static final int RISCO_ID_INDEX = 13; + public static final String POR = "por"; + public static final String POR_FULL = "plano_riscos.por"; + public static final int POR_INDEX = 14; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, ACTIVO, AREA_ID, TO_AREA_ID, VALOR, RESPONSAVEL_EXECUCAO, + RECURSOS_NECESSARIOS, DATA_INICIO, DATA_FIM, PARECER_DL, PARECER_DNS, + VERIFICACAO_SIPRP, RISCO_ID, POR, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + ACTIVO, TABLENAME + "." + AREA_ID, TABLENAME + "." + TO_AREA_ID, TABLENAME + "." + VALOR, TABLENAME + "." + RESPONSAVEL_EXECUCAO, + TABLENAME + "." + RECURSOS_NECESSARIOS, TABLENAME + "." + DATA_INICIO, TABLENAME + "." + DATA_FIM, TABLENAME + "." + PARECER_DL, TABLENAME + "." + PARECER_DNS, + TABLENAME + "." + VERIFICACAO_SIPRP, TABLENAME + "." + RISCO_ID, TABLENAME + "." + POR, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + DESCRICAO, ACTIVO, AREA_ID, ID, VALOR, RESPONSAVEL_EXECUCAO, RECURSOS_NECESSARIOS, + DATA_INICIO, DATA_FIM, PARECER_DL, PARECER_DNS, VERIFICACAO_SIPRP, RISCO_ID, POR, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + DESCRICAO, ACTIVO, AREA_ID, ID, VALOR, RESPONSAVEL_EXECUCAO, RECURSOS_NECESSARIOS, + DATA_INICIO, DATA_FIM, PARECER_DL, PARECER_DNS, VERIFICACAO_SIPRP, RISCO_ID, POR, }; + + private String descricao; + private String activo; + private Integer area_id; + private db.data.siprp.outer.PlanoAreasData to_area_id; + private Integer id; + private Integer valor; + private String responsavel_execucao; + private String recursos_necessarios; + private java.util.Date data_inicio; + private java.util.Date data_fim; + private String parecer_dl; + private String parecer_dns; + private String verificacao_siprp; + private Integer risco_id; + private String por; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PlanoRiscos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false, false, false, false, false, false, false, + false, false, false, false }; + } + + public String getDescricao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao; + } + + public void setDescricao( String descricao ) + { + try + { + 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 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 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 db.data.siprp.outer.PlanoAreasData 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( db.data.siprp.outer.PlanoAreasData 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 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.ListfromPlanoMedidas_risco_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.PlanoMedidasData.class , getPrimaryKey().getMap().get("id"), "risco_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public Integer getValor() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.valor; + } + + public void setValor( Integer valor ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALOR, valor ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.valor = valor; + LAZY_LOADED_OBJECTS.put( VALOR, Boolean.TRUE ); + } + + public String getResponsavel_execucao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESPONSAVEL_EXECUCAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.responsavel_execucao; + } + + public void setResponsavel_execucao( String responsavel_execucao ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESPONSAVEL_EXECUCAO, responsavel_execucao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.responsavel_execucao = responsavel_execucao; + LAZY_LOADED_OBJECTS.put( RESPONSAVEL_EXECUCAO, Boolean.TRUE ); + } + + public String getRecursos_necessarios() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RECURSOS_NECESSARIOS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.recursos_necessarios; + } + + public void setRecursos_necessarios( String recursos_necessarios ) + { + try + { + setLockedForRefresh( true ); + preProcess( RECURSOS_NECESSARIOS, recursos_necessarios ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.recursos_necessarios = recursos_necessarios; + LAZY_LOADED_OBJECTS.put( RECURSOS_NECESSARIOS, 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 String getParecer_dl() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PARECER_DL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.parecer_dl; + } + + public void setParecer_dl( String parecer_dl ) + { + try + { + setLockedForRefresh( true ); + preProcess( PARECER_DL, parecer_dl ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.parecer_dl = parecer_dl; + LAZY_LOADED_OBJECTS.put( PARECER_DL, Boolean.TRUE ); + } + + public String getParecer_dns() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PARECER_DNS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.parecer_dns; + } + + public void setParecer_dns( String parecer_dns ) + { + try + { + setLockedForRefresh( true ); + preProcess( PARECER_DNS, parecer_dns ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.parecer_dns = parecer_dns; + LAZY_LOADED_OBJECTS.put( PARECER_DNS, Boolean.TRUE ); + } + + public String getVerificacao_siprp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VERIFICACAO_SIPRP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.verificacao_siprp; + } + + public void setVerificacao_siprp( String verificacao_siprp ) + { + try + { + setLockedForRefresh( true ); + preProcess( VERIFICACAO_SIPRP, verificacao_siprp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.verificacao_siprp = verificacao_siprp; + LAZY_LOADED_OBJECTS.put( VERIFICACAO_SIPRP, Boolean.TRUE ); + } + + public Integer getRisco_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RISCO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.risco_id; + } + + public void setRisco_id( Integer risco_id ) + { + try + { + 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 String getPor() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( POR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.por; + } + + public void setPor( String por ) + { + try + { + setLockedForRefresh( true ); + preProcess( POR, por ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.por = por; + LAZY_LOADED_OBJECTS.put( POR, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoRiscos.DESCRICAO_INDEX: + value = getDescricao(); + break; + case PlanoRiscos.ACTIVO_INDEX: + value = getActivo(); + break; + case PlanoRiscos.AREA_ID_INDEX: + value = getArea_id(); + break; + case PlanoRiscos.TO_AREA_ID_INDEX: + value = toArea_id(); + break; + case PlanoRiscos.ID_INDEX: + value = getId(); + break; + case PlanoRiscos.VALOR_INDEX: + value = getValor(); + break; + case PlanoRiscos.RESPONSAVEL_EXECUCAO_INDEX: + value = getResponsavel_execucao(); + break; + case PlanoRiscos.RECURSOS_NECESSARIOS_INDEX: + value = getRecursos_necessarios(); + break; + case PlanoRiscos.DATA_INICIO_INDEX: + value = getData_inicio(); + break; + case PlanoRiscos.DATA_FIM_INDEX: + value = getData_fim(); + break; + case PlanoRiscos.PARECER_DL_INDEX: + value = getParecer_dl(); + break; + case PlanoRiscos.PARECER_DNS_INDEX: + value = getParecer_dns(); + break; + case PlanoRiscos.VERIFICACAO_SIPRP_INDEX: + value = getVerificacao_siprp(); + break; + case PlanoRiscos.RISCO_ID_INDEX: + value = getRisco_id(); + break; + case PlanoRiscos.POR_INDEX: + value = getPor(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoRiscos.DESCRICAO_INDEX: + value = this.descricao; + break; + case PlanoRiscos.ACTIVO_INDEX: + value = this.activo; + break; + case PlanoRiscos.AREA_ID_INDEX: + value = this.area_id; + break; + case PlanoRiscos.TO_AREA_ID_INDEX: + value = this.to_area_id; + break; + case PlanoRiscos.ID_INDEX: + value = this.id; + break; + case PlanoRiscos.VALOR_INDEX: + value = this.valor; + break; + case PlanoRiscos.RESPONSAVEL_EXECUCAO_INDEX: + value = this.responsavel_execucao; + break; + case PlanoRiscos.RECURSOS_NECESSARIOS_INDEX: + value = this.recursos_necessarios; + break; + case PlanoRiscos.DATA_INICIO_INDEX: + value = this.data_inicio; + break; + case PlanoRiscos.DATA_FIM_INDEX: + value = this.data_fim; + break; + case PlanoRiscos.PARECER_DL_INDEX: + value = this.parecer_dl; + break; + case PlanoRiscos.PARECER_DNS_INDEX: + value = this.parecer_dns; + break; + case PlanoRiscos.VERIFICACAO_SIPRP_INDEX: + value = this.verificacao_siprp; + break; + case PlanoRiscos.RISCO_ID_INDEX: + value = this.risco_id; + break; + case PlanoRiscos.POR_INDEX: + value = this.por; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoRiscos.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case PlanoRiscos.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + case PlanoRiscos.AREA_ID_INDEX: + setArea_id( ( Integer ) value ); + break; + case PlanoRiscos.TO_AREA_ID_INDEX: + setToArea_id( ( db.data.siprp.outer.PlanoAreasData ) value ); + break; + case PlanoRiscos.ID_INDEX: + setId( ( Integer ) value ); + break; + case PlanoRiscos.VALOR_INDEX: + setValor( ( Integer ) value ); + break; + case PlanoRiscos.RESPONSAVEL_EXECUCAO_INDEX: + setResponsavel_execucao( ( String ) value ); + break; + case PlanoRiscos.RECURSOS_NECESSARIOS_INDEX: + setRecursos_necessarios( ( String ) value ); + break; + case PlanoRiscos.DATA_INICIO_INDEX: + setData_inicio( ( java.util.Date ) value ); + break; + case PlanoRiscos.DATA_FIM_INDEX: + setData_fim( ( java.util.Date ) value ); + break; + case PlanoRiscos.PARECER_DL_INDEX: + setParecer_dl( ( String ) value ); + break; + case PlanoRiscos.PARECER_DNS_INDEX: + setParecer_dns( ( String ) value ); + break; + case PlanoRiscos.VERIFICACAO_SIPRP_INDEX: + setVerificacao_siprp( ( String ) value ); + break; + case PlanoRiscos.RISCO_ID_INDEX: + setRisco_id( ( Integer ) value ); + break; + case PlanoRiscos.POR_INDEX: + setPor( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoRiscos.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case PlanoRiscos.ACTIVO_INDEX: + this.activo = ( String ) value; + break; + case PlanoRiscos.AREA_ID_INDEX: + this.area_id = ( Integer ) value; + break; + case PlanoRiscos.TO_AREA_ID_INDEX: + this.to_area_id = ( db.data.siprp.outer.PlanoAreasData ) value; + break; + case PlanoRiscos.ID_INDEX: + this.id = ( Integer ) value; + break; + case PlanoRiscos.VALOR_INDEX: + this.valor = ( Integer ) value; + break; + case PlanoRiscos.RESPONSAVEL_EXECUCAO_INDEX: + this.responsavel_execucao = ( String ) value; + break; + case PlanoRiscos.RECURSOS_NECESSARIOS_INDEX: + this.recursos_necessarios = ( String ) value; + break; + case PlanoRiscos.DATA_INICIO_INDEX: + this.data_inicio = ( java.util.Date ) value; + break; + case PlanoRiscos.DATA_FIM_INDEX: + this.data_fim = ( java.util.Date ) value; + break; + case PlanoRiscos.PARECER_DL_INDEX: + this.parecer_dl = ( String ) value; + break; + case PlanoRiscos.PARECER_DNS_INDEX: + this.parecer_dns = ( String ) value; + break; + case PlanoRiscos.VERIFICACAO_SIPRP_INDEX: + this.verificacao_siprp = ( String ) value; + break; + case PlanoRiscos.RISCO_ID_INDEX: + this.risco_id = ( Integer ) value; + break; + case PlanoRiscos.POR_INDEX: + this.por = ( 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 PlanoRiscos.DESCRICAO_INDEX: + theClass = String.class; + break; + case PlanoRiscos.ACTIVO_INDEX: + theClass = String.class; + break; + case PlanoRiscos.AREA_ID_INDEX: + theClass = Integer.class; + break; + case PlanoRiscos.TO_AREA_ID_INDEX: + theClass = db.data.siprp.outer.PlanoAreasData.class; + break; + case PlanoRiscos.ID_INDEX: + theClass = Integer.class; + break; + case PlanoRiscos.VALOR_INDEX: + theClass = Integer.class; + break; + case PlanoRiscos.RESPONSAVEL_EXECUCAO_INDEX: + theClass = String.class; + break; + case PlanoRiscos.RECURSOS_NECESSARIOS_INDEX: + theClass = String.class; + break; + case PlanoRiscos.DATA_INICIO_INDEX: + theClass = java.util.Date.class; + break; + case PlanoRiscos.DATA_FIM_INDEX: + theClass = java.util.Date.class; + break; + case PlanoRiscos.PARECER_DL_INDEX: + theClass = String.class; + break; + case PlanoRiscos.PARECER_DNS_INDEX: + theClass = String.class; + break; + case PlanoRiscos.VERIFICACAO_SIPRP_INDEX: + theClass = String.class; + break; + case PlanoRiscos.RISCO_ID_INDEX: + theClass = Integer.class; + break; + case PlanoRiscos.POR_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PlanoRiscos._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, PlanoRiscos.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/PlanosActuacao.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/PlanosActuacao.java new file mode 100644 index 00000000..1955fc7b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/PlanosActuacao.java @@ -0,0 +1,2029 @@ +/* +* PlanosActuacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class PlanosActuacao extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PlanosActuacao.ESTABELECIMENTO_ID, PlanosActuacao.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.ESTABELECIMENTO_ID_FULL, PlanosActuacao.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.FASE, PlanosActuacao.FASE_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.FASE_FULL, PlanosActuacao.FASE_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VISITA, PlanosActuacao.DATA_VISITA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VISITA_FULL, PlanosActuacao.DATA_VISITA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.NOME_ESTABELECIMENTO, PlanosActuacao.NOME_ESTABELECIMENTO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.NOME_ESTABELECIMENTO_FULL, PlanosActuacao.NOME_ESTABELECIMENTO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.VALIDACAO_DIRECTOR_LOJA, PlanosActuacao.VALIDACAO_DIRECTOR_LOJA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.VALIDACAO_DIRECTOR_LOJA_FULL, PlanosActuacao.VALIDACAO_DIRECTOR_LOJA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.VALIDACAO_DNS, PlanosActuacao.VALIDACAO_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.VALIDACAO_DNS_FULL, PlanosActuacao.VALIDACAO_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.VALIDACAO_HS, PlanosActuacao.VALIDACAO_HS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.VALIDACAO_HS_FULL, PlanosActuacao.VALIDACAO_HS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.PARECER_DNS, PlanosActuacao.PARECER_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.PARECER_DNS_FULL, PlanosActuacao.PARECER_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.OBS_CORRECAO, PlanosActuacao.OBS_CORRECAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.OBS_CORRECAO_FULL, PlanosActuacao.OBS_CORRECAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VALIDACAO_DIR_LOJA, PlanosActuacao.DATA_VALIDACAO_DIR_LOJA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VALIDACAO_DIR_LOJA_FULL, PlanosActuacao.DATA_VALIDACAO_DIR_LOJA_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PlanosActuacao.CLASS_IDENTIFIER, PlanosActuacao.USER_DIR_LOJA, PlanosActuacao.TO_USER_DIR_LOJA ); + FIELD_INDEXES.put( PlanosActuacao.USER_DIR_LOJA, PlanosActuacao.USER_DIR_LOJA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.USER_DIR_LOJA_FULL, PlanosActuacao.USER_DIR_LOJA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TO_USER_DIR_LOJA, PlanosActuacao.TO_USER_DIR_LOJA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VALIDACAO_DNS, PlanosActuacao.DATA_VALIDACAO_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VALIDACAO_DNS_FULL, PlanosActuacao.DATA_VALIDACAO_DNS_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PlanosActuacao.CLASS_IDENTIFIER, PlanosActuacao.USER_DNS, PlanosActuacao.TO_USER_DNS ); + FIELD_INDEXES.put( PlanosActuacao.USER_DNS, PlanosActuacao.USER_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.USER_DNS_FULL, PlanosActuacao.USER_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TO_USER_DNS, PlanosActuacao.TO_USER_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VALIDACAO_HS, PlanosActuacao.DATA_VALIDACAO_HS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VALIDACAO_HS_FULL, PlanosActuacao.DATA_VALIDACAO_HS_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PlanosActuacao.CLASS_IDENTIFIER, PlanosActuacao.USER_HS, PlanosActuacao.TO_USER_HS ); + FIELD_INDEXES.put( PlanosActuacao.USER_HS, PlanosActuacao.USER_HS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.USER_HS_FULL, PlanosActuacao.USER_HS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TO_USER_HS, PlanosActuacao.TO_USER_HS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.FASE_ANTES_CORRECAO, PlanosActuacao.FASE_ANTES_CORRECAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.FASE_ANTES_CORRECAO_FULL, PlanosActuacao.FASE_ANTES_CORRECAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.CORRECAO, PlanosActuacao.CORRECAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.CORRECAO_FULL, PlanosActuacao.CORRECAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.OBSERVACOES_DL, PlanosActuacao.OBSERVACOES_DL_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.OBSERVACOES_DL_FULL, PlanosActuacao.OBSERVACOES_DL_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.OBSERVACOES_DNS, PlanosActuacao.OBSERVACOES_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.OBSERVACOES_DNS_FULL, PlanosActuacao.OBSERVACOES_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.VERIFICACAO_SIPRP, PlanosActuacao.VERIFICACAO_SIPRP_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.VERIFICACAO_SIPRP_FULL, PlanosActuacao.VERIFICACAO_SIPRP_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_CONTROLO, PlanosActuacao.DATA_CONTROLO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_CONTROLO_FULL, PlanosActuacao.DATA_CONTROLO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_EMAIL_CONTROLO, PlanosActuacao.DATA_EMAIL_CONTROLO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_EMAIL_CONTROLO_FULL, PlanosActuacao.DATA_EMAIL_CONTROLO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.EMPRESA_ID, PlanosActuacao.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.EMPRESA_ID_FULL, PlanosActuacao.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.NOME_EMPRESA, PlanosActuacao.NOME_EMPRESA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.NOME_EMPRESA_FULL, PlanosActuacao.NOME_EMPRESA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TECNICO_HS_ID, PlanosActuacao.TECNICO_HS_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TECNICO_HS_ID_FULL, PlanosActuacao.TECNICO_HS_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TECNICO_HS_NOME, PlanosActuacao.TECNICO_HS_NOME_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TECNICO_HS_NOME_FULL, PlanosActuacao.TECNICO_HS_NOME_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.ID, PlanosActuacao.ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.ID_FULL, PlanosActuacao.ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_RELATORIO, PlanosActuacao.DATA_RELATORIO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_RELATORIO_FULL, PlanosActuacao.DATA_RELATORIO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DELETED_DATE, PlanosActuacao.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DELETED_DATE_FULL, PlanosActuacao.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO, PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO_FULL, PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TECNICO_SUPERIOR_HS_ID, PlanosActuacao.TECNICO_SUPERIOR_HS_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TECNICO_SUPERIOR_HS_ID_FULL, PlanosActuacao.TECNICO_SUPERIOR_HS_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TECNICO_SUPERIOR_HS_NOME, PlanosActuacao.TECNICO_SUPERIOR_HS_NOME_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TECNICO_SUPERIOR_HS_NOME_FULL, PlanosActuacao.TECNICO_SUPERIOR_HS_NOME_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_DESACTIVACAO, PlanosActuacao.DATA_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_DESACTIVACAO_FULL, PlanosActuacao.DATA_DESACTIVACAO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyuser_dir_lojaToutilizadores = + new com.evolute.entity.ForeignKey( PlanosActuacao.class, PlanosActuacao.USER_DIR_LOJA, db.data.siprp.outer.UtilizadoresData.class, db.data.siprp.outer.UtilizadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyuser_dnsToutilizadores = + new com.evolute.entity.ForeignKey( PlanosActuacao.class, PlanosActuacao.USER_DNS, db.data.siprp.outer.UtilizadoresData.class, db.data.siprp.outer.UtilizadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyuser_hsToutilizadores = + new com.evolute.entity.ForeignKey( PlanosActuacao.class, PlanosActuacao.USER_HS, db.data.siprp.outer.UtilizadoresData.class, db.data.siprp.outer.UtilizadoresData.ID ); + + public static final String TABLENAME = "planos_actuacao"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.planos_actuacao"; + + public static final int _INVALID__INDEX = -1; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "planos_actuacao.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 0; + public static final String FASE = "fase"; + public static final String FASE_FULL = "planos_actuacao.fase"; + public static final int FASE_INDEX = 1; + public static final String DATA_VISITA = "data_visita"; + public static final String DATA_VISITA_FULL = "planos_actuacao.data_visita"; + public static final int DATA_VISITA_INDEX = 2; + public static final String NOME_ESTABELECIMENTO = "nome_estabelecimento"; + public static final String NOME_ESTABELECIMENTO_FULL = "planos_actuacao.nome_estabelecimento"; + public static final int NOME_ESTABELECIMENTO_INDEX = 3; + public static final String VALIDACAO_DIRECTOR_LOJA = "validacao_director_loja"; + public static final String VALIDACAO_DIRECTOR_LOJA_FULL = "planos_actuacao.validacao_director_loja"; + public static final int VALIDACAO_DIRECTOR_LOJA_INDEX = 4; + public static final String VALIDACAO_DNS = "validacao_dns"; + public static final String VALIDACAO_DNS_FULL = "planos_actuacao.validacao_dns"; + public static final int VALIDACAO_DNS_INDEX = 5; + public static final String VALIDACAO_HS = "validacao_hs"; + public static final String VALIDACAO_HS_FULL = "planos_actuacao.validacao_hs"; + public static final int VALIDACAO_HS_INDEX = 6; + public static final String PARECER_DNS = "parecer_dns"; + public static final String PARECER_DNS_FULL = "planos_actuacao.parecer_dns"; + public static final int PARECER_DNS_INDEX = 7; + public static final String OBS_CORRECAO = "obs_correcao"; + public static final String OBS_CORRECAO_FULL = "planos_actuacao.obs_correcao"; + public static final int OBS_CORRECAO_INDEX = 8; + public static final String DATA_VALIDACAO_DIR_LOJA = "data_validacao_dir_loja"; + public static final String DATA_VALIDACAO_DIR_LOJA_FULL = "planos_actuacao.data_validacao_dir_loja"; + public static final int DATA_VALIDACAO_DIR_LOJA_INDEX = 9; + public static final String USER_DIR_LOJA = "user_dir_loja"; + public static final String USER_DIR_LOJA_FULL = "planos_actuacao.user_dir_loja"; + public static final int USER_DIR_LOJA_INDEX = 10; + public static final String TO_USER_DIR_LOJA = "to_user_dir_loja"; + public static final String TO_USER_DIR_LOJA_FULL = "planos_actuacao.to_user_dir_loja"; + public static final int TO_USER_DIR_LOJA_INDEX = 11; + public static final String DATA_VALIDACAO_DNS = "data_validacao_dns"; + public static final String DATA_VALIDACAO_DNS_FULL = "planos_actuacao.data_validacao_dns"; + public static final int DATA_VALIDACAO_DNS_INDEX = 12; + public static final String USER_DNS = "user_dns"; + public static final String USER_DNS_FULL = "planos_actuacao.user_dns"; + public static final int USER_DNS_INDEX = 13; + public static final String TO_USER_DNS = "to_user_dns"; + public static final String TO_USER_DNS_FULL = "planos_actuacao.to_user_dns"; + public static final int TO_USER_DNS_INDEX = 14; + public static final String DATA_VALIDACAO_HS = "data_validacao_hs"; + public static final String DATA_VALIDACAO_HS_FULL = "planos_actuacao.data_validacao_hs"; + public static final int DATA_VALIDACAO_HS_INDEX = 15; + public static final String USER_HS = "user_hs"; + public static final String USER_HS_FULL = "planos_actuacao.user_hs"; + public static final int USER_HS_INDEX = 16; + public static final String TO_USER_HS = "to_user_hs"; + public static final String TO_USER_HS_FULL = "planos_actuacao.to_user_hs"; + public static final int TO_USER_HS_INDEX = 17; + public static final String FASE_ANTES_CORRECAO = "fase_antes_correcao"; + public static final String FASE_ANTES_CORRECAO_FULL = "planos_actuacao.fase_antes_correcao"; + public static final int FASE_ANTES_CORRECAO_INDEX = 18; + public static final String CORRECAO = "correcao"; + public static final String CORRECAO_FULL = "planos_actuacao.correcao"; + public static final int CORRECAO_INDEX = 19; + public static final String OBSERVACOES_DL = "observacoes_dl"; + public static final String OBSERVACOES_DL_FULL = "planos_actuacao.observacoes_dl"; + public static final int OBSERVACOES_DL_INDEX = 20; + public static final String OBSERVACOES_DNS = "observacoes_dns"; + public static final String OBSERVACOES_DNS_FULL = "planos_actuacao.observacoes_dns"; + public static final int OBSERVACOES_DNS_INDEX = 21; + public static final String VERIFICACAO_SIPRP = "verificacao_siprp"; + public static final String VERIFICACAO_SIPRP_FULL = "planos_actuacao.verificacao_siprp"; + public static final int VERIFICACAO_SIPRP_INDEX = 22; + public static final String DATA_CONTROLO = "data_controlo"; + public static final String DATA_CONTROLO_FULL = "planos_actuacao.data_controlo"; + public static final int DATA_CONTROLO_INDEX = 23; + public static final String DATA_EMAIL_CONTROLO = "data_email_controlo"; + public static final String DATA_EMAIL_CONTROLO_FULL = "planos_actuacao.data_email_controlo"; + public static final int DATA_EMAIL_CONTROLO_INDEX = 24; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "planos_actuacao.empresa_id"; + public static final int EMPRESA_ID_INDEX = 25; + public static final String NOME_EMPRESA = "nome_empresa"; + public static final String NOME_EMPRESA_FULL = "planos_actuacao.nome_empresa"; + public static final int NOME_EMPRESA_INDEX = 26; + public static final String TECNICO_HS_ID = "tecnico_hs_id"; + public static final String TECNICO_HS_ID_FULL = "planos_actuacao.tecnico_hs_id"; + public static final int TECNICO_HS_ID_INDEX = 27; + public static final String TECNICO_HS_NOME = "tecnico_hs_nome"; + public static final String TECNICO_HS_NOME_FULL = "planos_actuacao.tecnico_hs_nome"; + public static final int TECNICO_HS_NOME_INDEX = 28; + public static final String ID = "id"; + public static final String ID_FULL = "planos_actuacao.id"; + public static final int ID_INDEX = 29; + public static final String DATA_RELATORIO = "data_relatorio"; + public static final String DATA_RELATORIO_FULL = "planos_actuacao.data_relatorio"; + public static final int DATA_RELATORIO_INDEX = 30; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "planos_actuacao.deleted_date"; + public static final int DELETED_DATE_INDEX = 31; + public static final String CONCLUIDO_POR_DESACTIVACAO = "concluido_por_desactivacao"; + public static final String CONCLUIDO_POR_DESACTIVACAO_FULL = "planos_actuacao.concluido_por_desactivacao"; + public static final int CONCLUIDO_POR_DESACTIVACAO_INDEX = 32; + public static final String TECNICO_SUPERIOR_HS_ID = "tecnico_superior_hs_id"; + public static final String TECNICO_SUPERIOR_HS_ID_FULL = "planos_actuacao.tecnico_superior_hs_id"; + public static final int TECNICO_SUPERIOR_HS_ID_INDEX = 33; + public static final String TECNICO_SUPERIOR_HS_NOME = "tecnico_superior_hs_nome"; + public static final String TECNICO_SUPERIOR_HS_NOME_FULL = "planos_actuacao.tecnico_superior_hs_nome"; + public static final int TECNICO_SUPERIOR_HS_NOME_INDEX = 34; + public static final String DATA_DESACTIVACAO = "data_desactivacao"; + public static final String DATA_DESACTIVACAO_FULL = "planos_actuacao.data_desactivacao"; + public static final int DATA_DESACTIVACAO_INDEX = 35; + + public static final String FIELD_NAMES[] = new String[]{ + ESTABELECIMENTO_ID, FASE, DATA_VISITA, NOME_ESTABELECIMENTO, + VALIDACAO_DIRECTOR_LOJA, VALIDACAO_DNS, VALIDACAO_HS, PARECER_DNS, + OBS_CORRECAO, DATA_VALIDACAO_DIR_LOJA, USER_DIR_LOJA, TO_USER_DIR_LOJA, + DATA_VALIDACAO_DNS, USER_DNS, TO_USER_DNS, DATA_VALIDACAO_HS, USER_HS, + TO_USER_HS, FASE_ANTES_CORRECAO, CORRECAO, OBSERVACOES_DL, OBSERVACOES_DNS, + VERIFICACAO_SIPRP, DATA_CONTROLO, DATA_EMAIL_CONTROLO, EMPRESA_ID, + NOME_EMPRESA, TECNICO_HS_ID, TECNICO_HS_NOME, DATA_RELATORIO, DELETED_DATE, + CONCLUIDO_POR_DESACTIVACAO, TECNICO_SUPERIOR_HS_ID, + TECNICO_SUPERIOR_HS_NOME, DATA_DESACTIVACAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + FASE, TABLENAME + "." + DATA_VISITA, TABLENAME + "." + NOME_ESTABELECIMENTO, + TABLENAME + "." + VALIDACAO_DIRECTOR_LOJA, TABLENAME + "." + VALIDACAO_DNS, TABLENAME + "." + VALIDACAO_HS, TABLENAME + "." + PARECER_DNS, + TABLENAME + "." + OBS_CORRECAO, TABLENAME + "." + DATA_VALIDACAO_DIR_LOJA, TABLENAME + "." + USER_DIR_LOJA, TABLENAME + "." + TO_USER_DIR_LOJA, + TABLENAME + "." + DATA_VALIDACAO_DNS, TABLENAME + "." + USER_DNS, TABLENAME + "." + TO_USER_DNS, TABLENAME + "." + DATA_VALIDACAO_HS, TABLENAME + "." + USER_HS, + TABLENAME + "." + TO_USER_HS, TABLENAME + "." + FASE_ANTES_CORRECAO, TABLENAME + "." + CORRECAO, TABLENAME + "." + OBSERVACOES_DL, TABLENAME + "." + OBSERVACOES_DNS, + TABLENAME + "." + VERIFICACAO_SIPRP, TABLENAME + "." + DATA_CONTROLO, TABLENAME + "." + DATA_EMAIL_CONTROLO, TABLENAME + "." + EMPRESA_ID, + TABLENAME + "." + NOME_EMPRESA, TABLENAME + "." + TECNICO_HS_ID, TABLENAME + "." + TECNICO_HS_NOME, TABLENAME + "." + DATA_RELATORIO, TABLENAME + "." + DELETED_DATE, + TABLENAME + "." + CONCLUIDO_POR_DESACTIVACAO, TABLENAME + "." + TECNICO_SUPERIOR_HS_ID, + TABLENAME + "." + TECNICO_SUPERIOR_HS_NOME, TABLENAME + "." + DATA_DESACTIVACAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ESTABELECIMENTO_ID, FASE, DATA_VISITA, NOME_ESTABELECIMENTO, + VALIDACAO_DIRECTOR_LOJA, VALIDACAO_DNS, VALIDACAO_HS, PARECER_DNS, + OBS_CORRECAO, DATA_VALIDACAO_DIR_LOJA, USER_DIR_LOJA, DATA_VALIDACAO_DNS, + USER_DNS, DATA_VALIDACAO_HS, USER_HS, FASE_ANTES_CORRECAO, CORRECAO, + OBSERVACOES_DL, OBSERVACOES_DNS, VERIFICACAO_SIPRP, DATA_CONTROLO, + DATA_EMAIL_CONTROLO, EMPRESA_ID, NOME_EMPRESA, TECNICO_HS_ID, TECNICO_HS_NOME, + ID, DATA_RELATORIO, DELETED_DATE, CONCLUIDO_POR_DESACTIVACAO, + TECNICO_SUPERIOR_HS_ID, TECNICO_SUPERIOR_HS_NOME, DATA_DESACTIVACAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ESTABELECIMENTO_ID, FASE, DATA_VISITA, NOME_ESTABELECIMENTO, + VALIDACAO_DIRECTOR_LOJA, VALIDACAO_DNS, VALIDACAO_HS, PARECER_DNS, + OBS_CORRECAO, DATA_VALIDACAO_DIR_LOJA, USER_DIR_LOJA, DATA_VALIDACAO_DNS, + USER_DNS, DATA_VALIDACAO_HS, USER_HS, FASE_ANTES_CORRECAO, CORRECAO, + OBSERVACOES_DL, OBSERVACOES_DNS, VERIFICACAO_SIPRP, DATA_CONTROLO, + DATA_EMAIL_CONTROLO, EMPRESA_ID, NOME_EMPRESA, TECNICO_HS_ID, TECNICO_HS_NOME, + ID, DATA_RELATORIO, DELETED_DATE, CONCLUIDO_POR_DESACTIVACAO, + TECNICO_SUPERIOR_HS_ID, TECNICO_SUPERIOR_HS_NOME, DATA_DESACTIVACAO, }; + + private Integer estabelecimento_id; + private Integer fase; + private java.util.Date data_visita; + private String nome_estabelecimento; + private Boolean validacao_director_loja; + private Boolean validacao_dns; + private Boolean validacao_hs; + private String parecer_dns; + private String obs_correcao; + private java.util.Date data_validacao_dir_loja; + private Integer user_dir_loja; + private db.data.siprp.outer.UtilizadoresData to_user_dir_loja; + private java.util.Date data_validacao_dns; + private Integer user_dns; + private db.data.siprp.outer.UtilizadoresData to_user_dns; + private java.util.Date data_validacao_hs; + private Integer user_hs; + private db.data.siprp.outer.UtilizadoresData to_user_hs; + private Integer fase_antes_correcao; + private String correcao; + private String observacoes_dl; + private String observacoes_dns; + private String verificacao_siprp; + private java.util.Date data_controlo; + private java.util.Date data_email_controlo; + private Integer empresa_id; + private String nome_empresa; + private Integer tecnico_hs_id; + private String tecnico_hs_nome; + private Integer id; + private java.util.Date data_relatorio; + private java.sql.Timestamp deleted_date; + private Boolean concluido_por_desactivacao; + private Integer tecnico_superior_hs_id; + private String tecnico_superior_hs_nome; + private java.util.Date data_desactivacao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PlanosActuacao() + { + 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 }; + } + + 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 Integer getFase() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FASE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.fase; + } + + public void setFase( Integer fase ) + { + try + { + setLockedForRefresh( true ); + preProcess( FASE, fase ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.fase = fase; + LAZY_LOADED_OBJECTS.put( FASE, Boolean.TRUE ); + } + + public java.util.Date getData_visita() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_VISITA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_visita; + } + + public void setData_visita( java.util.Date data_visita ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_VISITA, data_visita ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_visita = data_visita; + LAZY_LOADED_OBJECTS.put( DATA_VISITA, Boolean.TRUE ); + } + + public String getNome_estabelecimento() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_ESTABELECIMENTO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_estabelecimento; + } + + public void setNome_estabelecimento( String nome_estabelecimento ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_ESTABELECIMENTO, nome_estabelecimento ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_estabelecimento = nome_estabelecimento; + LAZY_LOADED_OBJECTS.put( NOME_ESTABELECIMENTO, Boolean.TRUE ); + } + + public Boolean getValidacao_director_loja() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALIDACAO_DIRECTOR_LOJA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.validacao_director_loja; + } + + public void setValidacao_director_loja( Boolean validacao_director_loja ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALIDACAO_DIRECTOR_LOJA, validacao_director_loja ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.validacao_director_loja = validacao_director_loja; + LAZY_LOADED_OBJECTS.put( VALIDACAO_DIRECTOR_LOJA, Boolean.TRUE ); + } + + public Boolean getValidacao_dns() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALIDACAO_DNS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.validacao_dns; + } + + public void setValidacao_dns( Boolean validacao_dns ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALIDACAO_DNS, validacao_dns ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.validacao_dns = validacao_dns; + LAZY_LOADED_OBJECTS.put( VALIDACAO_DNS, Boolean.TRUE ); + } + + public Boolean getValidacao_hs() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALIDACAO_HS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.validacao_hs; + } + + public void setValidacao_hs( Boolean validacao_hs ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALIDACAO_HS, validacao_hs ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.validacao_hs = validacao_hs; + LAZY_LOADED_OBJECTS.put( VALIDACAO_HS, Boolean.TRUE ); + } + + public String getParecer_dns() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PARECER_DNS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.parecer_dns; + } + + public void setParecer_dns( String parecer_dns ) + { + try + { + setLockedForRefresh( true ); + preProcess( PARECER_DNS, parecer_dns ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.parecer_dns = parecer_dns; + LAZY_LOADED_OBJECTS.put( PARECER_DNS, Boolean.TRUE ); + } + + public String getObs_correcao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OBS_CORRECAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.obs_correcao; + } + + public void setObs_correcao( String obs_correcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( OBS_CORRECAO, obs_correcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.obs_correcao = obs_correcao; + LAZY_LOADED_OBJECTS.put( OBS_CORRECAO, Boolean.TRUE ); + } + + public java.util.Date getData_validacao_dir_loja() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_VALIDACAO_DIR_LOJA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_validacao_dir_loja; + } + + public void setData_validacao_dir_loja( java.util.Date data_validacao_dir_loja ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_VALIDACAO_DIR_LOJA, data_validacao_dir_loja ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_validacao_dir_loja = data_validacao_dir_loja; + LAZY_LOADED_OBJECTS.put( DATA_VALIDACAO_DIR_LOJA, Boolean.TRUE ); + } + + public Integer getUser_dir_loja() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( USER_DIR_LOJA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.user_dir_loja; + } + + public void setUser_dir_loja( Integer user_dir_loja ) + { + try + { + setLockedForRefresh( true ); + preProcess( USER_DIR_LOJA, user_dir_loja ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.user_dir_loja = user_dir_loja; + LAZY_LOADED_OBJECTS.put( USER_DIR_LOJA, Boolean.TRUE ); + } + + public db.data.siprp.outer.UtilizadoresData toUser_dir_loja() + { + try + { + prepare( TO_USER_DIR_LOJA ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_user_dir_loja; + } + + public void setToUser_dir_loja( db.data.siprp.outer.UtilizadoresData to_user_dir_loja ) + { + try + { + preProcess( TO_USER_DIR_LOJA, to_user_dir_loja ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_user_dir_loja = to_user_dir_loja; + } + + public java.util.Date getData_validacao_dns() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_VALIDACAO_DNS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_validacao_dns; + } + + public void setData_validacao_dns( java.util.Date data_validacao_dns ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_VALIDACAO_DNS, data_validacao_dns ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_validacao_dns = data_validacao_dns; + LAZY_LOADED_OBJECTS.put( DATA_VALIDACAO_DNS, Boolean.TRUE ); + } + + public Integer getUser_dns() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( USER_DNS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.user_dns; + } + + public void setUser_dns( Integer user_dns ) + { + try + { + setLockedForRefresh( true ); + preProcess( USER_DNS, user_dns ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.user_dns = user_dns; + LAZY_LOADED_OBJECTS.put( USER_DNS, Boolean.TRUE ); + } + + public db.data.siprp.outer.UtilizadoresData toUser_dns() + { + try + { + prepare( TO_USER_DNS ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_user_dns; + } + + public void setToUser_dns( db.data.siprp.outer.UtilizadoresData to_user_dns ) + { + try + { + preProcess( TO_USER_DNS, to_user_dns ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_user_dns = to_user_dns; + } + + public java.util.Date getData_validacao_hs() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_VALIDACAO_HS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_validacao_hs; + } + + public void setData_validacao_hs( java.util.Date data_validacao_hs ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_VALIDACAO_HS, data_validacao_hs ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_validacao_hs = data_validacao_hs; + LAZY_LOADED_OBJECTS.put( DATA_VALIDACAO_HS, Boolean.TRUE ); + } + + public Integer getUser_hs() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( USER_HS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.user_hs; + } + + public void setUser_hs( Integer user_hs ) + { + try + { + setLockedForRefresh( true ); + preProcess( USER_HS, user_hs ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.user_hs = user_hs; + LAZY_LOADED_OBJECTS.put( USER_HS, Boolean.TRUE ); + } + + public db.data.siprp.outer.UtilizadoresData toUser_hs() + { + try + { + prepare( TO_USER_HS ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_user_hs; + } + + public void setToUser_hs( db.data.siprp.outer.UtilizadoresData to_user_hs ) + { + try + { + preProcess( TO_USER_HS, to_user_hs ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_user_hs = to_user_hs; + } + + public Integer getFase_antes_correcao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FASE_ANTES_CORRECAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.fase_antes_correcao; + } + + public void setFase_antes_correcao( Integer fase_antes_correcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( FASE_ANTES_CORRECAO, fase_antes_correcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.fase_antes_correcao = fase_antes_correcao; + LAZY_LOADED_OBJECTS.put( FASE_ANTES_CORRECAO, Boolean.TRUE ); + } + + public String getCorrecao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CORRECAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.correcao; + } + + public void setCorrecao( String correcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( CORRECAO, correcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.correcao = correcao; + LAZY_LOADED_OBJECTS.put( CORRECAO, Boolean.TRUE ); + } + + public String getObservacoes_dl() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OBSERVACOES_DL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.observacoes_dl; + } + + public void setObservacoes_dl( String observacoes_dl ) + { + try + { + setLockedForRefresh( true ); + preProcess( OBSERVACOES_DL, observacoes_dl ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.observacoes_dl = observacoes_dl; + LAZY_LOADED_OBJECTS.put( OBSERVACOES_DL, Boolean.TRUE ); + } + + public String getObservacoes_dns() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OBSERVACOES_DNS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.observacoes_dns; + } + + public void setObservacoes_dns( String observacoes_dns ) + { + try + { + setLockedForRefresh( true ); + preProcess( OBSERVACOES_DNS, observacoes_dns ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.observacoes_dns = observacoes_dns; + LAZY_LOADED_OBJECTS.put( OBSERVACOES_DNS, Boolean.TRUE ); + } + + public String getVerificacao_siprp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VERIFICACAO_SIPRP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.verificacao_siprp; + } + + public void setVerificacao_siprp( String verificacao_siprp ) + { + try + { + setLockedForRefresh( true ); + preProcess( VERIFICACAO_SIPRP, verificacao_siprp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.verificacao_siprp = verificacao_siprp; + LAZY_LOADED_OBJECTS.put( VERIFICACAO_SIPRP, Boolean.TRUE ); + } + + public java.util.Date getData_controlo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_CONTROLO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_controlo; + } + + public void setData_controlo( java.util.Date data_controlo ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_CONTROLO, data_controlo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_controlo = data_controlo; + LAZY_LOADED_OBJECTS.put( DATA_CONTROLO, Boolean.TRUE ); + } + + public java.util.Date getData_email_controlo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_EMAIL_CONTROLO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_email_controlo; + } + + public void setData_email_controlo( java.util.Date data_email_controlo ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_EMAIL_CONTROLO, data_email_controlo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_email_controlo = data_email_controlo; + LAZY_LOADED_OBJECTS.put( DATA_EMAIL_CONTROLO, 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 String getNome_empresa() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_EMPRESA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_empresa; + } + + public void setNome_empresa( String nome_empresa ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_EMPRESA, nome_empresa ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_empresa = nome_empresa; + LAZY_LOADED_OBJECTS.put( NOME_EMPRESA, Boolean.TRUE ); + } + + public Integer getTecnico_hs_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TECNICO_HS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tecnico_hs_id; + } + + public void setTecnico_hs_id( Integer tecnico_hs_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TECNICO_HS_ID, tecnico_hs_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tecnico_hs_id = tecnico_hs_id; + LAZY_LOADED_OBJECTS.put( TECNICO_HS_ID, Boolean.TRUE ); + } + + public String getTecnico_hs_nome() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TECNICO_HS_NOME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tecnico_hs_nome; + } + + public void setTecnico_hs_nome( String tecnico_hs_nome ) + { + try + { + setLockedForRefresh( true ); + preProcess( TECNICO_HS_NOME, tecnico_hs_nome ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tecnico_hs_nome = tecnico_hs_nome; + LAZY_LOADED_OBJECTS.put( TECNICO_HS_NOME, 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 java.util.ListfromPlanoAreas_plano_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.PlanoAreasData.class , getPrimaryKey().getMap().get("id"), "plano_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 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 getConcluido_por_desactivacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONCLUIDO_POR_DESACTIVACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.concluido_por_desactivacao; + } + + public void setConcluido_por_desactivacao( Boolean concluido_por_desactivacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONCLUIDO_POR_DESACTIVACAO, concluido_por_desactivacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.concluido_por_desactivacao = concluido_por_desactivacao; + LAZY_LOADED_OBJECTS.put( CONCLUIDO_POR_DESACTIVACAO, Boolean.TRUE ); + } + + public Integer getTecnico_superior_hs_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TECNICO_SUPERIOR_HS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tecnico_superior_hs_id; + } + + public void setTecnico_superior_hs_id( Integer tecnico_superior_hs_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TECNICO_SUPERIOR_HS_ID, tecnico_superior_hs_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tecnico_superior_hs_id = tecnico_superior_hs_id; + LAZY_LOADED_OBJECTS.put( TECNICO_SUPERIOR_HS_ID, Boolean.TRUE ); + } + + public String getTecnico_superior_hs_nome() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TECNICO_SUPERIOR_HS_NOME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tecnico_superior_hs_nome; + } + + public void setTecnico_superior_hs_nome( String tecnico_superior_hs_nome ) + { + try + { + setLockedForRefresh( true ); + preProcess( TECNICO_SUPERIOR_HS_NOME, tecnico_superior_hs_nome ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tecnico_superior_hs_nome = tecnico_superior_hs_nome; + LAZY_LOADED_OBJECTS.put( TECNICO_SUPERIOR_HS_NOME, Boolean.TRUE ); + } + + public java.util.Date getData_desactivacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_DESACTIVACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_desactivacao; + } + + public void setData_desactivacao( java.util.Date data_desactivacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_DESACTIVACAO, data_desactivacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_desactivacao = data_desactivacao; + LAZY_LOADED_OBJECTS.put( DATA_DESACTIVACAO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanosActuacao.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case PlanosActuacao.FASE_INDEX: + value = getFase(); + break; + case PlanosActuacao.DATA_VISITA_INDEX: + value = getData_visita(); + break; + case PlanosActuacao.NOME_ESTABELECIMENTO_INDEX: + value = getNome_estabelecimento(); + break; + case PlanosActuacao.VALIDACAO_DIRECTOR_LOJA_INDEX: + value = getValidacao_director_loja(); + break; + case PlanosActuacao.VALIDACAO_DNS_INDEX: + value = getValidacao_dns(); + break; + case PlanosActuacao.VALIDACAO_HS_INDEX: + value = getValidacao_hs(); + break; + case PlanosActuacao.PARECER_DNS_INDEX: + value = getParecer_dns(); + break; + case PlanosActuacao.OBS_CORRECAO_INDEX: + value = getObs_correcao(); + break; + case PlanosActuacao.DATA_VALIDACAO_DIR_LOJA_INDEX: + value = getData_validacao_dir_loja(); + break; + case PlanosActuacao.USER_DIR_LOJA_INDEX: + value = getUser_dir_loja(); + break; + case PlanosActuacao.TO_USER_DIR_LOJA_INDEX: + value = toUser_dir_loja(); + break; + case PlanosActuacao.DATA_VALIDACAO_DNS_INDEX: + value = getData_validacao_dns(); + break; + case PlanosActuacao.USER_DNS_INDEX: + value = getUser_dns(); + break; + case PlanosActuacao.TO_USER_DNS_INDEX: + value = toUser_dns(); + break; + case PlanosActuacao.DATA_VALIDACAO_HS_INDEX: + value = getData_validacao_hs(); + break; + case PlanosActuacao.USER_HS_INDEX: + value = getUser_hs(); + break; + case PlanosActuacao.TO_USER_HS_INDEX: + value = toUser_hs(); + break; + case PlanosActuacao.FASE_ANTES_CORRECAO_INDEX: + value = getFase_antes_correcao(); + break; + case PlanosActuacao.CORRECAO_INDEX: + value = getCorrecao(); + break; + case PlanosActuacao.OBSERVACOES_DL_INDEX: + value = getObservacoes_dl(); + break; + case PlanosActuacao.OBSERVACOES_DNS_INDEX: + value = getObservacoes_dns(); + break; + case PlanosActuacao.VERIFICACAO_SIPRP_INDEX: + value = getVerificacao_siprp(); + break; + case PlanosActuacao.DATA_CONTROLO_INDEX: + value = getData_controlo(); + break; + case PlanosActuacao.DATA_EMAIL_CONTROLO_INDEX: + value = getData_email_controlo(); + break; + case PlanosActuacao.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case PlanosActuacao.NOME_EMPRESA_INDEX: + value = getNome_empresa(); + break; + case PlanosActuacao.TECNICO_HS_ID_INDEX: + value = getTecnico_hs_id(); + break; + case PlanosActuacao.TECNICO_HS_NOME_INDEX: + value = getTecnico_hs_nome(); + break; + case PlanosActuacao.ID_INDEX: + value = getId(); + break; + case PlanosActuacao.DATA_RELATORIO_INDEX: + value = getData_relatorio(); + break; + case PlanosActuacao.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO_INDEX: + value = getConcluido_por_desactivacao(); + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_ID_INDEX: + value = getTecnico_superior_hs_id(); + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_NOME_INDEX: + value = getTecnico_superior_hs_nome(); + break; + case PlanosActuacao.DATA_DESACTIVACAO_INDEX: + value = getData_desactivacao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanosActuacao.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + case PlanosActuacao.FASE_INDEX: + value = this.fase; + break; + case PlanosActuacao.DATA_VISITA_INDEX: + value = this.data_visita; + break; + case PlanosActuacao.NOME_ESTABELECIMENTO_INDEX: + value = this.nome_estabelecimento; + break; + case PlanosActuacao.VALIDACAO_DIRECTOR_LOJA_INDEX: + value = this.validacao_director_loja; + break; + case PlanosActuacao.VALIDACAO_DNS_INDEX: + value = this.validacao_dns; + break; + case PlanosActuacao.VALIDACAO_HS_INDEX: + value = this.validacao_hs; + break; + case PlanosActuacao.PARECER_DNS_INDEX: + value = this.parecer_dns; + break; + case PlanosActuacao.OBS_CORRECAO_INDEX: + value = this.obs_correcao; + break; + case PlanosActuacao.DATA_VALIDACAO_DIR_LOJA_INDEX: + value = this.data_validacao_dir_loja; + break; + case PlanosActuacao.USER_DIR_LOJA_INDEX: + value = this.user_dir_loja; + break; + case PlanosActuacao.TO_USER_DIR_LOJA_INDEX: + value = this.to_user_dir_loja; + break; + case PlanosActuacao.DATA_VALIDACAO_DNS_INDEX: + value = this.data_validacao_dns; + break; + case PlanosActuacao.USER_DNS_INDEX: + value = this.user_dns; + break; + case PlanosActuacao.TO_USER_DNS_INDEX: + value = this.to_user_dns; + break; + case PlanosActuacao.DATA_VALIDACAO_HS_INDEX: + value = this.data_validacao_hs; + break; + case PlanosActuacao.USER_HS_INDEX: + value = this.user_hs; + break; + case PlanosActuacao.TO_USER_HS_INDEX: + value = this.to_user_hs; + break; + case PlanosActuacao.FASE_ANTES_CORRECAO_INDEX: + value = this.fase_antes_correcao; + break; + case PlanosActuacao.CORRECAO_INDEX: + value = this.correcao; + break; + case PlanosActuacao.OBSERVACOES_DL_INDEX: + value = this.observacoes_dl; + break; + case PlanosActuacao.OBSERVACOES_DNS_INDEX: + value = this.observacoes_dns; + break; + case PlanosActuacao.VERIFICACAO_SIPRP_INDEX: + value = this.verificacao_siprp; + break; + case PlanosActuacao.DATA_CONTROLO_INDEX: + value = this.data_controlo; + break; + case PlanosActuacao.DATA_EMAIL_CONTROLO_INDEX: + value = this.data_email_controlo; + break; + case PlanosActuacao.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case PlanosActuacao.NOME_EMPRESA_INDEX: + value = this.nome_empresa; + break; + case PlanosActuacao.TECNICO_HS_ID_INDEX: + value = this.tecnico_hs_id; + break; + case PlanosActuacao.TECNICO_HS_NOME_INDEX: + value = this.tecnico_hs_nome; + break; + case PlanosActuacao.ID_INDEX: + value = this.id; + break; + case PlanosActuacao.DATA_RELATORIO_INDEX: + value = this.data_relatorio; + break; + case PlanosActuacao.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO_INDEX: + value = this.concluido_por_desactivacao; + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_ID_INDEX: + value = this.tecnico_superior_hs_id; + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_NOME_INDEX: + value = this.tecnico_superior_hs_nome; + break; + case PlanosActuacao.DATA_DESACTIVACAO_INDEX: + value = this.data_desactivacao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanosActuacao.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case PlanosActuacao.FASE_INDEX: + setFase( ( Integer ) value ); + break; + case PlanosActuacao.DATA_VISITA_INDEX: + setData_visita( ( java.util.Date ) value ); + break; + case PlanosActuacao.NOME_ESTABELECIMENTO_INDEX: + setNome_estabelecimento( ( String ) value ); + break; + case PlanosActuacao.VALIDACAO_DIRECTOR_LOJA_INDEX: + setValidacao_director_loja( ( Boolean ) value ); + break; + case PlanosActuacao.VALIDACAO_DNS_INDEX: + setValidacao_dns( ( Boolean ) value ); + break; + case PlanosActuacao.VALIDACAO_HS_INDEX: + setValidacao_hs( ( Boolean ) value ); + break; + case PlanosActuacao.PARECER_DNS_INDEX: + setParecer_dns( ( String ) value ); + break; + case PlanosActuacao.OBS_CORRECAO_INDEX: + setObs_correcao( ( String ) value ); + break; + case PlanosActuacao.DATA_VALIDACAO_DIR_LOJA_INDEX: + setData_validacao_dir_loja( ( java.util.Date ) value ); + break; + case PlanosActuacao.USER_DIR_LOJA_INDEX: + setUser_dir_loja( ( Integer ) value ); + break; + case PlanosActuacao.TO_USER_DIR_LOJA_INDEX: + setToUser_dir_loja( ( db.data.siprp.outer.UtilizadoresData ) value ); + break; + case PlanosActuacao.DATA_VALIDACAO_DNS_INDEX: + setData_validacao_dns( ( java.util.Date ) value ); + break; + case PlanosActuacao.USER_DNS_INDEX: + setUser_dns( ( Integer ) value ); + break; + case PlanosActuacao.TO_USER_DNS_INDEX: + setToUser_dns( ( db.data.siprp.outer.UtilizadoresData ) value ); + break; + case PlanosActuacao.DATA_VALIDACAO_HS_INDEX: + setData_validacao_hs( ( java.util.Date ) value ); + break; + case PlanosActuacao.USER_HS_INDEX: + setUser_hs( ( Integer ) value ); + break; + case PlanosActuacao.TO_USER_HS_INDEX: + setToUser_hs( ( db.data.siprp.outer.UtilizadoresData ) value ); + break; + case PlanosActuacao.FASE_ANTES_CORRECAO_INDEX: + setFase_antes_correcao( ( Integer ) value ); + break; + case PlanosActuacao.CORRECAO_INDEX: + setCorrecao( ( String ) value ); + break; + case PlanosActuacao.OBSERVACOES_DL_INDEX: + setObservacoes_dl( ( String ) value ); + break; + case PlanosActuacao.OBSERVACOES_DNS_INDEX: + setObservacoes_dns( ( String ) value ); + break; + case PlanosActuacao.VERIFICACAO_SIPRP_INDEX: + setVerificacao_siprp( ( String ) value ); + break; + case PlanosActuacao.DATA_CONTROLO_INDEX: + setData_controlo( ( java.util.Date ) value ); + break; + case PlanosActuacao.DATA_EMAIL_CONTROLO_INDEX: + setData_email_controlo( ( java.util.Date ) value ); + break; + case PlanosActuacao.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case PlanosActuacao.NOME_EMPRESA_INDEX: + setNome_empresa( ( String ) value ); + break; + case PlanosActuacao.TECNICO_HS_ID_INDEX: + setTecnico_hs_id( ( Integer ) value ); + break; + case PlanosActuacao.TECNICO_HS_NOME_INDEX: + setTecnico_hs_nome( ( String ) value ); + break; + case PlanosActuacao.ID_INDEX: + setId( ( Integer ) value ); + break; + case PlanosActuacao.DATA_RELATORIO_INDEX: + setData_relatorio( ( java.util.Date ) value ); + break; + case PlanosActuacao.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO_INDEX: + setConcluido_por_desactivacao( ( Boolean ) value ); + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_ID_INDEX: + setTecnico_superior_hs_id( ( Integer ) value ); + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_NOME_INDEX: + setTecnico_superior_hs_nome( ( String ) value ); + break; + case PlanosActuacao.DATA_DESACTIVACAO_INDEX: + setData_desactivacao( ( java.util.Date ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanosActuacao.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case PlanosActuacao.FASE_INDEX: + this.fase = ( Integer ) value; + break; + case PlanosActuacao.DATA_VISITA_INDEX: + this.data_visita = ( java.util.Date ) value; + break; + case PlanosActuacao.NOME_ESTABELECIMENTO_INDEX: + this.nome_estabelecimento = ( String ) value; + break; + case PlanosActuacao.VALIDACAO_DIRECTOR_LOJA_INDEX: + this.validacao_director_loja = ( Boolean ) value; + break; + case PlanosActuacao.VALIDACAO_DNS_INDEX: + this.validacao_dns = ( Boolean ) value; + break; + case PlanosActuacao.VALIDACAO_HS_INDEX: + this.validacao_hs = ( Boolean ) value; + break; + case PlanosActuacao.PARECER_DNS_INDEX: + this.parecer_dns = ( String ) value; + break; + case PlanosActuacao.OBS_CORRECAO_INDEX: + this.obs_correcao = ( String ) value; + break; + case PlanosActuacao.DATA_VALIDACAO_DIR_LOJA_INDEX: + this.data_validacao_dir_loja = ( java.util.Date ) value; + break; + case PlanosActuacao.USER_DIR_LOJA_INDEX: + this.user_dir_loja = ( Integer ) value; + break; + case PlanosActuacao.TO_USER_DIR_LOJA_INDEX: + this.to_user_dir_loja = ( db.data.siprp.outer.UtilizadoresData ) value; + break; + case PlanosActuacao.DATA_VALIDACAO_DNS_INDEX: + this.data_validacao_dns = ( java.util.Date ) value; + break; + case PlanosActuacao.USER_DNS_INDEX: + this.user_dns = ( Integer ) value; + break; + case PlanosActuacao.TO_USER_DNS_INDEX: + this.to_user_dns = ( db.data.siprp.outer.UtilizadoresData ) value; + break; + case PlanosActuacao.DATA_VALIDACAO_HS_INDEX: + this.data_validacao_hs = ( java.util.Date ) value; + break; + case PlanosActuacao.USER_HS_INDEX: + this.user_hs = ( Integer ) value; + break; + case PlanosActuacao.TO_USER_HS_INDEX: + this.to_user_hs = ( db.data.siprp.outer.UtilizadoresData ) value; + break; + case PlanosActuacao.FASE_ANTES_CORRECAO_INDEX: + this.fase_antes_correcao = ( Integer ) value; + break; + case PlanosActuacao.CORRECAO_INDEX: + this.correcao = ( String ) value; + break; + case PlanosActuacao.OBSERVACOES_DL_INDEX: + this.observacoes_dl = ( String ) value; + break; + case PlanosActuacao.OBSERVACOES_DNS_INDEX: + this.observacoes_dns = ( String ) value; + break; + case PlanosActuacao.VERIFICACAO_SIPRP_INDEX: + this.verificacao_siprp = ( String ) value; + break; + case PlanosActuacao.DATA_CONTROLO_INDEX: + this.data_controlo = ( java.util.Date ) value; + break; + case PlanosActuacao.DATA_EMAIL_CONTROLO_INDEX: + this.data_email_controlo = ( java.util.Date ) value; + break; + case PlanosActuacao.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case PlanosActuacao.NOME_EMPRESA_INDEX: + this.nome_empresa = ( String ) value; + break; + case PlanosActuacao.TECNICO_HS_ID_INDEX: + this.tecnico_hs_id = ( Integer ) value; + break; + case PlanosActuacao.TECNICO_HS_NOME_INDEX: + this.tecnico_hs_nome = ( String ) value; + break; + case PlanosActuacao.ID_INDEX: + this.id = ( Integer ) value; + break; + case PlanosActuacao.DATA_RELATORIO_INDEX: + this.data_relatorio = ( java.util.Date ) value; + break; + case PlanosActuacao.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO_INDEX: + this.concluido_por_desactivacao = ( Boolean ) value; + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_ID_INDEX: + this.tecnico_superior_hs_id = ( Integer ) value; + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_NOME_INDEX: + this.tecnico_superior_hs_nome = ( String ) value; + break; + case PlanosActuacao.DATA_DESACTIVACAO_INDEX: + this.data_desactivacao = ( 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 PlanosActuacao.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.FASE_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.DATA_VISITA_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.NOME_ESTABELECIMENTO_INDEX: + theClass = String.class; + break; + case PlanosActuacao.VALIDACAO_DIRECTOR_LOJA_INDEX: + theClass = Boolean.class; + break; + case PlanosActuacao.VALIDACAO_DNS_INDEX: + theClass = Boolean.class; + break; + case PlanosActuacao.VALIDACAO_HS_INDEX: + theClass = Boolean.class; + break; + case PlanosActuacao.PARECER_DNS_INDEX: + theClass = String.class; + break; + case PlanosActuacao.OBS_CORRECAO_INDEX: + theClass = String.class; + break; + case PlanosActuacao.DATA_VALIDACAO_DIR_LOJA_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.USER_DIR_LOJA_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.TO_USER_DIR_LOJA_INDEX: + theClass = db.data.siprp.outer.UtilizadoresData.class; + break; + case PlanosActuacao.DATA_VALIDACAO_DNS_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.USER_DNS_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.TO_USER_DNS_INDEX: + theClass = db.data.siprp.outer.UtilizadoresData.class; + break; + case PlanosActuacao.DATA_VALIDACAO_HS_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.USER_HS_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.TO_USER_HS_INDEX: + theClass = db.data.siprp.outer.UtilizadoresData.class; + break; + case PlanosActuacao.FASE_ANTES_CORRECAO_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.CORRECAO_INDEX: + theClass = String.class; + break; + case PlanosActuacao.OBSERVACOES_DL_INDEX: + theClass = String.class; + break; + case PlanosActuacao.OBSERVACOES_DNS_INDEX: + theClass = String.class; + break; + case PlanosActuacao.VERIFICACAO_SIPRP_INDEX: + theClass = String.class; + break; + case PlanosActuacao.DATA_CONTROLO_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.DATA_EMAIL_CONTROLO_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.NOME_EMPRESA_INDEX: + theClass = String.class; + break; + case PlanosActuacao.TECNICO_HS_ID_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.TECNICO_HS_NOME_INDEX: + theClass = String.class; + break; + case PlanosActuacao.ID_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.DATA_RELATORIO_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO_INDEX: + theClass = Boolean.class; + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_ID_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_NOME_INDEX: + theClass = String.class; + break; + case PlanosActuacao.DATA_DESACTIVACAO_INDEX: + theClass = java.util.Date.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PlanosActuacao._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, PlanosActuacao.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Properties.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Properties.java new file mode 100644 index 00000000..987f8cf7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Properties.java @@ -0,0 +1,178 @@ +/* +* Properties.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Properties extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "properties"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.properties"; + + public static final int _INVALID__INDEX = -1; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + }; + + + protected com.evolute.entity.utils.ObjectPrimaryKey primaryKey; + + public Properties() + { + super(); + dirtyProperties = new boolean[]{ }; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + throw new RuntimeException( "getPrimaryKeyName on Properties is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Properties._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.ObjectPrimaryKey( TABLENAME, Properties.PK_FIELD_NAMES ); + } + } + + @Override + public com.evolute.entity.utils.ObjectPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Recomendacoes.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Recomendacoes.java new file mode 100644 index 00000000..0e9d7531 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Recomendacoes.java @@ -0,0 +1,381 @@ +/* +* Recomendacoes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Recomendacoes extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Recomendacoes.ID, Recomendacoes.ID_INDEX ); + FIELD_INDEXES.put( Recomendacoes.ID_FULL, Recomendacoes.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Recomendacoes.CLASS_IDENTIFIER, Recomendacoes.ANALISE_ID, Recomendacoes.TO_ANALISE_ID ); + FIELD_INDEXES.put( Recomendacoes.ANALISE_ID, Recomendacoes.ANALISE_ID_INDEX ); + FIELD_INDEXES.put( Recomendacoes.ANALISE_ID_FULL, Recomendacoes.ANALISE_ID_INDEX ); + FIELD_INDEXES.put( Recomendacoes.TO_ANALISE_ID, Recomendacoes.TO_ANALISE_ID_INDEX ); + FIELD_INDEXES.put( Recomendacoes.RECOMENDACAO, Recomendacoes.RECOMENDACAO_INDEX ); + FIELD_INDEXES.put( Recomendacoes.RECOMENDACAO_FULL, Recomendacoes.RECOMENDACAO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyanalise_idToanalises_acidentes = + new com.evolute.entity.ForeignKey( Recomendacoes.class, Recomendacoes.ANALISE_ID, db.data.siprp.outer.AnalisesAcidentesData.class, db.data.siprp.outer.AnalisesAcidentesData.ID ); + + public static final String TABLENAME = "recomendacoes"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.recomendacoes"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "recomendacoes.id"; + public static final int ID_INDEX = 0; + public static final String ANALISE_ID = "analise_id"; + public static final String ANALISE_ID_FULL = "recomendacoes.analise_id"; + public static final int ANALISE_ID_INDEX = 1; + public static final String TO_ANALISE_ID = "to_analise_id"; + public static final String TO_ANALISE_ID_FULL = "recomendacoes.to_analise_id"; + public static final int TO_ANALISE_ID_INDEX = 2; + public static final String RECOMENDACAO = "recomendacao"; + public static final String RECOMENDACAO_FULL = "recomendacoes.recomendacao"; + public static final int RECOMENDACAO_INDEX = 3; + + public static final String FIELD_NAMES[] = new String[]{ + ANALISE_ID, TO_ANALISE_ID, RECOMENDACAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ANALISE_ID, TABLENAME + "." + TO_ANALISE_ID, TABLENAME + "." + RECOMENDACAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ANALISE_ID, RECOMENDACAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ANALISE_ID, RECOMENDACAO, }; + + private Integer id; + private Integer analise_id; + private db.data.siprp.outer.AnalisesAcidentesData to_analise_id; + private String recomendacao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Recomendacoes() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 getAnalise_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ANALISE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.analise_id; + } + + public void setAnalise_id( Integer analise_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ANALISE_ID, analise_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.analise_id = analise_id; + LAZY_LOADED_OBJECTS.put( ANALISE_ID, Boolean.TRUE ); + } + + public db.data.siprp.outer.AnalisesAcidentesData toAnalise_id() + { + try + { + prepare( TO_ANALISE_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_analise_id; + } + + public void setToAnalise_id( db.data.siprp.outer.AnalisesAcidentesData to_analise_id ) + { + try + { + preProcess( TO_ANALISE_ID, to_analise_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_analise_id = to_analise_id; + } + + public String getRecomendacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RECOMENDACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.recomendacao; + } + + public void setRecomendacao( String recomendacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( RECOMENDACAO, recomendacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.recomendacao = recomendacao; + LAZY_LOADED_OBJECTS.put( RECOMENDACAO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Recomendacoes.ID_INDEX: + value = getId(); + break; + case Recomendacoes.ANALISE_ID_INDEX: + value = getAnalise_id(); + break; + case Recomendacoes.TO_ANALISE_ID_INDEX: + value = toAnalise_id(); + break; + case Recomendacoes.RECOMENDACAO_INDEX: + value = getRecomendacao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Recomendacoes.ID_INDEX: + value = this.id; + break; + case Recomendacoes.ANALISE_ID_INDEX: + value = this.analise_id; + break; + case Recomendacoes.TO_ANALISE_ID_INDEX: + value = this.to_analise_id; + break; + case Recomendacoes.RECOMENDACAO_INDEX: + value = this.recomendacao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Recomendacoes.ID_INDEX: + setId( ( Integer ) value ); + break; + case Recomendacoes.ANALISE_ID_INDEX: + setAnalise_id( ( Integer ) value ); + break; + case Recomendacoes.TO_ANALISE_ID_INDEX: + setToAnalise_id( ( db.data.siprp.outer.AnalisesAcidentesData ) value ); + break; + case Recomendacoes.RECOMENDACAO_INDEX: + setRecomendacao( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Recomendacoes.ID_INDEX: + this.id = ( Integer ) value; + break; + case Recomendacoes.ANALISE_ID_INDEX: + this.analise_id = ( Integer ) value; + break; + case Recomendacoes.TO_ANALISE_ID_INDEX: + this.to_analise_id = ( db.data.siprp.outer.AnalisesAcidentesData ) value; + break; + case Recomendacoes.RECOMENDACAO_INDEX: + this.recomendacao = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Recomendacoes.ID_INDEX: + theClass = Integer.class; + break; + case Recomendacoes.ANALISE_ID_INDEX: + theClass = Integer.class; + break; + case Recomendacoes.TO_ANALISE_ID_INDEX: + theClass = db.data.siprp.outer.AnalisesAcidentesData.class; + break; + case Recomendacoes.RECOMENDACAO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Recomendacoes._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Recomendacoes.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/RiscoValoresTemp.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/RiscoValoresTemp.java new file mode 100644 index 00000000..8bf76521 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/RiscoValoresTemp.java @@ -0,0 +1,178 @@ +/* +* RiscoValoresTemp.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class RiscoValoresTemp extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "risco_valores_temp"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.risco_valores_temp"; + + public static final int _INVALID__INDEX = -1; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + }; + + + protected com.evolute.entity.utils.ObjectPrimaryKey primaryKey; + + public RiscoValoresTemp() + { + super(); + dirtyProperties = new boolean[]{ }; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + throw new RuntimeException( "getPrimaryKeyName on RiscoValoresTemp is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : RiscoValoresTemp._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.ObjectPrimaryKey( TABLENAME, RiscoValoresTemp.PK_FIELD_NAMES ); + } + } + + @Override + public com.evolute.entity.utils.ObjectPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Roles.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Roles.java new file mode 100644 index 00000000..ac757915 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Roles.java @@ -0,0 +1,178 @@ +/* +* Roles.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Roles extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "roles"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.roles"; + + public static final int _INVALID__INDEX = -1; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + }; + + + protected com.evolute.entity.utils.ObjectPrimaryKey primaryKey; + + public Roles() + { + super(); + dirtyProperties = new boolean[]{ }; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + throw new RuntimeException( "getPrimaryKeyName on Roles is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Roles._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.ObjectPrimaryKey( TABLENAME, Roles.PK_FIELD_NAMES ); + } + } + + @Override + public com.evolute.entity.utils.ObjectPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Seccoes.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Seccoes.java new file mode 100644 index 00000000..6e58c53e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Seccoes.java @@ -0,0 +1,445 @@ +/* +* Seccoes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Seccoes extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Seccoes.ID, Seccoes.ID_INDEX ); + FIELD_INDEXES.put( Seccoes.ID_FULL, Seccoes.ID_INDEX ); + FIELD_INDEXES.put( Seccoes.DESCRICAO, Seccoes.DESCRICAO_INDEX ); + FIELD_INDEXES.put( Seccoes.DESCRICAO_FULL, Seccoes.DESCRICAO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Seccoes.CLASS_IDENTIFIER, Seccoes.DEPARTAMENTO_ID, Seccoes.TO_DEPARTAMENTO_ID ); + FIELD_INDEXES.put( Seccoes.DEPARTAMENTO_ID, Seccoes.DEPARTAMENTO_ID_INDEX ); + FIELD_INDEXES.put( Seccoes.DEPARTAMENTO_ID_FULL, Seccoes.DEPARTAMENTO_ID_INDEX ); + FIELD_INDEXES.put( Seccoes.TO_DEPARTAMENTO_ID, Seccoes.TO_DEPARTAMENTO_ID_INDEX ); + FIELD_INDEXES.put( Seccoes.ACTIVO, Seccoes.ACTIVO_INDEX ); + FIELD_INDEXES.put( Seccoes.ACTIVO_FULL, Seccoes.ACTIVO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeydepartamento_idTodepartamentos = + new com.evolute.entity.ForeignKey( Seccoes.class, Seccoes.DEPARTAMENTO_ID, db.data.siprp.outer.DepartamentosData.class, db.data.siprp.outer.DepartamentosData.ID ); + + public static final String TABLENAME = "seccoes"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.seccoes"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "seccoes.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "seccoes.descricao"; + public static final int DESCRICAO_INDEX = 1; + public static final String DEPARTAMENTO_ID = "departamento_id"; + public static final String DEPARTAMENTO_ID_FULL = "seccoes.departamento_id"; + public static final int DEPARTAMENTO_ID_INDEX = 2; + public static final String TO_DEPARTAMENTO_ID = "to_departamento_id"; + public static final String TO_DEPARTAMENTO_ID_FULL = "seccoes.to_departamento_id"; + public static final int TO_DEPARTAMENTO_ID_INDEX = 3; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "seccoes.activo"; + public static final int ACTIVO_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, DEPARTAMENTO_ID, TO_DEPARTAMENTO_ID, ACTIVO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + DEPARTAMENTO_ID, TABLENAME + "." + TO_DEPARTAMENTO_ID, TABLENAME + "." + ACTIVO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, DEPARTAMENTO_ID, ACTIVO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRICAO, DEPARTAMENTO_ID, ACTIVO, }; + + private Integer id; + private String descricao; + private Integer departamento_id; + private db.data.siprp.outer.DepartamentosData to_departamento_id; + private String activo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Seccoes() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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.ListfromAnalisesAcidentes_seccao_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.AnalisesAcidentesData.class , getPrimaryKey().getMap().get("id"), "seccao_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public String getDescricao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao; + } + + public void setDescricao( String descricao ) + { + try + { + 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 getDepartamento_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DEPARTAMENTO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.departamento_id; + } + + public void setDepartamento_id( Integer departamento_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( DEPARTAMENTO_ID, departamento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.departamento_id = departamento_id; + LAZY_LOADED_OBJECTS.put( DEPARTAMENTO_ID, Boolean.TRUE ); + } + + public db.data.siprp.outer.DepartamentosData toDepartamento_id() + { + try + { + prepare( TO_DEPARTAMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_departamento_id; + } + + public void setToDepartamento_id( db.data.siprp.outer.DepartamentosData to_departamento_id ) + { + try + { + preProcess( TO_DEPARTAMENTO_ID, to_departamento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_departamento_id = to_departamento_id; + } + + public String getActivo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACTIVO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.activo; + } + + public void setActivo( String activo ) + { + try + { + 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 Seccoes.ID_INDEX: + value = getId(); + break; + case Seccoes.DESCRICAO_INDEX: + value = getDescricao(); + break; + case Seccoes.DEPARTAMENTO_ID_INDEX: + value = getDepartamento_id(); + break; + case Seccoes.TO_DEPARTAMENTO_ID_INDEX: + value = toDepartamento_id(); + break; + case Seccoes.ACTIVO_INDEX: + value = getActivo(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Seccoes.ID_INDEX: + value = this.id; + break; + case Seccoes.DESCRICAO_INDEX: + value = this.descricao; + break; + case Seccoes.DEPARTAMENTO_ID_INDEX: + value = this.departamento_id; + break; + case Seccoes.TO_DEPARTAMENTO_ID_INDEX: + value = this.to_departamento_id; + break; + case Seccoes.ACTIVO_INDEX: + value = this.activo; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Seccoes.ID_INDEX: + setId( ( Integer ) value ); + break; + case Seccoes.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case Seccoes.DEPARTAMENTO_ID_INDEX: + setDepartamento_id( ( Integer ) value ); + break; + case Seccoes.TO_DEPARTAMENTO_ID_INDEX: + setToDepartamento_id( ( db.data.siprp.outer.DepartamentosData ) value ); + break; + case Seccoes.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Seccoes.ID_INDEX: + this.id = ( Integer ) value; + break; + case Seccoes.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case Seccoes.DEPARTAMENTO_ID_INDEX: + this.departamento_id = ( Integer ) value; + break; + case Seccoes.TO_DEPARTAMENTO_ID_INDEX: + this.to_departamento_id = ( db.data.siprp.outer.DepartamentosData ) value; + break; + case Seccoes.ACTIVO_INDEX: + this.activo = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Seccoes.ID_INDEX: + theClass = Integer.class; + break; + case Seccoes.DESCRICAO_INDEX: + theClass = String.class; + break; + case Seccoes.DEPARTAMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Seccoes.TO_DEPARTAMENTO_ID_INDEX: + theClass = db.data.siprp.outer.DepartamentosData.class; + break; + case Seccoes.ACTIVO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Seccoes._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Seccoes.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/TiposExamesComp.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/TiposExamesComp.java new file mode 100644 index 00000000..755f8fcf --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/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 db.data.siprp.inner; + + +public class TiposExamesComp extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp.inner.tipos_exames_comp"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "tipos_exames_comp.id"; + public static final int ID_INDEX = 0; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "tipos_exames_comp.ordem"; + public static final int ORDEM_INDEX = 1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "tipos_exames_comp.descricao"; + public static final int DESCRICAO_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + ORDEM, DESCRICAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ORDEM, TABLENAME + "." + DESCRICAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ORDEM, DESCRICAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ORDEM, DESCRICAO, }; + + private Integer id; + private Integer ordem; + private String descricao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TiposExamesComp() + { + super(); + dirtyProperties = new boolean[]{ false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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( db.data.siprp.outer.ExamesPerfisData.class , getPrimaryKey().getMap().get("id"), "tipo" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public Integer getOrdem() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ORDEM ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ordem; + } + + public void setOrdem( Integer ordem ) + { + try + { + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/TiposUtilizadores.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/TiposUtilizadores.java new file mode 100644 index 00000000..10608736 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/TiposUtilizadores.java @@ -0,0 +1,431 @@ +/* +* TiposUtilizadores.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class TiposUtilizadores extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( TiposUtilizadores.ID, TiposUtilizadores.ID_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.ID_FULL, TiposUtilizadores.ID_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.TIPO, TiposUtilizadores.TIPO_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.TIPO_FULL, TiposUtilizadores.TIPO_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.DESCRICAO, TiposUtilizadores.DESCRICAO_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.DESCRICAO_FULL, TiposUtilizadores.DESCRICAO_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.ACTIVO, TiposUtilizadores.ACTIVO_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.ACTIVO_FULL, TiposUtilizadores.ACTIVO_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.ORDEM, TiposUtilizadores.ORDEM_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.ORDEM_FULL, TiposUtilizadores.ORDEM_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "tipos_utilizadores"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.tipos_utilizadores"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "tipos_utilizadores.id"; + public static final int ID_INDEX = 0; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "tipos_utilizadores.tipo"; + public static final int TIPO_INDEX = 1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "tipos_utilizadores.descricao"; + public static final int DESCRICAO_INDEX = 2; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "tipos_utilizadores.activo"; + public static final int ACTIVO_INDEX = 3; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "tipos_utilizadores.ordem"; + public static final int ORDEM_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + TIPO, DESCRICAO, ACTIVO, ORDEM, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TIPO, TABLENAME + "." + DESCRICAO, TABLENAME + "." + ACTIVO, TABLENAME + "." + ORDEM, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TIPO, DESCRICAO, ACTIVO, ORDEM, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TIPO, DESCRICAO, ACTIVO, ORDEM, }; + + private Integer id; + private Integer tipo; + private String descricao; + private String activo; + private Integer ordem; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TiposUtilizadores() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 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 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 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 TiposUtilizadores.ID_INDEX: + value = getId(); + break; + case TiposUtilizadores.TIPO_INDEX: + value = getTipo(); + break; + case TiposUtilizadores.DESCRICAO_INDEX: + value = getDescricao(); + break; + case TiposUtilizadores.ACTIVO_INDEX: + value = getActivo(); + break; + case TiposUtilizadores.ORDEM_INDEX: + value = getOrdem(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TiposUtilizadores.ID_INDEX: + value = this.id; + break; + case TiposUtilizadores.TIPO_INDEX: + value = this.tipo; + break; + case TiposUtilizadores.DESCRICAO_INDEX: + value = this.descricao; + break; + case TiposUtilizadores.ACTIVO_INDEX: + value = this.activo; + break; + case TiposUtilizadores.ORDEM_INDEX: + value = this.ordem; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TiposUtilizadores.ID_INDEX: + setId( ( Integer ) value ); + break; + case TiposUtilizadores.TIPO_INDEX: + setTipo( ( Integer ) value ); + break; + case TiposUtilizadores.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case TiposUtilizadores.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + case TiposUtilizadores.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TiposUtilizadores.ID_INDEX: + this.id = ( Integer ) value; + break; + case TiposUtilizadores.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case TiposUtilizadores.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case TiposUtilizadores.ACTIVO_INDEX: + this.activo = ( String ) value; + break; + case TiposUtilizadores.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case TiposUtilizadores.ID_INDEX: + theClass = Integer.class; + break; + case TiposUtilizadores.TIPO_INDEX: + theClass = Integer.class; + break; + case TiposUtilizadores.DESCRICAO_INDEX: + theClass = String.class; + break; + case TiposUtilizadores.ACTIVO_INDEX: + theClass = String.class; + break; + case TiposUtilizadores.ORDEM_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : TiposUtilizadores._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, TiposUtilizadores.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Trabalhadores.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Trabalhadores.java new file mode 100644 index 00000000..c6f581f9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Trabalhadores.java @@ -0,0 +1,1083 @@ +/* +* Trabalhadores.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Trabalhadores extends com.evolute.entity.evo.EvoDataObject +{ + 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.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.NUMERO_MECANOGRAFICO, Trabalhadores.NUMERO_MECANOGRAFICO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NUMERO_MECANOGRAFICO_FULL, Trabalhadores.NUMERO_MECANOGRAFICO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.CATEGORIA, Trabalhadores.CATEGORIA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.CATEGORIA_FULL, Trabalhadores.CATEGORIA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.ULTIMO_EXAME, Trabalhadores.ULTIMO_EXAME_INDEX ); + FIELD_INDEXES.put( Trabalhadores.ULTIMO_EXAME_FULL, Trabalhadores.ULTIMO_EXAME_INDEX ); + FIELD_INDEXES.put( Trabalhadores.REALIZADO, Trabalhadores.REALIZADO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.REALIZADO_FULL, Trabalhadores.REALIZADO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.PROXIMO_EXAME, Trabalhadores.PROXIMO_EXAME_INDEX ); + FIELD_INDEXES.put( Trabalhadores.PROXIMO_EXAME_FULL, Trabalhadores.PROXIMO_EXAME_INDEX ); + FIELD_INDEXES.put( Trabalhadores.ULTIMA_CONSULTA, Trabalhadores.ULTIMA_CONSULTA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.ULTIMA_CONSULTA_FULL, Trabalhadores.ULTIMA_CONSULTA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.REALIZADA, Trabalhadores.REALIZADA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.REALIZADA_FULL, Trabalhadores.REALIZADA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.PROXIMA_CONSULTA, Trabalhadores.PROXIMA_CONSULTA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.PROXIMA_CONSULTA_FULL, Trabalhadores.PROXIMA_CONSULTA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NOME, Trabalhadores.NOME_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NOME_FULL, Trabalhadores.NOME_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.RESULTADO, Trabalhadores.RESULTADO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.RESULTADO_FULL, Trabalhadores.RESULTADO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.DATA_ESPERADA, Trabalhadores.DATA_ESPERADA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.DATA_ESPERADA_FULL, Trabalhadores.DATA_ESPERADA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.DATA_FICHA, Trabalhadores.DATA_FICHA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.DATA_FICHA_FULL, Trabalhadores.DATA_FICHA_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, db.data.siprp.outer.EstabelecimentosData.class, db.data.siprp.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "trabalhadores"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.trabalhadores"; + + 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 SEXO = "sexo"; + public static final String SEXO_FULL = "trabalhadores.sexo"; + public static final int SEXO_INDEX = 1; + 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 = 2; + 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 = 3; + public static final String CATEGORIA = "categoria"; + public static final String CATEGORIA_FULL = "trabalhadores.categoria"; + public static final int CATEGORIA_INDEX = 4; + public static final String ULTIMO_EXAME = "ultimo_exame"; + public static final String ULTIMO_EXAME_FULL = "trabalhadores.ultimo_exame"; + public static final int ULTIMO_EXAME_INDEX = 5; + public static final String REALIZADO = "realizado"; + public static final String REALIZADO_FULL = "trabalhadores.realizado"; + public static final int REALIZADO_INDEX = 6; + public static final String PROXIMO_EXAME = "proximo_exame"; + public static final String PROXIMO_EXAME_FULL = "trabalhadores.proximo_exame"; + public static final int PROXIMO_EXAME_INDEX = 7; + public static final String ULTIMA_CONSULTA = "ultima_consulta"; + public static final String ULTIMA_CONSULTA_FULL = "trabalhadores.ultima_consulta"; + public static final int ULTIMA_CONSULTA_INDEX = 8; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "trabalhadores.realizada"; + public static final int REALIZADA_INDEX = 9; + public static final String PROXIMA_CONSULTA = "proxima_consulta"; + public static final String PROXIMA_CONSULTA_FULL = "trabalhadores.proxima_consulta"; + public static final int PROXIMA_CONSULTA_INDEX = 10; + public static final String NOME = "nome"; + public static final String NOME_FULL = "trabalhadores.nome"; + public static final int NOME_INDEX = 11; + 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 = 12; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID_FULL = "trabalhadores.to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 13; + public static final String RESULTADO = "resultado"; + public static final String RESULTADO_FULL = "trabalhadores.resultado"; + public static final int RESULTADO_INDEX = 14; + public static final String DATA_ESPERADA = "data_esperada"; + public static final String DATA_ESPERADA_FULL = "trabalhadores.data_esperada"; + public static final int DATA_ESPERADA_INDEX = 15; + public static final String DATA_FICHA = "data_ficha"; + public static final String DATA_FICHA_FULL = "trabalhadores.data_ficha"; + public static final int DATA_FICHA_INDEX = 16; + + public static final String FIELD_NAMES[] = new String[]{ + SEXO, DATA_NASCIMENTO, NUMERO_MECANOGRAFICO, CATEGORIA, ULTIMO_EXAME, REALIZADO, + PROXIMO_EXAME, ULTIMA_CONSULTA, REALIZADA, PROXIMA_CONSULTA, NOME, + ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, RESULTADO, DATA_ESPERADA, + DATA_FICHA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + SEXO, TABLENAME + "." + DATA_NASCIMENTO, TABLENAME + "." + NUMERO_MECANOGRAFICO, TABLENAME + "." + CATEGORIA, TABLENAME + "." + ULTIMO_EXAME, TABLENAME + "." + REALIZADO, + TABLENAME + "." + PROXIMO_EXAME, TABLENAME + "." + ULTIMA_CONSULTA, TABLENAME + "." + REALIZADA, TABLENAME + "." + PROXIMA_CONSULTA, TABLENAME + "." + NOME, + TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID, TABLENAME + "." + RESULTADO, TABLENAME + "." + DATA_ESPERADA, + TABLENAME + "." + DATA_FICHA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, SEXO, DATA_NASCIMENTO, NUMERO_MECANOGRAFICO, CATEGORIA, ULTIMO_EXAME, + REALIZADO, PROXIMO_EXAME, ULTIMA_CONSULTA, REALIZADA, PROXIMA_CONSULTA, NOME, + ESTABELECIMENTO_ID, RESULTADO, DATA_ESPERADA, DATA_FICHA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, SEXO, DATA_NASCIMENTO, NUMERO_MECANOGRAFICO, CATEGORIA, ULTIMO_EXAME, + REALIZADO, PROXIMO_EXAME, ULTIMA_CONSULTA, REALIZADA, PROXIMA_CONSULTA, NOME, + ESTABELECIMENTO_ID, RESULTADO, DATA_ESPERADA, DATA_FICHA, }; + + private Integer id; + private String sexo; + private java.util.Date data_nascimento; + private String numero_mecanografico; + private String categoria; + private java.util.Date ultimo_exame; + private String realizado; + private java.util.Date proximo_exame; + private java.util.Date ultima_consulta; + private String realizada; + private java.util.Date proxima_consulta; + private String nome; + private Integer estabelecimento_id; + private db.data.siprp.outer.EstabelecimentosData to_estabelecimento_id; + private String resultado; + private java.util.Date data_esperada; + private java.util.Date data_ficha; + + 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 }; + } + + 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( db.data.siprp.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( db.data.siprp.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.ListfromMarcacoesTrabalhador_trabalhador_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.MarcacoesTrabalhadorData.class , getPrimaryKey().getMap().get("id"), "trabalhador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 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 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 java.util.Date getUltimo_exame() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ULTIMO_EXAME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ultimo_exame; + } + + public void setUltimo_exame( java.util.Date ultimo_exame ) + { + try + { + setLockedForRefresh( true ); + preProcess( ULTIMO_EXAME, ultimo_exame ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ultimo_exame = ultimo_exame; + LAZY_LOADED_OBJECTS.put( ULTIMO_EXAME, Boolean.TRUE ); + } + + public String getRealizado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( REALIZADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.realizado; + } + + public void setRealizado( String realizado ) + { + try + { + setLockedForRefresh( true ); + preProcess( REALIZADO, realizado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.realizado = realizado; + LAZY_LOADED_OBJECTS.put( REALIZADO, 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 java.util.Date getUltima_consulta() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ULTIMA_CONSULTA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ultima_consulta; + } + + public void setUltima_consulta( java.util.Date ultima_consulta ) + { + try + { + setLockedForRefresh( true ); + preProcess( ULTIMA_CONSULTA, ultima_consulta ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ultima_consulta = ultima_consulta; + LAZY_LOADED_OBJECTS.put( ULTIMA_CONSULTA, 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 getProxima_consulta() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROXIMA_CONSULTA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.proxima_consulta; + } + + public void setProxima_consulta( java.util.Date proxima_consulta ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROXIMA_CONSULTA, proxima_consulta ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.proxima_consulta = proxima_consulta; + LAZY_LOADED_OBJECTS.put( PROXIMA_CONSULTA, Boolean.TRUE ); + } + + public String getNome() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome; + } + + public void setNome( String nome ) + { + try + { + 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 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 db.data.siprp.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp.outer.EstabelecimentosData to_estabelecimento_id ) + { + try + { + preProcess( TO_ESTABELECIMENTO_ID, to_estabelecimento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_estabelecimento_id = to_estabelecimento_id; + } + + public String getResultado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESULTADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.resultado; + } + + public void setResultado( String 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 java.util.Date getData_esperada() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ESPERADA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_esperada; + } + + public void setData_esperada( java.util.Date data_esperada ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ESPERADA, data_esperada ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_esperada = data_esperada; + LAZY_LOADED_OBJECTS.put( DATA_ESPERADA, Boolean.TRUE ); + } + + public java.util.Date getData_ficha() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_FICHA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_ficha; + } + + public void setData_ficha( java.util.Date data_ficha ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_FICHA, data_ficha ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_ficha = data_ficha; + LAZY_LOADED_OBJECTS.put( DATA_FICHA, 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.SEXO_INDEX: + value = getSexo(); + break; + case Trabalhadores.DATA_NASCIMENTO_INDEX: + value = getData_nascimento(); + break; + case Trabalhadores.NUMERO_MECANOGRAFICO_INDEX: + value = getNumero_mecanografico(); + break; + case Trabalhadores.CATEGORIA_INDEX: + value = getCategoria(); + break; + case Trabalhadores.ULTIMO_EXAME_INDEX: + value = getUltimo_exame(); + break; + case Trabalhadores.REALIZADO_INDEX: + value = getRealizado(); + break; + case Trabalhadores.PROXIMO_EXAME_INDEX: + value = getProximo_exame(); + break; + case Trabalhadores.ULTIMA_CONSULTA_INDEX: + value = getUltima_consulta(); + break; + case Trabalhadores.REALIZADA_INDEX: + value = getRealizada(); + break; + case Trabalhadores.PROXIMA_CONSULTA_INDEX: + value = getProxima_consulta(); + break; + case Trabalhadores.NOME_INDEX: + value = getNome(); + break; + case Trabalhadores.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case Trabalhadores.TO_ESTABELECIMENTO_ID_INDEX: + value = toEstabelecimento_id(); + break; + case Trabalhadores.RESULTADO_INDEX: + value = getResultado(); + break; + case Trabalhadores.DATA_ESPERADA_INDEX: + value = getData_esperada(); + break; + case Trabalhadores.DATA_FICHA_INDEX: + value = getData_ficha(); + 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.SEXO_INDEX: + value = this.sexo; + break; + case Trabalhadores.DATA_NASCIMENTO_INDEX: + value = this.data_nascimento; + break; + case Trabalhadores.NUMERO_MECANOGRAFICO_INDEX: + value = this.numero_mecanografico; + break; + case Trabalhadores.CATEGORIA_INDEX: + value = this.categoria; + break; + case Trabalhadores.ULTIMO_EXAME_INDEX: + value = this.ultimo_exame; + break; + case Trabalhadores.REALIZADO_INDEX: + value = this.realizado; + break; + case Trabalhadores.PROXIMO_EXAME_INDEX: + value = this.proximo_exame; + break; + case Trabalhadores.ULTIMA_CONSULTA_INDEX: + value = this.ultima_consulta; + break; + case Trabalhadores.REALIZADA_INDEX: + value = this.realizada; + break; + case Trabalhadores.PROXIMA_CONSULTA_INDEX: + value = this.proxima_consulta; + break; + case Trabalhadores.NOME_INDEX: + value = this.nome; + 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.RESULTADO_INDEX: + value = this.resultado; + break; + case Trabalhadores.DATA_ESPERADA_INDEX: + value = this.data_esperada; + break; + case Trabalhadores.DATA_FICHA_INDEX: + value = this.data_ficha; + 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.SEXO_INDEX: + setSexo( ( String ) value ); + break; + case Trabalhadores.DATA_NASCIMENTO_INDEX: + setData_nascimento( ( java.util.Date ) value ); + break; + case Trabalhadores.NUMERO_MECANOGRAFICO_INDEX: + setNumero_mecanografico( ( String ) value ); + break; + case Trabalhadores.CATEGORIA_INDEX: + setCategoria( ( String ) value ); + break; + case Trabalhadores.ULTIMO_EXAME_INDEX: + setUltimo_exame( ( java.util.Date ) value ); + break; + case Trabalhadores.REALIZADO_INDEX: + setRealizado( ( String ) value ); + break; + case Trabalhadores.PROXIMO_EXAME_INDEX: + setProximo_exame( ( java.util.Date ) value ); + break; + case Trabalhadores.ULTIMA_CONSULTA_INDEX: + setUltima_consulta( ( java.util.Date ) value ); + break; + case Trabalhadores.REALIZADA_INDEX: + setRealizada( ( String ) value ); + break; + case Trabalhadores.PROXIMA_CONSULTA_INDEX: + setProxima_consulta( ( java.util.Date ) value ); + break; + case Trabalhadores.NOME_INDEX: + setNome( ( String ) value ); + break; + case Trabalhadores.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case Trabalhadores.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp.outer.EstabelecimentosData ) value ); + break; + case Trabalhadores.RESULTADO_INDEX: + setResultado( ( String ) value ); + break; + case Trabalhadores.DATA_ESPERADA_INDEX: + setData_esperada( ( java.util.Date ) value ); + break; + case Trabalhadores.DATA_FICHA_INDEX: + setData_ficha( ( java.util.Date ) 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.SEXO_INDEX: + this.sexo = ( String ) value; + break; + case Trabalhadores.DATA_NASCIMENTO_INDEX: + this.data_nascimento = ( java.util.Date ) value; + break; + case Trabalhadores.NUMERO_MECANOGRAFICO_INDEX: + this.numero_mecanografico = ( String ) value; + break; + case Trabalhadores.CATEGORIA_INDEX: + this.categoria = ( String ) value; + break; + case Trabalhadores.ULTIMO_EXAME_INDEX: + this.ultimo_exame = ( java.util.Date ) value; + break; + case Trabalhadores.REALIZADO_INDEX: + this.realizado = ( String ) value; + break; + case Trabalhadores.PROXIMO_EXAME_INDEX: + this.proximo_exame = ( java.util.Date ) value; + break; + case Trabalhadores.ULTIMA_CONSULTA_INDEX: + this.ultima_consulta = ( java.util.Date ) value; + break; + case Trabalhadores.REALIZADA_INDEX: + this.realizada = ( String ) value; + break; + case Trabalhadores.PROXIMA_CONSULTA_INDEX: + this.proxima_consulta = ( java.util.Date ) value; + break; + case Trabalhadores.NOME_INDEX: + this.nome = ( String ) value; + break; + case Trabalhadores.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case Trabalhadores.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( db.data.siprp.outer.EstabelecimentosData ) value; + break; + case Trabalhadores.RESULTADO_INDEX: + this.resultado = ( String ) value; + break; + case Trabalhadores.DATA_ESPERADA_INDEX: + this.data_esperada = ( java.util.Date ) value; + break; + case Trabalhadores.DATA_FICHA_INDEX: + this.data_ficha = ( 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 Trabalhadores.ID_INDEX: + theClass = Integer.class; + break; + case Trabalhadores.SEXO_INDEX: + theClass = String.class; + break; + case Trabalhadores.DATA_NASCIMENTO_INDEX: + theClass = java.util.Date.class; + break; + case Trabalhadores.NUMERO_MECANOGRAFICO_INDEX: + theClass = String.class; + break; + case Trabalhadores.CATEGORIA_INDEX: + theClass = String.class; + break; + case Trabalhadores.ULTIMO_EXAME_INDEX: + theClass = java.util.Date.class; + break; + case Trabalhadores.REALIZADO_INDEX: + theClass = String.class; + break; + case Trabalhadores.PROXIMO_EXAME_INDEX: + theClass = java.util.Date.class; + break; + case Trabalhadores.ULTIMA_CONSULTA_INDEX: + theClass = java.util.Date.class; + break; + case Trabalhadores.REALIZADA_INDEX: + theClass = String.class; + break; + case Trabalhadores.PROXIMA_CONSULTA_INDEX: + theClass = java.util.Date.class; + break; + case Trabalhadores.NOME_INDEX: + theClass = String.class; + break; + case Trabalhadores.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Trabalhadores.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp.outer.EstabelecimentosData.class; + break; + case Trabalhadores.RESULTADO_INDEX: + theClass = String.class; + break; + case Trabalhadores.DATA_ESPERADA_INDEX: + theClass = java.util.Date.class; + break; + case Trabalhadores.DATA_FICHA_INDEX: + theClass = java.util.Date.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Users.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Users.java new file mode 100644 index 00000000..1df6d29e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Users.java @@ -0,0 +1,178 @@ +/* +* Users.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Users extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "users"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.users"; + + public static final int _INVALID__INDEX = -1; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + }; + + + protected com.evolute.entity.utils.ObjectPrimaryKey primaryKey; + + public Users() + { + super(); + dirtyProperties = new boolean[]{ }; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + throw new RuntimeException( "getPrimaryKeyName on Users is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Users._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.ObjectPrimaryKey( TABLENAME, Users.PK_FIELD_NAMES ); + } + } + + @Override + public com.evolute.entity.utils.ObjectPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Utilizadores.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Utilizadores.java new file mode 100644 index 00000000..d067e29c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Utilizadores.java @@ -0,0 +1,1233 @@ +/* +* Utilizadores.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Utilizadores extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Utilizadores.ID, Utilizadores.ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.ID_FULL, Utilizadores.ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.LOGIN, Utilizadores.LOGIN_INDEX ); + FIELD_INDEXES.put( Utilizadores.LOGIN_FULL, Utilizadores.LOGIN_INDEX ); + FIELD_INDEXES.put( Utilizadores.PASSWORD, Utilizadores.PASSWORD_INDEX ); + FIELD_INDEXES.put( Utilizadores.PASSWORD_FULL, Utilizadores.PASSWORD_INDEX ); + FIELD_INDEXES.put( Utilizadores.EMAIL, Utilizadores.EMAIL_INDEX ); + FIELD_INDEXES.put( Utilizadores.EMAIL_FULL, Utilizadores.EMAIL_INDEX ); + FIELD_INDEXES.put( Utilizadores.EMPRESA_ID, Utilizadores.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.EMPRESA_ID_FULL, Utilizadores.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.ESTABELECIMENTO_ID, Utilizadores.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.ESTABELECIMENTO_ID_FULL, Utilizadores.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.ADMINISTRADOR, Utilizadores.ADMINISTRADOR_INDEX ); + FIELD_INDEXES.put( Utilizadores.ADMINISTRADOR_FULL, Utilizadores.ADMINISTRADOR_INDEX ); + FIELD_INDEXES.put( Utilizadores.MEDICO_ID, Utilizadores.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.MEDICO_ID_FULL, Utilizadores.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.TIPO, Utilizadores.TIPO_INDEX ); + FIELD_INDEXES.put( Utilizadores.TIPO_FULL, Utilizadores.TIPO_INDEX ); + FIELD_INDEXES.put( Utilizadores.NUMERO_CEDULA, Utilizadores.NUMERO_CEDULA_INDEX ); + FIELD_INDEXES.put( Utilizadores.NUMERO_CEDULA_FULL, Utilizadores.NUMERO_CEDULA_INDEX ); + FIELD_INDEXES.put( Utilizadores.CAP, Utilizadores.CAP_INDEX ); + FIELD_INDEXES.put( Utilizadores.CAP_FULL, Utilizadores.CAP_INDEX ); + FIELD_INDEXES.put( Utilizadores.NOME, Utilizadores.NOME_INDEX ); + FIELD_INDEXES.put( Utilizadores.NOME_FULL, Utilizadores.NOME_INDEX ); + FIELD_INDEXES.put( Utilizadores.FUNCIONARIO_HST_ID, Utilizadores.FUNCIONARIO_HST_ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.FUNCIONARIO_HST_ID_FULL, Utilizadores.FUNCIONARIO_HST_ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.ACTIVO, Utilizadores.ACTIVO_INDEX ); + FIELD_INDEXES.put( Utilizadores.ACTIVO_FULL, Utilizadores.ACTIVO_INDEX ); + FIELD_INDEXES.put( Utilizadores.RESPONSAVEL_LOJA, Utilizadores.RESPONSAVEL_LOJA_INDEX ); + FIELD_INDEXES.put( Utilizadores.RESPONSAVEL_LOJA_FULL, Utilizadores.RESPONSAVEL_LOJA_INDEX ); + FIELD_INDEXES.put( Utilizadores.NUMERO_MECANOGRAFICO, Utilizadores.NUMERO_MECANOGRAFICO_INDEX ); + FIELD_INDEXES.put( Utilizadores.NUMERO_MECANOGRAFICO_FULL, Utilizadores.NUMERO_MECANOGRAFICO_INDEX ); + FIELD_INDEXES.put( Utilizadores.GESTOR_GERAL, Utilizadores.GESTOR_GERAL_INDEX ); + FIELD_INDEXES.put( Utilizadores.GESTOR_GERAL_FULL, Utilizadores.GESTOR_GERAL_INDEX ); + FIELD_INDEXES.put( Utilizadores.PRIMEIRO_LOGIN, Utilizadores.PRIMEIRO_LOGIN_INDEX ); + FIELD_INDEXES.put( Utilizadores.PRIMEIRO_LOGIN_FULL, Utilizadores.PRIMEIRO_LOGIN_INDEX ); + FIELD_INDEXES.put( Utilizadores.APAGADO, Utilizadores.APAGADO_INDEX ); + FIELD_INDEXES.put( Utilizadores.APAGADO_FULL, Utilizadores.APAGADO_INDEX ); + FIELD_INDEXES.put( Utilizadores.DATA_PASSWORD, Utilizadores.DATA_PASSWORD_INDEX ); + FIELD_INDEXES.put( Utilizadores.DATA_PASSWORD_FULL, Utilizadores.DATA_PASSWORD_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "utilizadores"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.utilizadores"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "utilizadores.id"; + public static final int ID_INDEX = 0; + public static final String LOGIN = "login"; + public static final String LOGIN_FULL = "utilizadores.login"; + public static final int LOGIN_INDEX = 1; + public static final String PASSWORD = "password"; + public static final String PASSWORD_FULL = "utilizadores.password"; + public static final int PASSWORD_INDEX = 2; + public static final String EMAIL = "email"; + public static final String EMAIL_FULL = "utilizadores.email"; + public static final int EMAIL_INDEX = 3; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "utilizadores.empresa_id"; + public static final int EMPRESA_ID_INDEX = 4; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "utilizadores.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 5; + public static final String ADMINISTRADOR = "administrador"; + public static final String ADMINISTRADOR_FULL = "utilizadores.administrador"; + public static final int ADMINISTRADOR_INDEX = 6; + public static final String MEDICO_ID = "medico_id"; + public static final String MEDICO_ID_FULL = "utilizadores.medico_id"; + public static final int MEDICO_ID_INDEX = 7; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "utilizadores.tipo"; + public static final int TIPO_INDEX = 8; + public static final String NUMERO_CEDULA = "numero_cedula"; + public static final String NUMERO_CEDULA_FULL = "utilizadores.numero_cedula"; + public static final int NUMERO_CEDULA_INDEX = 9; + public static final String CAP = "cap"; + public static final String CAP_FULL = "utilizadores.cap"; + public static final int CAP_INDEX = 10; + public static final String NOME = "nome"; + public static final String NOME_FULL = "utilizadores.nome"; + public static final int NOME_INDEX = 11; + public static final String FUNCIONARIO_HST_ID = "funcionario_hst_id"; + public static final String FUNCIONARIO_HST_ID_FULL = "utilizadores.funcionario_hst_id"; + public static final int FUNCIONARIO_HST_ID_INDEX = 12; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "utilizadores.activo"; + public static final int ACTIVO_INDEX = 13; + public static final String RESPONSAVEL_LOJA = "responsavel_loja"; + public static final String RESPONSAVEL_LOJA_FULL = "utilizadores.responsavel_loja"; + public static final int RESPONSAVEL_LOJA_INDEX = 14; + public static final String NUMERO_MECANOGRAFICO = "numero_mecanografico"; + public static final String NUMERO_MECANOGRAFICO_FULL = "utilizadores.numero_mecanografico"; + public static final int NUMERO_MECANOGRAFICO_INDEX = 15; + public static final String GESTOR_GERAL = "gestor_geral"; + public static final String GESTOR_GERAL_FULL = "utilizadores.gestor_geral"; + public static final int GESTOR_GERAL_INDEX = 16; + public static final String PRIMEIRO_LOGIN = "primeiro_login"; + public static final String PRIMEIRO_LOGIN_FULL = "utilizadores.primeiro_login"; + public static final int PRIMEIRO_LOGIN_INDEX = 17; + public static final String APAGADO = "apagado"; + public static final String APAGADO_FULL = "utilizadores.apagado"; + public static final int APAGADO_INDEX = 18; + public static final String DATA_PASSWORD = "data_password"; + public static final String DATA_PASSWORD_FULL = "utilizadores.data_password"; + public static final int DATA_PASSWORD_INDEX = 19; + + public static final String FIELD_NAMES[] = new String[]{ + LOGIN, PASSWORD, EMAIL, EMPRESA_ID, ESTABELECIMENTO_ID, ADMINISTRADOR, MEDICO_ID, + TIPO, NUMERO_CEDULA, CAP, NOME, FUNCIONARIO_HST_ID, ACTIVO, RESPONSAVEL_LOJA, + NUMERO_MECANOGRAFICO, GESTOR_GERAL, PRIMEIRO_LOGIN, APAGADO, DATA_PASSWORD, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + LOGIN, TABLENAME + "." + PASSWORD, TABLENAME + "." + EMAIL, TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + ADMINISTRADOR, TABLENAME + "." + MEDICO_ID, + TABLENAME + "." + TIPO, TABLENAME + "." + NUMERO_CEDULA, TABLENAME + "." + CAP, TABLENAME + "." + NOME, TABLENAME + "." + FUNCIONARIO_HST_ID, TABLENAME + "." + ACTIVO, TABLENAME + "." + RESPONSAVEL_LOJA, + TABLENAME + "." + NUMERO_MECANOGRAFICO, TABLENAME + "." + GESTOR_GERAL, TABLENAME + "." + PRIMEIRO_LOGIN, TABLENAME + "." + APAGADO, TABLENAME + "." + DATA_PASSWORD, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, LOGIN, PASSWORD, EMAIL, EMPRESA_ID, ESTABELECIMENTO_ID, ADMINISTRADOR, MEDICO_ID, + TIPO, NUMERO_CEDULA, CAP, NOME, FUNCIONARIO_HST_ID, ACTIVO, RESPONSAVEL_LOJA, + NUMERO_MECANOGRAFICO, GESTOR_GERAL, PRIMEIRO_LOGIN, APAGADO, DATA_PASSWORD, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, LOGIN, PASSWORD, EMAIL, EMPRESA_ID, ESTABELECIMENTO_ID, ADMINISTRADOR, MEDICO_ID, + TIPO, NUMERO_CEDULA, CAP, NOME, FUNCIONARIO_HST_ID, ACTIVO, RESPONSAVEL_LOJA, + NUMERO_MECANOGRAFICO, GESTOR_GERAL, PRIMEIRO_LOGIN, APAGADO, DATA_PASSWORD, }; + + private Integer id; + private String login; + private String password; + private String email; + private Integer empresa_id; + private Integer estabelecimento_id; + private String administrador; + private Integer medico_id; + private Integer tipo; + private String numero_cedula; + private String cap; + private String nome; + private Integer funcionario_hst_id; + private String activo; + private String responsavel_loja; + private String numero_mecanografico; + private String gestor_geral; + private String primeiro_login; + private String apagado; + private java.util.Date data_password; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Utilizadores() + { + 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.ListfromPlanosActuacao_user_dir_loja() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.PlanosActuacaoData.class , getPrimaryKey().getMap().get("id"), "user_dir_loja" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromPlanosActuacao_user_dns() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.PlanosActuacaoData.class , getPrimaryKey().getMap().get("id"), "user_dns" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromPlanosActuacao_user_hs() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp.outer.PlanosActuacaoData.class , getPrimaryKey().getMap().get("id"), "user_hs" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public String getLogin() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LOGIN ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.login; + } + + public void setLogin( String login ) + { + try + { + setLockedForRefresh( true ); + preProcess( LOGIN, login ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.login = login; + LAZY_LOADED_OBJECTS.put( LOGIN, Boolean.TRUE ); + } + + public String getPassword() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PASSWORD ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.password; + } + + public void setPassword( String password ) + { + try + { + setLockedForRefresh( true ); + preProcess( PASSWORD, password ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.password = password; + LAZY_LOADED_OBJECTS.put( PASSWORD, 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 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 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 String getAdministrador() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ADMINISTRADOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.administrador; + } + + public void setAdministrador( String administrador ) + { + try + { + setLockedForRefresh( true ); + preProcess( ADMINISTRADOR, administrador ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.administrador = administrador; + LAZY_LOADED_OBJECTS.put( ADMINISTRADOR, 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 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 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 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 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 Integer getFuncionario_hst_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FUNCIONARIO_HST_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.funcionario_hst_id; + } + + public void setFuncionario_hst_id( Integer funcionario_hst_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FUNCIONARIO_HST_ID, funcionario_hst_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.funcionario_hst_id = funcionario_hst_id; + LAZY_LOADED_OBJECTS.put( FUNCIONARIO_HST_ID, 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 String getResponsavel_loja() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESPONSAVEL_LOJA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.responsavel_loja; + } + + public void setResponsavel_loja( String responsavel_loja ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESPONSAVEL_LOJA, responsavel_loja ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.responsavel_loja = responsavel_loja; + LAZY_LOADED_OBJECTS.put( RESPONSAVEL_LOJA, 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 String getGestor_geral() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( GESTOR_GERAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.gestor_geral; + } + + public void setGestor_geral( String gestor_geral ) + { + try + { + setLockedForRefresh( true ); + preProcess( GESTOR_GERAL, gestor_geral ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.gestor_geral = gestor_geral; + LAZY_LOADED_OBJECTS.put( GESTOR_GERAL, Boolean.TRUE ); + } + + public String getPrimeiro_login() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PRIMEIRO_LOGIN ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.primeiro_login; + } + + public void setPrimeiro_login( String primeiro_login ) + { + try + { + setLockedForRefresh( true ); + preProcess( PRIMEIRO_LOGIN, primeiro_login ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.primeiro_login = primeiro_login; + LAZY_LOADED_OBJECTS.put( PRIMEIRO_LOGIN, Boolean.TRUE ); + } + + public String getApagado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( APAGADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.apagado; + } + + public void setApagado( String apagado ) + { + try + { + setLockedForRefresh( true ); + preProcess( APAGADO, apagado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.apagado = apagado; + LAZY_LOADED_OBJECTS.put( APAGADO, Boolean.TRUE ); + } + + public java.util.Date getData_password() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_PASSWORD ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_password; + } + + public void setData_password( java.util.Date data_password ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_PASSWORD, data_password ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_password = data_password; + LAZY_LOADED_OBJECTS.put( DATA_PASSWORD, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Utilizadores.ID_INDEX: + value = getId(); + break; + case Utilizadores.LOGIN_INDEX: + value = getLogin(); + break; + case Utilizadores.PASSWORD_INDEX: + value = getPassword(); + break; + case Utilizadores.EMAIL_INDEX: + value = getEmail(); + break; + case Utilizadores.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case Utilizadores.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case Utilizadores.ADMINISTRADOR_INDEX: + value = getAdministrador(); + break; + case Utilizadores.MEDICO_ID_INDEX: + value = getMedico_id(); + break; + case Utilizadores.TIPO_INDEX: + value = getTipo(); + break; + case Utilizadores.NUMERO_CEDULA_INDEX: + value = getNumero_cedula(); + break; + case Utilizadores.CAP_INDEX: + value = getCap(); + break; + case Utilizadores.NOME_INDEX: + value = getNome(); + break; + case Utilizadores.FUNCIONARIO_HST_ID_INDEX: + value = getFuncionario_hst_id(); + break; + case Utilizadores.ACTIVO_INDEX: + value = getActivo(); + break; + case Utilizadores.RESPONSAVEL_LOJA_INDEX: + value = getResponsavel_loja(); + break; + case Utilizadores.NUMERO_MECANOGRAFICO_INDEX: + value = getNumero_mecanografico(); + break; + case Utilizadores.GESTOR_GERAL_INDEX: + value = getGestor_geral(); + break; + case Utilizadores.PRIMEIRO_LOGIN_INDEX: + value = getPrimeiro_login(); + break; + case Utilizadores.APAGADO_INDEX: + value = getApagado(); + break; + case Utilizadores.DATA_PASSWORD_INDEX: + value = getData_password(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Utilizadores.ID_INDEX: + value = this.id; + break; + case Utilizadores.LOGIN_INDEX: + value = this.login; + break; + case Utilizadores.PASSWORD_INDEX: + value = this.password; + break; + case Utilizadores.EMAIL_INDEX: + value = this.email; + break; + case Utilizadores.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case Utilizadores.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + case Utilizadores.ADMINISTRADOR_INDEX: + value = this.administrador; + break; + case Utilizadores.MEDICO_ID_INDEX: + value = this.medico_id; + break; + case Utilizadores.TIPO_INDEX: + value = this.tipo; + break; + case Utilizadores.NUMERO_CEDULA_INDEX: + value = this.numero_cedula; + break; + case Utilizadores.CAP_INDEX: + value = this.cap; + break; + case Utilizadores.NOME_INDEX: + value = this.nome; + break; + case Utilizadores.FUNCIONARIO_HST_ID_INDEX: + value = this.funcionario_hst_id; + break; + case Utilizadores.ACTIVO_INDEX: + value = this.activo; + break; + case Utilizadores.RESPONSAVEL_LOJA_INDEX: + value = this.responsavel_loja; + break; + case Utilizadores.NUMERO_MECANOGRAFICO_INDEX: + value = this.numero_mecanografico; + break; + case Utilizadores.GESTOR_GERAL_INDEX: + value = this.gestor_geral; + break; + case Utilizadores.PRIMEIRO_LOGIN_INDEX: + value = this.primeiro_login; + break; + case Utilizadores.APAGADO_INDEX: + value = this.apagado; + break; + case Utilizadores.DATA_PASSWORD_INDEX: + value = this.data_password; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Utilizadores.ID_INDEX: + setId( ( Integer ) value ); + break; + case Utilizadores.LOGIN_INDEX: + setLogin( ( String ) value ); + break; + case Utilizadores.PASSWORD_INDEX: + setPassword( ( String ) value ); + break; + case Utilizadores.EMAIL_INDEX: + setEmail( ( String ) value ); + break; + case Utilizadores.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case Utilizadores.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case Utilizadores.ADMINISTRADOR_INDEX: + setAdministrador( ( String ) value ); + break; + case Utilizadores.MEDICO_ID_INDEX: + setMedico_id( ( Integer ) value ); + break; + case Utilizadores.TIPO_INDEX: + setTipo( ( Integer ) value ); + break; + case Utilizadores.NUMERO_CEDULA_INDEX: + setNumero_cedula( ( String ) value ); + break; + case Utilizadores.CAP_INDEX: + setCap( ( String ) value ); + break; + case Utilizadores.NOME_INDEX: + setNome( ( String ) value ); + break; + case Utilizadores.FUNCIONARIO_HST_ID_INDEX: + setFuncionario_hst_id( ( Integer ) value ); + break; + case Utilizadores.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + case Utilizadores.RESPONSAVEL_LOJA_INDEX: + setResponsavel_loja( ( String ) value ); + break; + case Utilizadores.NUMERO_MECANOGRAFICO_INDEX: + setNumero_mecanografico( ( String ) value ); + break; + case Utilizadores.GESTOR_GERAL_INDEX: + setGestor_geral( ( String ) value ); + break; + case Utilizadores.PRIMEIRO_LOGIN_INDEX: + setPrimeiro_login( ( String ) value ); + break; + case Utilizadores.APAGADO_INDEX: + setApagado( ( String ) value ); + break; + case Utilizadores.DATA_PASSWORD_INDEX: + setData_password( ( java.util.Date ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Utilizadores.ID_INDEX: + this.id = ( Integer ) value; + break; + case Utilizadores.LOGIN_INDEX: + this.login = ( String ) value; + break; + case Utilizadores.PASSWORD_INDEX: + this.password = ( String ) value; + break; + case Utilizadores.EMAIL_INDEX: + this.email = ( String ) value; + break; + case Utilizadores.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case Utilizadores.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case Utilizadores.ADMINISTRADOR_INDEX: + this.administrador = ( String ) value; + break; + case Utilizadores.MEDICO_ID_INDEX: + this.medico_id = ( Integer ) value; + break; + case Utilizadores.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case Utilizadores.NUMERO_CEDULA_INDEX: + this.numero_cedula = ( String ) value; + break; + case Utilizadores.CAP_INDEX: + this.cap = ( String ) value; + break; + case Utilizadores.NOME_INDEX: + this.nome = ( String ) value; + break; + case Utilizadores.FUNCIONARIO_HST_ID_INDEX: + this.funcionario_hst_id = ( Integer ) value; + break; + case Utilizadores.ACTIVO_INDEX: + this.activo = ( String ) value; + break; + case Utilizadores.RESPONSAVEL_LOJA_INDEX: + this.responsavel_loja = ( String ) value; + break; + case Utilizadores.NUMERO_MECANOGRAFICO_INDEX: + this.numero_mecanografico = ( String ) value; + break; + case Utilizadores.GESTOR_GERAL_INDEX: + this.gestor_geral = ( String ) value; + break; + case Utilizadores.PRIMEIRO_LOGIN_INDEX: + this.primeiro_login = ( String ) value; + break; + case Utilizadores.APAGADO_INDEX: + this.apagado = ( String ) value; + break; + case Utilizadores.DATA_PASSWORD_INDEX: + this.data_password = ( 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 Utilizadores.ID_INDEX: + theClass = Integer.class; + break; + case Utilizadores.LOGIN_INDEX: + theClass = String.class; + break; + case Utilizadores.PASSWORD_INDEX: + theClass = String.class; + break; + case Utilizadores.EMAIL_INDEX: + theClass = String.class; + break; + case Utilizadores.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case Utilizadores.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Utilizadores.ADMINISTRADOR_INDEX: + theClass = String.class; + break; + case Utilizadores.MEDICO_ID_INDEX: + theClass = Integer.class; + break; + case Utilizadores.TIPO_INDEX: + theClass = Integer.class; + break; + case Utilizadores.NUMERO_CEDULA_INDEX: + theClass = String.class; + break; + case Utilizadores.CAP_INDEX: + theClass = String.class; + break; + case Utilizadores.NOME_INDEX: + theClass = String.class; + break; + case Utilizadores.FUNCIONARIO_HST_ID_INDEX: + theClass = Integer.class; + break; + case Utilizadores.ACTIVO_INDEX: + theClass = String.class; + break; + case Utilizadores.RESPONSAVEL_LOJA_INDEX: + theClass = String.class; + break; + case Utilizadores.NUMERO_MECANOGRAFICO_INDEX: + theClass = String.class; + break; + case Utilizadores.GESTOR_GERAL_INDEX: + theClass = String.class; + break; + case Utilizadores.PRIMEIRO_LOGIN_INDEX: + theClass = String.class; + break; + case Utilizadores.APAGADO_INDEX: + theClass = String.class; + break; + case Utilizadores.DATA_PASSWORD_INDEX: + theClass = java.util.Date.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Utilizadores._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, Utilizadores.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Version.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Version.java new file mode 100644 index 00000000..dd071228 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/Version.java @@ -0,0 +1,330 @@ +/* +* Version.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Version extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Version.CURRENT_VERSION, Version.CURRENT_VERSION_INDEX ); + FIELD_INDEXES.put( Version.CURRENT_VERSION_FULL, Version.CURRENT_VERSION_INDEX ); + FIELD_INDEXES.put( Version.ID, Version.ID_INDEX ); + FIELD_INDEXES.put( Version.ID_FULL, Version.ID_INDEX ); + FIELD_INDEXES.put( Version.MODULE_NAME, Version.MODULE_NAME_INDEX ); + FIELD_INDEXES.put( Version.MODULE_NAME_FULL, Version.MODULE_NAME_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "version"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.version"; + + public static final int _INVALID__INDEX = -1; + public static final String CURRENT_VERSION = "current_version"; + public static final String CURRENT_VERSION_FULL = "version.current_version"; + public static final int CURRENT_VERSION_INDEX = 0; + public static final String ID = "id"; + public static final String ID_FULL = "version.id"; + public static final int ID_INDEX = 1; + public static final String MODULE_NAME = "module_name"; + public static final String MODULE_NAME_FULL = "version.module_name"; + public static final int MODULE_NAME_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + CURRENT_VERSION, MODULE_NAME, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + CURRENT_VERSION, TABLENAME + "." + MODULE_NAME, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + CURRENT_VERSION, ID, MODULE_NAME, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + CURRENT_VERSION, ID, MODULE_NAME, }; + + private Double current_version; + private Integer id; + private String module_name; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Version() + { + super(); + dirtyProperties = new boolean[]{ false, false, false }; + } + + public Double getCurrent_version() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURRENT_VERSION ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.current_version; + } + + public void setCurrent_version( Double current_version ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURRENT_VERSION, current_version ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.current_version = current_version; + LAZY_LOADED_OBJECTS.put( CURRENT_VERSION, Boolean.TRUE ); + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 getModule_name() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MODULE_NAME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.module_name; + } + + public void setModule_name( String module_name ) + { + try + { + setLockedForRefresh( true ); + preProcess( MODULE_NAME, module_name ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.module_name = module_name; + LAZY_LOADED_OBJECTS.put( MODULE_NAME, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + value = getCurrent_version(); + break; + case Version.ID_INDEX: + value = getId(); + break; + case Version.MODULE_NAME_INDEX: + value = getModule_name(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + value = this.current_version; + break; + case Version.ID_INDEX: + value = this.id; + break; + case Version.MODULE_NAME_INDEX: + value = this.module_name; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + setCurrent_version( ( Double ) value ); + break; + case Version.ID_INDEX: + setId( ( Integer ) value ); + break; + case Version.MODULE_NAME_INDEX: + setModule_name( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + this.current_version = ( Double ) value; + break; + case Version.ID_INDEX: + this.id = ( Integer ) value; + break; + case Version.MODULE_NAME_INDEX: + this.module_name = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + theClass = Double.class; + break; + case Version.ID_INDEX: + theClass = Integer.class; + break; + case Version.MODULE_NAME_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Version._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Version.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/package.xml b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/package.xml new file mode 100644 index 00000000..2c9dc712 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/inner/package.xml @@ -0,0 +1,1572 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/AcidentadosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/AcidentadosData.java new file mode 100644 index 00000000..2713cd49 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/AcidentadosData.java @@ -0,0 +1,18 @@ +/* +* AcidentadosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class AcidentadosData extends db.data.siprp.inner.Acidentados +{ + + public AcidentadosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ActualizacaoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ActualizacaoData.java new file mode 100644 index 00000000..316c102d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ActualizacaoData.java @@ -0,0 +1,18 @@ +/* +* ActualizacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class ActualizacaoData extends db.data.siprp.inner.Actualizacao +{ + + public ActualizacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/AnalisesAcidentesData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/AnalisesAcidentesData.java new file mode 100644 index 00000000..5177c7f2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/AnalisesAcidentesData.java @@ -0,0 +1,18 @@ +/* +* AnalisesAcidentesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class AnalisesAcidentesData extends db.data.siprp.inner.AnalisesAcidentes +{ + + public AnalisesAcidentesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/AvisosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/AvisosData.java new file mode 100644 index 00000000..580bbe07 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/AvisosData.java @@ -0,0 +1,18 @@ +/* +* AvisosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class AvisosData extends db.data.siprp.inner.Avisos +{ + + public AvisosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/CausasData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/CausasData.java new file mode 100644 index 00000000..0d0ff4a4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/CausasData.java @@ -0,0 +1,18 @@ +/* +* CausasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class CausasData extends db.data.siprp.inner.Causas +{ + + public CausasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ContactosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ContactosData.java new file mode 100644 index 00000000..d841d28a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ContactosData.java @@ -0,0 +1,18 @@ +/* +* ContactosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class ContactosData extends db.data.siprp.inner.Contactos +{ + + public ContactosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ControleData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ControleData.java new file mode 100644 index 00000000..8f919bb0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ControleData.java @@ -0,0 +1,18 @@ +/* +* ControleData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class ControleData extends db.data.siprp.inner.Controle +{ + + public ControleData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/DepartamentosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/DepartamentosData.java new file mode 100644 index 00000000..197c5982 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/DepartamentosData.java @@ -0,0 +1,18 @@ +/* +* DepartamentosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class DepartamentosData extends db.data.siprp.inner.Departamentos +{ + + public DepartamentosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/EmpresasData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/EmpresasData.java new file mode 100644 index 00000000..7b7b34ca --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/EmpresasData.java @@ -0,0 +1,18 @@ +/* +* EmpresasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class EmpresasData extends db.data.siprp.inner.Empresas +{ + + public EmpresasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ErrorsData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ErrorsData.java new file mode 100644 index 00000000..2752eb49 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ErrorsData.java @@ -0,0 +1,18 @@ +/* +* ErrorsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class ErrorsData extends db.data.siprp.inner.Errors +{ + + public ErrorsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/EstabelecimentosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/EstabelecimentosData.java new file mode 100644 index 00000000..61ee1210 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/EstabelecimentosData.java @@ -0,0 +1,18 @@ +/* +* EstabelecimentosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class EstabelecimentosData extends db.data.siprp.inner.Estabelecimentos +{ + + public EstabelecimentosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/EstadoMedidasData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/EstadoMedidasData.java new file mode 100644 index 00000000..12d62136 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/EstadoMedidasData.java @@ -0,0 +1,18 @@ +/* +* EstadoMedidasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class EstadoMedidasData extends db.data.siprp.inner.EstadoMedidas +{ + + public EstadoMedidasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ExamesData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ExamesData.java new file mode 100644 index 00000000..5710efe5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ExamesData.java @@ -0,0 +1,18 @@ +/* +* ExamesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class ExamesData extends db.data.siprp.inner.Exames +{ + + public ExamesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ExamesPerfisData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ExamesPerfisData.java new file mode 100644 index 00000000..3e709b6b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/ExamesPerfisData.java @@ -0,0 +1,18 @@ +/* +* ExamesPerfisData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class ExamesPerfisData extends db.data.siprp.inner.ExamesPerfis +{ + + public ExamesPerfisData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/HistoricoEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/HistoricoEstabelecimentoData.java new file mode 100644 index 00000000..caaafddc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/HistoricoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HistoricoEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class HistoricoEstabelecimentoData extends db.data.siprp.inner.HistoricoEstabelecimento +{ + + public HistoricoEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/MarcacoesEmpresaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/MarcacoesEmpresaData.java new file mode 100644 index 00000000..79679543 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/MarcacoesEmpresaData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class MarcacoesEmpresaData extends db.data.siprp.inner.MarcacoesEmpresa +{ + + public MarcacoesEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/MarcacoesEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/MarcacoesEstabelecimentoData.java new file mode 100644 index 00000000..a901db91 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/MarcacoesEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class MarcacoesEstabelecimentoData extends db.data.siprp.inner.MarcacoesEstabelecimento +{ + + public MarcacoesEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/MarcacoesTrabalhadorData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/MarcacoesTrabalhadorData.java new file mode 100644 index 00000000..e630fc2e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/MarcacoesTrabalhadorData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesTrabalhadorData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class MarcacoesTrabalhadorData extends db.data.siprp.inner.MarcacoesTrabalhador +{ + + public MarcacoesTrabalhadorData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/MedicosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/MedicosData.java new file mode 100644 index 00000000..3e2ee281 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/MedicosData.java @@ -0,0 +1,18 @@ +/* +* MedicosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class MedicosData extends db.data.siprp.inner.Medicos +{ + + public MedicosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/MedidasData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/MedidasData.java new file mode 100644 index 00000000..30a6c6f3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/MedidasData.java @@ -0,0 +1,18 @@ +/* +* MedidasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class MedidasData extends db.data.siprp.inner.Medidas +{ + + public MedidasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/NotNoticiasData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/NotNoticiasData.java new file mode 100644 index 00000000..b9598074 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/NotNoticiasData.java @@ -0,0 +1,18 @@ +/* +* NotNoticiasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class NotNoticiasData extends db.data.siprp.inner.NotNoticias +{ + + public NotNoticiasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PermissoesData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PermissoesData.java new file mode 100644 index 00000000..4b7d3356 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PermissoesData.java @@ -0,0 +1,18 @@ +/* +* PermissoesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class PermissoesData extends db.data.siprp.inner.Permissoes +{ + + public PermissoesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PlanoAreasData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PlanoAreasData.java new file mode 100644 index 00000000..960a9807 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PlanoAreasData.java @@ -0,0 +1,18 @@ +/* +* PlanoAreasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class PlanoAreasData extends db.data.siprp.inner.PlanoAreas +{ + + public PlanoAreasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PlanoMedidasData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PlanoMedidasData.java new file mode 100644 index 00000000..8d105648 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PlanoMedidasData.java @@ -0,0 +1,18 @@ +/* +* PlanoMedidasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class PlanoMedidasData extends db.data.siprp.inner.PlanoMedidas +{ + + public PlanoMedidasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PlanoPostosTrabalhoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PlanoPostosTrabalhoData.java new file mode 100644 index 00000000..a594b298 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PlanoPostosTrabalhoData.java @@ -0,0 +1,18 @@ +/* +* PlanoPostosTrabalhoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class PlanoPostosTrabalhoData extends db.data.siprp.inner.PlanoPostosTrabalho +{ + + public PlanoPostosTrabalhoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PlanoRiscosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PlanoRiscosData.java new file mode 100644 index 00000000..90b3891f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PlanoRiscosData.java @@ -0,0 +1,18 @@ +/* +* PlanoRiscosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class PlanoRiscosData extends db.data.siprp.inner.PlanoRiscos +{ + + public PlanoRiscosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PlanosActuacaoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PlanosActuacaoData.java new file mode 100644 index 00000000..23804955 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PlanosActuacaoData.java @@ -0,0 +1,18 @@ +/* +* PlanosActuacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class PlanosActuacaoData extends db.data.siprp.inner.PlanosActuacao +{ + + public PlanosActuacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PropertiesData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PropertiesData.java new file mode 100644 index 00000000..7f93b5b5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/PropertiesData.java @@ -0,0 +1,18 @@ +/* +* PropertiesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class PropertiesData extends db.data.siprp.inner.Properties +{ + + public PropertiesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/RecomendacoesData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/RecomendacoesData.java new file mode 100644 index 00000000..8a951078 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/RecomendacoesData.java @@ -0,0 +1,18 @@ +/* +* RecomendacoesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class RecomendacoesData extends db.data.siprp.inner.Recomendacoes +{ + + public RecomendacoesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/RiscoValoresTempData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/RiscoValoresTempData.java new file mode 100644 index 00000000..1756a8b0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/RiscoValoresTempData.java @@ -0,0 +1,18 @@ +/* +* RiscoValoresTempData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class RiscoValoresTempData extends db.data.siprp.inner.RiscoValoresTemp +{ + + public RiscoValoresTempData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/RolesData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/RolesData.java new file mode 100644 index 00000000..2ac92c55 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/RolesData.java @@ -0,0 +1,18 @@ +/* +* RolesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class RolesData extends db.data.siprp.inner.Roles +{ + + public RolesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/SeccoesData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/SeccoesData.java new file mode 100644 index 00000000..5b6b39bc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/SeccoesData.java @@ -0,0 +1,18 @@ +/* +* SeccoesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class SeccoesData extends db.data.siprp.inner.Seccoes +{ + + public SeccoesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/TiposExamesCompData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/TiposExamesCompData.java new file mode 100644 index 00000000..f7c0a8f4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/TiposExamesCompData.java @@ -0,0 +1,18 @@ +/* +* TiposExamesCompData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class TiposExamesCompData extends db.data.siprp.inner.TiposExamesComp +{ + + public TiposExamesCompData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/TiposUtilizadoresData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/TiposUtilizadoresData.java new file mode 100644 index 00000000..56f478b7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/TiposUtilizadoresData.java @@ -0,0 +1,18 @@ +/* +* TiposUtilizadoresData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class TiposUtilizadoresData extends db.data.siprp.inner.TiposUtilizadores +{ + + public TiposUtilizadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/TrabalhadoresData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/TrabalhadoresData.java new file mode 100644 index 00000000..81950266 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/TrabalhadoresData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class TrabalhadoresData extends db.data.siprp.inner.Trabalhadores +{ + + public TrabalhadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/UsersData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/UsersData.java new file mode 100644 index 00000000..5a661b86 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/UsersData.java @@ -0,0 +1,18 @@ +/* +* UsersData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class UsersData extends db.data.siprp.inner.Users +{ + + public UsersData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/UtilizadoresData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/UtilizadoresData.java new file mode 100644 index 00000000..3e5a0425 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/UtilizadoresData.java @@ -0,0 +1,18 @@ +/* +* UtilizadoresData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class UtilizadoresData extends db.data.siprp.inner.Utilizadores +{ + + public UtilizadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/VersionData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/VersionData.java new file mode 100644 index 00000000..128a7c4b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp/outer/VersionData.java @@ -0,0 +1,18 @@ +/* +* VersionData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class VersionData extends db.data.siprp.inner.Version +{ + + public VersionData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Actualizacao.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Actualizacao.java new file mode 100644 index 00000000..aa015d0a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class Actualizacao extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.actualizacao"; + + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/AptAppointment.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/AptAppointment.java new file mode 100644 index 00000000..35d979a4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/AptAppointment.java @@ -0,0 +1,609 @@ +/* +* AptAppointment.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class AptAppointment extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( AptAppointment.ID, AptAppointment.ID_INDEX ); + FIELD_INDEXES.put( AptAppointment.ID_FULL, AptAppointment.ID_INDEX ); + FIELD_INDEXES.put( AptAppointment.DAY_DATE, AptAppointment.DAY_DATE_INDEX ); + FIELD_INDEXES.put( AptAppointment.DAY_DATE_FULL, AptAppointment.DAY_DATE_INDEX ); + FIELD_INDEXES.put( AptAppointment.START_TIME, AptAppointment.START_TIME_INDEX ); + FIELD_INDEXES.put( AptAppointment.START_TIME_FULL, AptAppointment.START_TIME_INDEX ); + FIELD_INDEXES.put( AptAppointment.END_TIME, AptAppointment.END_TIME_INDEX ); + FIELD_INDEXES.put( AptAppointment.END_TIME_FULL, AptAppointment.END_TIME_INDEX ); + FIELD_INDEXES.put( AptAppointment.NOTES, AptAppointment.NOTES_INDEX ); + FIELD_INDEXES.put( AptAppointment.NOTES_FULL, AptAppointment.NOTES_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AptAppointment.CLASS_IDENTIFIER, AptAppointment.STATE_ID, AptAppointment.TO_STATE_ID ); + FIELD_INDEXES.put( AptAppointment.STATE_ID, AptAppointment.STATE_ID_INDEX ); + FIELD_INDEXES.put( AptAppointment.STATE_ID_FULL, AptAppointment.STATE_ID_INDEX ); + FIELD_INDEXES.put( AptAppointment.TO_STATE_ID, AptAppointment.TO_STATE_ID_INDEX ); + FIELD_INDEXES.put( AptAppointment.DELETED_STAMP, AptAppointment.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( AptAppointment.DELETED_STAMP_FULL, AptAppointment.DELETED_STAMP_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeystate_idToapt_state = + new com.evolute.entity.ForeignKey( AptAppointment.class, AptAppointment.STATE_ID, db.data.siprp_local.outer.AptStateData.class, db.data.siprp_local.outer.AptStateData.ID ); + + public static final String TABLENAME = "apt_appointment"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.apt_appointment"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "apt_appointment.id"; + public static final int ID_INDEX = 0; + public static final String DAY_DATE = "day_date"; + public static final String DAY_DATE_FULL = "apt_appointment.day_date"; + public static final int DAY_DATE_INDEX = 1; + public static final String START_TIME = "start_time"; + public static final String START_TIME_FULL = "apt_appointment.start_time"; + public static final int START_TIME_INDEX = 2; + public static final String END_TIME = "end_time"; + public static final String END_TIME_FULL = "apt_appointment.end_time"; + public static final int END_TIME_INDEX = 3; + public static final String NOTES = "notes"; + public static final String NOTES_FULL = "apt_appointment.notes"; + public static final int NOTES_INDEX = 4; + public static final String STATE_ID = "state_id"; + public static final String STATE_ID_FULL = "apt_appointment.state_id"; + public static final int STATE_ID_INDEX = 5; + public static final String TO_STATE_ID = "to_state_id"; + public static final String TO_STATE_ID_FULL = "apt_appointment.to_state_id"; + public static final int TO_STATE_ID_INDEX = 6; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "apt_appointment.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 7; + + public static final String FIELD_NAMES[] = new String[]{ + DAY_DATE, START_TIME, END_TIME, NOTES, STATE_ID, TO_STATE_ID, DELETED_STAMP, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DAY_DATE, TABLENAME + "." + START_TIME, TABLENAME + "." + END_TIME, TABLENAME + "." + NOTES, TABLENAME + "." + STATE_ID, TABLENAME + "." + TO_STATE_ID, TABLENAME + "." + DELETED_STAMP, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DAY_DATE, START_TIME, END_TIME, NOTES, STATE_ID, DELETED_STAMP, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DAY_DATE, START_TIME, END_TIME, NOTES, STATE_ID, DELETED_STAMP, }; + + private Integer id; + private java.util.Date day_date; + private java.sql.Time start_time; + private java.sql.Time end_time; + private String notes; + private Integer state_id; + private db.data.siprp_local.outer.AptStateData to_state_id; + private java.sql.Timestamp deleted_stamp; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public AptAppointment() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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.ListfromAptSegurancaAlimentar_appointment_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.AptSegurancaAlimentarData.class , getPrimaryKey().getMap().get("id"), "appointment_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromFilFileAppointment_appointment_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.FilFileAppointmentData.class , getPrimaryKey().getMap().get("id"), "appointment_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.Date getDay_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DAY_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.day_date; + } + + public void setDay_date( java.util.Date day_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DAY_DATE, day_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.day_date = day_date; + LAZY_LOADED_OBJECTS.put( DAY_DATE, Boolean.TRUE ); + } + + public java.sql.Time getStart_time() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( START_TIME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.start_time; + } + + public void setStart_time( java.sql.Time start_time ) + { + try + { + setLockedForRefresh( true ); + preProcess( START_TIME, start_time ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.start_time = start_time; + LAZY_LOADED_OBJECTS.put( START_TIME, Boolean.TRUE ); + } + + public java.sql.Time getEnd_time() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( END_TIME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.end_time; + } + + public void setEnd_time( java.sql.Time end_time ) + { + try + { + setLockedForRefresh( true ); + preProcess( END_TIME, end_time ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.end_time = end_time; + LAZY_LOADED_OBJECTS.put( END_TIME, Boolean.TRUE ); + } + + public String getNotes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOTES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.notes; + } + + public void setNotes( String notes ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOTES, notes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.notes = notes; + LAZY_LOADED_OBJECTS.put( NOTES, Boolean.TRUE ); + } + + public Integer getState_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( STATE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.state_id; + } + + public void setState_id( Integer state_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( STATE_ID, state_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.state_id = state_id; + LAZY_LOADED_OBJECTS.put( STATE_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.AptStateData toState_id() + { + try + { + prepare( TO_STATE_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_state_id; + } + + public void setToState_id( db.data.siprp_local.outer.AptStateData to_state_id ) + { + try + { + preProcess( TO_STATE_ID, to_state_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_state_id = to_state_id; + } + + public java.sql.Timestamp getDeleted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_stamp; + } + + public void setDeleted_stamp( java.sql.Timestamp deleted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_STAMP, deleted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_stamp = deleted_stamp; + LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptAppointment.ID_INDEX: + value = getId(); + break; + case AptAppointment.DAY_DATE_INDEX: + value = getDay_date(); + break; + case AptAppointment.START_TIME_INDEX: + value = getStart_time(); + break; + case AptAppointment.END_TIME_INDEX: + value = getEnd_time(); + break; + case AptAppointment.NOTES_INDEX: + value = getNotes(); + break; + case AptAppointment.STATE_ID_INDEX: + value = getState_id(); + break; + case AptAppointment.TO_STATE_ID_INDEX: + value = toState_id(); + break; + case AptAppointment.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptAppointment.ID_INDEX: + value = this.id; + break; + case AptAppointment.DAY_DATE_INDEX: + value = this.day_date; + break; + case AptAppointment.START_TIME_INDEX: + value = this.start_time; + break; + case AptAppointment.END_TIME_INDEX: + value = this.end_time; + break; + case AptAppointment.NOTES_INDEX: + value = this.notes; + break; + case AptAppointment.STATE_ID_INDEX: + value = this.state_id; + break; + case AptAppointment.TO_STATE_ID_INDEX: + value = this.to_state_id; + break; + case AptAppointment.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptAppointment.ID_INDEX: + setId( ( Integer ) value ); + break; + case AptAppointment.DAY_DATE_INDEX: + setDay_date( ( java.util.Date ) value ); + break; + case AptAppointment.START_TIME_INDEX: + setStart_time( ( java.sql.Time ) value ); + break; + case AptAppointment.END_TIME_INDEX: + setEnd_time( ( java.sql.Time ) value ); + break; + case AptAppointment.NOTES_INDEX: + setNotes( ( String ) value ); + break; + case AptAppointment.STATE_ID_INDEX: + setState_id( ( Integer ) value ); + break; + case AptAppointment.TO_STATE_ID_INDEX: + setToState_id( ( db.data.siprp_local.outer.AptStateData ) value ); + break; + case AptAppointment.DELETED_STAMP_INDEX: + setDeleted_stamp( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptAppointment.ID_INDEX: + this.id = ( Integer ) value; + break; + case AptAppointment.DAY_DATE_INDEX: + this.day_date = ( java.util.Date ) value; + break; + case AptAppointment.START_TIME_INDEX: + this.start_time = ( java.sql.Time ) value; + break; + case AptAppointment.END_TIME_INDEX: + this.end_time = ( java.sql.Time ) value; + break; + case AptAppointment.NOTES_INDEX: + this.notes = ( String ) value; + break; + case AptAppointment.STATE_ID_INDEX: + this.state_id = ( Integer ) value; + break; + case AptAppointment.TO_STATE_ID_INDEX: + this.to_state_id = ( db.data.siprp_local.outer.AptStateData ) value; + break; + case AptAppointment.DELETED_STAMP_INDEX: + this.deleted_stamp = ( java.sql.Timestamp ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case AptAppointment.ID_INDEX: + theClass = Integer.class; + break; + case AptAppointment.DAY_DATE_INDEX: + theClass = java.util.Date.class; + break; + case AptAppointment.START_TIME_INDEX: + theClass = java.sql.Time.class; + break; + case AptAppointment.END_TIME_INDEX: + theClass = java.sql.Time.class; + break; + case AptAppointment.NOTES_INDEX: + theClass = String.class; + break; + case AptAppointment.STATE_ID_INDEX: + theClass = Integer.class; + break; + case AptAppointment.TO_STATE_ID_INDEX: + theClass = db.data.siprp_local.outer.AptStateData.class; + break; + case AptAppointment.DELETED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : AptAppointment._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, AptAppointment.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/AptSegurancaAlimentar.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/AptSegurancaAlimentar.java new file mode 100644 index 00000000..2ed5f8e7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/AptSegurancaAlimentar.java @@ -0,0 +1,483 @@ +/* +* AptSegurancaAlimentar.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class AptSegurancaAlimentar extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( AptSegurancaAlimentar.ID, AptSegurancaAlimentar.ID_INDEX ); + FIELD_INDEXES.put( AptSegurancaAlimentar.ID_FULL, AptSegurancaAlimentar.ID_INDEX ); + FIELD_INDEXES.put( AptSegurancaAlimentar.DELETED_STAMP, AptSegurancaAlimentar.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( AptSegurancaAlimentar.DELETED_STAMP_FULL, AptSegurancaAlimentar.DELETED_STAMP_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AptSegurancaAlimentar.CLASS_IDENTIFIER, AptSegurancaAlimentar.APPOINTMENT_ID, AptSegurancaAlimentar.TO_APPOINTMENT_ID ); + FIELD_INDEXES.put( AptSegurancaAlimentar.APPOINTMENT_ID, AptSegurancaAlimentar.APPOINTMENT_ID_INDEX ); + FIELD_INDEXES.put( AptSegurancaAlimentar.APPOINTMENT_ID_FULL, AptSegurancaAlimentar.APPOINTMENT_ID_INDEX ); + FIELD_INDEXES.put( AptSegurancaAlimentar.TO_APPOINTMENT_ID, AptSegurancaAlimentar.TO_APPOINTMENT_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AptSegurancaAlimentar.CLASS_IDENTIFIER, AptSegurancaAlimentar.ESTABELECIMENTO_ID, AptSegurancaAlimentar.TO_ESTABELECIMENTO_ID ); + FIELD_INDEXES.put( AptSegurancaAlimentar.ESTABELECIMENTO_ID, AptSegurancaAlimentar.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( AptSegurancaAlimentar.ESTABELECIMENTO_ID_FULL, AptSegurancaAlimentar.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( AptSegurancaAlimentar.TO_ESTABELECIMENTO_ID, AptSegurancaAlimentar.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 ForeignKeyappointment_idToapt_appointment = + new com.evolute.entity.ForeignKey( AptSegurancaAlimentar.class, AptSegurancaAlimentar.APPOINTMENT_ID, db.data.siprp_local.outer.AptAppointmentData.class, db.data.siprp_local.outer.AptAppointmentData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( AptSegurancaAlimentar.class, AptSegurancaAlimentar.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "apt_seguranca_alimentar"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.apt_seguranca_alimentar"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "apt_seguranca_alimentar.id"; + public static final int ID_INDEX = 0; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "apt_seguranca_alimentar.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 1; + public static final String APPOINTMENT_ID = "appointment_id"; + public static final String APPOINTMENT_ID_FULL = "apt_seguranca_alimentar.appointment_id"; + public static final int APPOINTMENT_ID_INDEX = 2; + public static final String TO_APPOINTMENT_ID = "to_appointment_id"; + public static final String TO_APPOINTMENT_ID_FULL = "apt_seguranca_alimentar.to_appointment_id"; + public static final int TO_APPOINTMENT_ID_INDEX = 3; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "apt_seguranca_alimentar.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 4; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID_FULL = "apt_seguranca_alimentar.to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + DELETED_STAMP, APPOINTMENT_ID, TO_APPOINTMENT_ID, ESTABELECIMENTO_ID, + TO_ESTABELECIMENTO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DELETED_STAMP, TABLENAME + "." + APPOINTMENT_ID, TABLENAME + "." + TO_APPOINTMENT_ID, TABLENAME + "." + ESTABELECIMENTO_ID, + TABLENAME + "." + TO_ESTABELECIMENTO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DELETED_STAMP, APPOINTMENT_ID, ESTABELECIMENTO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DELETED_STAMP, APPOINTMENT_ID, ESTABELECIMENTO_ID, }; + + private Integer id; + private java.sql.Timestamp deleted_stamp; + private Integer appointment_id; + private db.data.siprp_local.outer.AptAppointmentData to_appointment_id; + private Integer estabelecimento_id; + private db.data.siprp_local.outer.EstabelecimentosData to_estabelecimento_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public AptSegurancaAlimentar() + { + 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.sql.Timestamp getDeleted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_stamp; + } + + public void setDeleted_stamp( java.sql.Timestamp deleted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_STAMP, deleted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_stamp = deleted_stamp; + LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); + } + + public Integer getAppointment_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( APPOINTMENT_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.appointment_id; + } + + public void setAppointment_id( Integer appointment_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( APPOINTMENT_ID, appointment_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.appointment_id = appointment_id; + LAZY_LOADED_OBJECTS.put( APPOINTMENT_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.AptAppointmentData toAppointment_id() + { + try + { + prepare( TO_APPOINTMENT_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_appointment_id; + } + + public void setToAppointment_id( db.data.siprp_local.outer.AptAppointmentData to_appointment_id ) + { + try + { + preProcess( TO_APPOINTMENT_ID, to_appointment_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_appointment_id = to_appointment_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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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 AptSegurancaAlimentar.ID_INDEX: + value = getId(); + break; + case AptSegurancaAlimentar.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + break; + case AptSegurancaAlimentar.APPOINTMENT_ID_INDEX: + value = getAppointment_id(); + break; + case AptSegurancaAlimentar.TO_APPOINTMENT_ID_INDEX: + value = toAppointment_id(); + break; + case AptSegurancaAlimentar.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case AptSegurancaAlimentar.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 AptSegurancaAlimentar.ID_INDEX: + value = this.id; + break; + case AptSegurancaAlimentar.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + case AptSegurancaAlimentar.APPOINTMENT_ID_INDEX: + value = this.appointment_id; + break; + case AptSegurancaAlimentar.TO_APPOINTMENT_ID_INDEX: + value = this.to_appointment_id; + break; + case AptSegurancaAlimentar.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + case AptSegurancaAlimentar.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 AptSegurancaAlimentar.ID_INDEX: + setId( ( Integer ) value ); + break; + case AptSegurancaAlimentar.DELETED_STAMP_INDEX: + setDeleted_stamp( ( java.sql.Timestamp ) value ); + break; + case AptSegurancaAlimentar.APPOINTMENT_ID_INDEX: + setAppointment_id( ( Integer ) value ); + break; + case AptSegurancaAlimentar.TO_APPOINTMENT_ID_INDEX: + setToAppointment_id( ( db.data.siprp_local.outer.AptAppointmentData ) value ); + break; + case AptSegurancaAlimentar.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case AptSegurancaAlimentar.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp_local.outer.EstabelecimentosData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptSegurancaAlimentar.ID_INDEX: + this.id = ( Integer ) value; + break; + case AptSegurancaAlimentar.DELETED_STAMP_INDEX: + this.deleted_stamp = ( java.sql.Timestamp ) value; + break; + case AptSegurancaAlimentar.APPOINTMENT_ID_INDEX: + this.appointment_id = ( Integer ) value; + break; + case AptSegurancaAlimentar.TO_APPOINTMENT_ID_INDEX: + this.to_appointment_id = ( db.data.siprp_local.outer.AptAppointmentData ) value; + break; + case AptSegurancaAlimentar.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case AptSegurancaAlimentar.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( db.data.siprp_local.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 AptSegurancaAlimentar.ID_INDEX: + theClass = Integer.class; + break; + case AptSegurancaAlimentar.DELETED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + case AptSegurancaAlimentar.APPOINTMENT_ID_INDEX: + theClass = Integer.class; + break; + case AptSegurancaAlimentar.TO_APPOINTMENT_ID_INDEX: + theClass = db.data.siprp_local.outer.AptAppointmentData.class; + break; + case AptSegurancaAlimentar.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case AptSegurancaAlimentar.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.outer.EstabelecimentosData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : AptSegurancaAlimentar._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, AptSegurancaAlimentar.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/AptState.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/AptState.java new file mode 100644 index 00000000..3bb24cb4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/AptState.java @@ -0,0 +1,293 @@ +/* +* AptState.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class AptState extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( AptState.ID, AptState.ID_INDEX ); + FIELD_INDEXES.put( AptState.ID_FULL, AptState.ID_INDEX ); + FIELD_INDEXES.put( AptState.DESCRIPTION, AptState.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( AptState.DESCRIPTION_FULL, AptState.DESCRIPTION_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "apt_state"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.apt_state"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "apt_state.id"; + public static final int ID_INDEX = 0; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "apt_state.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 AptState() + { + 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.ListfromAptAppointment_state_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.AptAppointmentData.class , getPrimaryKey().getMap().get("id"), "state_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 AptState.ID_INDEX: + value = getId(); + break; + case AptState.DESCRIPTION_INDEX: + value = getDescription(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptState.ID_INDEX: + value = this.id; + break; + case AptState.DESCRIPTION_INDEX: + value = this.description; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptState.ID_INDEX: + setId( ( Integer ) value ); + break; + case AptState.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptState.ID_INDEX: + this.id = ( Integer ) value; + break; + case AptState.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 AptState.ID_INDEX: + theClass = Integer.class; + break; + case AptState.DESCRIPTION_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : AptState._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, AptState.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Avisos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Avisos.java new file mode 100644 index 00000000..86793d5c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Avisos.java @@ -0,0 +1,786 @@ +/* +* Avisos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Avisos extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( Avisos.class, Avisos.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores = + new com.evolute.entity.ForeignKey( Avisos.class, Avisos.TRABALHADOR_ID, db.data.siprp_local.outer.TrabalhadoresData.class, db.data.siprp_local.outer.TrabalhadoresData.ID ); + + public static final String TABLENAME = "avisos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.avisos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "avisos.id"; + public static final int ID_INDEX = 0; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "avisos.tipo"; + public static final int TIPO_INDEX = 1; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "avisos.empresa_id"; + public static final int EMPRESA_ID_INDEX = 2; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final String TO_EMPRESA_ID_FULL = "avisos.to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 3; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "avisos.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 4; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID_FULL = "avisos.to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 5; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "avisos.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 6; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final String TO_TRABALHADOR_ID_FULL = "avisos.to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 7; + public static final String EVENTO_ID = "evento_id"; + public static final String EVENTO_ID_FULL = "avisos.evento_id"; + public static final int EVENTO_ID_INDEX = 8; + public static final String DATA_AVISO = "data_aviso"; + public static final String DATA_AVISO_FULL = "avisos.data_aviso"; + public static final int DATA_AVISO_INDEX = 9; + public static final String DATA_EVENTO = "data_evento"; + public static final String DATA_EVENTO_FULL = "avisos.data_evento"; + public static final int DATA_EVENTO_INDEX = 10; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "avisos.descricao"; + public static final int DESCRICAO_INDEX = 11; + + public static final String FIELD_NAMES[] = new String[]{ + TIPO, EMPRESA_ID, TO_EMPRESA_ID, ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, + TRABALHADOR_ID, TO_TRABALHADOR_ID, EVENTO_ID, DATA_AVISO, DATA_EVENTO, DESCRICAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TIPO, TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID, + TABLENAME + "." + TRABALHADOR_ID, TABLENAME + "." + TO_TRABALHADOR_ID, TABLENAME + "." + EVENTO_ID, TABLENAME + "." + DATA_AVISO, TABLENAME + "." + DATA_EVENTO, TABLENAME + "." + DESCRICAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TIPO, EMPRESA_ID, ESTABELECIMENTO_ID, TRABALHADOR_ID, EVENTO_ID, DATA_AVISO, + DATA_EVENTO, DESCRICAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TIPO, EMPRESA_ID, ESTABELECIMENTO_ID, TRABALHADOR_ID, EVENTO_ID, DATA_AVISO, + DATA_EVENTO, DESCRICAO, }; + + private Integer id; + private Integer tipo; + private Integer empresa_id; + private db.data.siprp_local.outer.EmpresasData to_empresa_id; + private Integer estabelecimento_id; + private db.data.siprp_local.outer.EstabelecimentosData to_estabelecimento_id; + private Integer trabalhador_id; + private db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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 db.data.siprp_local.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.EmpresasData ) value ); + break; + case Avisos.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case Avisos.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp_local.outer.EstabelecimentosData ) value ); + break; + case Avisos.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case Avisos.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( db.data.siprp_local.outer.TrabalhadoresData ) value ); + break; + case Avisos.EVENTO_ID_INDEX: + setEvento_id( ( Integer ) value ); + break; + case Avisos.DATA_AVISO_INDEX: + setData_aviso( ( java.util.Date ) value ); + break; + case Avisos.DATA_EVENTO_INDEX: + setData_evento( ( java.util.Date ) value ); + break; + case Avisos.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Avisos.ID_INDEX: + this.id = ( Integer ) value; + break; + case Avisos.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case Avisos.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case Avisos.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( db.data.siprp_local.outer.EmpresasData ) value; + break; + case Avisos.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case Avisos.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( db.data.siprp_local.outer.EstabelecimentosData ) value; + break; + case Avisos.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case Avisos.TO_TRABALHADOR_ID_INDEX: + this.to_trabalhador_id = ( db.data.siprp_local.outer.TrabalhadoresData ) value; + break; + case Avisos.EVENTO_ID_INDEX: + this.evento_id = ( Integer ) value; + break; + case Avisos.DATA_AVISO_INDEX: + this.data_aviso = ( java.util.Date ) value; + break; + case Avisos.DATA_EVENTO_INDEX: + this.data_evento = ( java.util.Date ) value; + break; + case Avisos.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Avisos.ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TIPO_INDEX: + theClass = Integer.class; + break; + case Avisos.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.outer.EmpresasData.class; + break; + case Avisos.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.outer.EstabelecimentosData.class; + break; + case Avisos.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TO_TRABALHADOR_ID_INDEX: + theClass = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Contactos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Contactos.java new file mode 100644 index 00000000..ca51c0dd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Contactos.java @@ -0,0 +1,637 @@ +/* +* Contactos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Contactos extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + FIELD_INDEXES.put( Contactos.DEPARTAMENTO, Contactos.DEPARTAMENTO_INDEX ); + FIELD_INDEXES.put( Contactos.DEPARTAMENTO_FULL, Contactos.DEPARTAMENTO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "contactos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.contactos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "contactos.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "contactos.nome"; + public static final int NOME_INDEX = 1; + public static final String TELEFONE = "telefone"; + public static final String TELEFONE_FULL = "contactos.telefone"; + public static final int TELEFONE_INDEX = 2; + public static final String TELEMOVEL = "telemovel"; + public static final String TELEMOVEL_FULL = "contactos.telemovel"; + public static final int TELEMOVEL_INDEX = 3; + public static final String FAX = "fax"; + public static final String FAX_FULL = "contactos.fax"; + public static final int FAX_INDEX = 4; + public static final String EMAIL = "email"; + public static final String EMAIL_FULL = "contactos.email"; + public static final int EMAIL_INDEX = 5; + public static final String CARGO = "cargo"; + public static final String CARGO_FULL = "contactos.cargo"; + public static final int CARGO_INDEX = 6; + public static final String DEPARTAMENTO = "departamento"; + public static final String DEPARTAMENTO_FULL = "contactos.departamento"; + public static final int DEPARTAMENTO_INDEX = 7; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, DEPARTAMENTO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + TELEFONE, TABLENAME + "." + TELEMOVEL, TABLENAME + "." + FAX, TABLENAME + "." + EMAIL, TABLENAME + "." + CARGO, TABLENAME + "." + DEPARTAMENTO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, DEPARTAMENTO, }; + + + 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, DEPARTAMENTO, }; + + private Integer id; + private String nome; + private String telefone; + private String telemovel; + private String fax; + private String email; + private String cargo; + private String departamento; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Contactos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 String getDepartamento() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DEPARTAMENTO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.departamento; + } + + public void setDepartamento( String departamento ) + { + try + { + setLockedForRefresh( true ); + preProcess( DEPARTAMENTO, departamento ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.departamento = departamento; + LAZY_LOADED_OBJECTS.put( DEPARTAMENTO, 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; + case Contactos.DEPARTAMENTO_INDEX: + value = getDepartamento(); + 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; + case Contactos.DEPARTAMENTO_INDEX: + value = this.departamento; + 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; + case Contactos.DEPARTAMENTO_INDEX: + setDepartamento( ( 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; + case Contactos.DEPARTAMENTO_INDEX: + this.departamento = ( 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; + case Contactos.DEPARTAMENTO_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, ( 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurArs.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurArs.java new file mode 100644 index 00000000..cc307e7c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurArs.java @@ -0,0 +1,294 @@ +/* +* CurArs.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurArs extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurArs.ID, CurArs.ID_INDEX ); + FIELD_INDEXES.put( CurArs.ID_FULL, CurArs.ID_INDEX ); + FIELD_INDEXES.put( CurArs.NOME, CurArs.NOME_INDEX ); + FIELD_INDEXES.put( CurArs.NOME_FULL, CurArs.NOME_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "cur_ars"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_ars"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_ars.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "cur_ars.nome"; + public static final int NOME_INDEX = 1; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, }; + + private Integer id; + private String nome; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurArs() + { + 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.ListfromCurFormandos_ars_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurFormandosData.class , getPrimaryKey().getMap().get("id"), "ars_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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurArs.ID_INDEX: + value = getId(); + break; + case CurArs.NOME_INDEX: + value = getNome(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurArs.ID_INDEX: + value = this.id; + break; + case CurArs.NOME_INDEX: + value = this.nome; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurArs.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurArs.NOME_INDEX: + setNome( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurArs.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurArs.NOME_INDEX: + this.nome = ( 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 CurArs.ID_INDEX: + theClass = Integer.class; + break; + case CurArs.NOME_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurArs._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, CurArs.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurAulas.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurAulas.java new file mode 100644 index 00000000..ad28b2e8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurAulas.java @@ -0,0 +1,509 @@ +/* +* CurAulas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurAulas extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurAulas.ID, CurAulas.ID_INDEX ); + FIELD_INDEXES.put( CurAulas.ID_FULL, CurAulas.ID_INDEX ); + FIELD_INDEXES.put( CurAulas.INICIO_DATE, CurAulas.INICIO_DATE_INDEX ); + FIELD_INDEXES.put( CurAulas.INICIO_DATE_FULL, CurAulas.INICIO_DATE_INDEX ); + FIELD_INDEXES.put( CurAulas.FIM_DATE, CurAulas.FIM_DATE_INDEX ); + FIELD_INDEXES.put( CurAulas.FIM_DATE_FULL, CurAulas.FIM_DATE_INDEX ); + FIELD_INDEXES.put( CurAulas.DELETED_DATE, CurAulas.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurAulas.DELETED_DATE_FULL, CurAulas.DELETED_DATE_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurAulas.CLASS_IDENTIFIER, CurAulas.CUR_DIA_ID, CurAulas.TO_CUR_DIA_ID ); + FIELD_INDEXES.put( CurAulas.CUR_DIA_ID, CurAulas.CUR_DIA_ID_INDEX ); + FIELD_INDEXES.put( CurAulas.CUR_DIA_ID_FULL, CurAulas.CUR_DIA_ID_INDEX ); + FIELD_INDEXES.put( CurAulas.TO_CUR_DIA_ID, CurAulas.TO_CUR_DIA_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 ForeignKeycur_dia_idTocur_dias = + new com.evolute.entity.ForeignKey( CurAulas.class, CurAulas.CUR_DIA_ID, db.data.siprp_local.outer.CurDiasData.class, db.data.siprp_local.outer.CurDiasData.ID ); + + public static final String TABLENAME = "cur_aulas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_aulas"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_aulas.id"; + public static final int ID_INDEX = 0; + public static final String INICIO_DATE = "inicio_date"; + public static final String INICIO_DATE_FULL = "cur_aulas.inicio_date"; + public static final int INICIO_DATE_INDEX = 1; + public static final String FIM_DATE = "fim_date"; + public static final String FIM_DATE_FULL = "cur_aulas.fim_date"; + public static final int FIM_DATE_INDEX = 2; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_aulas.deleted_date"; + public static final int DELETED_DATE_INDEX = 3; + public static final String CUR_DIA_ID = "cur_dia_id"; + public static final String CUR_DIA_ID_FULL = "cur_aulas.cur_dia_id"; + public static final int CUR_DIA_ID_INDEX = 4; + public static final String TO_CUR_DIA_ID = "to_cur_dia_id"; + public static final String TO_CUR_DIA_ID_FULL = "cur_aulas.to_cur_dia_id"; + public static final int TO_CUR_DIA_ID_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + INICIO_DATE, FIM_DATE, DELETED_DATE, CUR_DIA_ID, TO_CUR_DIA_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + INICIO_DATE, TABLENAME + "." + FIM_DATE, TABLENAME + "." + DELETED_DATE, TABLENAME + "." + CUR_DIA_ID, TABLENAME + "." + TO_CUR_DIA_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, INICIO_DATE, FIM_DATE, DELETED_DATE, CUR_DIA_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, INICIO_DATE, FIM_DATE, DELETED_DATE, CUR_DIA_ID, }; + + private Integer id; + private java.sql.Time inicio_date; + private java.sql.Time fim_date; + private java.sql.Timestamp deleted_date; + private Integer cur_dia_id; + private db.data.siprp_local.outer.CurDiasData to_cur_dia_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurAulas() + { + 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.ListfromCurAulasFormadores_aula_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurAulasFormadoresData.class , getPrimaryKey().getMap().get("id"), "aula_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromCurTopicosAulas_aula_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurTopicosAulasData.class , getPrimaryKey().getMap().get("id"), "aula_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.sql.Time getInicio_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( INICIO_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.inicio_date; + } + + public void setInicio_date( java.sql.Time inicio_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( INICIO_DATE, inicio_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.inicio_date = inicio_date; + LAZY_LOADED_OBJECTS.put( INICIO_DATE, Boolean.TRUE ); + } + + public java.sql.Time getFim_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FIM_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.fim_date; + } + + public void setFim_date( java.sql.Time fim_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( FIM_DATE, fim_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.fim_date = fim_date; + LAZY_LOADED_OBJECTS.put( FIM_DATE, 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 getCur_dia_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CUR_DIA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.cur_dia_id; + } + + public void setCur_dia_id( Integer cur_dia_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CUR_DIA_ID, cur_dia_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.cur_dia_id = cur_dia_id; + LAZY_LOADED_OBJECTS.put( CUR_DIA_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurDiasData toCur_dia_id() + { + try + { + prepare( TO_CUR_DIA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_cur_dia_id; + } + + public void setToCur_dia_id( db.data.siprp_local.outer.CurDiasData to_cur_dia_id ) + { + try + { + preProcess( TO_CUR_DIA_ID, to_cur_dia_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_cur_dia_id = to_cur_dia_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurAulas.ID_INDEX: + value = getId(); + break; + case CurAulas.INICIO_DATE_INDEX: + value = getInicio_date(); + break; + case CurAulas.FIM_DATE_INDEX: + value = getFim_date(); + break; + case CurAulas.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case CurAulas.CUR_DIA_ID_INDEX: + value = getCur_dia_id(); + break; + case CurAulas.TO_CUR_DIA_ID_INDEX: + value = toCur_dia_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurAulas.ID_INDEX: + value = this.id; + break; + case CurAulas.INICIO_DATE_INDEX: + value = this.inicio_date; + break; + case CurAulas.FIM_DATE_INDEX: + value = this.fim_date; + break; + case CurAulas.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case CurAulas.CUR_DIA_ID_INDEX: + value = this.cur_dia_id; + break; + case CurAulas.TO_CUR_DIA_ID_INDEX: + value = this.to_cur_dia_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurAulas.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurAulas.INICIO_DATE_INDEX: + setInicio_date( ( java.sql.Time ) value ); + break; + case CurAulas.FIM_DATE_INDEX: + setFim_date( ( java.sql.Time ) value ); + break; + case CurAulas.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case CurAulas.CUR_DIA_ID_INDEX: + setCur_dia_id( ( Integer ) value ); + break; + case CurAulas.TO_CUR_DIA_ID_INDEX: + setToCur_dia_id( ( db.data.siprp_local.outer.CurDiasData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurAulas.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurAulas.INICIO_DATE_INDEX: + this.inicio_date = ( java.sql.Time ) value; + break; + case CurAulas.FIM_DATE_INDEX: + this.fim_date = ( java.sql.Time ) value; + break; + case CurAulas.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case CurAulas.CUR_DIA_ID_INDEX: + this.cur_dia_id = ( Integer ) value; + break; + case CurAulas.TO_CUR_DIA_ID_INDEX: + this.to_cur_dia_id = ( db.data.siprp_local.outer.CurDiasData ) 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 CurAulas.ID_INDEX: + theClass = Integer.class; + break; + case CurAulas.INICIO_DATE_INDEX: + theClass = java.sql.Time.class; + break; + case CurAulas.FIM_DATE_INDEX: + theClass = java.sql.Time.class; + break; + case CurAulas.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurAulas.CUR_DIA_ID_INDEX: + theClass = Integer.class; + break; + case CurAulas.TO_CUR_DIA_ID_INDEX: + theClass = db.data.siprp_local.outer.CurDiasData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurAulas._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, CurAulas.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurAulasFormadores.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurAulasFormadores.java new file mode 100644 index 00000000..a1ed0aae --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurAulasFormadores.java @@ -0,0 +1,431 @@ +/* +* CurAulasFormadores.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurAulasFormadores extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( CurAulasFormadores.CLASS_IDENTIFIER, CurAulasFormadores.AULA_ID, CurAulasFormadores.TO_AULA_ID ); + FIELD_INDEXES.put( CurAulasFormadores.AULA_ID, CurAulasFormadores.AULA_ID_INDEX ); + FIELD_INDEXES.put( CurAulasFormadores.AULA_ID_FULL, CurAulasFormadores.AULA_ID_INDEX ); + FIELD_INDEXES.put( CurAulasFormadores.TO_AULA_ID, CurAulasFormadores.TO_AULA_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurAulasFormadores.CLASS_IDENTIFIER, CurAulasFormadores.FORMADOR_ID, CurAulasFormadores.TO_FORMADOR_ID ); + FIELD_INDEXES.put( CurAulasFormadores.FORMADOR_ID, CurAulasFormadores.FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurAulasFormadores.FORMADOR_ID_FULL, CurAulasFormadores.FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurAulasFormadores.TO_FORMADOR_ID, CurAulasFormadores.TO_FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurAulasFormadores.DELETED_DATE, CurAulasFormadores.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurAulasFormadores.DELETED_DATE_FULL, CurAulasFormadores.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 ForeignKeyaula_idTocur_aulas = + new com.evolute.entity.ForeignKey( CurAulasFormadores.class, CurAulasFormadores.AULA_ID, db.data.siprp_local.outer.CurAulasData.class, db.data.siprp_local.outer.CurAulasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyformador_idTocur_formadores = + new com.evolute.entity.ForeignKey( CurAulasFormadores.class, CurAulasFormadores.FORMADOR_ID, db.data.siprp_local.outer.CurFormadoresData.class, db.data.siprp_local.outer.CurFormadoresData.ID ); + + public static final String TABLENAME = "cur_aulas_formadores"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_aulas_formadores"; + + public static final int _INVALID__INDEX = -1; + public static final String AULA_ID = "aula_id"; + public static final String AULA_ID_FULL = "cur_aulas_formadores.aula_id"; + public static final int AULA_ID_INDEX = 0; + public static final String TO_AULA_ID = "to_aula_id"; + public static final String TO_AULA_ID_FULL = "cur_aulas_formadores.to_aula_id"; + public static final int TO_AULA_ID_INDEX = 1; + public static final String FORMADOR_ID = "formador_id"; + public static final String FORMADOR_ID_FULL = "cur_aulas_formadores.formador_id"; + public static final int FORMADOR_ID_INDEX = 2; + public static final String TO_FORMADOR_ID = "to_formador_id"; + public static final String TO_FORMADOR_ID_FULL = "cur_aulas_formadores.to_formador_id"; + public static final int TO_FORMADOR_ID_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_aulas_formadores.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + AULA_ID, FORMADOR_ID, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + AULA_ID, FORMADOR_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + AULA_ID, FORMADOR_ID, DELETED_DATE, }; + + private Integer aula_id; + private db.data.siprp_local.outer.CurAulasData to_aula_id; + private Integer formador_id; + private db.data.siprp_local.outer.CurFormadoresData to_formador_id; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurAulasFormadores() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false }; + } + + public Integer getAula_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( AULA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.aula_id; + } + + public void setAula_id( Integer aula_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( AULA_ID, aula_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.aula_id = aula_id; + LAZY_LOADED_OBJECTS.put( AULA_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurAulasData toAula_id() + { + try + { + prepare( TO_AULA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_aula_id; + } + + public void setToAula_id( db.data.siprp_local.outer.CurAulasData to_aula_id ) + { + try + { + preProcess( TO_AULA_ID, to_aula_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_aula_id = to_aula_id; + } + + public Integer getFormador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formador_id; + } + + public void setFormador_id( Integer formador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMADOR_ID, formador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formador_id = formador_id; + LAZY_LOADED_OBJECTS.put( FORMADOR_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurFormadoresData toFormador_id() + { + try + { + prepare( TO_FORMADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_formador_id; + } + + public void setToFormador_id( db.data.siprp_local.outer.CurFormadoresData to_formador_id ) + { + try + { + preProcess( TO_FORMADOR_ID, to_formador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_formador_id = to_formador_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 CurAulasFormadores.AULA_ID_INDEX: + value = getAula_id(); + break; + case CurAulasFormadores.TO_AULA_ID_INDEX: + value = toAula_id(); + break; + case CurAulasFormadores.FORMADOR_ID_INDEX: + value = getFormador_id(); + break; + case CurAulasFormadores.TO_FORMADOR_ID_INDEX: + value = toFormador_id(); + break; + case CurAulasFormadores.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurAulasFormadores.AULA_ID_INDEX: + value = this.aula_id; + break; + case CurAulasFormadores.TO_AULA_ID_INDEX: + value = this.to_aula_id; + break; + case CurAulasFormadores.FORMADOR_ID_INDEX: + value = this.formador_id; + break; + case CurAulasFormadores.TO_FORMADOR_ID_INDEX: + value = this.to_formador_id; + break; + case CurAulasFormadores.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurAulasFormadores.AULA_ID_INDEX: + setAula_id( ( Integer ) value ); + break; + case CurAulasFormadores.TO_AULA_ID_INDEX: + setToAula_id( ( db.data.siprp_local.outer.CurAulasData ) value ); + break; + case CurAulasFormadores.FORMADOR_ID_INDEX: + setFormador_id( ( Integer ) value ); + break; + case CurAulasFormadores.TO_FORMADOR_ID_INDEX: + setToFormador_id( ( db.data.siprp_local.outer.CurFormadoresData ) value ); + break; + case CurAulasFormadores.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurAulasFormadores.AULA_ID_INDEX: + this.aula_id = ( Integer ) value; + break; + case CurAulasFormadores.TO_AULA_ID_INDEX: + this.to_aula_id = ( db.data.siprp_local.outer.CurAulasData ) value; + break; + case CurAulasFormadores.FORMADOR_ID_INDEX: + this.formador_id = ( Integer ) value; + break; + case CurAulasFormadores.TO_FORMADOR_ID_INDEX: + this.to_formador_id = ( db.data.siprp_local.outer.CurFormadoresData ) value; + break; + case CurAulasFormadores.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() + { + throw new RuntimeException( "getPrimaryKeyName on CurAulasFormadores is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case CurAulasFormadores.AULA_ID_INDEX: + theClass = Integer.class; + break; + case CurAulasFormadores.TO_AULA_ID_INDEX: + theClass = db.data.siprp_local.outer.CurAulasData.class; + break; + case CurAulasFormadores.FORMADOR_ID_INDEX: + theClass = Integer.class; + break; + case CurAulasFormadores.TO_FORMADOR_ID_INDEX: + theClass = db.data.siprp_local.outer.CurFormadoresData.class; + break; + case CurAulasFormadores.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 : CurAulasFormadores._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, CurAulasFormadores.PK_FIELD_NAMES ); + primaryKey.set( 0, getAula_id() ); + primaryKey.set( 1, getFormador_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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurCursos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurCursos.java new file mode 100644 index 00000000..6968bddb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurCursos.java @@ -0,0 +1,1232 @@ +/* +* CurCursos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurCursos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurCursos.ID, CurCursos.ID_INDEX ); + FIELD_INDEXES.put( CurCursos.ID_FULL, CurCursos.ID_INDEX ); + FIELD_INDEXES.put( CurCursos.NOME, CurCursos.NOME_INDEX ); + FIELD_INDEXES.put( CurCursos.NOME_FULL, CurCursos.NOME_INDEX ); + FIELD_INDEXES.put( CurCursos.DATA, CurCursos.DATA_INDEX ); + FIELD_INDEXES.put( CurCursos.DATA_FULL, CurCursos.DATA_INDEX ); + FIELD_INDEXES.put( CurCursos.INICIO_HORA, CurCursos.INICIO_HORA_INDEX ); + FIELD_INDEXES.put( CurCursos.INICIO_HORA_FULL, CurCursos.INICIO_HORA_INDEX ); + FIELD_INDEXES.put( CurCursos.FIM_HORA, CurCursos.FIM_HORA_INDEX ); + FIELD_INDEXES.put( CurCursos.FIM_HORA_FULL, CurCursos.FIM_HORA_INDEX ); + FIELD_INDEXES.put( CurCursos.LIMITE_INSCRICOES, CurCursos.LIMITE_INSCRICOES_INDEX ); + FIELD_INDEXES.put( CurCursos.LIMITE_INSCRICOES_FULL, CurCursos.LIMITE_INSCRICOES_INDEX ); + FIELD_INDEXES.put( CurCursos.DELETED_DATE, CurCursos.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurCursos.DELETED_DATE_FULL, CurCursos.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurCursos.CODIGO_QUESTIONARIO_ANTES, CurCursos.CODIGO_QUESTIONARIO_ANTES_INDEX ); + FIELD_INDEXES.put( CurCursos.CODIGO_QUESTIONARIO_ANTES_FULL, CurCursos.CODIGO_QUESTIONARIO_ANTES_INDEX ); + FIELD_INDEXES.put( CurCursos.CODIGO_QUESTIONARIO_DURANTE, CurCursos.CODIGO_QUESTIONARIO_DURANTE_INDEX ); + FIELD_INDEXES.put( CurCursos.CODIGO_QUESTIONARIO_DURANTE_FULL, CurCursos.CODIGO_QUESTIONARIO_DURANTE_INDEX ); + FIELD_INDEXES.put( CurCursos.CODIGO_QUESTIONARIO_DEPOIS, CurCursos.CODIGO_QUESTIONARIO_DEPOIS_INDEX ); + FIELD_INDEXES.put( CurCursos.CODIGO_QUESTIONARIO_DEPOIS_FULL, CurCursos.CODIGO_QUESTIONARIO_DEPOIS_INDEX ); + FIELD_INDEXES.put( CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID, CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_INDEX ); + FIELD_INDEXES.put( CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_FULL, CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_INDEX ); + FIELD_INDEXES.put( CurCursos.ARCHIVED_DATE, CurCursos.ARCHIVED_DATE_INDEX ); + FIELD_INDEXES.put( CurCursos.ARCHIVED_DATE_FULL, CurCursos.ARCHIVED_DATE_INDEX ); + FIELD_INDEXES.put( CurCursos.PROFISSIONAL, CurCursos.PROFISSIONAL_INDEX ); + FIELD_INDEXES.put( CurCursos.PROFISSIONAL_FULL, CurCursos.PROFISSIONAL_INDEX ); + FIELD_INDEXES.put( CurCursos.FINANCIADO, CurCursos.FINANCIADO_INDEX ); + FIELD_INDEXES.put( CurCursos.FINANCIADO_FULL, CurCursos.FINANCIADO_INDEX ); + FIELD_INDEXES.put( CurCursos.VALOR, CurCursos.VALOR_INDEX ); + FIELD_INDEXES.put( CurCursos.VALOR_FULL, CurCursos.VALOR_INDEX ); + FIELD_INDEXES.put( CurCursos.RESPONSAVEL_ID, CurCursos.RESPONSAVEL_ID_INDEX ); + FIELD_INDEXES.put( CurCursos.RESPONSAVEL_ID_FULL, CurCursos.RESPONSAVEL_ID_INDEX ); + FIELD_INDEXES.put( CurCursos.DURACAO, CurCursos.DURACAO_INDEX ); + FIELD_INDEXES.put( CurCursos.DURACAO_FULL, CurCursos.DURACAO_INDEX ); + FIELD_INDEXES.put( CurCursos.LIVRO_REGISTO, CurCursos.LIVRO_REGISTO_INDEX ); + FIELD_INDEXES.put( CurCursos.LIVRO_REGISTO_FULL, CurCursos.LIVRO_REGISTO_INDEX ); + FIELD_INDEXES.put( CurCursos.LIVRO_NUMERO, CurCursos.LIVRO_NUMERO_INDEX ); + FIELD_INDEXES.put( CurCursos.LIVRO_NUMERO_FULL, CurCursos.LIVRO_NUMERO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "cur_cursos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_cursos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_cursos.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "cur_cursos.nome"; + public static final int NOME_INDEX = 1; + public static final String DATA = "data"; + public static final String DATA_FULL = "cur_cursos.data"; + public static final int DATA_INDEX = 2; + public static final String INICIO_HORA = "inicio_hora"; + public static final String INICIO_HORA_FULL = "cur_cursos.inicio_hora"; + public static final int INICIO_HORA_INDEX = 3; + public static final String FIM_HORA = "fim_hora"; + public static final String FIM_HORA_FULL = "cur_cursos.fim_hora"; + public static final int FIM_HORA_INDEX = 4; + public static final String LIMITE_INSCRICOES = "limite_inscricoes"; + public static final String LIMITE_INSCRICOES_FULL = "cur_cursos.limite_inscricoes"; + public static final int LIMITE_INSCRICOES_INDEX = 5; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_cursos.deleted_date"; + public static final int DELETED_DATE_INDEX = 6; + public static final String CODIGO_QUESTIONARIO_ANTES = "codigo_questionario_antes"; + public static final String CODIGO_QUESTIONARIO_ANTES_FULL = "cur_cursos.codigo_questionario_antes"; + public static final int CODIGO_QUESTIONARIO_ANTES_INDEX = 7; + public static final String CODIGO_QUESTIONARIO_DURANTE = "codigo_questionario_durante"; + public static final String CODIGO_QUESTIONARIO_DURANTE_FULL = "cur_cursos.codigo_questionario_durante"; + public static final int CODIGO_QUESTIONARIO_DURANTE_INDEX = 8; + public static final String CODIGO_QUESTIONARIO_DEPOIS = "codigo_questionario_depois"; + public static final String CODIGO_QUESTIONARIO_DEPOIS_FULL = "cur_cursos.codigo_questionario_depois"; + public static final int CODIGO_QUESTIONARIO_DEPOIS_INDEX = 9; + public static final String AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID = "aut_impressao_pedido_sub_tipo_id"; + public static final String AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_FULL = "cur_cursos.aut_impressao_pedido_sub_tipo_id"; + public static final int AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_INDEX = 10; + public static final String ARCHIVED_DATE = "archived_date"; + public static final String ARCHIVED_DATE_FULL = "cur_cursos.archived_date"; + public static final int ARCHIVED_DATE_INDEX = 11; + public static final String PROFISSIONAL = "profissional"; + public static final String PROFISSIONAL_FULL = "cur_cursos.profissional"; + public static final int PROFISSIONAL_INDEX = 12; + public static final String FINANCIADO = "financiado"; + public static final String FINANCIADO_FULL = "cur_cursos.financiado"; + public static final int FINANCIADO_INDEX = 13; + public static final String VALOR = "valor"; + public static final String VALOR_FULL = "cur_cursos.valor"; + public static final int VALOR_INDEX = 14; + public static final String RESPONSAVEL_ID = "responsavel_id"; + public static final String RESPONSAVEL_ID_FULL = "cur_cursos.responsavel_id"; + public static final int RESPONSAVEL_ID_INDEX = 15; + public static final String DURACAO = "duracao"; + public static final String DURACAO_FULL = "cur_cursos.duracao"; + public static final int DURACAO_INDEX = 16; + public static final String LIVRO_REGISTO = "livro_registo"; + public static final String LIVRO_REGISTO_FULL = "cur_cursos.livro_registo"; + public static final int LIVRO_REGISTO_INDEX = 17; + public static final String LIVRO_NUMERO = "livro_numero"; + public static final String LIVRO_NUMERO_FULL = "cur_cursos.livro_numero"; + public static final int LIVRO_NUMERO_INDEX = 18; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, DATA, INICIO_HORA, FIM_HORA, LIMITE_INSCRICOES, DELETED_DATE, + CODIGO_QUESTIONARIO_ANTES, CODIGO_QUESTIONARIO_DURANTE, + CODIGO_QUESTIONARIO_DEPOIS, AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID, + ARCHIVED_DATE, PROFISSIONAL, FINANCIADO, VALOR, RESPONSAVEL_ID, DURACAO, + LIVRO_REGISTO, LIVRO_NUMERO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + DATA, TABLENAME + "." + INICIO_HORA, TABLENAME + "." + FIM_HORA, TABLENAME + "." + LIMITE_INSCRICOES, TABLENAME + "." + DELETED_DATE, + TABLENAME + "." + CODIGO_QUESTIONARIO_ANTES, TABLENAME + "." + CODIGO_QUESTIONARIO_DURANTE, + TABLENAME + "." + CODIGO_QUESTIONARIO_DEPOIS, TABLENAME + "." + AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID, + TABLENAME + "." + ARCHIVED_DATE, TABLENAME + "." + PROFISSIONAL, TABLENAME + "." + FINANCIADO, TABLENAME + "." + VALOR, TABLENAME + "." + RESPONSAVEL_ID, TABLENAME + "." + DURACAO, + TABLENAME + "." + LIVRO_REGISTO, TABLENAME + "." + LIVRO_NUMERO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, DATA, INICIO_HORA, FIM_HORA, LIMITE_INSCRICOES, DELETED_DATE, + CODIGO_QUESTIONARIO_ANTES, CODIGO_QUESTIONARIO_DURANTE, + CODIGO_QUESTIONARIO_DEPOIS, AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID, + ARCHIVED_DATE, PROFISSIONAL, FINANCIADO, VALOR, RESPONSAVEL_ID, DURACAO, + LIVRO_REGISTO, LIVRO_NUMERO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, DATA, INICIO_HORA, FIM_HORA, LIMITE_INSCRICOES, DELETED_DATE, + CODIGO_QUESTIONARIO_ANTES, CODIGO_QUESTIONARIO_DURANTE, + CODIGO_QUESTIONARIO_DEPOIS, AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID, + ARCHIVED_DATE, PROFISSIONAL, FINANCIADO, VALOR, RESPONSAVEL_ID, DURACAO, + LIVRO_REGISTO, LIVRO_NUMERO, }; + + private Integer id; + private String nome; + private java.util.Date data; + private java.sql.Time inicio_hora; + private java.sql.Time fim_hora; + private Integer limite_inscricoes; + private java.sql.Timestamp deleted_date; + private String codigo_questionario_antes; + private String codigo_questionario_durante; + private String codigo_questionario_depois; + private Integer aut_impressao_pedido_sub_tipo_id; + private java.sql.Timestamp archived_date; + private Boolean profissional; + private Boolean financiado; + private Double valor; + private Integer responsavel_id; + private String duracao; + private String livro_registo; + private String livro_numero; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurCursos() + { + 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.ListfromCurDias_curso_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurDiasData.class , getPrimaryKey().getMap().get("id"), "curso_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromCurFormadoresCursos_curso_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurFormadoresCursosData.class , getPrimaryKey().getMap().get("id"), "curso_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromCurFormandosCursos_curso_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurFormandosCursosData.class , getPrimaryKey().getMap().get("id"), "curso_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromCurPagamentos_curso_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurPagamentosData.class , getPrimaryKey().getMap().get("id"), "curso_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromCurPresencas_curso_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurPresencasData.class , getPrimaryKey().getMap().get("id"), "curso_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromCurTopicos_curso_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurTopicosData.class , getPrimaryKey().getMap().get("id"), "curso_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 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.Time getInicio_hora() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( INICIO_HORA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.inicio_hora; + } + + public void setInicio_hora( java.sql.Time inicio_hora ) + { + try + { + setLockedForRefresh( true ); + preProcess( INICIO_HORA, inicio_hora ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.inicio_hora = inicio_hora; + LAZY_LOADED_OBJECTS.put( INICIO_HORA, Boolean.TRUE ); + } + + public java.sql.Time getFim_hora() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FIM_HORA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.fim_hora; + } + + public void setFim_hora( java.sql.Time fim_hora ) + { + try + { + setLockedForRefresh( true ); + preProcess( FIM_HORA, fim_hora ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.fim_hora = fim_hora; + LAZY_LOADED_OBJECTS.put( FIM_HORA, Boolean.TRUE ); + } + + public Integer getLimite_inscricoes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LIMITE_INSCRICOES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.limite_inscricoes; + } + + public void setLimite_inscricoes( Integer limite_inscricoes ) + { + try + { + setLockedForRefresh( true ); + preProcess( LIMITE_INSCRICOES, limite_inscricoes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.limite_inscricoes = limite_inscricoes; + LAZY_LOADED_OBJECTS.put( LIMITE_INSCRICOES, 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 String getCodigo_questionario_antes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CODIGO_QUESTIONARIO_ANTES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.codigo_questionario_antes; + } + + public void setCodigo_questionario_antes( String codigo_questionario_antes ) + { + try + { + setLockedForRefresh( true ); + preProcess( CODIGO_QUESTIONARIO_ANTES, codigo_questionario_antes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.codigo_questionario_antes = codigo_questionario_antes; + LAZY_LOADED_OBJECTS.put( CODIGO_QUESTIONARIO_ANTES, Boolean.TRUE ); + } + + public String getCodigo_questionario_durante() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CODIGO_QUESTIONARIO_DURANTE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.codigo_questionario_durante; + } + + public void setCodigo_questionario_durante( String codigo_questionario_durante ) + { + try + { + setLockedForRefresh( true ); + preProcess( CODIGO_QUESTIONARIO_DURANTE, codigo_questionario_durante ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.codigo_questionario_durante = codigo_questionario_durante; + LAZY_LOADED_OBJECTS.put( CODIGO_QUESTIONARIO_DURANTE, Boolean.TRUE ); + } + + public String getCodigo_questionario_depois() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CODIGO_QUESTIONARIO_DEPOIS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.codigo_questionario_depois; + } + + public void setCodigo_questionario_depois( String codigo_questionario_depois ) + { + try + { + setLockedForRefresh( true ); + preProcess( CODIGO_QUESTIONARIO_DEPOIS, codigo_questionario_depois ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.codigo_questionario_depois = codigo_questionario_depois; + LAZY_LOADED_OBJECTS.put( CODIGO_QUESTIONARIO_DEPOIS, Boolean.TRUE ); + } + + public Integer getAut_impressao_pedido_sub_tipo_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.aut_impressao_pedido_sub_tipo_id; + } + + public void setAut_impressao_pedido_sub_tipo_id( Integer aut_impressao_pedido_sub_tipo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID, aut_impressao_pedido_sub_tipo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.aut_impressao_pedido_sub_tipo_id = aut_impressao_pedido_sub_tipo_id; + LAZY_LOADED_OBJECTS.put( AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID, Boolean.TRUE ); + } + + public java.sql.Timestamp getArchived_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ARCHIVED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.archived_date; + } + + public void setArchived_date( java.sql.Timestamp archived_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( ARCHIVED_DATE, archived_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.archived_date = archived_date; + LAZY_LOADED_OBJECTS.put( ARCHIVED_DATE, Boolean.TRUE ); + } + + public Boolean getProfissional() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROFISSIONAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.profissional; + } + + public void setProfissional( Boolean profissional ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROFISSIONAL, profissional ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.profissional = profissional; + LAZY_LOADED_OBJECTS.put( PROFISSIONAL, Boolean.TRUE ); + } + + public Boolean getFinanciado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FINANCIADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.financiado; + } + + public void setFinanciado( Boolean financiado ) + { + try + { + setLockedForRefresh( true ); + preProcess( FINANCIADO, financiado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.financiado = financiado; + LAZY_LOADED_OBJECTS.put( FINANCIADO, Boolean.TRUE ); + } + + public Double getValor() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.valor; + } + + public void setValor( Double valor ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALOR, valor ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.valor = valor; + LAZY_LOADED_OBJECTS.put( VALOR, Boolean.TRUE ); + } + + public Integer getResponsavel_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESPONSAVEL_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.responsavel_id; + } + + public void setResponsavel_id( Integer responsavel_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESPONSAVEL_ID, responsavel_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.responsavel_id = responsavel_id; + LAZY_LOADED_OBJECTS.put( RESPONSAVEL_ID, Boolean.TRUE ); + } + + public String getDuracao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DURACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.duracao; + } + + public void setDuracao( String 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 String getLivro_registo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LIVRO_REGISTO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.livro_registo; + } + + public void setLivro_registo( String livro_registo ) + { + try + { + setLockedForRefresh( true ); + preProcess( LIVRO_REGISTO, livro_registo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.livro_registo = livro_registo; + LAZY_LOADED_OBJECTS.put( LIVRO_REGISTO, Boolean.TRUE ); + } + + public String getLivro_numero() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LIVRO_NUMERO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.livro_numero; + } + + public void setLivro_numero( String livro_numero ) + { + try + { + setLockedForRefresh( true ); + preProcess( LIVRO_NUMERO, livro_numero ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.livro_numero = livro_numero; + LAZY_LOADED_OBJECTS.put( LIVRO_NUMERO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurCursos.ID_INDEX: + value = getId(); + break; + case CurCursos.NOME_INDEX: + value = getNome(); + break; + case CurCursos.DATA_INDEX: + value = getData(); + break; + case CurCursos.INICIO_HORA_INDEX: + value = getInicio_hora(); + break; + case CurCursos.FIM_HORA_INDEX: + value = getFim_hora(); + break; + case CurCursos.LIMITE_INSCRICOES_INDEX: + value = getLimite_inscricoes(); + break; + case CurCursos.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case CurCursos.CODIGO_QUESTIONARIO_ANTES_INDEX: + value = getCodigo_questionario_antes(); + break; + case CurCursos.CODIGO_QUESTIONARIO_DURANTE_INDEX: + value = getCodigo_questionario_durante(); + break; + case CurCursos.CODIGO_QUESTIONARIO_DEPOIS_INDEX: + value = getCodigo_questionario_depois(); + break; + case CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_INDEX: + value = getAut_impressao_pedido_sub_tipo_id(); + break; + case CurCursos.ARCHIVED_DATE_INDEX: + value = getArchived_date(); + break; + case CurCursos.PROFISSIONAL_INDEX: + value = getProfissional(); + break; + case CurCursos.FINANCIADO_INDEX: + value = getFinanciado(); + break; + case CurCursos.VALOR_INDEX: + value = getValor(); + break; + case CurCursos.RESPONSAVEL_ID_INDEX: + value = getResponsavel_id(); + break; + case CurCursos.DURACAO_INDEX: + value = getDuracao(); + break; + case CurCursos.LIVRO_REGISTO_INDEX: + value = getLivro_registo(); + break; + case CurCursos.LIVRO_NUMERO_INDEX: + value = getLivro_numero(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurCursos.ID_INDEX: + value = this.id; + break; + case CurCursos.NOME_INDEX: + value = this.nome; + break; + case CurCursos.DATA_INDEX: + value = this.data; + break; + case CurCursos.INICIO_HORA_INDEX: + value = this.inicio_hora; + break; + case CurCursos.FIM_HORA_INDEX: + value = this.fim_hora; + break; + case CurCursos.LIMITE_INSCRICOES_INDEX: + value = this.limite_inscricoes; + break; + case CurCursos.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case CurCursos.CODIGO_QUESTIONARIO_ANTES_INDEX: + value = this.codigo_questionario_antes; + break; + case CurCursos.CODIGO_QUESTIONARIO_DURANTE_INDEX: + value = this.codigo_questionario_durante; + break; + case CurCursos.CODIGO_QUESTIONARIO_DEPOIS_INDEX: + value = this.codigo_questionario_depois; + break; + case CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_INDEX: + value = this.aut_impressao_pedido_sub_tipo_id; + break; + case CurCursos.ARCHIVED_DATE_INDEX: + value = this.archived_date; + break; + case CurCursos.PROFISSIONAL_INDEX: + value = this.profissional; + break; + case CurCursos.FINANCIADO_INDEX: + value = this.financiado; + break; + case CurCursos.VALOR_INDEX: + value = this.valor; + break; + case CurCursos.RESPONSAVEL_ID_INDEX: + value = this.responsavel_id; + break; + case CurCursos.DURACAO_INDEX: + value = this.duracao; + break; + case CurCursos.LIVRO_REGISTO_INDEX: + value = this.livro_registo; + break; + case CurCursos.LIVRO_NUMERO_INDEX: + value = this.livro_numero; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurCursos.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurCursos.NOME_INDEX: + setNome( ( String ) value ); + break; + case CurCursos.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case CurCursos.INICIO_HORA_INDEX: + setInicio_hora( ( java.sql.Time ) value ); + break; + case CurCursos.FIM_HORA_INDEX: + setFim_hora( ( java.sql.Time ) value ); + break; + case CurCursos.LIMITE_INSCRICOES_INDEX: + setLimite_inscricoes( ( Integer ) value ); + break; + case CurCursos.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case CurCursos.CODIGO_QUESTIONARIO_ANTES_INDEX: + setCodigo_questionario_antes( ( String ) value ); + break; + case CurCursos.CODIGO_QUESTIONARIO_DURANTE_INDEX: + setCodigo_questionario_durante( ( String ) value ); + break; + case CurCursos.CODIGO_QUESTIONARIO_DEPOIS_INDEX: + setCodigo_questionario_depois( ( String ) value ); + break; + case CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_INDEX: + setAut_impressao_pedido_sub_tipo_id( ( Integer ) value ); + break; + case CurCursos.ARCHIVED_DATE_INDEX: + setArchived_date( ( java.sql.Timestamp ) value ); + break; + case CurCursos.PROFISSIONAL_INDEX: + setProfissional( ( Boolean ) value ); + break; + case CurCursos.FINANCIADO_INDEX: + setFinanciado( ( Boolean ) value ); + break; + case CurCursos.VALOR_INDEX: + setValor( ( Double ) value ); + break; + case CurCursos.RESPONSAVEL_ID_INDEX: + setResponsavel_id( ( Integer ) value ); + break; + case CurCursos.DURACAO_INDEX: + setDuracao( ( String ) value ); + break; + case CurCursos.LIVRO_REGISTO_INDEX: + setLivro_registo( ( String ) value ); + break; + case CurCursos.LIVRO_NUMERO_INDEX: + setLivro_numero( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurCursos.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurCursos.NOME_INDEX: + this.nome = ( String ) value; + break; + case CurCursos.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case CurCursos.INICIO_HORA_INDEX: + this.inicio_hora = ( java.sql.Time ) value; + break; + case CurCursos.FIM_HORA_INDEX: + this.fim_hora = ( java.sql.Time ) value; + break; + case CurCursos.LIMITE_INSCRICOES_INDEX: + this.limite_inscricoes = ( Integer ) value; + break; + case CurCursos.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case CurCursos.CODIGO_QUESTIONARIO_ANTES_INDEX: + this.codigo_questionario_antes = ( String ) value; + break; + case CurCursos.CODIGO_QUESTIONARIO_DURANTE_INDEX: + this.codigo_questionario_durante = ( String ) value; + break; + case CurCursos.CODIGO_QUESTIONARIO_DEPOIS_INDEX: + this.codigo_questionario_depois = ( String ) value; + break; + case CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_INDEX: + this.aut_impressao_pedido_sub_tipo_id = ( Integer ) value; + break; + case CurCursos.ARCHIVED_DATE_INDEX: + this.archived_date = ( java.sql.Timestamp ) value; + break; + case CurCursos.PROFISSIONAL_INDEX: + this.profissional = ( Boolean ) value; + break; + case CurCursos.FINANCIADO_INDEX: + this.financiado = ( Boolean ) value; + break; + case CurCursos.VALOR_INDEX: + this.valor = ( Double ) value; + break; + case CurCursos.RESPONSAVEL_ID_INDEX: + this.responsavel_id = ( Integer ) value; + break; + case CurCursos.DURACAO_INDEX: + this.duracao = ( String ) value; + break; + case CurCursos.LIVRO_REGISTO_INDEX: + this.livro_registo = ( String ) value; + break; + case CurCursos.LIVRO_NUMERO_INDEX: + this.livro_numero = ( 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 CurCursos.ID_INDEX: + theClass = Integer.class; + break; + case CurCursos.NOME_INDEX: + theClass = String.class; + break; + case CurCursos.DATA_INDEX: + theClass = java.util.Date.class; + break; + case CurCursos.INICIO_HORA_INDEX: + theClass = java.sql.Time.class; + break; + case CurCursos.FIM_HORA_INDEX: + theClass = java.sql.Time.class; + break; + case CurCursos.LIMITE_INSCRICOES_INDEX: + theClass = Integer.class; + break; + case CurCursos.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurCursos.CODIGO_QUESTIONARIO_ANTES_INDEX: + theClass = String.class; + break; + case CurCursos.CODIGO_QUESTIONARIO_DURANTE_INDEX: + theClass = String.class; + break; + case CurCursos.CODIGO_QUESTIONARIO_DEPOIS_INDEX: + theClass = String.class; + break; + case CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_INDEX: + theClass = Integer.class; + break; + case CurCursos.ARCHIVED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurCursos.PROFISSIONAL_INDEX: + theClass = Boolean.class; + break; + case CurCursos.FINANCIADO_INDEX: + theClass = Boolean.class; + break; + case CurCursos.VALOR_INDEX: + theClass = Double.class; + break; + case CurCursos.RESPONSAVEL_ID_INDEX: + theClass = Integer.class; + break; + case CurCursos.DURACAO_INDEX: + theClass = String.class; + break; + case CurCursos.LIVRO_REGISTO_INDEX: + theClass = String.class; + break; + case CurCursos.LIVRO_NUMERO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurCursos._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, CurCursos.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurDias.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurDias.java new file mode 100644 index 00000000..c7198d9a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurDias.java @@ -0,0 +1,445 @@ +/* +* CurDias.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurDias extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurDias.ID, CurDias.ID_INDEX ); + FIELD_INDEXES.put( CurDias.ID_FULL, CurDias.ID_INDEX ); + FIELD_INDEXES.put( CurDias.DIA_DATE, CurDias.DIA_DATE_INDEX ); + FIELD_INDEXES.put( CurDias.DIA_DATE_FULL, CurDias.DIA_DATE_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurDias.CLASS_IDENTIFIER, CurDias.CURSO_ID, CurDias.TO_CURSO_ID ); + FIELD_INDEXES.put( CurDias.CURSO_ID, CurDias.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurDias.CURSO_ID_FULL, CurDias.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurDias.TO_CURSO_ID, CurDias.TO_CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurDias.DELETED_DATE, CurDias.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurDias.DELETED_DATE_FULL, CurDias.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 ForeignKeycurso_idTocur_cursos = + new com.evolute.entity.ForeignKey( CurDias.class, CurDias.CURSO_ID, db.data.siprp_local.outer.CurCursosData.class, db.data.siprp_local.outer.CurCursosData.ID ); + + public static final String TABLENAME = "cur_dias"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_dias"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_dias.id"; + public static final int ID_INDEX = 0; + public static final String DIA_DATE = "dia_date"; + public static final String DIA_DATE_FULL = "cur_dias.dia_date"; + public static final int DIA_DATE_INDEX = 1; + public static final String CURSO_ID = "curso_id"; + public static final String CURSO_ID_FULL = "cur_dias.curso_id"; + public static final int CURSO_ID_INDEX = 2; + public static final String TO_CURSO_ID = "to_curso_id"; + public static final String TO_CURSO_ID_FULL = "cur_dias.to_curso_id"; + public static final int TO_CURSO_ID_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_dias.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DIA_DATE, CURSO_ID, TO_CURSO_ID, DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DIA_DATE, TABLENAME + "." + CURSO_ID, TABLENAME + "." + TO_CURSO_ID, TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DIA_DATE, CURSO_ID, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DIA_DATE, CURSO_ID, DELETED_DATE, }; + + private Integer id; + private java.util.Date dia_date; + private Integer curso_id; + private db.data.siprp_local.outer.CurCursosData to_curso_id; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurDias() + { + 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.ListfromCurAulas_cur_dia_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurAulasData.class , getPrimaryKey().getMap().get("id"), "cur_dia_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.Date getDia_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DIA_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.dia_date; + } + + public void setDia_date( java.util.Date dia_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DIA_DATE, dia_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.dia_date = dia_date; + LAZY_LOADED_OBJECTS.put( DIA_DATE, Boolean.TRUE ); + } + + public Integer getCurso_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURSO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.curso_id; + } + + public void setCurso_id( Integer curso_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURSO_ID, curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.curso_id = curso_id; + LAZY_LOADED_OBJECTS.put( CURSO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurCursosData toCurso_id() + { + try + { + prepare( TO_CURSO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_curso_id; + } + + public void setToCurso_id( db.data.siprp_local.outer.CurCursosData to_curso_id ) + { + try + { + preProcess( TO_CURSO_ID, to_curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_curso_id = to_curso_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 CurDias.ID_INDEX: + value = getId(); + break; + case CurDias.DIA_DATE_INDEX: + value = getDia_date(); + break; + case CurDias.CURSO_ID_INDEX: + value = getCurso_id(); + break; + case CurDias.TO_CURSO_ID_INDEX: + value = toCurso_id(); + break; + case CurDias.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurDias.ID_INDEX: + value = this.id; + break; + case CurDias.DIA_DATE_INDEX: + value = this.dia_date; + break; + case CurDias.CURSO_ID_INDEX: + value = this.curso_id; + break; + case CurDias.TO_CURSO_ID_INDEX: + value = this.to_curso_id; + break; + case CurDias.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurDias.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurDias.DIA_DATE_INDEX: + setDia_date( ( java.util.Date ) value ); + break; + case CurDias.CURSO_ID_INDEX: + setCurso_id( ( Integer ) value ); + break; + case CurDias.TO_CURSO_ID_INDEX: + setToCurso_id( ( db.data.siprp_local.outer.CurCursosData ) value ); + break; + case CurDias.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurDias.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurDias.DIA_DATE_INDEX: + this.dia_date = ( java.util.Date ) value; + break; + case CurDias.CURSO_ID_INDEX: + this.curso_id = ( Integer ) value; + break; + case CurDias.TO_CURSO_ID_INDEX: + this.to_curso_id = ( db.data.siprp_local.outer.CurCursosData ) value; + break; + case CurDias.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 CurDias.ID_INDEX: + theClass = Integer.class; + break; + case CurDias.DIA_DATE_INDEX: + theClass = java.util.Date.class; + break; + case CurDias.CURSO_ID_INDEX: + theClass = Integer.class; + break; + case CurDias.TO_CURSO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurCursosData.class; + break; + case CurDias.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 : CurDias._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, CurDias.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurFormadores.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurFormadores.java new file mode 100644 index 00000000..c629697e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurFormadores.java @@ -0,0 +1,587 @@ +/* +* CurFormadores.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurFormadores extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurFormadores.ID, CurFormadores.ID_INDEX ); + FIELD_INDEXES.put( CurFormadores.ID_FULL, CurFormadores.ID_INDEX ); + FIELD_INDEXES.put( CurFormadores.DADOS_PESSOAS_ID, CurFormadores.DADOS_PESSOAS_ID_INDEX ); + FIELD_INDEXES.put( CurFormadores.DADOS_PESSOAS_ID_FULL, CurFormadores.DADOS_PESSOAS_ID_INDEX ); + FIELD_INDEXES.put( CurFormadores.DELETED_DATE, CurFormadores.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurFormadores.DELETED_DATE_FULL, CurFormadores.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurFormadores.NOME_PROFISSIONAL, CurFormadores.NOME_PROFISSIONAL_INDEX ); + FIELD_INDEXES.put( CurFormadores.NOME_PROFISSIONAL_FULL, CurFormadores.NOME_PROFISSIONAL_INDEX ); + FIELD_INDEXES.put( CurFormadores.HABILITACAO, CurFormadores.HABILITACAO_INDEX ); + FIELD_INDEXES.put( CurFormadores.HABILITACAO_FULL, CurFormadores.HABILITACAO_INDEX ); + FIELD_INDEXES.put( CurFormadores.CAP, CurFormadores.CAP_INDEX ); + FIELD_INDEXES.put( CurFormadores.CAP_FULL, CurFormadores.CAP_INDEX ); + FIELD_INDEXES.put( CurFormadores.CAP_TSHST, CurFormadores.CAP_TSHST_INDEX ); + FIELD_INDEXES.put( CurFormadores.CAP_TSHST_FULL, CurFormadores.CAP_TSHST_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "cur_formadores"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_formadores"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_formadores.id"; + public static final int ID_INDEX = 0; + public static final String DADOS_PESSOAS_ID = "dados_pessoas_id"; + public static final String DADOS_PESSOAS_ID_FULL = "cur_formadores.dados_pessoas_id"; + public static final int DADOS_PESSOAS_ID_INDEX = 1; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_formadores.deleted_date"; + public static final int DELETED_DATE_INDEX = 2; + public static final String NOME_PROFISSIONAL = "nome_profissional"; + public static final String NOME_PROFISSIONAL_FULL = "cur_formadores.nome_profissional"; + public static final int NOME_PROFISSIONAL_INDEX = 3; + public static final String HABILITACAO = "habilitacao"; + public static final String HABILITACAO_FULL = "cur_formadores.habilitacao"; + public static final int HABILITACAO_INDEX = 4; + public static final String CAP = "cap"; + public static final String CAP_FULL = "cur_formadores.cap"; + public static final int CAP_INDEX = 5; + public static final String CAP_TSHST = "cap_tshst"; + public static final String CAP_TSHST_FULL = "cur_formadores.cap_tshst"; + public static final int CAP_TSHST_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + DADOS_PESSOAS_ID, DELETED_DATE, NOME_PROFISSIONAL, HABILITACAO, CAP, CAP_TSHST, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DADOS_PESSOAS_ID, TABLENAME + "." + DELETED_DATE, TABLENAME + "." + NOME_PROFISSIONAL, TABLENAME + "." + HABILITACAO, TABLENAME + "." + CAP, TABLENAME + "." + CAP_TSHST, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DADOS_PESSOAS_ID, DELETED_DATE, NOME_PROFISSIONAL, HABILITACAO, CAP, CAP_TSHST, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DADOS_PESSOAS_ID, DELETED_DATE, NOME_PROFISSIONAL, HABILITACAO, CAP, CAP_TSHST, }; + + private Integer id; + private Integer dados_pessoas_id; + private java.sql.Timestamp deleted_date; + private String nome_profissional; + private String habilitacao; + private String cap; + private String cap_tshst; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurFormadores() + { + 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.ListfromCurAulasFormadores_formador_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurAulasFormadoresData.class , getPrimaryKey().getMap().get("id"), "formador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromCurFormadoresCursos_formador_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurFormadoresCursosData.class , getPrimaryKey().getMap().get("id"), "formador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromCurPresencas_formador_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurPresencasData.class , getPrimaryKey().getMap().get("id"), "formador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromCurTopicos_formador_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurTopicosData.class , getPrimaryKey().getMap().get("id"), "formador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public Integer getDados_pessoas_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DADOS_PESSOAS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.dados_pessoas_id; + } + + public void setDados_pessoas_id( Integer dados_pessoas_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( DADOS_PESSOAS_ID, dados_pessoas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.dados_pessoas_id = dados_pessoas_id; + LAZY_LOADED_OBJECTS.put( DADOS_PESSOAS_ID, 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 String getNome_profissional() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_PROFISSIONAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_profissional; + } + + public void setNome_profissional( String nome_profissional ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_PROFISSIONAL, nome_profissional ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_profissional = nome_profissional; + LAZY_LOADED_OBJECTS.put( NOME_PROFISSIONAL, Boolean.TRUE ); + } + + public String getHabilitacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HABILITACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.habilitacao; + } + + public void setHabilitacao( String habilitacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( HABILITACAO, habilitacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.habilitacao = habilitacao; + LAZY_LOADED_OBJECTS.put( HABILITACAO, 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 getCap_tshst() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CAP_TSHST ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.cap_tshst; + } + + public void setCap_tshst( String cap_tshst ) + { + try + { + setLockedForRefresh( true ); + preProcess( CAP_TSHST, cap_tshst ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.cap_tshst = cap_tshst; + LAZY_LOADED_OBJECTS.put( CAP_TSHST, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormadores.ID_INDEX: + value = getId(); + break; + case CurFormadores.DADOS_PESSOAS_ID_INDEX: + value = getDados_pessoas_id(); + break; + case CurFormadores.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case CurFormadores.NOME_PROFISSIONAL_INDEX: + value = getNome_profissional(); + break; + case CurFormadores.HABILITACAO_INDEX: + value = getHabilitacao(); + break; + case CurFormadores.CAP_INDEX: + value = getCap(); + break; + case CurFormadores.CAP_TSHST_INDEX: + value = getCap_tshst(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormadores.ID_INDEX: + value = this.id; + break; + case CurFormadores.DADOS_PESSOAS_ID_INDEX: + value = this.dados_pessoas_id; + break; + case CurFormadores.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case CurFormadores.NOME_PROFISSIONAL_INDEX: + value = this.nome_profissional; + break; + case CurFormadores.HABILITACAO_INDEX: + value = this.habilitacao; + break; + case CurFormadores.CAP_INDEX: + value = this.cap; + break; + case CurFormadores.CAP_TSHST_INDEX: + value = this.cap_tshst; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormadores.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurFormadores.DADOS_PESSOAS_ID_INDEX: + setDados_pessoas_id( ( Integer ) value ); + break; + case CurFormadores.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case CurFormadores.NOME_PROFISSIONAL_INDEX: + setNome_profissional( ( String ) value ); + break; + case CurFormadores.HABILITACAO_INDEX: + setHabilitacao( ( String ) value ); + break; + case CurFormadores.CAP_INDEX: + setCap( ( String ) value ); + break; + case CurFormadores.CAP_TSHST_INDEX: + setCap_tshst( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormadores.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurFormadores.DADOS_PESSOAS_ID_INDEX: + this.dados_pessoas_id = ( Integer ) value; + break; + case CurFormadores.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case CurFormadores.NOME_PROFISSIONAL_INDEX: + this.nome_profissional = ( String ) value; + break; + case CurFormadores.HABILITACAO_INDEX: + this.habilitacao = ( String ) value; + break; + case CurFormadores.CAP_INDEX: + this.cap = ( String ) value; + break; + case CurFormadores.CAP_TSHST_INDEX: + this.cap_tshst = ( 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 CurFormadores.ID_INDEX: + theClass = Integer.class; + break; + case CurFormadores.DADOS_PESSOAS_ID_INDEX: + theClass = Integer.class; + break; + case CurFormadores.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurFormadores.NOME_PROFISSIONAL_INDEX: + theClass = String.class; + break; + case CurFormadores.HABILITACAO_INDEX: + theClass = String.class; + break; + case CurFormadores.CAP_INDEX: + theClass = String.class; + break; + case CurFormadores.CAP_TSHST_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurFormadores._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, CurFormadores.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurFormadoresCursos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurFormadoresCursos.java new file mode 100644 index 00000000..9a4824d0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurFormadoresCursos.java @@ -0,0 +1,481 @@ +/* +* CurFormadoresCursos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurFormadoresCursos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( CurFormadoresCursos.CLASS_IDENTIFIER, CurFormadoresCursos.FORMADOR_ID, CurFormadoresCursos.TO_FORMADOR_ID ); + FIELD_INDEXES.put( CurFormadoresCursos.FORMADOR_ID, CurFormadoresCursos.FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurFormadoresCursos.FORMADOR_ID_FULL, CurFormadoresCursos.FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurFormadoresCursos.TO_FORMADOR_ID, CurFormadoresCursos.TO_FORMADOR_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurFormadoresCursos.CLASS_IDENTIFIER, CurFormadoresCursos.CURSO_ID, CurFormadoresCursos.TO_CURSO_ID ); + FIELD_INDEXES.put( CurFormadoresCursos.CURSO_ID, CurFormadoresCursos.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurFormadoresCursos.CURSO_ID_FULL, CurFormadoresCursos.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurFormadoresCursos.TO_CURSO_ID, CurFormadoresCursos.TO_CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurFormadoresCursos.HORAS, CurFormadoresCursos.HORAS_INDEX ); + FIELD_INDEXES.put( CurFormadoresCursos.HORAS_FULL, CurFormadoresCursos.HORAS_INDEX ); + FIELD_INDEXES.put( CurFormadoresCursos.NUMERO_CERTIFICADO, CurFormadoresCursos.NUMERO_CERTIFICADO_INDEX ); + FIELD_INDEXES.put( CurFormadoresCursos.NUMERO_CERTIFICADO_FULL, CurFormadoresCursos.NUMERO_CERTIFICADO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyformador_idTocur_formadores = + new com.evolute.entity.ForeignKey( CurFormadoresCursos.class, CurFormadoresCursos.FORMADOR_ID, db.data.siprp_local.outer.CurFormadoresData.class, db.data.siprp_local.outer.CurFormadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycurso_idTocur_cursos = + new com.evolute.entity.ForeignKey( CurFormadoresCursos.class, CurFormadoresCursos.CURSO_ID, db.data.siprp_local.outer.CurCursosData.class, db.data.siprp_local.outer.CurCursosData.ID ); + + public static final String TABLENAME = "cur_formadores_cursos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_formadores_cursos"; + + public static final int _INVALID__INDEX = -1; + public static final String FORMADOR_ID = "formador_id"; + public static final String FORMADOR_ID_FULL = "cur_formadores_cursos.formador_id"; + public static final int FORMADOR_ID_INDEX = 0; + public static final String TO_FORMADOR_ID = "to_formador_id"; + public static final String TO_FORMADOR_ID_FULL = "cur_formadores_cursos.to_formador_id"; + public static final int TO_FORMADOR_ID_INDEX = 1; + public static final String CURSO_ID = "curso_id"; + public static final String CURSO_ID_FULL = "cur_formadores_cursos.curso_id"; + public static final int CURSO_ID_INDEX = 2; + public static final String TO_CURSO_ID = "to_curso_id"; + public static final String TO_CURSO_ID_FULL = "cur_formadores_cursos.to_curso_id"; + public static final int TO_CURSO_ID_INDEX = 3; + public static final String HORAS = "horas"; + public static final String HORAS_FULL = "cur_formadores_cursos.horas"; + public static final int HORAS_INDEX = 4; + public static final String NUMERO_CERTIFICADO = "numero_certificado"; + public static final String NUMERO_CERTIFICADO_FULL = "cur_formadores_cursos.numero_certificado"; + public static final int NUMERO_CERTIFICADO_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + HORAS, NUMERO_CERTIFICADO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + HORAS, TABLENAME + "." + NUMERO_CERTIFICADO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + FORMADOR_ID, CURSO_ID, HORAS, NUMERO_CERTIFICADO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + FORMADOR_ID, CURSO_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + FORMADOR_ID, CURSO_ID, HORAS, NUMERO_CERTIFICADO, }; + + private Integer formador_id; + private db.data.siprp_local.outer.CurFormadoresData to_formador_id; + private Integer curso_id; + private db.data.siprp_local.outer.CurCursosData to_curso_id; + private Integer horas; + private Integer numero_certificado; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurFormadoresCursos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false, false }; + } + + public Integer getFormador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formador_id; + } + + public void setFormador_id( Integer formador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMADOR_ID, formador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formador_id = formador_id; + LAZY_LOADED_OBJECTS.put( FORMADOR_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurFormadoresData toFormador_id() + { + try + { + prepare( TO_FORMADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_formador_id; + } + + public void setToFormador_id( db.data.siprp_local.outer.CurFormadoresData to_formador_id ) + { + try + { + preProcess( TO_FORMADOR_ID, to_formador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_formador_id = to_formador_id; + } + + public Integer getCurso_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURSO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.curso_id; + } + + public void setCurso_id( Integer curso_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURSO_ID, curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.curso_id = curso_id; + LAZY_LOADED_OBJECTS.put( CURSO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurCursosData toCurso_id() + { + try + { + prepare( TO_CURSO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_curso_id; + } + + public void setToCurso_id( db.data.siprp_local.outer.CurCursosData to_curso_id ) + { + try + { + preProcess( TO_CURSO_ID, to_curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_curso_id = to_curso_id; + } + + public Integer getHoras() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HORAS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.horas; + } + + public void setHoras( Integer horas ) + { + try + { + setLockedForRefresh( true ); + preProcess( HORAS, horas ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.horas = horas; + LAZY_LOADED_OBJECTS.put( HORAS, Boolean.TRUE ); + } + + public Integer getNumero_certificado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NUMERO_CERTIFICADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.numero_certificado; + } + + public void setNumero_certificado( Integer numero_certificado ) + { + try + { + setLockedForRefresh( true ); + preProcess( NUMERO_CERTIFICADO, numero_certificado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.numero_certificado = numero_certificado; + LAZY_LOADED_OBJECTS.put( NUMERO_CERTIFICADO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormadoresCursos.FORMADOR_ID_INDEX: + value = getFormador_id(); + break; + case CurFormadoresCursos.TO_FORMADOR_ID_INDEX: + value = toFormador_id(); + break; + case CurFormadoresCursos.CURSO_ID_INDEX: + value = getCurso_id(); + break; + case CurFormadoresCursos.TO_CURSO_ID_INDEX: + value = toCurso_id(); + break; + case CurFormadoresCursos.HORAS_INDEX: + value = getHoras(); + break; + case CurFormadoresCursos.NUMERO_CERTIFICADO_INDEX: + value = getNumero_certificado(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormadoresCursos.FORMADOR_ID_INDEX: + value = this.formador_id; + break; + case CurFormadoresCursos.TO_FORMADOR_ID_INDEX: + value = this.to_formador_id; + break; + case CurFormadoresCursos.CURSO_ID_INDEX: + value = this.curso_id; + break; + case CurFormadoresCursos.TO_CURSO_ID_INDEX: + value = this.to_curso_id; + break; + case CurFormadoresCursos.HORAS_INDEX: + value = this.horas; + break; + case CurFormadoresCursos.NUMERO_CERTIFICADO_INDEX: + value = this.numero_certificado; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormadoresCursos.FORMADOR_ID_INDEX: + setFormador_id( ( Integer ) value ); + break; + case CurFormadoresCursos.TO_FORMADOR_ID_INDEX: + setToFormador_id( ( db.data.siprp_local.outer.CurFormadoresData ) value ); + break; + case CurFormadoresCursos.CURSO_ID_INDEX: + setCurso_id( ( Integer ) value ); + break; + case CurFormadoresCursos.TO_CURSO_ID_INDEX: + setToCurso_id( ( db.data.siprp_local.outer.CurCursosData ) value ); + break; + case CurFormadoresCursos.HORAS_INDEX: + setHoras( ( Integer ) value ); + break; + case CurFormadoresCursos.NUMERO_CERTIFICADO_INDEX: + setNumero_certificado( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormadoresCursos.FORMADOR_ID_INDEX: + this.formador_id = ( Integer ) value; + break; + case CurFormadoresCursos.TO_FORMADOR_ID_INDEX: + this.to_formador_id = ( db.data.siprp_local.outer.CurFormadoresData ) value; + break; + case CurFormadoresCursos.CURSO_ID_INDEX: + this.curso_id = ( Integer ) value; + break; + case CurFormadoresCursos.TO_CURSO_ID_INDEX: + this.to_curso_id = ( db.data.siprp_local.outer.CurCursosData ) value; + break; + case CurFormadoresCursos.HORAS_INDEX: + this.horas = ( Integer ) value; + break; + case CurFormadoresCursos.NUMERO_CERTIFICADO_INDEX: + this.numero_certificado = ( 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 CurFormadoresCursos is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case CurFormadoresCursos.FORMADOR_ID_INDEX: + theClass = Integer.class; + break; + case CurFormadoresCursos.TO_FORMADOR_ID_INDEX: + theClass = db.data.siprp_local.outer.CurFormadoresData.class; + break; + case CurFormadoresCursos.CURSO_ID_INDEX: + theClass = Integer.class; + break; + case CurFormadoresCursos.TO_CURSO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurCursosData.class; + break; + case CurFormadoresCursos.HORAS_INDEX: + theClass = Integer.class; + break; + case CurFormadoresCursos.NUMERO_CERTIFICADO_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurFormadoresCursos._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, CurFormadoresCursos.PK_FIELD_NAMES ); + primaryKey.set( 0, getFormador_id() ); + primaryKey.set( 1, getCurso_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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurFormandos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurFormandos.java new file mode 100644 index 00000000..b5a55cf6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurFormandos.java @@ -0,0 +1,625 @@ +/* +* CurFormandos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurFormandos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurFormandos.ID, CurFormandos.ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.ID_FULL, CurFormandos.ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.DADOS_PESSOAS_ID, CurFormandos.DADOS_PESSOAS_ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.DADOS_PESSOAS_ID_FULL, CurFormandos.DADOS_PESSOAS_ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.DELETED_DATE, CurFormandos.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurFormandos.DELETED_DATE_FULL, CurFormandos.DELETED_DATE_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurFormandos.CLASS_IDENTIFIER, CurFormandos.HOSPITAL_ID, CurFormandos.TO_HOSPITAL_ID ); + FIELD_INDEXES.put( CurFormandos.HOSPITAL_ID, CurFormandos.HOSPITAL_ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.HOSPITAL_ID_FULL, CurFormandos.HOSPITAL_ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.TO_HOSPITAL_ID, CurFormandos.TO_HOSPITAL_ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.SUB_REGIAO_ID, CurFormandos.SUB_REGIAO_ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.SUB_REGIAO_ID_FULL, CurFormandos.SUB_REGIAO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurFormandos.CLASS_IDENTIFIER, CurFormandos.ARS_ID, CurFormandos.TO_ARS_ID ); + FIELD_INDEXES.put( CurFormandos.ARS_ID, CurFormandos.ARS_ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.ARS_ID_FULL, CurFormandos.ARS_ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.TO_ARS_ID, CurFormandos.TO_ARS_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 ForeignKeyhospital_idTocur_hospitais = + new com.evolute.entity.ForeignKey( CurFormandos.class, CurFormandos.HOSPITAL_ID, db.data.siprp_local.outer.CurHospitaisData.class, db.data.siprp_local.outer.CurHospitaisData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyars_idTocur_ars = + new com.evolute.entity.ForeignKey( CurFormandos.class, CurFormandos.ARS_ID, db.data.siprp_local.outer.CurArsData.class, db.data.siprp_local.outer.CurArsData.ID ); + + public static final String TABLENAME = "cur_formandos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_formandos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_formandos.id"; + public static final int ID_INDEX = 0; + public static final String DADOS_PESSOAS_ID = "dados_pessoas_id"; + public static final String DADOS_PESSOAS_ID_FULL = "cur_formandos.dados_pessoas_id"; + public static final int DADOS_PESSOAS_ID_INDEX = 1; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_formandos.deleted_date"; + public static final int DELETED_DATE_INDEX = 2; + public static final String HOSPITAL_ID = "hospital_id"; + public static final String HOSPITAL_ID_FULL = "cur_formandos.hospital_id"; + public static final int HOSPITAL_ID_INDEX = 3; + public static final String TO_HOSPITAL_ID = "to_hospital_id"; + public static final String TO_HOSPITAL_ID_FULL = "cur_formandos.to_hospital_id"; + public static final int TO_HOSPITAL_ID_INDEX = 4; + public static final String SUB_REGIAO_ID = "sub_regiao_id"; + public static final String SUB_REGIAO_ID_FULL = "cur_formandos.sub_regiao_id"; + public static final int SUB_REGIAO_ID_INDEX = 5; + public static final String ARS_ID = "ars_id"; + public static final String ARS_ID_FULL = "cur_formandos.ars_id"; + public static final int ARS_ID_INDEX = 6; + public static final String TO_ARS_ID = "to_ars_id"; + public static final String TO_ARS_ID_FULL = "cur_formandos.to_ars_id"; + public static final int TO_ARS_ID_INDEX = 7; + + public static final String FIELD_NAMES[] = new String[]{ + DADOS_PESSOAS_ID, DELETED_DATE, HOSPITAL_ID, TO_HOSPITAL_ID, SUB_REGIAO_ID, + ARS_ID, TO_ARS_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DADOS_PESSOAS_ID, TABLENAME + "." + DELETED_DATE, TABLENAME + "." + HOSPITAL_ID, TABLENAME + "." + TO_HOSPITAL_ID, TABLENAME + "." + SUB_REGIAO_ID, + TABLENAME + "." + ARS_ID, TABLENAME + "." + TO_ARS_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DADOS_PESSOAS_ID, DELETED_DATE, HOSPITAL_ID, SUB_REGIAO_ID, ARS_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DADOS_PESSOAS_ID, DELETED_DATE, HOSPITAL_ID, SUB_REGIAO_ID, ARS_ID, }; + + private Integer id; + private Integer dados_pessoas_id; + private java.sql.Timestamp deleted_date; + private Integer hospital_id; + private db.data.siprp_local.outer.CurHospitaisData to_hospital_id; + private Integer sub_regiao_id; + private Integer ars_id; + private db.data.siprp_local.outer.CurArsData to_ars_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurFormandos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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.ListfromCurFormandosCursos_formando_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurFormandosCursosData.class , getPrimaryKey().getMap().get("id"), "formando_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromCurPagamentos_formando_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurPagamentosData.class , getPrimaryKey().getMap().get("id"), "formando_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromCurPresencas_formando_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurPresencasData.class , getPrimaryKey().getMap().get("id"), "formando_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public Integer getDados_pessoas_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DADOS_PESSOAS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.dados_pessoas_id; + } + + public void setDados_pessoas_id( Integer dados_pessoas_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( DADOS_PESSOAS_ID, dados_pessoas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.dados_pessoas_id = dados_pessoas_id; + LAZY_LOADED_OBJECTS.put( DADOS_PESSOAS_ID, 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 getHospital_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HOSPITAL_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.hospital_id; + } + + public void setHospital_id( Integer hospital_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( HOSPITAL_ID, hospital_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.hospital_id = hospital_id; + LAZY_LOADED_OBJECTS.put( HOSPITAL_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurHospitaisData toHospital_id() + { + try + { + prepare( TO_HOSPITAL_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_hospital_id; + } + + public void setToHospital_id( db.data.siprp_local.outer.CurHospitaisData to_hospital_id ) + { + try + { + preProcess( TO_HOSPITAL_ID, to_hospital_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_hospital_id = to_hospital_id; + } + + public Integer getSub_regiao_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SUB_REGIAO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.sub_regiao_id; + } + + public void setSub_regiao_id( Integer sub_regiao_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( SUB_REGIAO_ID, sub_regiao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.sub_regiao_id = sub_regiao_id; + LAZY_LOADED_OBJECTS.put( SUB_REGIAO_ID, Boolean.TRUE ); + } + + public Integer getArs_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ARS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ars_id; + } + + public void setArs_id( Integer ars_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ARS_ID, ars_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ars_id = ars_id; + LAZY_LOADED_OBJECTS.put( ARS_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurArsData toArs_id() + { + try + { + prepare( TO_ARS_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_ars_id; + } + + public void setToArs_id( db.data.siprp_local.outer.CurArsData to_ars_id ) + { + try + { + preProcess( TO_ARS_ID, to_ars_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_ars_id = to_ars_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormandos.ID_INDEX: + value = getId(); + break; + case CurFormandos.DADOS_PESSOAS_ID_INDEX: + value = getDados_pessoas_id(); + break; + case CurFormandos.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case CurFormandos.HOSPITAL_ID_INDEX: + value = getHospital_id(); + break; + case CurFormandos.TO_HOSPITAL_ID_INDEX: + value = toHospital_id(); + break; + case CurFormandos.SUB_REGIAO_ID_INDEX: + value = getSub_regiao_id(); + break; + case CurFormandos.ARS_ID_INDEX: + value = getArs_id(); + break; + case CurFormandos.TO_ARS_ID_INDEX: + value = toArs_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormandos.ID_INDEX: + value = this.id; + break; + case CurFormandos.DADOS_PESSOAS_ID_INDEX: + value = this.dados_pessoas_id; + break; + case CurFormandos.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case CurFormandos.HOSPITAL_ID_INDEX: + value = this.hospital_id; + break; + case CurFormandos.TO_HOSPITAL_ID_INDEX: + value = this.to_hospital_id; + break; + case CurFormandos.SUB_REGIAO_ID_INDEX: + value = this.sub_regiao_id; + break; + case CurFormandos.ARS_ID_INDEX: + value = this.ars_id; + break; + case CurFormandos.TO_ARS_ID_INDEX: + value = this.to_ars_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormandos.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurFormandos.DADOS_PESSOAS_ID_INDEX: + setDados_pessoas_id( ( Integer ) value ); + break; + case CurFormandos.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case CurFormandos.HOSPITAL_ID_INDEX: + setHospital_id( ( Integer ) value ); + break; + case CurFormandos.TO_HOSPITAL_ID_INDEX: + setToHospital_id( ( db.data.siprp_local.outer.CurHospitaisData ) value ); + break; + case CurFormandos.SUB_REGIAO_ID_INDEX: + setSub_regiao_id( ( Integer ) value ); + break; + case CurFormandos.ARS_ID_INDEX: + setArs_id( ( Integer ) value ); + break; + case CurFormandos.TO_ARS_ID_INDEX: + setToArs_id( ( db.data.siprp_local.outer.CurArsData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormandos.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurFormandos.DADOS_PESSOAS_ID_INDEX: + this.dados_pessoas_id = ( Integer ) value; + break; + case CurFormandos.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case CurFormandos.HOSPITAL_ID_INDEX: + this.hospital_id = ( Integer ) value; + break; + case CurFormandos.TO_HOSPITAL_ID_INDEX: + this.to_hospital_id = ( db.data.siprp_local.outer.CurHospitaisData ) value; + break; + case CurFormandos.SUB_REGIAO_ID_INDEX: + this.sub_regiao_id = ( Integer ) value; + break; + case CurFormandos.ARS_ID_INDEX: + this.ars_id = ( Integer ) value; + break; + case CurFormandos.TO_ARS_ID_INDEX: + this.to_ars_id = ( db.data.siprp_local.outer.CurArsData ) 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 CurFormandos.ID_INDEX: + theClass = Integer.class; + break; + case CurFormandos.DADOS_PESSOAS_ID_INDEX: + theClass = Integer.class; + break; + case CurFormandos.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurFormandos.HOSPITAL_ID_INDEX: + theClass = Integer.class; + break; + case CurFormandos.TO_HOSPITAL_ID_INDEX: + theClass = db.data.siprp_local.outer.CurHospitaisData.class; + break; + case CurFormandos.SUB_REGIAO_ID_INDEX: + theClass = Integer.class; + break; + case CurFormandos.ARS_ID_INDEX: + theClass = Integer.class; + break; + case CurFormandos.TO_ARS_ID_INDEX: + theClass = db.data.siprp_local.outer.CurArsData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurFormandos._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, CurFormandos.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurFormandosCursos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurFormandosCursos.java new file mode 100644 index 00000000..b61a9546 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurFormandosCursos.java @@ -0,0 +1,583 @@ +/* +* CurFormandosCursos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurFormandosCursos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( CurFormandosCursos.CLASS_IDENTIFIER, CurFormandosCursos.FORMANDO_ID, CurFormandosCursos.TO_FORMANDO_ID ); + FIELD_INDEXES.put( CurFormandosCursos.FORMANDO_ID, CurFormandosCursos.FORMANDO_ID_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.FORMANDO_ID_FULL, CurFormandosCursos.FORMANDO_ID_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.TO_FORMANDO_ID, CurFormandosCursos.TO_FORMANDO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurFormandosCursos.CLASS_IDENTIFIER, CurFormandosCursos.CURSO_ID, CurFormandosCursos.TO_CURSO_ID ); + FIELD_INDEXES.put( CurFormandosCursos.CURSO_ID, CurFormandosCursos.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.CURSO_ID_FULL, CurFormandosCursos.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.TO_CURSO_ID, CurFormandosCursos.TO_CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.INSCRITO_DATE, CurFormandosCursos.INSCRITO_DATE_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.INSCRITO_DATE_FULL, CurFormandosCursos.INSCRITO_DATE_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.REJEITADO_DATE, CurFormandosCursos.REJEITADO_DATE_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.REJEITADO_DATE_FULL, CurFormandosCursos.REJEITADO_DATE_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.DESISTIU_DATE, CurFormandosCursos.DESISTIU_DATE_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.DESISTIU_DATE_FULL, CurFormandosCursos.DESISTIU_DATE_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.NUMERO_CERTIFICADO, CurFormandosCursos.NUMERO_CERTIFICADO_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.NUMERO_CERTIFICADO_FULL, CurFormandosCursos.NUMERO_CERTIFICADO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyformando_idTocur_formandos = + new com.evolute.entity.ForeignKey( CurFormandosCursos.class, CurFormandosCursos.FORMANDO_ID, db.data.siprp_local.outer.CurFormandosData.class, db.data.siprp_local.outer.CurFormandosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycurso_idTocur_cursos = + new com.evolute.entity.ForeignKey( CurFormandosCursos.class, CurFormandosCursos.CURSO_ID, db.data.siprp_local.outer.CurCursosData.class, db.data.siprp_local.outer.CurCursosData.ID ); + + public static final String TABLENAME = "cur_formandos_cursos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_formandos_cursos"; + + public static final int _INVALID__INDEX = -1; + public static final String FORMANDO_ID = "formando_id"; + public static final String FORMANDO_ID_FULL = "cur_formandos_cursos.formando_id"; + public static final int FORMANDO_ID_INDEX = 0; + public static final String TO_FORMANDO_ID = "to_formando_id"; + public static final String TO_FORMANDO_ID_FULL = "cur_formandos_cursos.to_formando_id"; + public static final int TO_FORMANDO_ID_INDEX = 1; + public static final String CURSO_ID = "curso_id"; + public static final String CURSO_ID_FULL = "cur_formandos_cursos.curso_id"; + public static final int CURSO_ID_INDEX = 2; + public static final String TO_CURSO_ID = "to_curso_id"; + public static final String TO_CURSO_ID_FULL = "cur_formandos_cursos.to_curso_id"; + public static final int TO_CURSO_ID_INDEX = 3; + public static final String INSCRITO_DATE = "inscrito_date"; + public static final String INSCRITO_DATE_FULL = "cur_formandos_cursos.inscrito_date"; + public static final int INSCRITO_DATE_INDEX = 4; + public static final String REJEITADO_DATE = "rejeitado_date"; + public static final String REJEITADO_DATE_FULL = "cur_formandos_cursos.rejeitado_date"; + public static final int REJEITADO_DATE_INDEX = 5; + public static final String DESISTIU_DATE = "desistiu_date"; + public static final String DESISTIU_DATE_FULL = "cur_formandos_cursos.desistiu_date"; + public static final int DESISTIU_DATE_INDEX = 6; + public static final String NUMERO_CERTIFICADO = "numero_certificado"; + public static final String NUMERO_CERTIFICADO_FULL = "cur_formandos_cursos.numero_certificado"; + public static final int NUMERO_CERTIFICADO_INDEX = 7; + + public static final String FIELD_NAMES[] = new String[]{ + INSCRITO_DATE, REJEITADO_DATE, DESISTIU_DATE, NUMERO_CERTIFICADO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + INSCRITO_DATE, TABLENAME + "." + REJEITADO_DATE, TABLENAME + "." + DESISTIU_DATE, TABLENAME + "." + NUMERO_CERTIFICADO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + FORMANDO_ID, CURSO_ID, INSCRITO_DATE, REJEITADO_DATE, DESISTIU_DATE, + NUMERO_CERTIFICADO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + FORMANDO_ID, CURSO_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + FORMANDO_ID, CURSO_ID, INSCRITO_DATE, REJEITADO_DATE, DESISTIU_DATE, + NUMERO_CERTIFICADO, }; + + private Integer formando_id; + private db.data.siprp_local.outer.CurFormandosData to_formando_id; + private Integer curso_id; + private db.data.siprp_local.outer.CurCursosData to_curso_id; + private java.sql.Timestamp inscrito_date; + private java.sql.Timestamp rejeitado_date; + private java.sql.Timestamp desistiu_date; + private Integer numero_certificado; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurFormandosCursos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false, false, false, false }; + } + + public Integer getFormando_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMANDO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formando_id; + } + + public void setFormando_id( Integer formando_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMANDO_ID, formando_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formando_id = formando_id; + LAZY_LOADED_OBJECTS.put( FORMANDO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurFormandosData toFormando_id() + { + try + { + prepare( TO_FORMANDO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_formando_id; + } + + public void setToFormando_id( db.data.siprp_local.outer.CurFormandosData to_formando_id ) + { + try + { + preProcess( TO_FORMANDO_ID, to_formando_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_formando_id = to_formando_id; + } + + public Integer getCurso_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURSO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.curso_id; + } + + public void setCurso_id( Integer curso_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURSO_ID, curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.curso_id = curso_id; + LAZY_LOADED_OBJECTS.put( CURSO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurCursosData toCurso_id() + { + try + { + prepare( TO_CURSO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_curso_id; + } + + public void setToCurso_id( db.data.siprp_local.outer.CurCursosData to_curso_id ) + { + try + { + preProcess( TO_CURSO_ID, to_curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_curso_id = to_curso_id; + } + + public java.sql.Timestamp getInscrito_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( INSCRITO_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.inscrito_date; + } + + public void setInscrito_date( java.sql.Timestamp inscrito_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( INSCRITO_DATE, inscrito_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.inscrito_date = inscrito_date; + LAZY_LOADED_OBJECTS.put( INSCRITO_DATE, Boolean.TRUE ); + } + + public java.sql.Timestamp getRejeitado_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( REJEITADO_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.rejeitado_date; + } + + public void setRejeitado_date( java.sql.Timestamp rejeitado_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( REJEITADO_DATE, rejeitado_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.rejeitado_date = rejeitado_date; + LAZY_LOADED_OBJECTS.put( REJEITADO_DATE, Boolean.TRUE ); + } + + public java.sql.Timestamp getDesistiu_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESISTIU_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.desistiu_date; + } + + public void setDesistiu_date( java.sql.Timestamp desistiu_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DESISTIU_DATE, desistiu_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.desistiu_date = desistiu_date; + LAZY_LOADED_OBJECTS.put( DESISTIU_DATE, Boolean.TRUE ); + } + + public Integer getNumero_certificado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NUMERO_CERTIFICADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.numero_certificado; + } + + public void setNumero_certificado( Integer numero_certificado ) + { + try + { + setLockedForRefresh( true ); + preProcess( NUMERO_CERTIFICADO, numero_certificado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.numero_certificado = numero_certificado; + LAZY_LOADED_OBJECTS.put( NUMERO_CERTIFICADO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormandosCursos.FORMANDO_ID_INDEX: + value = getFormando_id(); + break; + case CurFormandosCursos.TO_FORMANDO_ID_INDEX: + value = toFormando_id(); + break; + case CurFormandosCursos.CURSO_ID_INDEX: + value = getCurso_id(); + break; + case CurFormandosCursos.TO_CURSO_ID_INDEX: + value = toCurso_id(); + break; + case CurFormandosCursos.INSCRITO_DATE_INDEX: + value = getInscrito_date(); + break; + case CurFormandosCursos.REJEITADO_DATE_INDEX: + value = getRejeitado_date(); + break; + case CurFormandosCursos.DESISTIU_DATE_INDEX: + value = getDesistiu_date(); + break; + case CurFormandosCursos.NUMERO_CERTIFICADO_INDEX: + value = getNumero_certificado(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormandosCursos.FORMANDO_ID_INDEX: + value = this.formando_id; + break; + case CurFormandosCursos.TO_FORMANDO_ID_INDEX: + value = this.to_formando_id; + break; + case CurFormandosCursos.CURSO_ID_INDEX: + value = this.curso_id; + break; + case CurFormandosCursos.TO_CURSO_ID_INDEX: + value = this.to_curso_id; + break; + case CurFormandosCursos.INSCRITO_DATE_INDEX: + value = this.inscrito_date; + break; + case CurFormandosCursos.REJEITADO_DATE_INDEX: + value = this.rejeitado_date; + break; + case CurFormandosCursos.DESISTIU_DATE_INDEX: + value = this.desistiu_date; + break; + case CurFormandosCursos.NUMERO_CERTIFICADO_INDEX: + value = this.numero_certificado; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormandosCursos.FORMANDO_ID_INDEX: + setFormando_id( ( Integer ) value ); + break; + case CurFormandosCursos.TO_FORMANDO_ID_INDEX: + setToFormando_id( ( db.data.siprp_local.outer.CurFormandosData ) value ); + break; + case CurFormandosCursos.CURSO_ID_INDEX: + setCurso_id( ( Integer ) value ); + break; + case CurFormandosCursos.TO_CURSO_ID_INDEX: + setToCurso_id( ( db.data.siprp_local.outer.CurCursosData ) value ); + break; + case CurFormandosCursos.INSCRITO_DATE_INDEX: + setInscrito_date( ( java.sql.Timestamp ) value ); + break; + case CurFormandosCursos.REJEITADO_DATE_INDEX: + setRejeitado_date( ( java.sql.Timestamp ) value ); + break; + case CurFormandosCursos.DESISTIU_DATE_INDEX: + setDesistiu_date( ( java.sql.Timestamp ) value ); + break; + case CurFormandosCursos.NUMERO_CERTIFICADO_INDEX: + setNumero_certificado( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormandosCursos.FORMANDO_ID_INDEX: + this.formando_id = ( Integer ) value; + break; + case CurFormandosCursos.TO_FORMANDO_ID_INDEX: + this.to_formando_id = ( db.data.siprp_local.outer.CurFormandosData ) value; + break; + case CurFormandosCursos.CURSO_ID_INDEX: + this.curso_id = ( Integer ) value; + break; + case CurFormandosCursos.TO_CURSO_ID_INDEX: + this.to_curso_id = ( db.data.siprp_local.outer.CurCursosData ) value; + break; + case CurFormandosCursos.INSCRITO_DATE_INDEX: + this.inscrito_date = ( java.sql.Timestamp ) value; + break; + case CurFormandosCursos.REJEITADO_DATE_INDEX: + this.rejeitado_date = ( java.sql.Timestamp ) value; + break; + case CurFormandosCursos.DESISTIU_DATE_INDEX: + this.desistiu_date = ( java.sql.Timestamp ) value; + break; + case CurFormandosCursos.NUMERO_CERTIFICADO_INDEX: + this.numero_certificado = ( 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 CurFormandosCursos is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case CurFormandosCursos.FORMANDO_ID_INDEX: + theClass = Integer.class; + break; + case CurFormandosCursos.TO_FORMANDO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurFormandosData.class; + break; + case CurFormandosCursos.CURSO_ID_INDEX: + theClass = Integer.class; + break; + case CurFormandosCursos.TO_CURSO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurCursosData.class; + break; + case CurFormandosCursos.INSCRITO_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurFormandosCursos.REJEITADO_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurFormandosCursos.DESISTIU_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurFormandosCursos.NUMERO_CERTIFICADO_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurFormandosCursos._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, CurFormandosCursos.PK_FIELD_NAMES ); + primaryKey.set( 0, getFormando_id() ); + primaryKey.set( 1, getCurso_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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurHospitais.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurHospitais.java new file mode 100644 index 00000000..63ff84a4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurHospitais.java @@ -0,0 +1,293 @@ +/* +* CurHospitais.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurHospitais extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurHospitais.ID, CurHospitais.ID_INDEX ); + FIELD_INDEXES.put( CurHospitais.ID_FULL, CurHospitais.ID_INDEX ); + FIELD_INDEXES.put( CurHospitais.NOME, CurHospitais.NOME_INDEX ); + FIELD_INDEXES.put( CurHospitais.NOME_FULL, CurHospitais.NOME_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "cur_hospitais"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_hospitais"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_hospitais.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "cur_hospitais.nome"; + public static final int NOME_INDEX = 1; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, }; + + private Integer id; + private String nome; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurHospitais() + { + 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.ListfromCurFormandos_hospital_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurFormandosData.class , getPrimaryKey().getMap().get("id"), "hospital_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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurHospitais.ID_INDEX: + value = getId(); + break; + case CurHospitais.NOME_INDEX: + value = getNome(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurHospitais.ID_INDEX: + value = this.id; + break; + case CurHospitais.NOME_INDEX: + value = this.nome; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurHospitais.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurHospitais.NOME_INDEX: + setNome( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurHospitais.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurHospitais.NOME_INDEX: + this.nome = ( 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 CurHospitais.ID_INDEX: + theClass = Integer.class; + break; + case CurHospitais.NOME_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurHospitais._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, CurHospitais.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurNumeroCertificado.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurNumeroCertificado.java new file mode 100644 index 00000000..ce70bcf2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurNumeroCertificado.java @@ -0,0 +1,330 @@ +/* +* CurNumeroCertificado.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurNumeroCertificado extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurNumeroCertificado.ID, CurNumeroCertificado.ID_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificado.ID_FULL, CurNumeroCertificado.ID_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificado.ANO, CurNumeroCertificado.ANO_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificado.ANO_FULL, CurNumeroCertificado.ANO_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificado.ULTIMO_NUMERO, CurNumeroCertificado.ULTIMO_NUMERO_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificado.ULTIMO_NUMERO_FULL, CurNumeroCertificado.ULTIMO_NUMERO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "cur_numero_certificado"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_numero_certificado"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_numero_certificado.id"; + public static final int ID_INDEX = 0; + public static final String ANO = "ano"; + public static final String ANO_FULL = "cur_numero_certificado.ano"; + public static final int ANO_INDEX = 1; + public static final String ULTIMO_NUMERO = "ultimo_numero"; + public static final String ULTIMO_NUMERO_FULL = "cur_numero_certificado.ultimo_numero"; + public static final int ULTIMO_NUMERO_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + ANO, ULTIMO_NUMERO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ANO, TABLENAME + "." + ULTIMO_NUMERO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ANO, ULTIMO_NUMERO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ANO, ULTIMO_NUMERO, }; + + private Integer id; + private Integer ano; + private Integer ultimo_numero; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurNumeroCertificado() + { + 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 Integer getAno() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ANO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ano; + } + + public void setAno( Integer ano ) + { + try + { + setLockedForRefresh( true ); + preProcess( ANO, ano ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ano = ano; + LAZY_LOADED_OBJECTS.put( ANO, Boolean.TRUE ); + } + + public Integer getUltimo_numero() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ULTIMO_NUMERO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ultimo_numero; + } + + public void setUltimo_numero( Integer ultimo_numero ) + { + try + { + setLockedForRefresh( true ); + preProcess( ULTIMO_NUMERO, ultimo_numero ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ultimo_numero = ultimo_numero; + LAZY_LOADED_OBJECTS.put( ULTIMO_NUMERO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurNumeroCertificado.ID_INDEX: + value = getId(); + break; + case CurNumeroCertificado.ANO_INDEX: + value = getAno(); + break; + case CurNumeroCertificado.ULTIMO_NUMERO_INDEX: + value = getUltimo_numero(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurNumeroCertificado.ID_INDEX: + value = this.id; + break; + case CurNumeroCertificado.ANO_INDEX: + value = this.ano; + break; + case CurNumeroCertificado.ULTIMO_NUMERO_INDEX: + value = this.ultimo_numero; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurNumeroCertificado.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurNumeroCertificado.ANO_INDEX: + setAno( ( Integer ) value ); + break; + case CurNumeroCertificado.ULTIMO_NUMERO_INDEX: + setUltimo_numero( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurNumeroCertificado.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurNumeroCertificado.ANO_INDEX: + this.ano = ( Integer ) value; + break; + case CurNumeroCertificado.ULTIMO_NUMERO_INDEX: + this.ultimo_numero = ( 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 CurNumeroCertificado.ID_INDEX: + theClass = Integer.class; + break; + case CurNumeroCertificado.ANO_INDEX: + theClass = Integer.class; + break; + case CurNumeroCertificado.ULTIMO_NUMERO_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurNumeroCertificado._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, CurNumeroCertificado.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurNumeroCertificadoFormador.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurNumeroCertificadoFormador.java new file mode 100644 index 00000000..3182d757 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurNumeroCertificadoFormador.java @@ -0,0 +1,330 @@ +/* +* CurNumeroCertificadoFormador.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurNumeroCertificadoFormador extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurNumeroCertificadoFormador.ID, CurNumeroCertificadoFormador.ID_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificadoFormador.ID_FULL, CurNumeroCertificadoFormador.ID_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificadoFormador.ANO, CurNumeroCertificadoFormador.ANO_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificadoFormador.ANO_FULL, CurNumeroCertificadoFormador.ANO_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificadoFormador.ULTIMO_NUMERO, CurNumeroCertificadoFormador.ULTIMO_NUMERO_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificadoFormador.ULTIMO_NUMERO_FULL, CurNumeroCertificadoFormador.ULTIMO_NUMERO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "cur_numero_certificado_formador"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_numero_certificado_formador"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_numero_certificado_formador.id"; + public static final int ID_INDEX = 0; + public static final String ANO = "ano"; + public static final String ANO_FULL = "cur_numero_certificado_formador.ano"; + public static final int ANO_INDEX = 1; + public static final String ULTIMO_NUMERO = "ultimo_numero"; + public static final String ULTIMO_NUMERO_FULL = "cur_numero_certificado_formador.ultimo_numero"; + public static final int ULTIMO_NUMERO_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + ANO, ULTIMO_NUMERO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ANO, TABLENAME + "." + ULTIMO_NUMERO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ANO, ULTIMO_NUMERO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ANO, ULTIMO_NUMERO, }; + + private Integer id; + private Integer ano; + private Integer ultimo_numero; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurNumeroCertificadoFormador() + { + 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 Integer getAno() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ANO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ano; + } + + public void setAno( Integer ano ) + { + try + { + setLockedForRefresh( true ); + preProcess( ANO, ano ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ano = ano; + LAZY_LOADED_OBJECTS.put( ANO, Boolean.TRUE ); + } + + public Integer getUltimo_numero() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ULTIMO_NUMERO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ultimo_numero; + } + + public void setUltimo_numero( Integer ultimo_numero ) + { + try + { + setLockedForRefresh( true ); + preProcess( ULTIMO_NUMERO, ultimo_numero ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ultimo_numero = ultimo_numero; + LAZY_LOADED_OBJECTS.put( ULTIMO_NUMERO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurNumeroCertificadoFormador.ID_INDEX: + value = getId(); + break; + case CurNumeroCertificadoFormador.ANO_INDEX: + value = getAno(); + break; + case CurNumeroCertificadoFormador.ULTIMO_NUMERO_INDEX: + value = getUltimo_numero(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurNumeroCertificadoFormador.ID_INDEX: + value = this.id; + break; + case CurNumeroCertificadoFormador.ANO_INDEX: + value = this.ano; + break; + case CurNumeroCertificadoFormador.ULTIMO_NUMERO_INDEX: + value = this.ultimo_numero; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurNumeroCertificadoFormador.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurNumeroCertificadoFormador.ANO_INDEX: + setAno( ( Integer ) value ); + break; + case CurNumeroCertificadoFormador.ULTIMO_NUMERO_INDEX: + setUltimo_numero( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurNumeroCertificadoFormador.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurNumeroCertificadoFormador.ANO_INDEX: + this.ano = ( Integer ) value; + break; + case CurNumeroCertificadoFormador.ULTIMO_NUMERO_INDEX: + this.ultimo_numero = ( 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 CurNumeroCertificadoFormador.ID_INDEX: + theClass = Integer.class; + break; + case CurNumeroCertificadoFormador.ANO_INDEX: + theClass = Integer.class; + break; + case CurNumeroCertificadoFormador.ULTIMO_NUMERO_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurNumeroCertificadoFormador._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, CurNumeroCertificadoFormador.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurPagamentos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurPagamentos.java new file mode 100644 index 00000000..9b4b3514 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurPagamentos.java @@ -0,0 +1,683 @@ +/* +* CurPagamentos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurPagamentos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurPagamentos.ID, CurPagamentos.ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.ID_FULL, CurPagamentos.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurPagamentos.CLASS_IDENTIFIER, CurPagamentos.FORMANDO_ID, CurPagamentos.TO_FORMANDO_ID ); + FIELD_INDEXES.put( CurPagamentos.FORMANDO_ID, CurPagamentos.FORMANDO_ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.FORMANDO_ID_FULL, CurPagamentos.FORMANDO_ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.TO_FORMANDO_ID, CurPagamentos.TO_FORMANDO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurPagamentos.CLASS_IDENTIFIER, CurPagamentos.CURSO_ID, CurPagamentos.TO_CURSO_ID ); + FIELD_INDEXES.put( CurPagamentos.CURSO_ID, CurPagamentos.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.CURSO_ID_FULL, CurPagamentos.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.TO_CURSO_ID, CurPagamentos.TO_CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.DATA_DATE, CurPagamentos.DATA_DATE_INDEX ); + FIELD_INDEXES.put( CurPagamentos.DATA_DATE_FULL, CurPagamentos.DATA_DATE_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurPagamentos.CLASS_IDENTIFIER, CurPagamentos.TIPO_ID, CurPagamentos.TO_TIPO_ID ); + FIELD_INDEXES.put( CurPagamentos.TIPO_ID, CurPagamentos.TIPO_ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.TIPO_ID_FULL, CurPagamentos.TIPO_ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.TO_TIPO_ID, CurPagamentos.TO_TIPO_ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.OBSERVACOES, CurPagamentos.OBSERVACOES_INDEX ); + FIELD_INDEXES.put( CurPagamentos.OBSERVACOES_FULL, CurPagamentos.OBSERVACOES_INDEX ); + FIELD_INDEXES.put( CurPagamentos.VALOR, CurPagamentos.VALOR_INDEX ); + FIELD_INDEXES.put( CurPagamentos.VALOR_FULL, CurPagamentos.VALOR_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyformando_idTocur_formandos = + new com.evolute.entity.ForeignKey( CurPagamentos.class, CurPagamentos.FORMANDO_ID, db.data.siprp_local.outer.CurFormandosData.class, db.data.siprp_local.outer.CurFormandosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycurso_idTocur_cursos = + new com.evolute.entity.ForeignKey( CurPagamentos.class, CurPagamentos.CURSO_ID, db.data.siprp_local.outer.CurCursosData.class, db.data.siprp_local.outer.CurCursosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytipo_idTocur_pagamentos_tipos = + new com.evolute.entity.ForeignKey( CurPagamentos.class, CurPagamentos.TIPO_ID, db.data.siprp_local.outer.CurPagamentosTiposData.class, db.data.siprp_local.outer.CurPagamentosTiposData.ID ); + + public static final String TABLENAME = "cur_pagamentos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_pagamentos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_pagamentos.id"; + public static final int ID_INDEX = 0; + public static final String FORMANDO_ID = "formando_id"; + public static final String FORMANDO_ID_FULL = "cur_pagamentos.formando_id"; + public static final int FORMANDO_ID_INDEX = 1; + public static final String TO_FORMANDO_ID = "to_formando_id"; + public static final String TO_FORMANDO_ID_FULL = "cur_pagamentos.to_formando_id"; + public static final int TO_FORMANDO_ID_INDEX = 2; + public static final String CURSO_ID = "curso_id"; + public static final String CURSO_ID_FULL = "cur_pagamentos.curso_id"; + public static final int CURSO_ID_INDEX = 3; + public static final String TO_CURSO_ID = "to_curso_id"; + public static final String TO_CURSO_ID_FULL = "cur_pagamentos.to_curso_id"; + public static final int TO_CURSO_ID_INDEX = 4; + public static final String DATA_DATE = "data_date"; + public static final String DATA_DATE_FULL = "cur_pagamentos.data_date"; + public static final int DATA_DATE_INDEX = 5; + public static final String TIPO_ID = "tipo_id"; + public static final String TIPO_ID_FULL = "cur_pagamentos.tipo_id"; + public static final int TIPO_ID_INDEX = 6; + public static final String TO_TIPO_ID = "to_tipo_id"; + public static final String TO_TIPO_ID_FULL = "cur_pagamentos.to_tipo_id"; + public static final int TO_TIPO_ID_INDEX = 7; + public static final String OBSERVACOES = "observacoes"; + public static final String OBSERVACOES_FULL = "cur_pagamentos.observacoes"; + public static final int OBSERVACOES_INDEX = 8; + public static final String VALOR = "valor"; + public static final String VALOR_FULL = "cur_pagamentos.valor"; + public static final int VALOR_INDEX = 9; + + public static final String FIELD_NAMES[] = new String[]{ + FORMANDO_ID, TO_FORMANDO_ID, CURSO_ID, TO_CURSO_ID, DATA_DATE, TIPO_ID, TO_TIPO_ID, + OBSERVACOES, VALOR, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + FORMANDO_ID, TABLENAME + "." + TO_FORMANDO_ID, TABLENAME + "." + CURSO_ID, TABLENAME + "." + TO_CURSO_ID, TABLENAME + "." + DATA_DATE, TABLENAME + "." + TIPO_ID, TABLENAME + "." + TO_TIPO_ID, + TABLENAME + "." + OBSERVACOES, TABLENAME + "." + VALOR, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, FORMANDO_ID, CURSO_ID, DATA_DATE, TIPO_ID, OBSERVACOES, VALOR, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, FORMANDO_ID, CURSO_ID, DATA_DATE, TIPO_ID, OBSERVACOES, VALOR, }; + + private Integer id; + private Integer formando_id; + private db.data.siprp_local.outer.CurFormandosData to_formando_id; + private Integer curso_id; + private db.data.siprp_local.outer.CurCursosData to_curso_id; + private java.sql.Timestamp data_date; + private Integer tipo_id; + private db.data.siprp_local.outer.CurPagamentosTiposData to_tipo_id; + private String observacoes; + private Double valor; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurPagamentos() + { + super(); + dirtyProperties = new boolean[]{ 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 getFormando_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMANDO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formando_id; + } + + public void setFormando_id( Integer formando_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMANDO_ID, formando_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formando_id = formando_id; + LAZY_LOADED_OBJECTS.put( FORMANDO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurFormandosData toFormando_id() + { + try + { + prepare( TO_FORMANDO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_formando_id; + } + + public void setToFormando_id( db.data.siprp_local.outer.CurFormandosData to_formando_id ) + { + try + { + preProcess( TO_FORMANDO_ID, to_formando_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_formando_id = to_formando_id; + } + + public Integer getCurso_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURSO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.curso_id; + } + + public void setCurso_id( Integer curso_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURSO_ID, curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.curso_id = curso_id; + LAZY_LOADED_OBJECTS.put( CURSO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurCursosData toCurso_id() + { + try + { + prepare( TO_CURSO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_curso_id; + } + + public void setToCurso_id( db.data.siprp_local.outer.CurCursosData to_curso_id ) + { + try + { + preProcess( TO_CURSO_ID, to_curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_curso_id = to_curso_id; + } + + public java.sql.Timestamp getData_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_date; + } + + public void setData_date( java.sql.Timestamp data_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_DATE, data_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_date = data_date; + LAZY_LOADED_OBJECTS.put( DATA_DATE, 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 db.data.siprp_local.outer.CurPagamentosTiposData 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( db.data.siprp_local.outer.CurPagamentosTiposData 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 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 Double getValor() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.valor; + } + + public void setValor( Double valor ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALOR, valor ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.valor = valor; + LAZY_LOADED_OBJECTS.put( VALOR, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPagamentos.ID_INDEX: + value = getId(); + break; + case CurPagamentos.FORMANDO_ID_INDEX: + value = getFormando_id(); + break; + case CurPagamentos.TO_FORMANDO_ID_INDEX: + value = toFormando_id(); + break; + case CurPagamentos.CURSO_ID_INDEX: + value = getCurso_id(); + break; + case CurPagamentos.TO_CURSO_ID_INDEX: + value = toCurso_id(); + break; + case CurPagamentos.DATA_DATE_INDEX: + value = getData_date(); + break; + case CurPagamentos.TIPO_ID_INDEX: + value = getTipo_id(); + break; + case CurPagamentos.TO_TIPO_ID_INDEX: + value = toTipo_id(); + break; + case CurPagamentos.OBSERVACOES_INDEX: + value = getObservacoes(); + break; + case CurPagamentos.VALOR_INDEX: + value = getValor(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPagamentos.ID_INDEX: + value = this.id; + break; + case CurPagamentos.FORMANDO_ID_INDEX: + value = this.formando_id; + break; + case CurPagamentos.TO_FORMANDO_ID_INDEX: + value = this.to_formando_id; + break; + case CurPagamentos.CURSO_ID_INDEX: + value = this.curso_id; + break; + case CurPagamentos.TO_CURSO_ID_INDEX: + value = this.to_curso_id; + break; + case CurPagamentos.DATA_DATE_INDEX: + value = this.data_date; + break; + case CurPagamentos.TIPO_ID_INDEX: + value = this.tipo_id; + break; + case CurPagamentos.TO_TIPO_ID_INDEX: + value = this.to_tipo_id; + break; + case CurPagamentos.OBSERVACOES_INDEX: + value = this.observacoes; + break; + case CurPagamentos.VALOR_INDEX: + value = this.valor; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPagamentos.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurPagamentos.FORMANDO_ID_INDEX: + setFormando_id( ( Integer ) value ); + break; + case CurPagamentos.TO_FORMANDO_ID_INDEX: + setToFormando_id( ( db.data.siprp_local.outer.CurFormandosData ) value ); + break; + case CurPagamentos.CURSO_ID_INDEX: + setCurso_id( ( Integer ) value ); + break; + case CurPagamentos.TO_CURSO_ID_INDEX: + setToCurso_id( ( db.data.siprp_local.outer.CurCursosData ) value ); + break; + case CurPagamentos.DATA_DATE_INDEX: + setData_date( ( java.sql.Timestamp ) value ); + break; + case CurPagamentos.TIPO_ID_INDEX: + setTipo_id( ( Integer ) value ); + break; + case CurPagamentos.TO_TIPO_ID_INDEX: + setToTipo_id( ( db.data.siprp_local.outer.CurPagamentosTiposData ) value ); + break; + case CurPagamentos.OBSERVACOES_INDEX: + setObservacoes( ( String ) value ); + break; + case CurPagamentos.VALOR_INDEX: + setValor( ( Double ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPagamentos.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurPagamentos.FORMANDO_ID_INDEX: + this.formando_id = ( Integer ) value; + break; + case CurPagamentos.TO_FORMANDO_ID_INDEX: + this.to_formando_id = ( db.data.siprp_local.outer.CurFormandosData ) value; + break; + case CurPagamentos.CURSO_ID_INDEX: + this.curso_id = ( Integer ) value; + break; + case CurPagamentos.TO_CURSO_ID_INDEX: + this.to_curso_id = ( db.data.siprp_local.outer.CurCursosData ) value; + break; + case CurPagamentos.DATA_DATE_INDEX: + this.data_date = ( java.sql.Timestamp ) value; + break; + case CurPagamentos.TIPO_ID_INDEX: + this.tipo_id = ( Integer ) value; + break; + case CurPagamentos.TO_TIPO_ID_INDEX: + this.to_tipo_id = ( db.data.siprp_local.outer.CurPagamentosTiposData ) value; + break; + case CurPagamentos.OBSERVACOES_INDEX: + this.observacoes = ( String ) value; + break; + case CurPagamentos.VALOR_INDEX: + this.valor = ( Double ) 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 CurPagamentos.ID_INDEX: + theClass = Integer.class; + break; + case CurPagamentos.FORMANDO_ID_INDEX: + theClass = Integer.class; + break; + case CurPagamentos.TO_FORMANDO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurFormandosData.class; + break; + case CurPagamentos.CURSO_ID_INDEX: + theClass = Integer.class; + break; + case CurPagamentos.TO_CURSO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurCursosData.class; + break; + case CurPagamentos.DATA_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurPagamentos.TIPO_ID_INDEX: + theClass = Integer.class; + break; + case CurPagamentos.TO_TIPO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurPagamentosTiposData.class; + break; + case CurPagamentos.OBSERVACOES_INDEX: + theClass = String.class; + break; + case CurPagamentos.VALOR_INDEX: + theClass = Double.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurPagamentos._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, CurPagamentos.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurPagamentosTipos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurPagamentosTipos.java new file mode 100644 index 00000000..75a733e7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurPagamentosTipos.java @@ -0,0 +1,294 @@ +/* +* CurPagamentosTipos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurPagamentosTipos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurPagamentosTipos.ID, CurPagamentosTipos.ID_INDEX ); + FIELD_INDEXES.put( CurPagamentosTipos.ID_FULL, CurPagamentosTipos.ID_INDEX ); + FIELD_INDEXES.put( CurPagamentosTipos.DESCRICAO, CurPagamentosTipos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( CurPagamentosTipos.DESCRICAO_FULL, CurPagamentosTipos.DESCRICAO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "cur_pagamentos_tipos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_pagamentos_tipos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_pagamentos_tipos.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "cur_pagamentos_tipos.descricao"; + public static final int DESCRICAO_INDEX = 1; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRICAO, }; + + private Integer id; + private String descricao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurPagamentosTipos() + { + 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.ListfromCurPagamentos_tipo_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurPagamentosData.class , getPrimaryKey().getMap().get("id"), "tipo_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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPagamentosTipos.ID_INDEX: + value = getId(); + break; + case CurPagamentosTipos.DESCRICAO_INDEX: + value = getDescricao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPagamentosTipos.ID_INDEX: + value = this.id; + break; + case CurPagamentosTipos.DESCRICAO_INDEX: + value = this.descricao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPagamentosTipos.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurPagamentosTipos.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPagamentosTipos.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurPagamentosTipos.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 CurPagamentosTipos.ID_INDEX: + theClass = Integer.class; + break; + case CurPagamentosTipos.DESCRICAO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurPagamentosTipos._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, CurPagamentosTipos.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurPresencas.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurPresencas.java new file mode 100644 index 00000000..72d4f402 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurPresencas.java @@ -0,0 +1,633 @@ +/* +* CurPresencas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurPresencas extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurPresencas.ID, CurPresencas.ID_INDEX ); + FIELD_INDEXES.put( CurPresencas.ID_FULL, CurPresencas.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurPresencas.CLASS_IDENTIFIER, CurPresencas.FORMANDO_ID, CurPresencas.TO_FORMANDO_ID ); + FIELD_INDEXES.put( CurPresencas.FORMANDO_ID, CurPresencas.FORMANDO_ID_INDEX ); + FIELD_INDEXES.put( CurPresencas.FORMANDO_ID_FULL, CurPresencas.FORMANDO_ID_INDEX ); + FIELD_INDEXES.put( CurPresencas.TO_FORMANDO_ID, CurPresencas.TO_FORMANDO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurPresencas.CLASS_IDENTIFIER, CurPresencas.FORMADOR_ID, CurPresencas.TO_FORMADOR_ID ); + FIELD_INDEXES.put( CurPresencas.FORMADOR_ID, CurPresencas.FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurPresencas.FORMADOR_ID_FULL, CurPresencas.FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurPresencas.TO_FORMADOR_ID, CurPresencas.TO_FORMADOR_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurPresencas.CLASS_IDENTIFIER, CurPresencas.CURSO_ID, CurPresencas.TO_CURSO_ID ); + FIELD_INDEXES.put( CurPresencas.CURSO_ID, CurPresencas.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurPresencas.CURSO_ID_FULL, CurPresencas.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurPresencas.TO_CURSO_ID, CurPresencas.TO_CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurPresencas.DATA_DATE, CurPresencas.DATA_DATE_INDEX ); + FIELD_INDEXES.put( CurPresencas.DATA_DATE_FULL, CurPresencas.DATA_DATE_INDEX ); + FIELD_INDEXES.put( CurPresencas.DELETED_DATE, CurPresencas.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurPresencas.DELETED_DATE_FULL, CurPresencas.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 ForeignKeyformando_idTocur_formandos = + new com.evolute.entity.ForeignKey( CurPresencas.class, CurPresencas.FORMANDO_ID, db.data.siprp_local.outer.CurFormandosData.class, db.data.siprp_local.outer.CurFormandosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyformador_idTocur_formadores = + new com.evolute.entity.ForeignKey( CurPresencas.class, CurPresencas.FORMADOR_ID, db.data.siprp_local.outer.CurFormadoresData.class, db.data.siprp_local.outer.CurFormadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycurso_idTocur_cursos = + new com.evolute.entity.ForeignKey( CurPresencas.class, CurPresencas.CURSO_ID, db.data.siprp_local.outer.CurCursosData.class, db.data.siprp_local.outer.CurCursosData.ID ); + + public static final String TABLENAME = "cur_presencas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_presencas"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_presencas.id"; + public static final int ID_INDEX = 0; + public static final String FORMANDO_ID = "formando_id"; + public static final String FORMANDO_ID_FULL = "cur_presencas.formando_id"; + public static final int FORMANDO_ID_INDEX = 1; + public static final String TO_FORMANDO_ID = "to_formando_id"; + public static final String TO_FORMANDO_ID_FULL = "cur_presencas.to_formando_id"; + public static final int TO_FORMANDO_ID_INDEX = 2; + public static final String FORMADOR_ID = "formador_id"; + public static final String FORMADOR_ID_FULL = "cur_presencas.formador_id"; + public static final int FORMADOR_ID_INDEX = 3; + public static final String TO_FORMADOR_ID = "to_formador_id"; + public static final String TO_FORMADOR_ID_FULL = "cur_presencas.to_formador_id"; + public static final int TO_FORMADOR_ID_INDEX = 4; + public static final String CURSO_ID = "curso_id"; + public static final String CURSO_ID_FULL = "cur_presencas.curso_id"; + public static final int CURSO_ID_INDEX = 5; + public static final String TO_CURSO_ID = "to_curso_id"; + public static final String TO_CURSO_ID_FULL = "cur_presencas.to_curso_id"; + public static final int TO_CURSO_ID_INDEX = 6; + public static final String DATA_DATE = "data_date"; + public static final String DATA_DATE_FULL = "cur_presencas.data_date"; + public static final int DATA_DATE_INDEX = 7; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_presencas.deleted_date"; + public static final int DELETED_DATE_INDEX = 8; + + public static final String FIELD_NAMES[] = new String[]{ + FORMANDO_ID, TO_FORMANDO_ID, FORMADOR_ID, TO_FORMADOR_ID, CURSO_ID, TO_CURSO_ID, + DATA_DATE, DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + FORMANDO_ID, TABLENAME + "." + TO_FORMANDO_ID, TABLENAME + "." + FORMADOR_ID, TABLENAME + "." + TO_FORMADOR_ID, TABLENAME + "." + CURSO_ID, TABLENAME + "." + TO_CURSO_ID, + TABLENAME + "." + DATA_DATE, TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, FORMANDO_ID, FORMADOR_ID, CURSO_ID, DATA_DATE, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, FORMANDO_ID, FORMADOR_ID, CURSO_ID, DATA_DATE, DELETED_DATE, }; + + private Integer id; + private Integer formando_id; + private db.data.siprp_local.outer.CurFormandosData to_formando_id; + private Integer formador_id; + private db.data.siprp_local.outer.CurFormadoresData to_formador_id; + private Integer curso_id; + private db.data.siprp_local.outer.CurCursosData to_curso_id; + private java.sql.Timestamp data_date; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurPresencas() + { + 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 Integer getFormando_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMANDO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formando_id; + } + + public void setFormando_id( Integer formando_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMANDO_ID, formando_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formando_id = formando_id; + LAZY_LOADED_OBJECTS.put( FORMANDO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurFormandosData toFormando_id() + { + try + { + prepare( TO_FORMANDO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_formando_id; + } + + public void setToFormando_id( db.data.siprp_local.outer.CurFormandosData to_formando_id ) + { + try + { + preProcess( TO_FORMANDO_ID, to_formando_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_formando_id = to_formando_id; + } + + public Integer getFormador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formador_id; + } + + public void setFormador_id( Integer formador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMADOR_ID, formador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formador_id = formador_id; + LAZY_LOADED_OBJECTS.put( FORMADOR_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurFormadoresData toFormador_id() + { + try + { + prepare( TO_FORMADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_formador_id; + } + + public void setToFormador_id( db.data.siprp_local.outer.CurFormadoresData to_formador_id ) + { + try + { + preProcess( TO_FORMADOR_ID, to_formador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_formador_id = to_formador_id; + } + + public Integer getCurso_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURSO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.curso_id; + } + + public void setCurso_id( Integer curso_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURSO_ID, curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.curso_id = curso_id; + LAZY_LOADED_OBJECTS.put( CURSO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurCursosData toCurso_id() + { + try + { + prepare( TO_CURSO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_curso_id; + } + + public void setToCurso_id( db.data.siprp_local.outer.CurCursosData to_curso_id ) + { + try + { + preProcess( TO_CURSO_ID, to_curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_curso_id = to_curso_id; + } + + public java.sql.Timestamp getData_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_date; + } + + public void setData_date( java.sql.Timestamp data_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_DATE, data_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_date = data_date; + LAZY_LOADED_OBJECTS.put( DATA_DATE, 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 CurPresencas.ID_INDEX: + value = getId(); + break; + case CurPresencas.FORMANDO_ID_INDEX: + value = getFormando_id(); + break; + case CurPresencas.TO_FORMANDO_ID_INDEX: + value = toFormando_id(); + break; + case CurPresencas.FORMADOR_ID_INDEX: + value = getFormador_id(); + break; + case CurPresencas.TO_FORMADOR_ID_INDEX: + value = toFormador_id(); + break; + case CurPresencas.CURSO_ID_INDEX: + value = getCurso_id(); + break; + case CurPresencas.TO_CURSO_ID_INDEX: + value = toCurso_id(); + break; + case CurPresencas.DATA_DATE_INDEX: + value = getData_date(); + break; + case CurPresencas.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPresencas.ID_INDEX: + value = this.id; + break; + case CurPresencas.FORMANDO_ID_INDEX: + value = this.formando_id; + break; + case CurPresencas.TO_FORMANDO_ID_INDEX: + value = this.to_formando_id; + break; + case CurPresencas.FORMADOR_ID_INDEX: + value = this.formador_id; + break; + case CurPresencas.TO_FORMADOR_ID_INDEX: + value = this.to_formador_id; + break; + case CurPresencas.CURSO_ID_INDEX: + value = this.curso_id; + break; + case CurPresencas.TO_CURSO_ID_INDEX: + value = this.to_curso_id; + break; + case CurPresencas.DATA_DATE_INDEX: + value = this.data_date; + break; + case CurPresencas.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPresencas.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurPresencas.FORMANDO_ID_INDEX: + setFormando_id( ( Integer ) value ); + break; + case CurPresencas.TO_FORMANDO_ID_INDEX: + setToFormando_id( ( db.data.siprp_local.outer.CurFormandosData ) value ); + break; + case CurPresencas.FORMADOR_ID_INDEX: + setFormador_id( ( Integer ) value ); + break; + case CurPresencas.TO_FORMADOR_ID_INDEX: + setToFormador_id( ( db.data.siprp_local.outer.CurFormadoresData ) value ); + break; + case CurPresencas.CURSO_ID_INDEX: + setCurso_id( ( Integer ) value ); + break; + case CurPresencas.TO_CURSO_ID_INDEX: + setToCurso_id( ( db.data.siprp_local.outer.CurCursosData ) value ); + break; + case CurPresencas.DATA_DATE_INDEX: + setData_date( ( java.sql.Timestamp ) value ); + break; + case CurPresencas.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPresencas.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurPresencas.FORMANDO_ID_INDEX: + this.formando_id = ( Integer ) value; + break; + case CurPresencas.TO_FORMANDO_ID_INDEX: + this.to_formando_id = ( db.data.siprp_local.outer.CurFormandosData ) value; + break; + case CurPresencas.FORMADOR_ID_INDEX: + this.formador_id = ( Integer ) value; + break; + case CurPresencas.TO_FORMADOR_ID_INDEX: + this.to_formador_id = ( db.data.siprp_local.outer.CurFormadoresData ) value; + break; + case CurPresencas.CURSO_ID_INDEX: + this.curso_id = ( Integer ) value; + break; + case CurPresencas.TO_CURSO_ID_INDEX: + this.to_curso_id = ( db.data.siprp_local.outer.CurCursosData ) value; + break; + case CurPresencas.DATA_DATE_INDEX: + this.data_date = ( java.sql.Timestamp ) value; + break; + case CurPresencas.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 CurPresencas.ID_INDEX: + theClass = Integer.class; + break; + case CurPresencas.FORMANDO_ID_INDEX: + theClass = Integer.class; + break; + case CurPresencas.TO_FORMANDO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurFormandosData.class; + break; + case CurPresencas.FORMADOR_ID_INDEX: + theClass = Integer.class; + break; + case CurPresencas.TO_FORMADOR_ID_INDEX: + theClass = db.data.siprp_local.outer.CurFormadoresData.class; + break; + case CurPresencas.CURSO_ID_INDEX: + theClass = Integer.class; + break; + case CurPresencas.TO_CURSO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurCursosData.class; + break; + case CurPresencas.DATA_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurPresencas.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 : CurPresencas._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, CurPresencas.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurTopicos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurTopicos.java new file mode 100644 index 00000000..b8850095 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurTopicos.java @@ -0,0 +1,711 @@ +/* +* CurTopicos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurTopicos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurTopicos.ID, CurTopicos.ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.ID_FULL, CurTopicos.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurTopicos.CLASS_IDENTIFIER, CurTopicos.PARENT_ID, CurTopicos.TO_PARENT_ID ); + FIELD_INDEXES.put( CurTopicos.PARENT_ID, CurTopicos.PARENT_ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.PARENT_ID_FULL, CurTopicos.PARENT_ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.TO_PARENT_ID, CurTopicos.TO_PARENT_ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.DESCRICAO, CurTopicos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( CurTopicos.DESCRICAO_FULL, CurTopicos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( CurTopicos.ORDEM, CurTopicos.ORDEM_INDEX ); + FIELD_INDEXES.put( CurTopicos.ORDEM_FULL, CurTopicos.ORDEM_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurTopicos.CLASS_IDENTIFIER, CurTopicos.CURSO_ID, CurTopicos.TO_CURSO_ID ); + FIELD_INDEXES.put( CurTopicos.CURSO_ID, CurTopicos.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.CURSO_ID_FULL, CurTopicos.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.TO_CURSO_ID, CurTopicos.TO_CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.DELETED_DATE, CurTopicos.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurTopicos.DELETED_DATE_FULL, CurTopicos.DELETED_DATE_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurTopicos.CLASS_IDENTIFIER, CurTopicos.FORMADOR_ID, CurTopicos.TO_FORMADOR_ID ); + FIELD_INDEXES.put( CurTopicos.FORMADOR_ID, CurTopicos.FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.FORMADOR_ID_FULL, CurTopicos.FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.TO_FORMADOR_ID, CurTopicos.TO_FORMADOR_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 ForeignKeyparent_idTocur_topicos = + new com.evolute.entity.ForeignKey( CurTopicos.class, CurTopicos.PARENT_ID, db.data.siprp_local.outer.CurTopicosData.class, db.data.siprp_local.outer.CurTopicosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycurso_idTocur_cursos = + new com.evolute.entity.ForeignKey( CurTopicos.class, CurTopicos.CURSO_ID, db.data.siprp_local.outer.CurCursosData.class, db.data.siprp_local.outer.CurCursosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyformador_idTocur_formadores = + new com.evolute.entity.ForeignKey( CurTopicos.class, CurTopicos.FORMADOR_ID, db.data.siprp_local.outer.CurFormadoresData.class, db.data.siprp_local.outer.CurFormadoresData.ID ); + + public static final String TABLENAME = "cur_topicos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_topicos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_topicos.id"; + public static final int ID_INDEX = 0; + public static final String PARENT_ID = "parent_id"; + public static final String PARENT_ID_FULL = "cur_topicos.parent_id"; + public static final int PARENT_ID_INDEX = 1; + public static final String TO_PARENT_ID = "to_parent_id"; + public static final String TO_PARENT_ID_FULL = "cur_topicos.to_parent_id"; + public static final int TO_PARENT_ID_INDEX = 2; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "cur_topicos.descricao"; + public static final int DESCRICAO_INDEX = 3; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "cur_topicos.ordem"; + public static final int ORDEM_INDEX = 4; + public static final String CURSO_ID = "curso_id"; + public static final String CURSO_ID_FULL = "cur_topicos.curso_id"; + public static final int CURSO_ID_INDEX = 5; + public static final String TO_CURSO_ID = "to_curso_id"; + public static final String TO_CURSO_ID_FULL = "cur_topicos.to_curso_id"; + public static final int TO_CURSO_ID_INDEX = 6; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_topicos.deleted_date"; + public static final int DELETED_DATE_INDEX = 7; + public static final String FORMADOR_ID = "formador_id"; + public static final String FORMADOR_ID_FULL = "cur_topicos.formador_id"; + public static final int FORMADOR_ID_INDEX = 8; + public static final String TO_FORMADOR_ID = "to_formador_id"; + public static final String TO_FORMADOR_ID_FULL = "cur_topicos.to_formador_id"; + public static final int TO_FORMADOR_ID_INDEX = 9; + + public static final String FIELD_NAMES[] = new String[]{ + PARENT_ID, TO_PARENT_ID, DESCRICAO, ORDEM, CURSO_ID, TO_CURSO_ID, DELETED_DATE, + FORMADOR_ID, TO_FORMADOR_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + PARENT_ID, TABLENAME + "." + TO_PARENT_ID, TABLENAME + "." + DESCRICAO, TABLENAME + "." + ORDEM, TABLENAME + "." + CURSO_ID, TABLENAME + "." + TO_CURSO_ID, TABLENAME + "." + DELETED_DATE, + TABLENAME + "." + FORMADOR_ID, TABLENAME + "." + TO_FORMADOR_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, PARENT_ID, DESCRICAO, ORDEM, CURSO_ID, DELETED_DATE, FORMADOR_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, PARENT_ID, DESCRICAO, ORDEM, CURSO_ID, DELETED_DATE, FORMADOR_ID, }; + + private Integer id; + private Integer parent_id; + private db.data.siprp_local.outer.CurTopicosData to_parent_id; + private String descricao; + private Integer ordem; + private Integer curso_id; + private db.data.siprp_local.outer.CurCursosData to_curso_id; + private java.sql.Timestamp deleted_date; + private Integer formador_id; + private db.data.siprp_local.outer.CurFormadoresData to_formador_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurTopicos() + { + super(); + dirtyProperties = new boolean[]{ 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.ListfromCurTopicos_parent_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurTopicosData.class , getPrimaryKey().getMap().get("id"), "parent_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromCurTopicosAulas_topico_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.CurTopicosAulasData.class , getPrimaryKey().getMap().get("id"), "topico_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public Integer getParent_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PARENT_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.parent_id; + } + + public void setParent_id( Integer parent_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PARENT_ID, parent_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.parent_id = parent_id; + LAZY_LOADED_OBJECTS.put( PARENT_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurTopicosData toParent_id() + { + try + { + prepare( TO_PARENT_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_parent_id; + } + + public void setToParent_id( db.data.siprp_local.outer.CurTopicosData to_parent_id ) + { + try + { + preProcess( TO_PARENT_ID, to_parent_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_parent_id = to_parent_id; + } + + 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 Integer getCurso_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURSO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.curso_id; + } + + public void setCurso_id( Integer curso_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURSO_ID, curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.curso_id = curso_id; + LAZY_LOADED_OBJECTS.put( CURSO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurCursosData toCurso_id() + { + try + { + prepare( TO_CURSO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_curso_id; + } + + public void setToCurso_id( db.data.siprp_local.outer.CurCursosData to_curso_id ) + { + try + { + preProcess( TO_CURSO_ID, to_curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_curso_id = to_curso_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 Integer getFormador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formador_id; + } + + public void setFormador_id( Integer formador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMADOR_ID, formador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formador_id = formador_id; + LAZY_LOADED_OBJECTS.put( FORMADOR_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurFormadoresData toFormador_id() + { + try + { + prepare( TO_FORMADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_formador_id; + } + + public void setToFormador_id( db.data.siprp_local.outer.CurFormadoresData to_formador_id ) + { + try + { + preProcess( TO_FORMADOR_ID, to_formador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_formador_id = to_formador_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurTopicos.ID_INDEX: + value = getId(); + break; + case CurTopicos.PARENT_ID_INDEX: + value = getParent_id(); + break; + case CurTopicos.TO_PARENT_ID_INDEX: + value = toParent_id(); + break; + case CurTopicos.DESCRICAO_INDEX: + value = getDescricao(); + break; + case CurTopicos.ORDEM_INDEX: + value = getOrdem(); + break; + case CurTopicos.CURSO_ID_INDEX: + value = getCurso_id(); + break; + case CurTopicos.TO_CURSO_ID_INDEX: + value = toCurso_id(); + break; + case CurTopicos.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case CurTopicos.FORMADOR_ID_INDEX: + value = getFormador_id(); + break; + case CurTopicos.TO_FORMADOR_ID_INDEX: + value = toFormador_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurTopicos.ID_INDEX: + value = this.id; + break; + case CurTopicos.PARENT_ID_INDEX: + value = this.parent_id; + break; + case CurTopicos.TO_PARENT_ID_INDEX: + value = this.to_parent_id; + break; + case CurTopicos.DESCRICAO_INDEX: + value = this.descricao; + break; + case CurTopicos.ORDEM_INDEX: + value = this.ordem; + break; + case CurTopicos.CURSO_ID_INDEX: + value = this.curso_id; + break; + case CurTopicos.TO_CURSO_ID_INDEX: + value = this.to_curso_id; + break; + case CurTopicos.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case CurTopicos.FORMADOR_ID_INDEX: + value = this.formador_id; + break; + case CurTopicos.TO_FORMADOR_ID_INDEX: + value = this.to_formador_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurTopicos.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurTopicos.PARENT_ID_INDEX: + setParent_id( ( Integer ) value ); + break; + case CurTopicos.TO_PARENT_ID_INDEX: + setToParent_id( ( db.data.siprp_local.outer.CurTopicosData ) value ); + break; + case CurTopicos.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case CurTopicos.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + case CurTopicos.CURSO_ID_INDEX: + setCurso_id( ( Integer ) value ); + break; + case CurTopicos.TO_CURSO_ID_INDEX: + setToCurso_id( ( db.data.siprp_local.outer.CurCursosData ) value ); + break; + case CurTopicos.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case CurTopicos.FORMADOR_ID_INDEX: + setFormador_id( ( Integer ) value ); + break; + case CurTopicos.TO_FORMADOR_ID_INDEX: + setToFormador_id( ( db.data.siprp_local.outer.CurFormadoresData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurTopicos.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurTopicos.PARENT_ID_INDEX: + this.parent_id = ( Integer ) value; + break; + case CurTopicos.TO_PARENT_ID_INDEX: + this.to_parent_id = ( db.data.siprp_local.outer.CurTopicosData ) value; + break; + case CurTopicos.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case CurTopicos.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + case CurTopicos.CURSO_ID_INDEX: + this.curso_id = ( Integer ) value; + break; + case CurTopicos.TO_CURSO_ID_INDEX: + this.to_curso_id = ( db.data.siprp_local.outer.CurCursosData ) value; + break; + case CurTopicos.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case CurTopicos.FORMADOR_ID_INDEX: + this.formador_id = ( Integer ) value; + break; + case CurTopicos.TO_FORMADOR_ID_INDEX: + this.to_formador_id = ( db.data.siprp_local.outer.CurFormadoresData ) 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 CurTopicos.ID_INDEX: + theClass = Integer.class; + break; + case CurTopicos.PARENT_ID_INDEX: + theClass = Integer.class; + break; + case CurTopicos.TO_PARENT_ID_INDEX: + theClass = db.data.siprp_local.outer.CurTopicosData.class; + break; + case CurTopicos.DESCRICAO_INDEX: + theClass = String.class; + break; + case CurTopicos.ORDEM_INDEX: + theClass = Integer.class; + break; + case CurTopicos.CURSO_ID_INDEX: + theClass = Integer.class; + break; + case CurTopicos.TO_CURSO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurCursosData.class; + break; + case CurTopicos.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurTopicos.FORMADOR_ID_INDEX: + theClass = Integer.class; + break; + case CurTopicos.TO_FORMADOR_ID_INDEX: + theClass = db.data.siprp_local.outer.CurFormadoresData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurTopicos._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, CurTopicos.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurTopicosAulas.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurTopicosAulas.java new file mode 100644 index 00000000..3c5effb7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/CurTopicosAulas.java @@ -0,0 +1,431 @@ +/* +* CurTopicosAulas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurTopicosAulas extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( CurTopicosAulas.CLASS_IDENTIFIER, CurTopicosAulas.TOPICO_ID, CurTopicosAulas.TO_TOPICO_ID ); + FIELD_INDEXES.put( CurTopicosAulas.TOPICO_ID, CurTopicosAulas.TOPICO_ID_INDEX ); + FIELD_INDEXES.put( CurTopicosAulas.TOPICO_ID_FULL, CurTopicosAulas.TOPICO_ID_INDEX ); + FIELD_INDEXES.put( CurTopicosAulas.TO_TOPICO_ID, CurTopicosAulas.TO_TOPICO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurTopicosAulas.CLASS_IDENTIFIER, CurTopicosAulas.AULA_ID, CurTopicosAulas.TO_AULA_ID ); + FIELD_INDEXES.put( CurTopicosAulas.AULA_ID, CurTopicosAulas.AULA_ID_INDEX ); + FIELD_INDEXES.put( CurTopicosAulas.AULA_ID_FULL, CurTopicosAulas.AULA_ID_INDEX ); + FIELD_INDEXES.put( CurTopicosAulas.TO_AULA_ID, CurTopicosAulas.TO_AULA_ID_INDEX ); + FIELD_INDEXES.put( CurTopicosAulas.DELETED_DATE, CurTopicosAulas.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurTopicosAulas.DELETED_DATE_FULL, CurTopicosAulas.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 ForeignKeytopico_idTocur_topicos = + new com.evolute.entity.ForeignKey( CurTopicosAulas.class, CurTopicosAulas.TOPICO_ID, db.data.siprp_local.outer.CurTopicosData.class, db.data.siprp_local.outer.CurTopicosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyaula_idTocur_aulas = + new com.evolute.entity.ForeignKey( CurTopicosAulas.class, CurTopicosAulas.AULA_ID, db.data.siprp_local.outer.CurAulasData.class, db.data.siprp_local.outer.CurAulasData.ID ); + + public static final String TABLENAME = "cur_topicos_aulas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_topicos_aulas"; + + public static final int _INVALID__INDEX = -1; + public static final String TOPICO_ID = "topico_id"; + public static final String TOPICO_ID_FULL = "cur_topicos_aulas.topico_id"; + public static final int TOPICO_ID_INDEX = 0; + public static final String TO_TOPICO_ID = "to_topico_id"; + public static final String TO_TOPICO_ID_FULL = "cur_topicos_aulas.to_topico_id"; + public static final int TO_TOPICO_ID_INDEX = 1; + public static final String AULA_ID = "aula_id"; + public static final String AULA_ID_FULL = "cur_topicos_aulas.aula_id"; + public static final int AULA_ID_INDEX = 2; + public static final String TO_AULA_ID = "to_aula_id"; + public static final String TO_AULA_ID_FULL = "cur_topicos_aulas.to_aula_id"; + public static final int TO_AULA_ID_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_topicos_aulas.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + TOPICO_ID, AULA_ID, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + TOPICO_ID, AULA_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + TOPICO_ID, AULA_ID, DELETED_DATE, }; + + private Integer topico_id; + private db.data.siprp_local.outer.CurTopicosData to_topico_id; + private Integer aula_id; + private db.data.siprp_local.outer.CurAulasData to_aula_id; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurTopicosAulas() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false }; + } + + public Integer getTopico_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TOPICO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.topico_id; + } + + public void setTopico_id( Integer topico_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TOPICO_ID, topico_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.topico_id = topico_id; + LAZY_LOADED_OBJECTS.put( TOPICO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurTopicosData toTopico_id() + { + try + { + prepare( TO_TOPICO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_topico_id; + } + + public void setToTopico_id( db.data.siprp_local.outer.CurTopicosData to_topico_id ) + { + try + { + preProcess( TO_TOPICO_ID, to_topico_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_topico_id = to_topico_id; + } + + public Integer getAula_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( AULA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.aula_id; + } + + public void setAula_id( Integer aula_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( AULA_ID, aula_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.aula_id = aula_id; + LAZY_LOADED_OBJECTS.put( AULA_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurAulasData toAula_id() + { + try + { + prepare( TO_AULA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_aula_id; + } + + public void setToAula_id( db.data.siprp_local.outer.CurAulasData to_aula_id ) + { + try + { + preProcess( TO_AULA_ID, to_aula_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_aula_id = to_aula_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 CurTopicosAulas.TOPICO_ID_INDEX: + value = getTopico_id(); + break; + case CurTopicosAulas.TO_TOPICO_ID_INDEX: + value = toTopico_id(); + break; + case CurTopicosAulas.AULA_ID_INDEX: + value = getAula_id(); + break; + case CurTopicosAulas.TO_AULA_ID_INDEX: + value = toAula_id(); + break; + case CurTopicosAulas.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurTopicosAulas.TOPICO_ID_INDEX: + value = this.topico_id; + break; + case CurTopicosAulas.TO_TOPICO_ID_INDEX: + value = this.to_topico_id; + break; + case CurTopicosAulas.AULA_ID_INDEX: + value = this.aula_id; + break; + case CurTopicosAulas.TO_AULA_ID_INDEX: + value = this.to_aula_id; + break; + case CurTopicosAulas.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurTopicosAulas.TOPICO_ID_INDEX: + setTopico_id( ( Integer ) value ); + break; + case CurTopicosAulas.TO_TOPICO_ID_INDEX: + setToTopico_id( ( db.data.siprp_local.outer.CurTopicosData ) value ); + break; + case CurTopicosAulas.AULA_ID_INDEX: + setAula_id( ( Integer ) value ); + break; + case CurTopicosAulas.TO_AULA_ID_INDEX: + setToAula_id( ( db.data.siprp_local.outer.CurAulasData ) value ); + break; + case CurTopicosAulas.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurTopicosAulas.TOPICO_ID_INDEX: + this.topico_id = ( Integer ) value; + break; + case CurTopicosAulas.TO_TOPICO_ID_INDEX: + this.to_topico_id = ( db.data.siprp_local.outer.CurTopicosData ) value; + break; + case CurTopicosAulas.AULA_ID_INDEX: + this.aula_id = ( Integer ) value; + break; + case CurTopicosAulas.TO_AULA_ID_INDEX: + this.to_aula_id = ( db.data.siprp_local.outer.CurAulasData ) value; + break; + case CurTopicosAulas.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() + { + throw new RuntimeException( "getPrimaryKeyName on CurTopicosAulas is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case CurTopicosAulas.TOPICO_ID_INDEX: + theClass = Integer.class; + break; + case CurTopicosAulas.TO_TOPICO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurTopicosData.class; + break; + case CurTopicosAulas.AULA_ID_INDEX: + theClass = Integer.class; + break; + case CurTopicosAulas.TO_AULA_ID_INDEX: + theClass = db.data.siprp_local.outer.CurAulasData.class; + break; + case CurTopicosAulas.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 : CurTopicosAulas._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, CurTopicosAulas.PK_FIELD_NAMES ); + primaryKey.set( 0, getTopico_id() ); + primaryKey.set( 1, getAula_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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EcdOficial.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EcdOficial.java new file mode 100644 index 00000000..c15ccd05 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class EcdOficial extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.ecd_oficial"; + + 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( db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EmailPlanoDeActuacao.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EmailPlanoDeActuacao.java new file mode 100644 index 00000000..a44a0108 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EmailPlanoDeActuacao.java @@ -0,0 +1,381 @@ +/* +* EmailPlanoDeActuacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EmailPlanoDeActuacao extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "email_plano_de_actuacao"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.email_plano_de_actuacao"; + + 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 String TO_ESTABELECIMENTO_ID_FULL = "email_plano_de_actuacao.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 db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EmpresaPrecoPeriodicidadeTipo.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EmpresaPrecoPeriodicidadeTipo.java new file mode 100644 index 00000000..f168ec2c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EmpresaPrecoPeriodicidadeTipo.java @@ -0,0 +1,294 @@ +/* +* EmpresaPrecoPeriodicidadeTipo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EmpresaPrecoPeriodicidadeTipo extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EmpresaPrecoPeriodicidadeTipo.ID, EmpresaPrecoPeriodicidadeTipo.ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoPeriodicidadeTipo.ID_FULL, EmpresaPrecoPeriodicidadeTipo.ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoPeriodicidadeTipo.NOME, EmpresaPrecoPeriodicidadeTipo.NOME_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoPeriodicidadeTipo.NOME_FULL, EmpresaPrecoPeriodicidadeTipo.NOME_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "empresa_preco_periodicidade_tipo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.empresa_preco_periodicidade_tipo"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "empresa_preco_periodicidade_tipo.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "empresa_preco_periodicidade_tipo.nome"; + public static final int NOME_INDEX = 1; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, }; + + private Integer id; + private String nome; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EmpresaPrecoPeriodicidadeTipo() + { + 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.ListfromEmpresaPrecoServico_empresa_preco_periodicidade_tipo_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.EmpresaPrecoServicoData.class , getPrimaryKey().getMap().get("id"), "empresa_preco_periodicidade_tipo_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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoPeriodicidadeTipo.ID_INDEX: + value = getId(); + break; + case EmpresaPrecoPeriodicidadeTipo.NOME_INDEX: + value = getNome(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoPeriodicidadeTipo.ID_INDEX: + value = this.id; + break; + case EmpresaPrecoPeriodicidadeTipo.NOME_INDEX: + value = this.nome; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoPeriodicidadeTipo.ID_INDEX: + setId( ( Integer ) value ); + break; + case EmpresaPrecoPeriodicidadeTipo.NOME_INDEX: + setNome( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoPeriodicidadeTipo.ID_INDEX: + this.id = ( Integer ) value; + break; + case EmpresaPrecoPeriodicidadeTipo.NOME_INDEX: + this.nome = ( 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 EmpresaPrecoPeriodicidadeTipo.ID_INDEX: + theClass = Integer.class; + break; + case EmpresaPrecoPeriodicidadeTipo.NOME_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EmpresaPrecoPeriodicidadeTipo._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, EmpresaPrecoPeriodicidadeTipo.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EmpresaPrecoServico.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EmpresaPrecoServico.java new file mode 100644 index 00000000..7fc39103 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EmpresaPrecoServico.java @@ -0,0 +1,739 @@ +/* +* EmpresaPrecoServico.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EmpresaPrecoServico extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EmpresaPrecoServico.ID, EmpresaPrecoServico.ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.ID_FULL, EmpresaPrecoServico.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( EmpresaPrecoServico.CLASS_IDENTIFIER, EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID, EmpresaPrecoServico.TO_EMPRESA_PRECO_SERVICO_TIPO_ID ); + FIELD_INDEXES.put( EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID, EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID_FULL, EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.TO_EMPRESA_PRECO_SERVICO_TIPO_ID, EmpresaPrecoServico.TO_EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( EmpresaPrecoServico.CLASS_IDENTIFIER, EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, EmpresaPrecoServico.TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID ); + FIELD_INDEXES.put( EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_FULL, EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, EmpresaPrecoServico.TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.TIPO_OUTRO, EmpresaPrecoServico.TIPO_OUTRO_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.TIPO_OUTRO_FULL, EmpresaPrecoServico.TIPO_OUTRO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( EmpresaPrecoServico.CLASS_IDENTIFIER, EmpresaPrecoServico.EMPRESA_ID, EmpresaPrecoServico.TO_EMPRESA_ID ); + FIELD_INDEXES.put( EmpresaPrecoServico.EMPRESA_ID, EmpresaPrecoServico.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.EMPRESA_ID_FULL, EmpresaPrecoServico.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.TO_EMPRESA_ID, EmpresaPrecoServico.TO_EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.VALOR, EmpresaPrecoServico.VALOR_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.VALOR_FULL, EmpresaPrecoServico.VALOR_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.INICIADO, EmpresaPrecoServico.INICIADO_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.INICIADO_FULL, EmpresaPrecoServico.INICIADO_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.ACTIVO, EmpresaPrecoServico.ACTIVO_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.ACTIVO_FULL, EmpresaPrecoServico.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 ForeignKeyempresa_preco_servico_tipo_idToempresa_preco_servico_tipo = + new com.evolute.entity.ForeignKey( EmpresaPrecoServico.class, EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID, db.data.siprp_local.outer.EmpresaPrecoServicoTipoData.class, db.data.siprp_local.outer.EmpresaPrecoServicoTipoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_preco_periodicidade_tipo_idToempresa_preco_periodicidade_tipo = + new com.evolute.entity.ForeignKey( EmpresaPrecoServico.class, EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, db.data.siprp_local.outer.EmpresaPrecoPeriodicidadeTipoData.class, db.data.siprp_local.outer.EmpresaPrecoPeriodicidadeTipoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( EmpresaPrecoServico.class, EmpresaPrecoServico.EMPRESA_ID, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final String TABLENAME = "empresa_preco_servico"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.empresa_preco_servico"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "empresa_preco_servico.id"; + public static final int ID_INDEX = 0; + public static final String EMPRESA_PRECO_SERVICO_TIPO_ID = "empresa_preco_servico_tipo_id"; + public static final String EMPRESA_PRECO_SERVICO_TIPO_ID_FULL = "empresa_preco_servico.empresa_preco_servico_tipo_id"; + public static final int EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX = 1; + public static final String TO_EMPRESA_PRECO_SERVICO_TIPO_ID = "to_empresa_preco_servico_tipo_id"; + public static final String TO_EMPRESA_PRECO_SERVICO_TIPO_ID_FULL = "empresa_preco_servico.to_empresa_preco_servico_tipo_id"; + public static final int TO_EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX = 2; + public static final String EMPRESA_PRECO_PERIODICIDADE_TIPO_ID = "empresa_preco_periodicidade_tipo_id"; + public static final String EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_FULL = "empresa_preco_servico.empresa_preco_periodicidade_tipo_id"; + public static final int EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX = 3; + public static final String TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID = "to_empresa_preco_periodicidade_tipo_id"; + public static final String TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_FULL = "empresa_preco_servico.to_empresa_preco_periodicidade_tipo_id"; + public static final int TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX = 4; + public static final String TIPO_OUTRO = "tipo_outro"; + public static final String TIPO_OUTRO_FULL = "empresa_preco_servico.tipo_outro"; + public static final int TIPO_OUTRO_INDEX = 5; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "empresa_preco_servico.empresa_id"; + public static final int EMPRESA_ID_INDEX = 6; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final String TO_EMPRESA_ID_FULL = "empresa_preco_servico.to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 7; + public static final String VALOR = "valor"; + public static final String VALOR_FULL = "empresa_preco_servico.valor"; + public static final int VALOR_INDEX = 8; + public static final String INICIADO = "iniciado"; + public static final String INICIADO_FULL = "empresa_preco_servico.iniciado"; + public static final int INICIADO_INDEX = 9; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "empresa_preco_servico.activo"; + public static final int ACTIVO_INDEX = 10; + + public static final String FIELD_NAMES[] = new String[]{ + EMPRESA_PRECO_SERVICO_TIPO_ID, TO_EMPRESA_PRECO_SERVICO_TIPO_ID, + EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, + TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, TIPO_OUTRO, EMPRESA_ID, + TO_EMPRESA_ID, VALOR, INICIADO, ACTIVO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + EMPRESA_PRECO_SERVICO_TIPO_ID, TABLENAME + "." + TO_EMPRESA_PRECO_SERVICO_TIPO_ID, + TABLENAME + "." + EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, + TABLENAME + "." + TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, TABLENAME + "." + TIPO_OUTRO, TABLENAME + "." + EMPRESA_ID, + TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + VALOR, TABLENAME + "." + INICIADO, TABLENAME + "." + ACTIVO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, EMPRESA_PRECO_SERVICO_TIPO_ID, EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, + TIPO_OUTRO, EMPRESA_ID, VALOR, INICIADO, ACTIVO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, EMPRESA_PRECO_SERVICO_TIPO_ID, EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, + TIPO_OUTRO, EMPRESA_ID, VALOR, INICIADO, ACTIVO, }; + + private Integer id; + private Integer empresa_preco_servico_tipo_id; + private db.data.siprp_local.outer.EmpresaPrecoServicoTipoData to_empresa_preco_servico_tipo_id; + private Integer empresa_preco_periodicidade_tipo_id; + private db.data.siprp_local.outer.EmpresaPrecoPeriodicidadeTipoData to_empresa_preco_periodicidade_tipo_id; + private String tipo_outro; + private Integer empresa_id; + private db.data.siprp_local.outer.EmpresasData to_empresa_id; + private Double valor; + private java.sql.Timestamp iniciado; + private Boolean activo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EmpresaPrecoServico() + { + 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 Integer getEmpresa_preco_servico_tipo_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( EMPRESA_PRECO_SERVICO_TIPO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.empresa_preco_servico_tipo_id; + } + + public void setEmpresa_preco_servico_tipo_id( Integer empresa_preco_servico_tipo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( EMPRESA_PRECO_SERVICO_TIPO_ID, empresa_preco_servico_tipo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.empresa_preco_servico_tipo_id = empresa_preco_servico_tipo_id; + LAZY_LOADED_OBJECTS.put( EMPRESA_PRECO_SERVICO_TIPO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EmpresaPrecoServicoTipoData toEmpresa_preco_servico_tipo_id() + { + try + { + prepare( TO_EMPRESA_PRECO_SERVICO_TIPO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_preco_servico_tipo_id; + } + + public void setToEmpresa_preco_servico_tipo_id( db.data.siprp_local.outer.EmpresaPrecoServicoTipoData to_empresa_preco_servico_tipo_id ) + { + try + { + preProcess( TO_EMPRESA_PRECO_SERVICO_TIPO_ID, to_empresa_preco_servico_tipo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_empresa_preco_servico_tipo_id = to_empresa_preco_servico_tipo_id; + } + + public Integer getEmpresa_preco_periodicidade_tipo_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( EMPRESA_PRECO_PERIODICIDADE_TIPO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.empresa_preco_periodicidade_tipo_id; + } + + public void setEmpresa_preco_periodicidade_tipo_id( Integer empresa_preco_periodicidade_tipo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, empresa_preco_periodicidade_tipo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.empresa_preco_periodicidade_tipo_id = empresa_preco_periodicidade_tipo_id; + LAZY_LOADED_OBJECTS.put( EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EmpresaPrecoPeriodicidadeTipoData toEmpresa_preco_periodicidade_tipo_id() + { + try + { + prepare( TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_preco_periodicidade_tipo_id; + } + + public void setToEmpresa_preco_periodicidade_tipo_id( db.data.siprp_local.outer.EmpresaPrecoPeriodicidadeTipoData to_empresa_preco_periodicidade_tipo_id ) + { + try + { + preProcess( TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, to_empresa_preco_periodicidade_tipo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_empresa_preco_periodicidade_tipo_id = to_empresa_preco_periodicidade_tipo_id; + } + + public String getTipo_outro() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TIPO_OUTRO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tipo_outro; + } + + public void setTipo_outro( String tipo_outro ) + { + try + { + setLockedForRefresh( true ); + preProcess( TIPO_OUTRO, tipo_outro ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tipo_outro = tipo_outro; + LAZY_LOADED_OBJECTS.put( TIPO_OUTRO, 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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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 Double getValor() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.valor; + } + + public void setValor( Double valor ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALOR, valor ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.valor = valor; + LAZY_LOADED_OBJECTS.put( VALOR, Boolean.TRUE ); + } + + public java.sql.Timestamp getIniciado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( INICIADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.iniciado; + } + + public void setIniciado( java.sql.Timestamp iniciado ) + { + try + { + setLockedForRefresh( true ); + preProcess( INICIADO, iniciado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.iniciado = iniciado; + LAZY_LOADED_OBJECTS.put( INICIADO, Boolean.TRUE ); + } + + public Boolean getActivo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACTIVO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.activo; + } + + public void setActivo( Boolean 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 EmpresaPrecoServico.ID_INDEX: + value = getId(); + break; + case EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + value = getEmpresa_preco_servico_tipo_id(); + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + value = toEmpresa_preco_servico_tipo_id(); + break; + case EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + value = getEmpresa_preco_periodicidade_tipo_id(); + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + value = toEmpresa_preco_periodicidade_tipo_id(); + break; + case EmpresaPrecoServico.TIPO_OUTRO_INDEX: + value = getTipo_outro(); + break; + case EmpresaPrecoServico.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case EmpresaPrecoServico.TO_EMPRESA_ID_INDEX: + value = toEmpresa_id(); + break; + case EmpresaPrecoServico.VALOR_INDEX: + value = getValor(); + break; + case EmpresaPrecoServico.INICIADO_INDEX: + value = getIniciado(); + break; + case EmpresaPrecoServico.ACTIVO_INDEX: + value = getActivo(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoServico.ID_INDEX: + value = this.id; + break; + case EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + value = this.empresa_preco_servico_tipo_id; + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + value = this.to_empresa_preco_servico_tipo_id; + break; + case EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + value = this.empresa_preco_periodicidade_tipo_id; + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + value = this.to_empresa_preco_periodicidade_tipo_id; + break; + case EmpresaPrecoServico.TIPO_OUTRO_INDEX: + value = this.tipo_outro; + break; + case EmpresaPrecoServico.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case EmpresaPrecoServico.TO_EMPRESA_ID_INDEX: + value = this.to_empresa_id; + break; + case EmpresaPrecoServico.VALOR_INDEX: + value = this.valor; + break; + case EmpresaPrecoServico.INICIADO_INDEX: + value = this.iniciado; + break; + case EmpresaPrecoServico.ACTIVO_INDEX: + value = this.activo; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoServico.ID_INDEX: + setId( ( Integer ) value ); + break; + case EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + setEmpresa_preco_servico_tipo_id( ( Integer ) value ); + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + setToEmpresa_preco_servico_tipo_id( ( db.data.siprp_local.outer.EmpresaPrecoServicoTipoData ) value ); + break; + case EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + setEmpresa_preco_periodicidade_tipo_id( ( Integer ) value ); + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + setToEmpresa_preco_periodicidade_tipo_id( ( db.data.siprp_local.outer.EmpresaPrecoPeriodicidadeTipoData ) value ); + break; + case EmpresaPrecoServico.TIPO_OUTRO_INDEX: + setTipo_outro( ( String ) value ); + break; + case EmpresaPrecoServico.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case EmpresaPrecoServico.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( db.data.siprp_local.outer.EmpresasData ) value ); + break; + case EmpresaPrecoServico.VALOR_INDEX: + setValor( ( Double ) value ); + break; + case EmpresaPrecoServico.INICIADO_INDEX: + setIniciado( ( java.sql.Timestamp ) value ); + break; + case EmpresaPrecoServico.ACTIVO_INDEX: + setActivo( ( Boolean ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoServico.ID_INDEX: + this.id = ( Integer ) value; + break; + case EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + this.empresa_preco_servico_tipo_id = ( Integer ) value; + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + this.to_empresa_preco_servico_tipo_id = ( db.data.siprp_local.outer.EmpresaPrecoServicoTipoData ) value; + break; + case EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + this.empresa_preco_periodicidade_tipo_id = ( Integer ) value; + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + this.to_empresa_preco_periodicidade_tipo_id = ( db.data.siprp_local.outer.EmpresaPrecoPeriodicidadeTipoData ) value; + break; + case EmpresaPrecoServico.TIPO_OUTRO_INDEX: + this.tipo_outro = ( String ) value; + break; + case EmpresaPrecoServico.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case EmpresaPrecoServico.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( db.data.siprp_local.outer.EmpresasData ) value; + break; + case EmpresaPrecoServico.VALOR_INDEX: + this.valor = ( Double ) value; + break; + case EmpresaPrecoServico.INICIADO_INDEX: + this.iniciado = ( java.sql.Timestamp ) value; + break; + case EmpresaPrecoServico.ACTIVO_INDEX: + this.activo = ( 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 EmpresaPrecoServico.ID_INDEX: + theClass = Integer.class; + break; + case EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + theClass = Integer.class; + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + theClass = db.data.siprp_local.outer.EmpresaPrecoServicoTipoData.class; + break; + case EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + theClass = Integer.class; + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + theClass = db.data.siprp_local.outer.EmpresaPrecoPeriodicidadeTipoData.class; + break; + case EmpresaPrecoServico.TIPO_OUTRO_INDEX: + theClass = String.class; + break; + case EmpresaPrecoServico.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case EmpresaPrecoServico.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.outer.EmpresasData.class; + break; + case EmpresaPrecoServico.VALOR_INDEX: + theClass = Double.class; + break; + case EmpresaPrecoServico.INICIADO_INDEX: + theClass = java.sql.Timestamp.class; + break; + case EmpresaPrecoServico.ACTIVO_INDEX: + theClass = Boolean.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EmpresaPrecoServico._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, EmpresaPrecoServico.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EmpresaPrecoServicoTipo.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EmpresaPrecoServicoTipo.java new file mode 100644 index 00000000..5260dbfa --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EmpresaPrecoServicoTipo.java @@ -0,0 +1,294 @@ +/* +* EmpresaPrecoServicoTipo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EmpresaPrecoServicoTipo extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EmpresaPrecoServicoTipo.ID, EmpresaPrecoServicoTipo.ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServicoTipo.ID_FULL, EmpresaPrecoServicoTipo.ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServicoTipo.NOME, EmpresaPrecoServicoTipo.NOME_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServicoTipo.NOME_FULL, EmpresaPrecoServicoTipo.NOME_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "empresa_preco_servico_tipo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.empresa_preco_servico_tipo"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "empresa_preco_servico_tipo.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "empresa_preco_servico_tipo.nome"; + public static final int NOME_INDEX = 1; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, }; + + private Integer id; + private String nome; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EmpresaPrecoServicoTipo() + { + 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.ListfromEmpresaPrecoServico_empresa_preco_servico_tipo_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.EmpresaPrecoServicoData.class , getPrimaryKey().getMap().get("id"), "empresa_preco_servico_tipo_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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoServicoTipo.ID_INDEX: + value = getId(); + break; + case EmpresaPrecoServicoTipo.NOME_INDEX: + value = getNome(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoServicoTipo.ID_INDEX: + value = this.id; + break; + case EmpresaPrecoServicoTipo.NOME_INDEX: + value = this.nome; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoServicoTipo.ID_INDEX: + setId( ( Integer ) value ); + break; + case EmpresaPrecoServicoTipo.NOME_INDEX: + setNome( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoServicoTipo.ID_INDEX: + this.id = ( Integer ) value; + break; + case EmpresaPrecoServicoTipo.NOME_INDEX: + this.nome = ( 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 EmpresaPrecoServicoTipo.ID_INDEX: + theClass = Integer.class; + break; + case EmpresaPrecoServicoTipo.NOME_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EmpresaPrecoServicoTipo._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, EmpresaPrecoServicoTipo.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Empresas.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Empresas.java new file mode 100644 index 00000000..3e73f792 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Empresas.java @@ -0,0 +1,2726 @@ +/* +* Empresas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Empresas extends com.evolute.entity.evo.EvoDataObject +{ + 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.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 ); + FIELD_INDEXES.put( Empresas.CODIGO_RELATORIO_UNICO, Empresas.CODIGO_RELATORIO_UNICO_INDEX ); + FIELD_INDEXES.put( Empresas.CODIGO_RELATORIO_UNICO_FULL, Empresas.CODIGO_RELATORIO_UNICO_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, db.data.siprp_local.outer.ContactosData.class, db.data.siprp_local.outer.ContactosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycontacto_2Tocontactos = + new com.evolute.entity.ForeignKey( Empresas.class, Empresas.CONTACTO_2, db.data.siprp_local.outer.ContactosData.class, db.data.siprp_local.outer.ContactosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_logo_idToimage = + new com.evolute.entity.ForeignKey( Empresas.class, Empresas.EMPRESA_LOGO_ID, db.data.siprp_local.outer.ImageData.class, db.data.siprp_local.outer.ImageData.ID ); + + public static final String TABLENAME = "empresas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.empresas"; + + 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 String TO_CONTACTO_1_FULL = "empresas.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 String TO_CONTACTO_2_FULL = "empresas.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 PERIODICIDADE = "periodicidade"; + public static final String PERIODICIDADE_FULL = "empresas.periodicidade"; + public static final int PERIODICIDADE_INDEX = 32; + public static final String ACTIVIDADE = "actividade"; + public static final String ACTIVIDADE_FULL = "empresas.actividade"; + public static final int ACTIVIDADE_INDEX = 33; + public static final String ACTUALIZACAO = "actualizacao"; + public static final String ACTUALIZACAO_FULL = "empresas.actualizacao"; + public static final int ACTUALIZACAO_INDEX = 34; + 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 = 35; + 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 = 36; + 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 = 37; + 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 = 38; + 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 = 39; + 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 = 40; + public static final String DURACAO = "duracao"; + public static final String DURACAO_FULL = "empresas.duracao"; + public static final int DURACAO_INDEX = 41; + 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 = 42; + 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 = 43; + public static final String TO_EMPRESA_LOGO_ID = "to_empresa_logo_id"; + public static final String TO_EMPRESA_LOGO_ID_FULL = "empresas.to_empresa_logo_id"; + public static final int TO_EMPRESA_LOGO_ID_INDEX = 44; + 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 = 45; + public static final String CODIGO_RELATORIO_UNICO = "codigo_relatorio_unico"; + public static final String CODIGO_RELATORIO_UNICO_FULL = "empresas.codigo_relatorio_unico"; + public static final int CODIGO_RELATORIO_UNICO_INDEX = 46; + + 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, 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, CODIGO_RELATORIO_UNICO, }; + + 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 + "." + 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, TABLENAME + "." + CODIGO_RELATORIO_UNICO, }; + + 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, 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, CODIGO_RELATORIO_UNICO, }; + + + 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, 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, CODIGO_RELATORIO_UNICO, }; + + 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 db.data.siprp_local.outer.ContactosData to_contacto_1; + private Integer contacto_2; + private db.data.siprp_local.outer.ContactosData to_contacto_2; + private java.util.Date data_relatorio_anual; + 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 db.data.siprp_local.outer.ImageData to_empresa_logo_id; + private Boolean imprimir_tabela_alargada; + private String codigo_relatorio_unico; + + 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 }; + } + + 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( db.data.siprp_local.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.ListfromEmpresaPrecoServico_empresa_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.EmpresaPrecoServicoData.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 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 db.data.siprp_local.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( db.data.siprp_local.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 String getCodigo_relatorio_unico() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CODIGO_RELATORIO_UNICO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.codigo_relatorio_unico; + } + + public void setCodigo_relatorio_unico( String codigo_relatorio_unico ) + { + try + { + setLockedForRefresh( true ); + preProcess( CODIGO_RELATORIO_UNICO, codigo_relatorio_unico ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.codigo_relatorio_unico = codigo_relatorio_unico; + LAZY_LOADED_OBJECTS.put( CODIGO_RELATORIO_UNICO, 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.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; + case Empresas.CODIGO_RELATORIO_UNICO_INDEX: + value = getCodigo_relatorio_unico(); + 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.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; + case Empresas.CODIGO_RELATORIO_UNICO_INDEX: + value = this.codigo_relatorio_unico; + 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( ( db.data.siprp_local.outer.ContactosData ) value ); + break; + case Empresas.CONTACTO_2_INDEX: + setContacto_2( ( Integer ) value ); + break; + case Empresas.TO_CONTACTO_2_INDEX: + setToContacto_2( ( db.data.siprp_local.outer.ContactosData ) value ); + break; + case Empresas.DATA_RELATORIO_ANUAL_INDEX: + setData_relatorio_anual( ( java.util.Date ) 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( ( db.data.siprp_local.outer.ImageData ) value ); + break; + case Empresas.IMPRIMIR_TABELA_ALARGADA_INDEX: + setImprimir_tabela_alargada( ( Boolean ) value ); + break; + case Empresas.CODIGO_RELATORIO_UNICO_INDEX: + setCodigo_relatorio_unico( ( String ) 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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.outer.ContactosData ) value; + break; + case Empresas.DATA_RELATORIO_ANUAL_INDEX: + this.data_relatorio_anual = ( java.util.Date ) 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 = ( db.data.siprp_local.outer.ImageData ) value; + break; + case Empresas.IMPRIMIR_TABELA_ALARGADA_INDEX: + this.imprimir_tabela_alargada = ( Boolean ) value; + break; + case Empresas.CODIGO_RELATORIO_UNICO_INDEX: + this.codigo_relatorio_unico = ( 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 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 = db.data.siprp_local.outer.ContactosData.class; + break; + case Empresas.CONTACTO_2_INDEX: + theClass = Integer.class; + break; + case Empresas.TO_CONTACTO_2_INDEX: + theClass = db.data.siprp_local.outer.ContactosData.class; + break; + case Empresas.DATA_RELATORIO_ANUAL_INDEX: + theClass = java.util.Date.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 = db.data.siprp_local.outer.ImageData.class; + break; + case Empresas.IMPRIMIR_TABELA_ALARGADA_INDEX: + theClass = Boolean.class; + break; + case Empresas.CODIGO_RELATORIO_UNICO_INDEX: + theClass = String.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, ( 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Errors.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Errors.java new file mode 100644 index 00000000..0649e573 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class Errors extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.errors"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "errors.id"; + public static final int ID_INDEX = 0; + public static final String DATE = "date"; + public static final String DATE_FULL = "errors.date"; + public static final int DATE_INDEX = 1; + public static final String TYPE = "type"; + public static final String TYPE_FULL = "errors.type"; + public static final int TYPE_INDEX = 2; + public static final String ENVIRONMENT = "environment"; + public static final String ENVIRONMENT_FULL = "errors.environment"; + public static final int ENVIRONMENT_INDEX = 3; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "errors.description"; + public static final int DESCRIPTION_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DATE, TYPE, ENVIRONMENT, DESCRIPTION, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATE, TABLENAME + "." + TYPE, TABLENAME + "." + ENVIRONMENT, TABLENAME + "." + DESCRIPTION, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATE, TYPE, ENVIRONMENT, DESCRIPTION, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATE, TYPE, ENVIRONMENT, DESCRIPTION, }; + + private Integer id; + private java.sql.Timestamp date; + private String type; + private String environment; + private String description; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Errors() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Estabelecimentos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Estabelecimentos.java new file mode 100644 index 00000000..30bbda4c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Estabelecimentos.java @@ -0,0 +1,1347 @@ +/* +* Estabelecimentos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Estabelecimentos extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedico_idTomedicos = + new com.evolute.entity.ForeignKey( Estabelecimentos.class, Estabelecimentos.MEDICO_ID, db.data.siprp_local.outer.MedicosData.class, db.data.siprp_local.outer.MedicosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_consulta_idToprestadores = + new com.evolute.entity.ForeignKey( Estabelecimentos.class, Estabelecimentos.PRESTADOR_CONSULTA_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_ecds_idToprestadores = + new com.evolute.entity.ForeignKey( Estabelecimentos.class, Estabelecimentos.PRESTADOR_ECDS_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycontacto_idTocontactos = + new com.evolute.entity.ForeignKey( Estabelecimentos.class, Estabelecimentos.CONTACTO_ID, db.data.siprp_local.outer.ContactosData.class, db.data.siprp_local.outer.ContactosData.ID ); + + public static final String TABLENAME = "estabelecimentos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.estabelecimentos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "estabelecimentos.id"; + public static final int ID_INDEX = 0; + public static final String 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 String TO_EMPRESA_ID_FULL = "estabelecimentos.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 String TO_MEDICO_ID_FULL = "estabelecimentos.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 String TO_PRESTADOR_CONSULTA_ID_FULL = "estabelecimentos.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 String TO_PRESTADOR_ECDS_ID_FULL = "estabelecimentos.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 String TO_CONTACTO_ID_FULL = "estabelecimentos.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 db.data.siprp_local.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 db.data.siprp_local.outer.MedicosData to_medico_id; + private Integer prestador_consulta_id; + private db.data.siprp_local.outer.PrestadoresData to_prestador_consulta_id; + private Integer prestador_ecds_id; + private db.data.siprp_local.outer.PrestadoresData to_prestador_ecds_id; + private Integer contacto_id; + private db.data.siprp_local.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.ListfromAptSegurancaAlimentar_estabelecimento_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.AptSegurancaAlimentarData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromAvisos_estabelecimento_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.outer.PrestadoresData ) value ); + break; + case Estabelecimentos.CONTACTO_ID_INDEX: + setContacto_id( ( Integer ) value ); + break; + case Estabelecimentos.TO_CONTACTO_ID_INDEX: + setToContacto_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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 = db.data.siprp_local.outer.MedicosData.class; + break; + case Estabelecimentos.PRESTADOR_CONSULTA_ID_INDEX: + theClass = Integer.class; + break; + case Estabelecimentos.TO_PRESTADOR_CONSULTA_ID_INDEX: + theClass = db.data.siprp_local.outer.PrestadoresData.class; + break; + case Estabelecimentos.PRESTADOR_ECDS_ID_INDEX: + theClass = Integer.class; + break; + case Estabelecimentos.TO_PRESTADOR_ECDS_ID_INDEX: + theClass = db.data.siprp_local.outer.PrestadoresData.class; + break; + case Estabelecimentos.CONTACTO_ID_INDEX: + theClass = Integer.class; + break; + case Estabelecimentos.TO_CONTACTO_ID_INDEX: + theClass = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Etiquetas.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Etiquetas.java new file mode 100644 index 00000000..676abf37 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class Etiquetas extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.etiquetas"; + + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoPessoa.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoPessoa.java new file mode 100644 index 00000000..46abf268 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoPessoa.java @@ -0,0 +1,914 @@ +/* +* EvoPessoa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EvoPessoa extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EvoPessoa.ID, EvoPessoa.ID_INDEX ); + FIELD_INDEXES.put( EvoPessoa.ID_FULL, EvoPessoa.ID_INDEX ); + FIELD_INDEXES.put( EvoPessoa.NOME, EvoPessoa.NOME_INDEX ); + FIELD_INDEXES.put( EvoPessoa.NOME_FULL, EvoPessoa.NOME_INDEX ); + FIELD_INDEXES.put( EvoPessoa.MORADA, EvoPessoa.MORADA_INDEX ); + FIELD_INDEXES.put( EvoPessoa.MORADA_FULL, EvoPessoa.MORADA_INDEX ); + FIELD_INDEXES.put( EvoPessoa.CIDADE, EvoPessoa.CIDADE_INDEX ); + FIELD_INDEXES.put( EvoPessoa.CIDADE_FULL, EvoPessoa.CIDADE_INDEX ); + FIELD_INDEXES.put( EvoPessoa.LOCALIDADE, EvoPessoa.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( EvoPessoa.LOCALIDADE_FULL, EvoPessoa.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( EvoPessoa.CODIGO_POSTAL, EvoPessoa.CODIGO_POSTAL_INDEX ); + FIELD_INDEXES.put( EvoPessoa.CODIGO_POSTAL_FULL, EvoPessoa.CODIGO_POSTAL_INDEX ); + FIELD_INDEXES.put( EvoPessoa.EMAIL, EvoPessoa.EMAIL_INDEX ); + FIELD_INDEXES.put( EvoPessoa.EMAIL_FULL, EvoPessoa.EMAIL_INDEX ); + FIELD_INDEXES.put( EvoPessoa.TELEFONE, EvoPessoa.TELEFONE_INDEX ); + FIELD_INDEXES.put( EvoPessoa.TELEFONE_FULL, EvoPessoa.TELEFONE_INDEX ); + FIELD_INDEXES.put( EvoPessoa.TELEMOVEL, EvoPessoa.TELEMOVEL_INDEX ); + FIELD_INDEXES.put( EvoPessoa.TELEMOVEL_FULL, EvoPessoa.TELEMOVEL_INDEX ); + FIELD_INDEXES.put( EvoPessoa.DATA_NASCIMENTO, EvoPessoa.DATA_NASCIMENTO_INDEX ); + FIELD_INDEXES.put( EvoPessoa.DATA_NASCIMENTO_FULL, EvoPessoa.DATA_NASCIMENTO_INDEX ); + FIELD_INDEXES.put( EvoPessoa.NATURALIDADE, EvoPessoa.NATURALIDADE_INDEX ); + FIELD_INDEXES.put( EvoPessoa.NATURALIDADE_FULL, EvoPessoa.NATURALIDADE_INDEX ); + FIELD_INDEXES.put( EvoPessoa.NACIONALIDADE_ID, EvoPessoa.NACIONALIDADE_ID_INDEX ); + FIELD_INDEXES.put( EvoPessoa.NACIONALIDADE_ID_FULL, EvoPessoa.NACIONALIDADE_ID_INDEX ); + FIELD_INDEXES.put( EvoPessoa.SEXO, EvoPessoa.SEXO_INDEX ); + FIELD_INDEXES.put( EvoPessoa.SEXO_FULL, EvoPessoa.SEXO_INDEX ); + FIELD_INDEXES.put( EvoPessoa.PROFISSAO, EvoPessoa.PROFISSAO_INDEX ); + FIELD_INDEXES.put( EvoPessoa.PROFISSAO_FULL, EvoPessoa.PROFISSAO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "evo_pessoa"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.evo_pessoa"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "evo_pessoa.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "evo_pessoa.nome"; + public static final int NOME_INDEX = 1; + public static final String MORADA = "morada"; + public static final String MORADA_FULL = "evo_pessoa.morada"; + public static final int MORADA_INDEX = 2; + public static final String CIDADE = "cidade"; + public static final String CIDADE_FULL = "evo_pessoa.cidade"; + public static final int CIDADE_INDEX = 3; + public static final String LOCALIDADE = "localidade"; + public static final String LOCALIDADE_FULL = "evo_pessoa.localidade"; + public static final int LOCALIDADE_INDEX = 4; + public static final String CODIGO_POSTAL = "codigo_postal"; + public static final String CODIGO_POSTAL_FULL = "evo_pessoa.codigo_postal"; + public static final int CODIGO_POSTAL_INDEX = 5; + public static final String EMAIL = "email"; + public static final String EMAIL_FULL = "evo_pessoa.email"; + public static final int EMAIL_INDEX = 6; + public static final String TELEFONE = "telefone"; + public static final String TELEFONE_FULL = "evo_pessoa.telefone"; + public static final int TELEFONE_INDEX = 7; + public static final String TELEMOVEL = "telemovel"; + public static final String TELEMOVEL_FULL = "evo_pessoa.telemovel"; + public static final int TELEMOVEL_INDEX = 8; + public static final String DATA_NASCIMENTO = "data_nascimento"; + public static final String DATA_NASCIMENTO_FULL = "evo_pessoa.data_nascimento"; + public static final int DATA_NASCIMENTO_INDEX = 9; + public static final String NATURALIDADE = "naturalidade"; + public static final String NATURALIDADE_FULL = "evo_pessoa.naturalidade"; + public static final int NATURALIDADE_INDEX = 10; + public static final String NACIONALIDADE_ID = "nacionalidade_id"; + public static final String NACIONALIDADE_ID_FULL = "evo_pessoa.nacionalidade_id"; + public static final int NACIONALIDADE_ID_INDEX = 11; + public static final String SEXO = "sexo"; + public static final String SEXO_FULL = "evo_pessoa.sexo"; + public static final int SEXO_INDEX = 12; + public static final String PROFISSAO = "profissao"; + public static final String PROFISSAO_FULL = "evo_pessoa.profissao"; + public static final int PROFISSAO_INDEX = 13; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, MORADA, CIDADE, LOCALIDADE, CODIGO_POSTAL, EMAIL, TELEFONE, TELEMOVEL, + DATA_NASCIMENTO, NATURALIDADE, NACIONALIDADE_ID, SEXO, PROFISSAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + MORADA, TABLENAME + "." + CIDADE, TABLENAME + "." + LOCALIDADE, TABLENAME + "." + CODIGO_POSTAL, TABLENAME + "." + EMAIL, TABLENAME + "." + TELEFONE, TABLENAME + "." + TELEMOVEL, + TABLENAME + "." + DATA_NASCIMENTO, TABLENAME + "." + NATURALIDADE, TABLENAME + "." + NACIONALIDADE_ID, TABLENAME + "." + SEXO, TABLENAME + "." + PROFISSAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, MORADA, CIDADE, LOCALIDADE, CODIGO_POSTAL, EMAIL, TELEFONE, TELEMOVEL, + DATA_NASCIMENTO, NATURALIDADE, NACIONALIDADE_ID, SEXO, PROFISSAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, MORADA, CIDADE, LOCALIDADE, CODIGO_POSTAL, EMAIL, TELEFONE, TELEMOVEL, + DATA_NASCIMENTO, NATURALIDADE, NACIONALIDADE_ID, SEXO, PROFISSAO, }; + + private Integer id; + private String nome; + private String morada; + private String cidade; + private String localidade; + private String codigo_postal; + private String email; + private String telefone; + private Integer telemovel; + private java.util.Date data_nascimento; + private String naturalidade; + private Integer nacionalidade_id; + private String sexo; + private String profissao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EvoPessoa() + { + 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.ListfromPesPessoaDocumento_pessoa_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.PesPessoaDocumentoData.class , getPrimaryKey().getMap().get("id"), "pessoa_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadores_pessoa_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.TrabalhadoresData.class , getPrimaryKey().getMap().get("id"), "pessoa_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 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 getCidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.cidade; + } + + public void setCidade( String cidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( CIDADE, cidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.cidade = cidade; + LAZY_LOADED_OBJECTS.put( CIDADE, 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 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 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 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 Integer getTelemovel() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TELEMOVEL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.telemovel; + } + + public void setTelemovel( Integer 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 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 getNaturalidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NATURALIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.naturalidade; + } + + public void setNaturalidade( String naturalidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( NATURALIDADE, naturalidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.naturalidade = naturalidade; + LAZY_LOADED_OBJECTS.put( NATURALIDADE, Boolean.TRUE ); + } + + public Integer getNacionalidade_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NACIONALIDADE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nacionalidade_id; + } + + public void setNacionalidade_id( Integer nacionalidade_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( NACIONALIDADE_ID, nacionalidade_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nacionalidade_id = nacionalidade_id; + LAZY_LOADED_OBJECTS.put( NACIONALIDADE_ID, 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 String getProfissao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROFISSAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.profissao; + } + + public void setProfissao( String profissao ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROFISSAO, profissao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.profissao = profissao; + LAZY_LOADED_OBJECTS.put( PROFISSAO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoPessoa.ID_INDEX: + value = getId(); + break; + case EvoPessoa.NOME_INDEX: + value = getNome(); + break; + case EvoPessoa.MORADA_INDEX: + value = getMorada(); + break; + case EvoPessoa.CIDADE_INDEX: + value = getCidade(); + break; + case EvoPessoa.LOCALIDADE_INDEX: + value = getLocalidade(); + break; + case EvoPessoa.CODIGO_POSTAL_INDEX: + value = getCodigo_postal(); + break; + case EvoPessoa.EMAIL_INDEX: + value = getEmail(); + break; + case EvoPessoa.TELEFONE_INDEX: + value = getTelefone(); + break; + case EvoPessoa.TELEMOVEL_INDEX: + value = getTelemovel(); + break; + case EvoPessoa.DATA_NASCIMENTO_INDEX: + value = getData_nascimento(); + break; + case EvoPessoa.NATURALIDADE_INDEX: + value = getNaturalidade(); + break; + case EvoPessoa.NACIONALIDADE_ID_INDEX: + value = getNacionalidade_id(); + break; + case EvoPessoa.SEXO_INDEX: + value = getSexo(); + break; + case EvoPessoa.PROFISSAO_INDEX: + value = getProfissao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoPessoa.ID_INDEX: + value = this.id; + break; + case EvoPessoa.NOME_INDEX: + value = this.nome; + break; + case EvoPessoa.MORADA_INDEX: + value = this.morada; + break; + case EvoPessoa.CIDADE_INDEX: + value = this.cidade; + break; + case EvoPessoa.LOCALIDADE_INDEX: + value = this.localidade; + break; + case EvoPessoa.CODIGO_POSTAL_INDEX: + value = this.codigo_postal; + break; + case EvoPessoa.EMAIL_INDEX: + value = this.email; + break; + case EvoPessoa.TELEFONE_INDEX: + value = this.telefone; + break; + case EvoPessoa.TELEMOVEL_INDEX: + value = this.telemovel; + break; + case EvoPessoa.DATA_NASCIMENTO_INDEX: + value = this.data_nascimento; + break; + case EvoPessoa.NATURALIDADE_INDEX: + value = this.naturalidade; + break; + case EvoPessoa.NACIONALIDADE_ID_INDEX: + value = this.nacionalidade_id; + break; + case EvoPessoa.SEXO_INDEX: + value = this.sexo; + break; + case EvoPessoa.PROFISSAO_INDEX: + value = this.profissao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoPessoa.ID_INDEX: + setId( ( Integer ) value ); + break; + case EvoPessoa.NOME_INDEX: + setNome( ( String ) value ); + break; + case EvoPessoa.MORADA_INDEX: + setMorada( ( String ) value ); + break; + case EvoPessoa.CIDADE_INDEX: + setCidade( ( String ) value ); + break; + case EvoPessoa.LOCALIDADE_INDEX: + setLocalidade( ( String ) value ); + break; + case EvoPessoa.CODIGO_POSTAL_INDEX: + setCodigo_postal( ( String ) value ); + break; + case EvoPessoa.EMAIL_INDEX: + setEmail( ( String ) value ); + break; + case EvoPessoa.TELEFONE_INDEX: + setTelefone( ( String ) value ); + break; + case EvoPessoa.TELEMOVEL_INDEX: + setTelemovel( ( Integer ) value ); + break; + case EvoPessoa.DATA_NASCIMENTO_INDEX: + setData_nascimento( ( java.util.Date ) value ); + break; + case EvoPessoa.NATURALIDADE_INDEX: + setNaturalidade( ( String ) value ); + break; + case EvoPessoa.NACIONALIDADE_ID_INDEX: + setNacionalidade_id( ( Integer ) value ); + break; + case EvoPessoa.SEXO_INDEX: + setSexo( ( String ) value ); + break; + case EvoPessoa.PROFISSAO_INDEX: + setProfissao( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoPessoa.ID_INDEX: + this.id = ( Integer ) value; + break; + case EvoPessoa.NOME_INDEX: + this.nome = ( String ) value; + break; + case EvoPessoa.MORADA_INDEX: + this.morada = ( String ) value; + break; + case EvoPessoa.CIDADE_INDEX: + this.cidade = ( String ) value; + break; + case EvoPessoa.LOCALIDADE_INDEX: + this.localidade = ( String ) value; + break; + case EvoPessoa.CODIGO_POSTAL_INDEX: + this.codigo_postal = ( String ) value; + break; + case EvoPessoa.EMAIL_INDEX: + this.email = ( String ) value; + break; + case EvoPessoa.TELEFONE_INDEX: + this.telefone = ( String ) value; + break; + case EvoPessoa.TELEMOVEL_INDEX: + this.telemovel = ( Integer ) value; + break; + case EvoPessoa.DATA_NASCIMENTO_INDEX: + this.data_nascimento = ( java.util.Date ) value; + break; + case EvoPessoa.NATURALIDADE_INDEX: + this.naturalidade = ( String ) value; + break; + case EvoPessoa.NACIONALIDADE_ID_INDEX: + this.nacionalidade_id = ( Integer ) value; + break; + case EvoPessoa.SEXO_INDEX: + this.sexo = ( String ) value; + break; + case EvoPessoa.PROFISSAO_INDEX: + this.profissao = ( 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 EvoPessoa.ID_INDEX: + theClass = Integer.class; + break; + case EvoPessoa.NOME_INDEX: + theClass = String.class; + break; + case EvoPessoa.MORADA_INDEX: + theClass = String.class; + break; + case EvoPessoa.CIDADE_INDEX: + theClass = String.class; + break; + case EvoPessoa.LOCALIDADE_INDEX: + theClass = String.class; + break; + case EvoPessoa.CODIGO_POSTAL_INDEX: + theClass = String.class; + break; + case EvoPessoa.EMAIL_INDEX: + theClass = String.class; + break; + case EvoPessoa.TELEFONE_INDEX: + theClass = String.class; + break; + case EvoPessoa.TELEMOVEL_INDEX: + theClass = Integer.class; + break; + case EvoPessoa.DATA_NASCIMENTO_INDEX: + theClass = java.util.Date.class; + break; + case EvoPessoa.NATURALIDADE_INDEX: + theClass = String.class; + break; + case EvoPessoa.NACIONALIDADE_ID_INDEX: + theClass = Integer.class; + break; + case EvoPessoa.SEXO_INDEX: + theClass = String.class; + break; + case EvoPessoa.PROFISSAO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EvoPessoa._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, EvoPessoa.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUpdate.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUpdate.java new file mode 100644 index 00000000..e3bab506 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUpdate.java @@ -0,0 +1,330 @@ +/* +* EvoUpdate.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EvoUpdate extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EvoUpdate.ID, EvoUpdate.ID_INDEX ); + FIELD_INDEXES.put( EvoUpdate.ID_FULL, EvoUpdate.ID_INDEX ); + FIELD_INDEXES.put( EvoUpdate.TIME, EvoUpdate.TIME_INDEX ); + FIELD_INDEXES.put( EvoUpdate.TIME_FULL, EvoUpdate.TIME_INDEX ); + FIELD_INDEXES.put( EvoUpdate.DUMMY, EvoUpdate.DUMMY_INDEX ); + FIELD_INDEXES.put( EvoUpdate.DUMMY_FULL, EvoUpdate.DUMMY_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "evo_update"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.evo_update"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "evo_update.id"; + public static final int ID_INDEX = 0; + public static final String TIME = "time"; + public static final String TIME_FULL = "evo_update.time"; + public static final int TIME_INDEX = 1; + public static final String DUMMY = "dummy"; + public static final String DUMMY_FULL = "evo_update.dummy"; + public static final int DUMMY_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + TIME, DUMMY, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TIME, TABLENAME + "." + DUMMY, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TIME, DUMMY, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TIME, DUMMY, }; + + private Integer id; + private java.sql.Timestamp time; + private Integer dummy; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EvoUpdate() + { + 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.sql.Timestamp getTime() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TIME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.time; + } + + public void setTime( java.sql.Timestamp time ) + { + try + { + setLockedForRefresh( true ); + preProcess( TIME, time ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.time = time; + LAZY_LOADED_OBJECTS.put( TIME, Boolean.TRUE ); + } + + public Integer getDummy() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DUMMY ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.dummy; + } + + public void setDummy( Integer dummy ) + { + try + { + setLockedForRefresh( true ); + preProcess( DUMMY, dummy ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.dummy = dummy; + LAZY_LOADED_OBJECTS.put( DUMMY, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUpdate.ID_INDEX: + value = getId(); + break; + case EvoUpdate.TIME_INDEX: + value = getTime(); + break; + case EvoUpdate.DUMMY_INDEX: + value = getDummy(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUpdate.ID_INDEX: + value = this.id; + break; + case EvoUpdate.TIME_INDEX: + value = this.time; + break; + case EvoUpdate.DUMMY_INDEX: + value = this.dummy; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUpdate.ID_INDEX: + setId( ( Integer ) value ); + break; + case EvoUpdate.TIME_INDEX: + setTime( ( java.sql.Timestamp ) value ); + break; + case EvoUpdate.DUMMY_INDEX: + setDummy( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUpdate.ID_INDEX: + this.id = ( Integer ) value; + break; + case EvoUpdate.TIME_INDEX: + this.time = ( java.sql.Timestamp ) value; + break; + case EvoUpdate.DUMMY_INDEX: + this.dummy = ( 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 EvoUpdate.ID_INDEX: + theClass = Integer.class; + break; + case EvoUpdate.TIME_INDEX: + theClass = java.sql.Timestamp.class; + break; + case EvoUpdate.DUMMY_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EvoUpdate._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, EvoUpdate.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUsrPermission.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUsrPermission.java new file mode 100644 index 00000000..b90e7ce1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUsrPermission.java @@ -0,0 +1,445 @@ +/* +* EvoUsrPermission.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EvoUsrPermission extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EvoUsrPermission.ID, EvoUsrPermission.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.ID_FULL, EvoUsrPermission.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.CLASS_, EvoUsrPermission.CLASS__INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.CLASS__FULL, EvoUsrPermission.CLASS__INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.KEY, EvoUsrPermission.KEY_INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.KEY_FULL, EvoUsrPermission.KEY_INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.DESCRIPTION, EvoUsrPermission.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.DESCRIPTION_FULL, EvoUsrPermission.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.DELETED_DATE, EvoUsrPermission.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.DELETED_DATE_FULL, EvoUsrPermission.DELETED_DATE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "evo_usr_permission"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.evo_usr_permission"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "evo_usr_permission.id"; + public static final int ID_INDEX = 0; + public static final String CLASS_ = "class"; + public static final String CLASS__FULL = "evo_usr_permission.class"; + public static final int CLASS__INDEX = 1; + public static final String KEY = "key"; + public static final String KEY_FULL = "evo_usr_permission.key"; + public static final int KEY_INDEX = 2; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "evo_usr_permission.description"; + public static final int DESCRIPTION_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "evo_usr_permission.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + CLASS_, KEY, DESCRIPTION, DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + CLASS_, TABLENAME + "." + KEY, TABLENAME + "." + DESCRIPTION, TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, CLASS_, KEY, DESCRIPTION, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, CLASS_, KEY, DESCRIPTION, DELETED_DATE, }; + + private Integer id; + private String class_; + private String key; + private String description; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EvoUsrPermission() + { + 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.ListfromEvoUsrRolesPermissions_permission_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.EvoUsrRolesPermissionsData.class , getPrimaryKey().getMap().get("id"), "permission_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public String getClass_() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CLASS_ ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.class_; + } + + public void setClass_( String class_ ) + { + try + { + setLockedForRefresh( true ); + preProcess( CLASS_, class_ ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.class_ = class_; + LAZY_LOADED_OBJECTS.put( CLASS_, Boolean.TRUE ); + } + + public String getKey() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( KEY ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.key; + } + + public void setKey( String key ) + { + try + { + setLockedForRefresh( true ); + preProcess( KEY, key ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.key = key; + LAZY_LOADED_OBJECTS.put( KEY, 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 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 EvoUsrPermission.ID_INDEX: + value = getId(); + break; + case EvoUsrPermission.CLASS__INDEX: + value = getClass_(); + break; + case EvoUsrPermission.KEY_INDEX: + value = getKey(); + break; + case EvoUsrPermission.DESCRIPTION_INDEX: + value = getDescription(); + break; + case EvoUsrPermission.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrPermission.ID_INDEX: + value = this.id; + break; + case EvoUsrPermission.CLASS__INDEX: + value = this.class_; + break; + case EvoUsrPermission.KEY_INDEX: + value = this.key; + break; + case EvoUsrPermission.DESCRIPTION_INDEX: + value = this.description; + break; + case EvoUsrPermission.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrPermission.ID_INDEX: + setId( ( Integer ) value ); + break; + case EvoUsrPermission.CLASS__INDEX: + setClass_( ( String ) value ); + break; + case EvoUsrPermission.KEY_INDEX: + setKey( ( String ) value ); + break; + case EvoUsrPermission.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + case EvoUsrPermission.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrPermission.ID_INDEX: + this.id = ( Integer ) value; + break; + case EvoUsrPermission.CLASS__INDEX: + this.class_ = ( String ) value; + break; + case EvoUsrPermission.KEY_INDEX: + this.key = ( String ) value; + break; + case EvoUsrPermission.DESCRIPTION_INDEX: + this.description = ( String ) value; + break; + case EvoUsrPermission.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 EvoUsrPermission.ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrPermission.CLASS__INDEX: + theClass = String.class; + break; + case EvoUsrPermission.KEY_INDEX: + theClass = String.class; + break; + case EvoUsrPermission.DESCRIPTION_INDEX: + theClass = String.class; + break; + case EvoUsrPermission.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 : EvoUsrPermission._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, EvoUsrPermission.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUsrRole.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUsrRole.java new file mode 100644 index 00000000..ba2ea89a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUsrRole.java @@ -0,0 +1,358 @@ +/* +* EvoUsrRole.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EvoUsrRole extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EvoUsrRole.ID, EvoUsrRole.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRole.ID_FULL, EvoUsrRole.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRole.NAME, EvoUsrRole.NAME_INDEX ); + FIELD_INDEXES.put( EvoUsrRole.NAME_FULL, EvoUsrRole.NAME_INDEX ); + FIELD_INDEXES.put( EvoUsrRole.DELETED_STAMP, EvoUsrRole.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( EvoUsrRole.DELETED_STAMP_FULL, EvoUsrRole.DELETED_STAMP_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "evo_usr_role"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.evo_usr_role"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "evo_usr_role.id"; + public static final int ID_INDEX = 0; + public static final String NAME = "name"; + public static final String NAME_FULL = "evo_usr_role.name"; + public static final int NAME_INDEX = 1; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "evo_usr_role.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + NAME, DELETED_STAMP, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NAME, TABLENAME + "." + DELETED_STAMP, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NAME, DELETED_STAMP, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NAME, DELETED_STAMP, }; + + private Integer id; + private String name; + private java.sql.Timestamp deleted_stamp; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EvoUsrRole() + { + 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.ListfromEvoUsrRolesPermissions_role_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.EvoUsrRolesPermissionsData.class , getPrimaryKey().getMap().get("id"), "role_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromEvoUsrUsersRoles_role_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.EvoUsrUsersRolesData.class , getPrimaryKey().getMap().get("id"), "role_id" ); + } + 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 java.sql.Timestamp getDeleted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_stamp; + } + + public void setDeleted_stamp( java.sql.Timestamp deleted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_STAMP, deleted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_stamp = deleted_stamp; + LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrRole.ID_INDEX: + value = getId(); + break; + case EvoUsrRole.NAME_INDEX: + value = getName(); + break; + case EvoUsrRole.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrRole.ID_INDEX: + value = this.id; + break; + case EvoUsrRole.NAME_INDEX: + value = this.name; + break; + case EvoUsrRole.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrRole.ID_INDEX: + setId( ( Integer ) value ); + break; + case EvoUsrRole.NAME_INDEX: + setName( ( String ) value ); + break; + case EvoUsrRole.DELETED_STAMP_INDEX: + setDeleted_stamp( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrRole.ID_INDEX: + this.id = ( Integer ) value; + break; + case EvoUsrRole.NAME_INDEX: + this.name = ( String ) value; + break; + case EvoUsrRole.DELETED_STAMP_INDEX: + this.deleted_stamp = ( java.sql.Timestamp ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case EvoUsrRole.ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrRole.NAME_INDEX: + theClass = String.class; + break; + case EvoUsrRole.DELETED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EvoUsrRole._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, EvoUsrRole.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUsrRolesPermissions.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUsrRolesPermissions.java new file mode 100644 index 00000000..960ed704 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUsrRolesPermissions.java @@ -0,0 +1,481 @@ +/* +* EvoUsrRolesPermissions.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EvoUsrRolesPermissions extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( EvoUsrRolesPermissions.CLASS_IDENTIFIER, EvoUsrRolesPermissions.ROLE_ID, EvoUsrRolesPermissions.TO_ROLE_ID ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.ROLE_ID, EvoUsrRolesPermissions.ROLE_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.ROLE_ID_FULL, EvoUsrRolesPermissions.ROLE_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.TO_ROLE_ID, EvoUsrRolesPermissions.TO_ROLE_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( EvoUsrRolesPermissions.CLASS_IDENTIFIER, EvoUsrRolesPermissions.PERMISSION_ID, EvoUsrRolesPermissions.TO_PERMISSION_ID ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.PERMISSION_ID, EvoUsrRolesPermissions.PERMISSION_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.PERMISSION_ID_FULL, EvoUsrRolesPermissions.PERMISSION_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.TO_PERMISSION_ID, EvoUsrRolesPermissions.TO_PERMISSION_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.ID, EvoUsrRolesPermissions.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.ID_FULL, EvoUsrRolesPermissions.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.REMOVE, EvoUsrRolesPermissions.REMOVE_INDEX ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.REMOVE_FULL, EvoUsrRolesPermissions.REMOVE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyrole_idToevo_usr_role = + new com.evolute.entity.ForeignKey( EvoUsrRolesPermissions.class, EvoUsrRolesPermissions.ROLE_ID, db.data.siprp_local.outer.EvoUsrRoleData.class, db.data.siprp_local.outer.EvoUsrRoleData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeypermission_idToevo_usr_permission = + new com.evolute.entity.ForeignKey( EvoUsrRolesPermissions.class, EvoUsrRolesPermissions.PERMISSION_ID, db.data.siprp_local.outer.EvoUsrPermissionData.class, db.data.siprp_local.outer.EvoUsrPermissionData.ID ); + + public static final String TABLENAME = "evo_usr_roles_permissions"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.evo_usr_roles_permissions"; + + public static final int _INVALID__INDEX = -1; + public static final String ROLE_ID = "role_id"; + public static final String ROLE_ID_FULL = "evo_usr_roles_permissions.role_id"; + public static final int ROLE_ID_INDEX = 0; + public static final String TO_ROLE_ID = "to_role_id"; + public static final String TO_ROLE_ID_FULL = "evo_usr_roles_permissions.to_role_id"; + public static final int TO_ROLE_ID_INDEX = 1; + public static final String PERMISSION_ID = "permission_id"; + public static final String PERMISSION_ID_FULL = "evo_usr_roles_permissions.permission_id"; + public static final int PERMISSION_ID_INDEX = 2; + public static final String TO_PERMISSION_ID = "to_permission_id"; + public static final String TO_PERMISSION_ID_FULL = "evo_usr_roles_permissions.to_permission_id"; + public static final int TO_PERMISSION_ID_INDEX = 3; + public static final String ID = "id"; + public static final String ID_FULL = "evo_usr_roles_permissions.id"; + public static final int ID_INDEX = 4; + public static final String REMOVE = "remove"; + public static final String REMOVE_FULL = "evo_usr_roles_permissions.remove"; + public static final int REMOVE_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + ROLE_ID, TO_ROLE_ID, PERMISSION_ID, TO_PERMISSION_ID, REMOVE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ROLE_ID, TABLENAME + "." + TO_ROLE_ID, TABLENAME + "." + PERMISSION_ID, TABLENAME + "." + TO_PERMISSION_ID, TABLENAME + "." + REMOVE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ROLE_ID, PERMISSION_ID, ID, REMOVE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ROLE_ID, PERMISSION_ID, ID, REMOVE, }; + + private Integer role_id; + private db.data.siprp_local.outer.EvoUsrRoleData to_role_id; + private Integer permission_id; + private db.data.siprp_local.outer.EvoUsrPermissionData to_permission_id; + private Integer id; + private Boolean remove; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EvoUsrRolesPermissions() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false, false }; + } + + public Integer getRole_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ROLE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.role_id; + } + + public void setRole_id( Integer role_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ROLE_ID, role_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.role_id = role_id; + LAZY_LOADED_OBJECTS.put( ROLE_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EvoUsrRoleData toRole_id() + { + try + { + prepare( TO_ROLE_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_role_id; + } + + public void setToRole_id( db.data.siprp_local.outer.EvoUsrRoleData to_role_id ) + { + try + { + preProcess( TO_ROLE_ID, to_role_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_role_id = to_role_id; + } + + public Integer getPermission_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PERMISSION_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.permission_id; + } + + public void setPermission_id( Integer permission_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PERMISSION_ID, permission_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.permission_id = permission_id; + LAZY_LOADED_OBJECTS.put( PERMISSION_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EvoUsrPermissionData toPermission_id() + { + try + { + prepare( TO_PERMISSION_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_permission_id; + } + + public void setToPermission_id( db.data.siprp_local.outer.EvoUsrPermissionData to_permission_id ) + { + try + { + preProcess( TO_PERMISSION_ID, to_permission_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_permission_id = to_permission_id; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 Boolean getRemove() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( REMOVE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.remove; + } + + public void setRemove( Boolean remove ) + { + try + { + setLockedForRefresh( true ); + preProcess( REMOVE, remove ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.remove = remove; + LAZY_LOADED_OBJECTS.put( REMOVE, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrRolesPermissions.ROLE_ID_INDEX: + value = getRole_id(); + break; + case EvoUsrRolesPermissions.TO_ROLE_ID_INDEX: + value = toRole_id(); + break; + case EvoUsrRolesPermissions.PERMISSION_ID_INDEX: + value = getPermission_id(); + break; + case EvoUsrRolesPermissions.TO_PERMISSION_ID_INDEX: + value = toPermission_id(); + break; + case EvoUsrRolesPermissions.ID_INDEX: + value = getId(); + break; + case EvoUsrRolesPermissions.REMOVE_INDEX: + value = getRemove(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrRolesPermissions.ROLE_ID_INDEX: + value = this.role_id; + break; + case EvoUsrRolesPermissions.TO_ROLE_ID_INDEX: + value = this.to_role_id; + break; + case EvoUsrRolesPermissions.PERMISSION_ID_INDEX: + value = this.permission_id; + break; + case EvoUsrRolesPermissions.TO_PERMISSION_ID_INDEX: + value = this.to_permission_id; + break; + case EvoUsrRolesPermissions.ID_INDEX: + value = this.id; + break; + case EvoUsrRolesPermissions.REMOVE_INDEX: + value = this.remove; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrRolesPermissions.ROLE_ID_INDEX: + setRole_id( ( Integer ) value ); + break; + case EvoUsrRolesPermissions.TO_ROLE_ID_INDEX: + setToRole_id( ( db.data.siprp_local.outer.EvoUsrRoleData ) value ); + break; + case EvoUsrRolesPermissions.PERMISSION_ID_INDEX: + setPermission_id( ( Integer ) value ); + break; + case EvoUsrRolesPermissions.TO_PERMISSION_ID_INDEX: + setToPermission_id( ( db.data.siprp_local.outer.EvoUsrPermissionData ) value ); + break; + case EvoUsrRolesPermissions.ID_INDEX: + setId( ( Integer ) value ); + break; + case EvoUsrRolesPermissions.REMOVE_INDEX: + setRemove( ( Boolean ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrRolesPermissions.ROLE_ID_INDEX: + this.role_id = ( Integer ) value; + break; + case EvoUsrRolesPermissions.TO_ROLE_ID_INDEX: + this.to_role_id = ( db.data.siprp_local.outer.EvoUsrRoleData ) value; + break; + case EvoUsrRolesPermissions.PERMISSION_ID_INDEX: + this.permission_id = ( Integer ) value; + break; + case EvoUsrRolesPermissions.TO_PERMISSION_ID_INDEX: + this.to_permission_id = ( db.data.siprp_local.outer.EvoUsrPermissionData ) value; + break; + case EvoUsrRolesPermissions.ID_INDEX: + this.id = ( Integer ) value; + break; + case EvoUsrRolesPermissions.REMOVE_INDEX: + this.remove = ( 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 EvoUsrRolesPermissions.ROLE_ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrRolesPermissions.TO_ROLE_ID_INDEX: + theClass = db.data.siprp_local.outer.EvoUsrRoleData.class; + break; + case EvoUsrRolesPermissions.PERMISSION_ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrRolesPermissions.TO_PERMISSION_ID_INDEX: + theClass = db.data.siprp_local.outer.EvoUsrPermissionData.class; + break; + case EvoUsrRolesPermissions.ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrRolesPermissions.REMOVE_INDEX: + theClass = Boolean.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EvoUsrRolesPermissions._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, EvoUsrRolesPermissions.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUsrUser.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUsrUser.java new file mode 100644 index 00000000..2c2a44c3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUsrUser.java @@ -0,0 +1,864 @@ +/* +* EvoUsrUser.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EvoUsrUser extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EvoUsrUser.ID, EvoUsrUser.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.ID_FULL, EvoUsrUser.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.LOGIN, EvoUsrUser.LOGIN_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.LOGIN_FULL, EvoUsrUser.LOGIN_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.NAME, EvoUsrUser.NAME_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.NAME_FULL, EvoUsrUser.NAME_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.CREATED_STAMP, EvoUsrUser.CREATED_STAMP_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.CREATED_STAMP_FULL, EvoUsrUser.CREATED_STAMP_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.DELETED_STAMP, EvoUsrUser.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.DELETED_STAMP_FULL, EvoUsrUser.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.PASSWORD, EvoUsrUser.PASSWORD_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.PASSWORD_FULL, EvoUsrUser.PASSWORD_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.PERSON_ID, EvoUsrUser.PERSON_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.PERSON_ID_FULL, EvoUsrUser.PERSON_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.DEVEL, EvoUsrUser.DEVEL_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.DEVEL_FULL, EvoUsrUser.DEVEL_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.ACTIVE, EvoUsrUser.ACTIVE_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.ACTIVE_FULL, EvoUsrUser.ACTIVE_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.EMAIL, EvoUsrUser.EMAIL_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.EMAIL_FULL, EvoUsrUser.EMAIL_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.TELEMOVEL, EvoUsrUser.TELEMOVEL_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.TELEMOVEL_FULL, EvoUsrUser.TELEMOVEL_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.TELEFONE, EvoUsrUser.TELEFONE_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.TELEFONE_FULL, EvoUsrUser.TELEFONE_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.USER_LEVEL, EvoUsrUser.USER_LEVEL_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.USER_LEVEL_FULL, EvoUsrUser.USER_LEVEL_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "evo_usr_user"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.evo_usr_user"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "evo_usr_user.id"; + public static final int ID_INDEX = 0; + public static final String LOGIN = "login"; + public static final String LOGIN_FULL = "evo_usr_user.login"; + public static final int LOGIN_INDEX = 1; + public static final String NAME = "name"; + public static final String NAME_FULL = "evo_usr_user.name"; + public static final int NAME_INDEX = 2; + public static final String CREATED_STAMP = "created_stamp"; + public static final String CREATED_STAMP_FULL = "evo_usr_user.created_stamp"; + public static final int CREATED_STAMP_INDEX = 3; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "evo_usr_user.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 4; + public static final String PASSWORD = "password"; + public static final String PASSWORD_FULL = "evo_usr_user.password"; + public static final int PASSWORD_INDEX = 5; + public static final String PERSON_ID = "person_id"; + public static final String PERSON_ID_FULL = "evo_usr_user.person_id"; + public static final int PERSON_ID_INDEX = 6; + public static final String DEVEL = "devel"; + public static final String DEVEL_FULL = "evo_usr_user.devel"; + public static final int DEVEL_INDEX = 7; + public static final String ACTIVE = "active"; + public static final String ACTIVE_FULL = "evo_usr_user.active"; + public static final int ACTIVE_INDEX = 8; + public static final String EMAIL = "email"; + public static final String EMAIL_FULL = "evo_usr_user.email"; + public static final int EMAIL_INDEX = 9; + public static final String TELEMOVEL = "telemovel"; + public static final String TELEMOVEL_FULL = "evo_usr_user.telemovel"; + public static final int TELEMOVEL_INDEX = 10; + public static final String TELEFONE = "telefone"; + public static final String TELEFONE_FULL = "evo_usr_user.telefone"; + public static final int TELEFONE_INDEX = 11; + public static final String USER_LEVEL = "user_level"; + public static final String USER_LEVEL_FULL = "evo_usr_user.user_level"; + public static final int USER_LEVEL_INDEX = 12; + + public static final String FIELD_NAMES[] = new String[]{ + LOGIN, NAME, CREATED_STAMP, DELETED_STAMP, PASSWORD, PERSON_ID, DEVEL, ACTIVE, EMAIL, + TELEMOVEL, TELEFONE, USER_LEVEL, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + LOGIN, TABLENAME + "." + NAME, TABLENAME + "." + CREATED_STAMP, TABLENAME + "." + DELETED_STAMP, TABLENAME + "." + PASSWORD, TABLENAME + "." + PERSON_ID, TABLENAME + "." + DEVEL, TABLENAME + "." + ACTIVE, TABLENAME + "." + EMAIL, + TABLENAME + "." + TELEMOVEL, TABLENAME + "." + TELEFONE, TABLENAME + "." + USER_LEVEL, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, LOGIN, NAME, CREATED_STAMP, DELETED_STAMP, PASSWORD, PERSON_ID, DEVEL, ACTIVE, EMAIL, + TELEMOVEL, TELEFONE, USER_LEVEL, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, LOGIN, NAME, CREATED_STAMP, DELETED_STAMP, PASSWORD, PERSON_ID, DEVEL, ACTIVE, EMAIL, + TELEMOVEL, TELEFONE, USER_LEVEL, }; + + private Integer id; + private String login; + private String name; + private java.sql.Timestamp created_stamp; + private java.sql.Timestamp deleted_stamp; + private String password; + private Integer person_id; + private Boolean devel; + private Boolean active; + private String email; + private Integer telemovel; + private Integer telefone; + private Integer user_level; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EvoUsrUser() + { + 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.ListfromEvoUsrUsersRoles_user_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.EvoUsrUsersRolesData.class , getPrimaryKey().getMap().get("id"), "user_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromFilFile_user_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.FilFileData.class , getPrimaryKey().getMap().get("id"), "user_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public String getLogin() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LOGIN ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.login; + } + + public void setLogin( String login ) + { + try + { + setLockedForRefresh( true ); + preProcess( LOGIN, login ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.login = login; + LAZY_LOADED_OBJECTS.put( LOGIN, Boolean.TRUE ); + } + + 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 java.sql.Timestamp getCreated_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CREATED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.created_stamp; + } + + public void setCreated_stamp( java.sql.Timestamp created_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( CREATED_STAMP, created_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.created_stamp = created_stamp; + LAZY_LOADED_OBJECTS.put( CREATED_STAMP, Boolean.TRUE ); + } + + public java.sql.Timestamp getDeleted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_stamp; + } + + public void setDeleted_stamp( java.sql.Timestamp deleted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_STAMP, deleted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_stamp = deleted_stamp; + LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); + } + + public String getPassword() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PASSWORD ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.password; + } + + public void setPassword( String password ) + { + try + { + setLockedForRefresh( true ); + preProcess( PASSWORD, password ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.password = password; + LAZY_LOADED_OBJECTS.put( PASSWORD, Boolean.TRUE ); + } + + public Integer getPerson_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PERSON_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.person_id; + } + + public void setPerson_id( Integer person_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PERSON_ID, person_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.person_id = person_id; + LAZY_LOADED_OBJECTS.put( PERSON_ID, Boolean.TRUE ); + } + + public Boolean getDevel() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DEVEL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.devel; + } + + public void setDevel( Boolean devel ) + { + try + { + setLockedForRefresh( true ); + preProcess( DEVEL, devel ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.devel = devel; + LAZY_LOADED_OBJECTS.put( DEVEL, Boolean.TRUE ); + } + + public Boolean getActive() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACTIVE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.active; + } + + public void setActive( Boolean active ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACTIVE, active ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.active = active; + LAZY_LOADED_OBJECTS.put( ACTIVE, 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 Integer getTelemovel() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TELEMOVEL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.telemovel; + } + + public void setTelemovel( Integer 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 Integer getTelefone() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TELEFONE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.telefone; + } + + public void setTelefone( Integer 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 Integer getUser_level() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( USER_LEVEL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.user_level; + } + + public void setUser_level( Integer user_level ) + { + try + { + setLockedForRefresh( true ); + preProcess( USER_LEVEL, user_level ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.user_level = user_level; + LAZY_LOADED_OBJECTS.put( USER_LEVEL, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrUser.ID_INDEX: + value = getId(); + break; + case EvoUsrUser.LOGIN_INDEX: + value = getLogin(); + break; + case EvoUsrUser.NAME_INDEX: + value = getName(); + break; + case EvoUsrUser.CREATED_STAMP_INDEX: + value = getCreated_stamp(); + break; + case EvoUsrUser.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + break; + case EvoUsrUser.PASSWORD_INDEX: + value = getPassword(); + break; + case EvoUsrUser.PERSON_ID_INDEX: + value = getPerson_id(); + break; + case EvoUsrUser.DEVEL_INDEX: + value = getDevel(); + break; + case EvoUsrUser.ACTIVE_INDEX: + value = getActive(); + break; + case EvoUsrUser.EMAIL_INDEX: + value = getEmail(); + break; + case EvoUsrUser.TELEMOVEL_INDEX: + value = getTelemovel(); + break; + case EvoUsrUser.TELEFONE_INDEX: + value = getTelefone(); + break; + case EvoUsrUser.USER_LEVEL_INDEX: + value = getUser_level(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrUser.ID_INDEX: + value = this.id; + break; + case EvoUsrUser.LOGIN_INDEX: + value = this.login; + break; + case EvoUsrUser.NAME_INDEX: + value = this.name; + break; + case EvoUsrUser.CREATED_STAMP_INDEX: + value = this.created_stamp; + break; + case EvoUsrUser.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + case EvoUsrUser.PASSWORD_INDEX: + value = this.password; + break; + case EvoUsrUser.PERSON_ID_INDEX: + value = this.person_id; + break; + case EvoUsrUser.DEVEL_INDEX: + value = this.devel; + break; + case EvoUsrUser.ACTIVE_INDEX: + value = this.active; + break; + case EvoUsrUser.EMAIL_INDEX: + value = this.email; + break; + case EvoUsrUser.TELEMOVEL_INDEX: + value = this.telemovel; + break; + case EvoUsrUser.TELEFONE_INDEX: + value = this.telefone; + break; + case EvoUsrUser.USER_LEVEL_INDEX: + value = this.user_level; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrUser.ID_INDEX: + setId( ( Integer ) value ); + break; + case EvoUsrUser.LOGIN_INDEX: + setLogin( ( String ) value ); + break; + case EvoUsrUser.NAME_INDEX: + setName( ( String ) value ); + break; + case EvoUsrUser.CREATED_STAMP_INDEX: + setCreated_stamp( ( java.sql.Timestamp ) value ); + break; + case EvoUsrUser.DELETED_STAMP_INDEX: + setDeleted_stamp( ( java.sql.Timestamp ) value ); + break; + case EvoUsrUser.PASSWORD_INDEX: + setPassword( ( String ) value ); + break; + case EvoUsrUser.PERSON_ID_INDEX: + setPerson_id( ( Integer ) value ); + break; + case EvoUsrUser.DEVEL_INDEX: + setDevel( ( Boolean ) value ); + break; + case EvoUsrUser.ACTIVE_INDEX: + setActive( ( Boolean ) value ); + break; + case EvoUsrUser.EMAIL_INDEX: + setEmail( ( String ) value ); + break; + case EvoUsrUser.TELEMOVEL_INDEX: + setTelemovel( ( Integer ) value ); + break; + case EvoUsrUser.TELEFONE_INDEX: + setTelefone( ( Integer ) value ); + break; + case EvoUsrUser.USER_LEVEL_INDEX: + setUser_level( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrUser.ID_INDEX: + this.id = ( Integer ) value; + break; + case EvoUsrUser.LOGIN_INDEX: + this.login = ( String ) value; + break; + case EvoUsrUser.NAME_INDEX: + this.name = ( String ) value; + break; + case EvoUsrUser.CREATED_STAMP_INDEX: + this.created_stamp = ( java.sql.Timestamp ) value; + break; + case EvoUsrUser.DELETED_STAMP_INDEX: + this.deleted_stamp = ( java.sql.Timestamp ) value; + break; + case EvoUsrUser.PASSWORD_INDEX: + this.password = ( String ) value; + break; + case EvoUsrUser.PERSON_ID_INDEX: + this.person_id = ( Integer ) value; + break; + case EvoUsrUser.DEVEL_INDEX: + this.devel = ( Boolean ) value; + break; + case EvoUsrUser.ACTIVE_INDEX: + this.active = ( Boolean ) value; + break; + case EvoUsrUser.EMAIL_INDEX: + this.email = ( String ) value; + break; + case EvoUsrUser.TELEMOVEL_INDEX: + this.telemovel = ( Integer ) value; + break; + case EvoUsrUser.TELEFONE_INDEX: + this.telefone = ( Integer ) value; + break; + case EvoUsrUser.USER_LEVEL_INDEX: + this.user_level = ( 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 EvoUsrUser.ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrUser.LOGIN_INDEX: + theClass = String.class; + break; + case EvoUsrUser.NAME_INDEX: + theClass = String.class; + break; + case EvoUsrUser.CREATED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + case EvoUsrUser.DELETED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + case EvoUsrUser.PASSWORD_INDEX: + theClass = String.class; + break; + case EvoUsrUser.PERSON_ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrUser.DEVEL_INDEX: + theClass = Boolean.class; + break; + case EvoUsrUser.ACTIVE_INDEX: + theClass = Boolean.class; + break; + case EvoUsrUser.EMAIL_INDEX: + theClass = String.class; + break; + case EvoUsrUser.TELEMOVEL_INDEX: + theClass = Integer.class; + break; + case EvoUsrUser.TELEFONE_INDEX: + theClass = Integer.class; + break; + case EvoUsrUser.USER_LEVEL_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EvoUsrUser._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, EvoUsrUser.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUsrUsersRoles.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUsrUsersRoles.java new file mode 100644 index 00000000..e2604c41 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/EvoUsrUsersRoles.java @@ -0,0 +1,431 @@ +/* +* EvoUsrUsersRoles.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EvoUsrUsersRoles extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( EvoUsrUsersRoles.CLASS_IDENTIFIER, EvoUsrUsersRoles.USER_ID, EvoUsrUsersRoles.TO_USER_ID ); + FIELD_INDEXES.put( EvoUsrUsersRoles.USER_ID, EvoUsrUsersRoles.USER_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUsersRoles.USER_ID_FULL, EvoUsrUsersRoles.USER_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUsersRoles.TO_USER_ID, EvoUsrUsersRoles.TO_USER_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( EvoUsrUsersRoles.CLASS_IDENTIFIER, EvoUsrUsersRoles.ROLE_ID, EvoUsrUsersRoles.TO_ROLE_ID ); + FIELD_INDEXES.put( EvoUsrUsersRoles.ROLE_ID, EvoUsrUsersRoles.ROLE_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUsersRoles.ROLE_ID_FULL, EvoUsrUsersRoles.ROLE_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUsersRoles.TO_ROLE_ID, EvoUsrUsersRoles.TO_ROLE_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUsersRoles.ID, EvoUsrUsersRoles.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUsersRoles.ID_FULL, EvoUsrUsersRoles.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 ForeignKeyuser_idToevo_usr_user = + new com.evolute.entity.ForeignKey( EvoUsrUsersRoles.class, EvoUsrUsersRoles.USER_ID, db.data.siprp_local.outer.EvoUsrUserData.class, db.data.siprp_local.outer.EvoUsrUserData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyrole_idToevo_usr_role = + new com.evolute.entity.ForeignKey( EvoUsrUsersRoles.class, EvoUsrUsersRoles.ROLE_ID, db.data.siprp_local.outer.EvoUsrRoleData.class, db.data.siprp_local.outer.EvoUsrRoleData.ID ); + + public static final String TABLENAME = "evo_usr_users_roles"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.evo_usr_users_roles"; + + public static final int _INVALID__INDEX = -1; + public static final String USER_ID = "user_id"; + public static final String USER_ID_FULL = "evo_usr_users_roles.user_id"; + public static final int USER_ID_INDEX = 0; + public static final String TO_USER_ID = "to_user_id"; + public static final String TO_USER_ID_FULL = "evo_usr_users_roles.to_user_id"; + public static final int TO_USER_ID_INDEX = 1; + public static final String ROLE_ID = "role_id"; + public static final String ROLE_ID_FULL = "evo_usr_users_roles.role_id"; + public static final int ROLE_ID_INDEX = 2; + public static final String TO_ROLE_ID = "to_role_id"; + public static final String TO_ROLE_ID_FULL = "evo_usr_users_roles.to_role_id"; + public static final int TO_ROLE_ID_INDEX = 3; + public static final String ID = "id"; + public static final String ID_FULL = "evo_usr_users_roles.id"; + public static final int ID_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + USER_ID, TO_USER_ID, ROLE_ID, TO_ROLE_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + USER_ID, TABLENAME + "." + TO_USER_ID, TABLENAME + "." + ROLE_ID, TABLENAME + "." + TO_ROLE_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + USER_ID, ROLE_ID, ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + USER_ID, ROLE_ID, ID, }; + + private Integer user_id; + private db.data.siprp_local.outer.EvoUsrUserData to_user_id; + private Integer role_id; + private db.data.siprp_local.outer.EvoUsrRoleData to_role_id; + private Integer id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EvoUsrUsersRoles() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false }; + } + + public Integer getUser_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( USER_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.user_id; + } + + public void setUser_id( Integer user_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( USER_ID, user_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.user_id = user_id; + LAZY_LOADED_OBJECTS.put( USER_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EvoUsrUserData toUser_id() + { + try + { + prepare( TO_USER_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_user_id; + } + + public void setToUser_id( db.data.siprp_local.outer.EvoUsrUserData to_user_id ) + { + try + { + preProcess( TO_USER_ID, to_user_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_user_id = to_user_id; + } + + public Integer getRole_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ROLE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.role_id; + } + + public void setRole_id( Integer role_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ROLE_ID, role_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.role_id = role_id; + LAZY_LOADED_OBJECTS.put( ROLE_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EvoUsrRoleData toRole_id() + { + try + { + prepare( TO_ROLE_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_role_id; + } + + public void setToRole_id( db.data.siprp_local.outer.EvoUsrRoleData to_role_id ) + { + try + { + preProcess( TO_ROLE_ID, to_role_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_role_id = to_role_id; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 EvoUsrUsersRoles.USER_ID_INDEX: + value = getUser_id(); + break; + case EvoUsrUsersRoles.TO_USER_ID_INDEX: + value = toUser_id(); + break; + case EvoUsrUsersRoles.ROLE_ID_INDEX: + value = getRole_id(); + break; + case EvoUsrUsersRoles.TO_ROLE_ID_INDEX: + value = toRole_id(); + break; + case EvoUsrUsersRoles.ID_INDEX: + value = getId(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrUsersRoles.USER_ID_INDEX: + value = this.user_id; + break; + case EvoUsrUsersRoles.TO_USER_ID_INDEX: + value = this.to_user_id; + break; + case EvoUsrUsersRoles.ROLE_ID_INDEX: + value = this.role_id; + break; + case EvoUsrUsersRoles.TO_ROLE_ID_INDEX: + value = this.to_role_id; + break; + case EvoUsrUsersRoles.ID_INDEX: + value = this.id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrUsersRoles.USER_ID_INDEX: + setUser_id( ( Integer ) value ); + break; + case EvoUsrUsersRoles.TO_USER_ID_INDEX: + setToUser_id( ( db.data.siprp_local.outer.EvoUsrUserData ) value ); + break; + case EvoUsrUsersRoles.ROLE_ID_INDEX: + setRole_id( ( Integer ) value ); + break; + case EvoUsrUsersRoles.TO_ROLE_ID_INDEX: + setToRole_id( ( db.data.siprp_local.outer.EvoUsrRoleData ) value ); + break; + case EvoUsrUsersRoles.ID_INDEX: + setId( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrUsersRoles.USER_ID_INDEX: + this.user_id = ( Integer ) value; + break; + case EvoUsrUsersRoles.TO_USER_ID_INDEX: + this.to_user_id = ( db.data.siprp_local.outer.EvoUsrUserData ) value; + break; + case EvoUsrUsersRoles.ROLE_ID_INDEX: + this.role_id = ( Integer ) value; + break; + case EvoUsrUsersRoles.TO_ROLE_ID_INDEX: + this.to_role_id = ( db.data.siprp_local.outer.EvoUsrRoleData ) value; + break; + case EvoUsrUsersRoles.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 EvoUsrUsersRoles.USER_ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrUsersRoles.TO_USER_ID_INDEX: + theClass = db.data.siprp_local.outer.EvoUsrUserData.class; + break; + case EvoUsrUsersRoles.ROLE_ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrUsersRoles.TO_ROLE_ID_INDEX: + theClass = db.data.siprp_local.outer.EvoUsrRoleData.class; + break; + case EvoUsrUsersRoles.ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EvoUsrUsersRoles._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, EvoUsrUsersRoles.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Exames.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Exames.java new file mode 100644 index 00000000..6d0bcf23 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Exames.java @@ -0,0 +1,1235 @@ +/* +* Exames.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Exames extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + FIELD_INDEXES.put( Exames.IMPRESSO_STAMP, Exames.IMPRESSO_STAMP_INDEX ); + FIELD_INDEXES.put( Exames.IMPRESSO_STAMP_FULL, Exames.IMPRESSO_STAMP_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, db.data.siprp_local.outer.TrabalhadoresData.class, db.data.siprp_local.outer.TrabalhadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedico_idTomedicos = + new com.evolute.entity.ForeignKey( Exames.class, Exames.MEDICO_ID, db.data.siprp_local.outer.MedicosData.class, db.data.siprp_local.outer.MedicosData.ID ); + + public static final String TABLENAME = "exames"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.exames"; + + 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 String TO_TRABALHADOR_ID_FULL = "exames.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 String TO_MEDICO_ID_FULL = "exames.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 IMPRESSO_STAMP = "impresso_stamp"; + public static final String IMPRESSO_STAMP_FULL = "exames.impresso_stamp"; + public static final int IMPRESSO_STAMP_INDEX = 19; + + 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, + IMPRESSO_STAMP, }; + + 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, + TABLENAME + "." + IMPRESSO_STAMP, }; + + 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, IMPRESSO_STAMP, }; + + + 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, IMPRESSO_STAMP, }; + + 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 db.data.siprp_local.outer.TrabalhadoresData to_trabalhador_id; + private Integer medico_id; + private db.data.siprp_local.outer.MedicosData to_medico_id; + private byte[] pdf; + private byte[] fo; + private java.sql.Timestamp impresso_stamp; + + 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, + 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_exame_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.LembretesData.class , getPrimaryKey().getMap().get("id"), "exame_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresFichasAptidao_exame_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 java.sql.Timestamp getImpresso_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMPRESSO_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.impresso_stamp; + } + + public void setImpresso_stamp( java.sql.Timestamp impresso_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMPRESSO_STAMP, impresso_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.impresso_stamp = impresso_stamp; + LAZY_LOADED_OBJECTS.put( IMPRESSO_STAMP, 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; + case Exames.IMPRESSO_STAMP_INDEX: + value = getImpresso_stamp(); + 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; + case Exames.IMPRESSO_STAMP_INDEX: + value = this.impresso_stamp; + 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( ( db.data.siprp_local.outer.TrabalhadoresData ) value ); + break; + case Exames.MEDICO_ID_INDEX: + setMedico_id( ( Integer ) value ); + break; + case Exames.TO_MEDICO_ID_INDEX: + setToMedico_id( ( db.data.siprp_local.outer.MedicosData ) value ); + break; + case Exames.PDF_INDEX: + setPdf( ( byte[] ) value ); + break; + case Exames.FO_INDEX: + setFo( ( byte[] ) value ); + break; + case Exames.IMPRESSO_STAMP_INDEX: + setImpresso_stamp( ( java.sql.Timestamp ) 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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.outer.MedicosData ) value; + break; + case Exames.PDF_INDEX: + this.pdf = ( byte[] ) value; + break; + case Exames.FO_INDEX: + this.fo = ( byte[] ) value; + break; + case Exames.IMPRESSO_STAMP_INDEX: + this.impresso_stamp = ( java.sql.Timestamp ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case 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 = db.data.siprp_local.outer.TrabalhadoresData.class; + break; + case Exames.MEDICO_ID_INDEX: + theClass = Integer.class; + break; + case Exames.TO_MEDICO_ID_INDEX: + theClass = db.data.siprp_local.outer.MedicosData.class; + break; + case Exames.PDF_INDEX: + theClass = byte[].class; + break; + case Exames.FO_INDEX: + theClass = byte[].class; + break; + case Exames.IMPRESSO_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : 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, ( 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( 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/ExamesPerfis.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/ExamesPerfis.java new file mode 100644 index 00000000..678703c9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/ExamesPerfis.java @@ -0,0 +1,431 @@ +/* +* ExamesPerfis.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class ExamesPerfis extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TiposExamesCompData.class, db.data.siprp_local.outer.TiposExamesCompData.ID ); + + public static final String TABLENAME = "exames_perfis"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.exames_perfis"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "exames_perfis.id"; + public static final int ID_INDEX = 0; + public static final String PERFIL = "perfil"; + public static final String PERFIL_FULL = "exames_perfis.perfil"; + public static final int PERFIL_INDEX = 1; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "exames_perfis.tipo"; + public static final int TIPO_INDEX = 2; + public static final String TO_TIPO = "to_tipo"; + public static final String TO_TIPO_FULL = "exames_perfis.to_tipo"; + public static final int TO_TIPO_INDEX = 3; + public static final String MULTIPLICADOR = "multiplicador"; + public static final String MULTIPLICADOR_FULL = "exames_perfis.multiplicador"; + public static final int MULTIPLICADOR_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + PERFIL, TIPO, TO_TIPO, MULTIPLICADOR, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + PERFIL, TABLENAME + "." + TIPO, TABLENAME + "." + TO_TIPO, TABLENAME + "." + MULTIPLICADOR, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, PERFIL, TIPO, MULTIPLICADOR, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, PERFIL, TIPO, MULTIPLICADOR, }; + + private Integer id; + private Integer perfil; + private Integer tipo; + private db.data.siprp_local.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 db.data.siprp_local.outer.TiposExamesCompData toTipo() + { + try + { + prepare( TO_TIPO ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_tipo; + } + + public void setToTipo( db.data.siprp_local.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( ( db.data.siprp_local.outer.TiposExamesCompData ) value ); + break; + case ExamesPerfis.MULTIPLICADOR_INDEX: + setMultiplicador( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case ExamesPerfis.ID_INDEX: + this.id = ( Integer ) value; + break; + case ExamesPerfis.PERFIL_INDEX: + this.perfil = ( Integer ) value; + break; + case ExamesPerfis.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case ExamesPerfis.TO_TIPO_INDEX: + this.to_tipo = ( db.data.siprp_local.outer.TiposExamesCompData ) value; + break; + case ExamesPerfis.MULTIPLICADOR_INDEX: + this.multiplicador = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case ExamesPerfis.ID_INDEX: + theClass = Integer.class; + break; + case ExamesPerfis.PERFIL_INDEX: + theClass = Integer.class; + break; + case ExamesPerfis.TIPO_INDEX: + theClass = Integer.class; + break; + case ExamesPerfis.TO_TIPO_INDEX: + theClass = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/ExamesPortaria.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/ExamesPortaria.java new file mode 100644 index 00000000..9fdfb973 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class ExamesPortaria extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.exames_portaria"; + + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/FilFile.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/FilFile.java new file mode 100644 index 00000000..e2e3d7b3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/FilFile.java @@ -0,0 +1,654 @@ +/* +* FilFile.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class FilFile extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( FilFile.ID, FilFile.ID_INDEX ); + FIELD_INDEXES.put( FilFile.ID_FULL, FilFile.ID_INDEX ); + FIELD_INDEXES.put( FilFile.DELETED_STAMP, FilFile.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( FilFile.DELETED_STAMP_FULL, FilFile.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( FilFile.NAME, FilFile.NAME_INDEX ); + FIELD_INDEXES.put( FilFile.NAME_FULL, FilFile.NAME_INDEX ); + FIELD_INDEXES.put( FilFile.MIME_TYPE, FilFile.MIME_TYPE_INDEX ); + FIELD_INDEXES.put( FilFile.MIME_TYPE_FULL, FilFile.MIME_TYPE_INDEX ); + FIELD_INDEXES.put( FilFile.INSERTED_STAMP, FilFile.INSERTED_STAMP_INDEX ); + FIELD_INDEXES.put( FilFile.INSERTED_STAMP_FULL, FilFile.INSERTED_STAMP_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( FilFile.CLASS_IDENTIFIER, FilFile.USER_ID, FilFile.TO_USER_ID ); + FIELD_INDEXES.put( FilFile.USER_ID, FilFile.USER_ID_INDEX ); + FIELD_INDEXES.put( FilFile.USER_ID_FULL, FilFile.USER_ID_INDEX ); + FIELD_INDEXES.put( FilFile.TO_USER_ID, FilFile.TO_USER_ID_INDEX ); + FIELD_INDEXES.put( FilFile.FILE_DATA, FilFile.FILE_DATA_INDEX ); + FIELD_INDEXES.put( FilFile.FILE_DATA_FULL, FilFile.FILE_DATA_INDEX ); + FIELD_INDEXES.put( FilFile.DETAILS, FilFile.DETAILS_INDEX ); + FIELD_INDEXES.put( FilFile.DETAILS_FULL, FilFile.DETAILS_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyuser_idToevo_usr_user = + new com.evolute.entity.ForeignKey( FilFile.class, FilFile.USER_ID, db.data.siprp_local.outer.EvoUsrUserData.class, db.data.siprp_local.outer.EvoUsrUserData.ID ); + + public static final String TABLENAME = "fil_file"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.fil_file"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "fil_file.id"; + public static final int ID_INDEX = 0; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "fil_file.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 1; + public static final String NAME = "name"; + public static final String NAME_FULL = "fil_file.name"; + public static final int NAME_INDEX = 2; + public static final String MIME_TYPE = "mime_type"; + public static final String MIME_TYPE_FULL = "fil_file.mime_type"; + public static final int MIME_TYPE_INDEX = 3; + public static final String INSERTED_STAMP = "inserted_stamp"; + public static final String INSERTED_STAMP_FULL = "fil_file.inserted_stamp"; + public static final int INSERTED_STAMP_INDEX = 4; + public static final String USER_ID = "user_id"; + public static final String USER_ID_FULL = "fil_file.user_id"; + public static final int USER_ID_INDEX = 5; + public static final String TO_USER_ID = "to_user_id"; + public static final String TO_USER_ID_FULL = "fil_file.to_user_id"; + public static final int TO_USER_ID_INDEX = 6; + public static final String FILE_DATA = "file_data"; + public static final String FILE_DATA_FULL = "fil_file.file_data"; + public static final int FILE_DATA_INDEX = 7; + public static final String DETAILS = "details"; + public static final String DETAILS_FULL = "fil_file.details"; + public static final int DETAILS_INDEX = 8; + + public static final String FIELD_NAMES[] = new String[]{ + DELETED_STAMP, NAME, MIME_TYPE, INSERTED_STAMP, USER_ID, TO_USER_ID, FILE_DATA, + DETAILS, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DELETED_STAMP, TABLENAME + "." + NAME, TABLENAME + "." + MIME_TYPE, TABLENAME + "." + INSERTED_STAMP, TABLENAME + "." + USER_ID, TABLENAME + "." + TO_USER_ID, TABLENAME + "." + FILE_DATA, + TABLENAME + "." + DETAILS, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DELETED_STAMP, NAME, MIME_TYPE, INSERTED_STAMP, USER_ID, FILE_DATA, DETAILS, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DELETED_STAMP, NAME, MIME_TYPE, INSERTED_STAMP, USER_ID, DETAILS, }; + + private Integer id; + private java.sql.Timestamp deleted_stamp; + private String name; + private String mime_type; + private java.sql.Timestamp inserted_stamp; + private Integer user_id; + private db.data.siprp_local.outer.EvoUsrUserData to_user_id; + private byte[] file_data; + private String details; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public FilFile() + { + 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.ListfromFilFileAppointment_file_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.FilFileAppointmentData.class , getPrimaryKey().getMap().get("id"), "file_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.sql.Timestamp getDeleted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_stamp; + } + + public void setDeleted_stamp( java.sql.Timestamp deleted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_STAMP, deleted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_stamp = deleted_stamp; + LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); + } + + public 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 String getMime_type() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MIME_TYPE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.mime_type; + } + + public void setMime_type( String mime_type ) + { + try + { + setLockedForRefresh( true ); + preProcess( MIME_TYPE, mime_type ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.mime_type = mime_type; + LAZY_LOADED_OBJECTS.put( MIME_TYPE, Boolean.TRUE ); + } + + public java.sql.Timestamp getInserted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( INSERTED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.inserted_stamp; + } + + public void setInserted_stamp( java.sql.Timestamp inserted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( INSERTED_STAMP, inserted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.inserted_stamp = inserted_stamp; + LAZY_LOADED_OBJECTS.put( INSERTED_STAMP, Boolean.TRUE ); + } + + public Integer getUser_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( USER_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.user_id; + } + + public void setUser_id( Integer user_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( USER_ID, user_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.user_id = user_id; + LAZY_LOADED_OBJECTS.put( USER_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EvoUsrUserData toUser_id() + { + try + { + prepare( TO_USER_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_user_id; + } + + public void setToUser_id( db.data.siprp_local.outer.EvoUsrUserData to_user_id ) + { + try + { + preProcess( TO_USER_ID, to_user_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_user_id = to_user_id; + } + + public byte[] getFile_data() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FILE_DATA ); + Boolean isLazyLoaded = isPropertyLoaded( FILE_DATA ); + if ( ! isLazyLoaded ) + { + this.file_data = ( byte[] ) getProvider().loadFieldFromDatabase( FILE_DATA, this ); + LAZY_LOADED_OBJECTS.put( FILE_DATA, Boolean.TRUE ); + } + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.file_data; + } + + public void setFile_data( byte[] file_data ) + { + try + { + setLockedForRefresh( true ); + preProcess( FILE_DATA, file_data ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.file_data = file_data; + LAZY_LOADED_OBJECTS.put( FILE_DATA, Boolean.TRUE ); + } + + public String getDetails() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DETAILS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.details; + } + + public void setDetails( String details ) + { + try + { + setLockedForRefresh( true ); + preProcess( DETAILS, details ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.details = details; + LAZY_LOADED_OBJECTS.put( DETAILS, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFile.ID_INDEX: + value = getId(); + break; + case FilFile.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + break; + case FilFile.NAME_INDEX: + value = getName(); + break; + case FilFile.MIME_TYPE_INDEX: + value = getMime_type(); + break; + case FilFile.INSERTED_STAMP_INDEX: + value = getInserted_stamp(); + break; + case FilFile.USER_ID_INDEX: + value = getUser_id(); + break; + case FilFile.TO_USER_ID_INDEX: + value = toUser_id(); + break; + case FilFile.FILE_DATA_INDEX: + value = getFile_data(); + break; + case FilFile.DETAILS_INDEX: + value = getDetails(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFile.ID_INDEX: + value = this.id; + break; + case FilFile.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + case FilFile.NAME_INDEX: + value = this.name; + break; + case FilFile.MIME_TYPE_INDEX: + value = this.mime_type; + break; + case FilFile.INSERTED_STAMP_INDEX: + value = this.inserted_stamp; + break; + case FilFile.USER_ID_INDEX: + value = this.user_id; + break; + case FilFile.TO_USER_ID_INDEX: + value = this.to_user_id; + break; + case FilFile.FILE_DATA_INDEX: + value = this.file_data; + break; + case FilFile.DETAILS_INDEX: + value = this.details; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFile.ID_INDEX: + setId( ( Integer ) value ); + break; + case FilFile.DELETED_STAMP_INDEX: + setDeleted_stamp( ( java.sql.Timestamp ) value ); + break; + case FilFile.NAME_INDEX: + setName( ( String ) value ); + break; + case FilFile.MIME_TYPE_INDEX: + setMime_type( ( String ) value ); + break; + case FilFile.INSERTED_STAMP_INDEX: + setInserted_stamp( ( java.sql.Timestamp ) value ); + break; + case FilFile.USER_ID_INDEX: + setUser_id( ( Integer ) value ); + break; + case FilFile.TO_USER_ID_INDEX: + setToUser_id( ( db.data.siprp_local.outer.EvoUsrUserData ) value ); + break; + case FilFile.FILE_DATA_INDEX: + setFile_data( ( byte[] ) value ); + break; + case FilFile.DETAILS_INDEX: + setDetails( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFile.ID_INDEX: + this.id = ( Integer ) value; + break; + case FilFile.DELETED_STAMP_INDEX: + this.deleted_stamp = ( java.sql.Timestamp ) value; + break; + case FilFile.NAME_INDEX: + this.name = ( String ) value; + break; + case FilFile.MIME_TYPE_INDEX: + this.mime_type = ( String ) value; + break; + case FilFile.INSERTED_STAMP_INDEX: + this.inserted_stamp = ( java.sql.Timestamp ) value; + break; + case FilFile.USER_ID_INDEX: + this.user_id = ( Integer ) value; + break; + case FilFile.TO_USER_ID_INDEX: + this.to_user_id = ( db.data.siprp_local.outer.EvoUsrUserData ) value; + break; + case FilFile.FILE_DATA_INDEX: + this.file_data = ( byte[] ) value; + break; + case FilFile.DETAILS_INDEX: + this.details = ( 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 FilFile.ID_INDEX: + theClass = Integer.class; + break; + case FilFile.DELETED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + case FilFile.NAME_INDEX: + theClass = String.class; + break; + case FilFile.MIME_TYPE_INDEX: + theClass = String.class; + break; + case FilFile.INSERTED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + case FilFile.USER_ID_INDEX: + theClass = Integer.class; + break; + case FilFile.TO_USER_ID_INDEX: + theClass = db.data.siprp_local.outer.EvoUsrUserData.class; + break; + case FilFile.FILE_DATA_INDEX: + theClass = byte[].class; + break; + case FilFile.DETAILS_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : FilFile._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, FilFile.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( FILE_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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/FilFileAppointment.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/FilFileAppointment.java new file mode 100644 index 00000000..de1b902d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/FilFileAppointment.java @@ -0,0 +1,431 @@ +/* +* FilFileAppointment.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class FilFileAppointment extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( FilFileAppointment.ID, FilFileAppointment.ID_INDEX ); + FIELD_INDEXES.put( FilFileAppointment.ID_FULL, FilFileAppointment.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( FilFileAppointment.CLASS_IDENTIFIER, FilFileAppointment.FILE_ID, FilFileAppointment.TO_FILE_ID ); + FIELD_INDEXES.put( FilFileAppointment.FILE_ID, FilFileAppointment.FILE_ID_INDEX ); + FIELD_INDEXES.put( FilFileAppointment.FILE_ID_FULL, FilFileAppointment.FILE_ID_INDEX ); + FIELD_INDEXES.put( FilFileAppointment.TO_FILE_ID, FilFileAppointment.TO_FILE_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( FilFileAppointment.CLASS_IDENTIFIER, FilFileAppointment.APPOINTMENT_ID, FilFileAppointment.TO_APPOINTMENT_ID ); + FIELD_INDEXES.put( FilFileAppointment.APPOINTMENT_ID, FilFileAppointment.APPOINTMENT_ID_INDEX ); + FIELD_INDEXES.put( FilFileAppointment.APPOINTMENT_ID_FULL, FilFileAppointment.APPOINTMENT_ID_INDEX ); + FIELD_INDEXES.put( FilFileAppointment.TO_APPOINTMENT_ID, FilFileAppointment.TO_APPOINTMENT_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 ForeignKeyfile_idTofil_file = + new com.evolute.entity.ForeignKey( FilFileAppointment.class, FilFileAppointment.FILE_ID, db.data.siprp_local.outer.FilFileData.class, db.data.siprp_local.outer.FilFileData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyappointment_idToapt_appointment = + new com.evolute.entity.ForeignKey( FilFileAppointment.class, FilFileAppointment.APPOINTMENT_ID, db.data.siprp_local.outer.AptAppointmentData.class, db.data.siprp_local.outer.AptAppointmentData.ID ); + + public static final String TABLENAME = "fil_file_appointment"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.fil_file_appointment"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "fil_file_appointment.id"; + public static final int ID_INDEX = 0; + public static final String FILE_ID = "file_id"; + public static final String FILE_ID_FULL = "fil_file_appointment.file_id"; + public static final int FILE_ID_INDEX = 1; + public static final String TO_FILE_ID = "to_file_id"; + public static final String TO_FILE_ID_FULL = "fil_file_appointment.to_file_id"; + public static final int TO_FILE_ID_INDEX = 2; + public static final String APPOINTMENT_ID = "appointment_id"; + public static final String APPOINTMENT_ID_FULL = "fil_file_appointment.appointment_id"; + public static final int APPOINTMENT_ID_INDEX = 3; + public static final String TO_APPOINTMENT_ID = "to_appointment_id"; + public static final String TO_APPOINTMENT_ID_FULL = "fil_file_appointment.to_appointment_id"; + public static final int TO_APPOINTMENT_ID_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + FILE_ID, TO_FILE_ID, APPOINTMENT_ID, TO_APPOINTMENT_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + FILE_ID, TABLENAME + "." + TO_FILE_ID, TABLENAME + "." + APPOINTMENT_ID, TABLENAME + "." + TO_APPOINTMENT_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, FILE_ID, APPOINTMENT_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, FILE_ID, APPOINTMENT_ID, }; + + private Integer id; + private Integer file_id; + private db.data.siprp_local.outer.FilFileData to_file_id; + private Integer appointment_id; + private db.data.siprp_local.outer.AptAppointmentData to_appointment_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public FilFileAppointment() + { + 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 getFile_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FILE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.file_id; + } + + public void setFile_id( Integer file_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FILE_ID, file_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.file_id = file_id; + LAZY_LOADED_OBJECTS.put( FILE_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.FilFileData toFile_id() + { + try + { + prepare( TO_FILE_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_file_id; + } + + public void setToFile_id( db.data.siprp_local.outer.FilFileData to_file_id ) + { + try + { + preProcess( TO_FILE_ID, to_file_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_file_id = to_file_id; + } + + public Integer getAppointment_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( APPOINTMENT_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.appointment_id; + } + + public void setAppointment_id( Integer appointment_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( APPOINTMENT_ID, appointment_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.appointment_id = appointment_id; + LAZY_LOADED_OBJECTS.put( APPOINTMENT_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.AptAppointmentData toAppointment_id() + { + try + { + prepare( TO_APPOINTMENT_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_appointment_id; + } + + public void setToAppointment_id( db.data.siprp_local.outer.AptAppointmentData to_appointment_id ) + { + try + { + preProcess( TO_APPOINTMENT_ID, to_appointment_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_appointment_id = to_appointment_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFileAppointment.ID_INDEX: + value = getId(); + break; + case FilFileAppointment.FILE_ID_INDEX: + value = getFile_id(); + break; + case FilFileAppointment.TO_FILE_ID_INDEX: + value = toFile_id(); + break; + case FilFileAppointment.APPOINTMENT_ID_INDEX: + value = getAppointment_id(); + break; + case FilFileAppointment.TO_APPOINTMENT_ID_INDEX: + value = toAppointment_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFileAppointment.ID_INDEX: + value = this.id; + break; + case FilFileAppointment.FILE_ID_INDEX: + value = this.file_id; + break; + case FilFileAppointment.TO_FILE_ID_INDEX: + value = this.to_file_id; + break; + case FilFileAppointment.APPOINTMENT_ID_INDEX: + value = this.appointment_id; + break; + case FilFileAppointment.TO_APPOINTMENT_ID_INDEX: + value = this.to_appointment_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFileAppointment.ID_INDEX: + setId( ( Integer ) value ); + break; + case FilFileAppointment.FILE_ID_INDEX: + setFile_id( ( Integer ) value ); + break; + case FilFileAppointment.TO_FILE_ID_INDEX: + setToFile_id( ( db.data.siprp_local.outer.FilFileData ) value ); + break; + case FilFileAppointment.APPOINTMENT_ID_INDEX: + setAppointment_id( ( Integer ) value ); + break; + case FilFileAppointment.TO_APPOINTMENT_ID_INDEX: + setToAppointment_id( ( db.data.siprp_local.outer.AptAppointmentData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFileAppointment.ID_INDEX: + this.id = ( Integer ) value; + break; + case FilFileAppointment.FILE_ID_INDEX: + this.file_id = ( Integer ) value; + break; + case FilFileAppointment.TO_FILE_ID_INDEX: + this.to_file_id = ( db.data.siprp_local.outer.FilFileData ) value; + break; + case FilFileAppointment.APPOINTMENT_ID_INDEX: + this.appointment_id = ( Integer ) value; + break; + case FilFileAppointment.TO_APPOINTMENT_ID_INDEX: + this.to_appointment_id = ( db.data.siprp_local.outer.AptAppointmentData ) 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 FilFileAppointment.ID_INDEX: + theClass = Integer.class; + break; + case FilFileAppointment.FILE_ID_INDEX: + theClass = Integer.class; + break; + case FilFileAppointment.TO_FILE_ID_INDEX: + theClass = db.data.siprp_local.outer.FilFileData.class; + break; + case FilFileAppointment.APPOINTMENT_ID_INDEX: + theClass = Integer.class; + break; + case FilFileAppointment.TO_APPOINTMENT_ID_INDEX: + theClass = db.data.siprp_local.outer.AptAppointmentData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : FilFileAppointment._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, FilFileAppointment.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HistoricoEstabelecimento.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HistoricoEstabelecimento.java new file mode 100644 index 00000000..f4e8a424 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HistoricoEstabelecimento.java @@ -0,0 +1,431 @@ +/* +* HistoricoEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HistoricoEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "historico_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.historico_estabelecimento"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "historico_estabelecimento.id"; + public static final int ID_INDEX = 0; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "historico_estabelecimento.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 1; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID_FULL = "historico_estabelecimento.to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 2; + public static final String DATA = "data"; + public static final String DATA_FULL = "historico_estabelecimento.data"; + public static final int DATA_INDEX = 3; + public static final String TEXTO = "texto"; + public static final String TEXTO_FULL = "historico_estabelecimento.texto"; + public static final int TEXTO_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, DATA, TEXTO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID, TABLENAME + "." + DATA, TABLENAME + "." + TEXTO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ESTABELECIMENTO_ID, DATA, TEXTO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ESTABELECIMENTO_ID, DATA, TEXTO, }; + + private Integer id; + private Integer estabelecimento_id; + private db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.EstabelecimentosData ) value ); + break; + case HistoricoEstabelecimento.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case HistoricoEstabelecimento.TEXTO_INDEX: + setTexto( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HistoricoEstabelecimento.ID_INDEX: + this.id = ( Integer ) value; + break; + case HistoricoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case HistoricoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( db.data.siprp_local.outer.EstabelecimentosData ) value; + break; + case HistoricoEstabelecimento.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case HistoricoEstabelecimento.TEXTO_INDEX: + this.texto = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HistoricoEstabelecimento.ID_INDEX: + theClass = Integer.class; + break; + case HistoricoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case HistoricoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsArea.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsArea.java new file mode 100644 index 00000000..e0ee2fd9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsArea.java @@ -0,0 +1,495 @@ +/* +* HsArea.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsArea extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final String TABLENAME = "hs_area"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_area"; + + 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 String TO_EMPRESA_ID_FULL = "hs_area.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsEmail.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsEmail.java new file mode 100644 index 00000000..2671fc45 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class HsEmail extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.hs_email"; + + 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( db.data.siprp_local.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( db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsEmailEmpresa.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsEmailEmpresa.java new file mode 100644 index 00000000..b3a462e0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsEmailEmpresa.java @@ -0,0 +1,381 @@ +/* +* HsEmailEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsEmailEmpresa extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsEmailData.class, db.data.siprp_local.outer.HsEmailData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( HsEmailEmpresa.class, HsEmailEmpresa.EMPRESA_ID, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final String TABLENAME = "hs_email_empresa"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_email_empresa"; + + 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 String TO_EMAIL_ID_FULL = "hs_email_empresa.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 String TO_EMPRESA_ID_FULL = "hs_email_empresa.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 db.data.siprp_local.outer.HsEmailData to_email_id; + private Integer empresa_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsEmailData ) value ); + break; + case HsEmailEmpresa.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case HsEmailEmpresa.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsEmailData.class; + break; + case HsEmailEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case HsEmailEmpresa.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsEmailEstabelecimento.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsEmailEstabelecimento.java new file mode 100644 index 00000000..379b3617 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsEmailEstabelecimento.java @@ -0,0 +1,381 @@ +/* +* HsEmailEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsEmailEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsEmailData.class, db.data.siprp_local.outer.HsEmailData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( HsEmailEstabelecimento.class, HsEmailEstabelecimento.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "hs_email_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_email_estabelecimento"; + + 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 String TO_EMAIL_ID_FULL = "hs_email_estabelecimento.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 String TO_ESTABELECIMENTO_ID_FULL = "hs_email_estabelecimento.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 db.data.siprp_local.outer.HsEmailData to_email_id; + private Integer estabelecimento_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsEmailData ) value ); + break; + case HsEmailEstabelecimento.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case HsEmailEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsEmailData.class; + break; + case HsEmailEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case HsEmailEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsEquipamento.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsEquipamento.java new file mode 100644 index 00000000..0fb4aa02 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class HsEquipamento extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.hs_equipamento"; + + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsLegislacao.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsLegislacao.java new file mode 100644 index 00000000..c3c7aa95 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsLegislacao.java @@ -0,0 +1,459 @@ +/* +* HsLegislacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsLegislacao extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsLegislacaoCategoriaData.class, db.data.siprp_local.outer.HsLegislacaoCategoriaData.ID ); + + public static final String TABLENAME = "hs_legislacao"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_legislacao"; + + 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 String TO_CATEGORIA_ID_FULL = "hs_legislacao.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 db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsLegislacaoCategoria.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsLegislacaoCategoria.java new file mode 100644 index 00000000..690b1e8c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class HsLegislacaoCategoria extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.hs_legislacao_categoria"; + + 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( db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsLegislacaoEmpresa.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsLegislacaoEmpresa.java new file mode 100644 index 00000000..69c5d8d8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsLegislacaoEmpresa.java @@ -0,0 +1,381 @@ +/* +* HsLegislacaoEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsLegislacaoEmpresa extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsLegislacaoData.class, db.data.siprp_local.outer.HsLegislacaoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( HsLegislacaoEmpresa.class, HsLegislacaoEmpresa.EMPRESA_ID, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final String TABLENAME = "hs_legislacao_empresa"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_legislacao_empresa"; + + 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 String TO_LEGISLACAO_ID_FULL = "hs_legislacao_empresa.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 String TO_EMPRESA_ID_FULL = "hs_legislacao_empresa.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 db.data.siprp_local.outer.HsLegislacaoData to_legislacao_id; + private Integer empresa_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsLegislacaoData ) value ); + break; + case HsLegislacaoEmpresa.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case HsLegislacaoEmpresa.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsLegislacaoData.class; + break; + case HsLegislacaoEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case HsLegislacaoEmpresa.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsLegislacaoEstabelecimento.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsLegislacaoEstabelecimento.java new file mode 100644 index 00000000..6fa4757e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsLegislacaoEstabelecimento.java @@ -0,0 +1,431 @@ +/* +* HsLegislacaoEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsLegislacaoEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsLegislacaoData.class, db.data.siprp_local.outer.HsLegislacaoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( HsLegislacaoEstabelecimento.class, HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "hs_legislacao_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_legislacao_estabelecimento"; + + 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 String TO_LEGISLACAO_ID_FULL = "hs_legislacao_estabelecimento.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 String TO_ESTABELECIMENTO_ID_FULL = "hs_legislacao_estabelecimento.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 db.data.siprp_local.outer.HsLegislacaoData to_legislacao_id; + private Integer estabelecimento_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsLegislacaoData ) value ); + break; + case HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case HsLegislacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsLegislacaoData.class; + break; + case HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case HsLegislacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsMedida.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsMedida.java new file mode 100644 index 00000000..7a7465e3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class HsMedida extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.hs_medida"; + + 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( db.data.siprp_local.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( db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsNormalizacao.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsNormalizacao.java new file mode 100644 index 00000000..c031851d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class HsNormalizacao extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.hs_normalizacao"; + + 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( db.data.siprp_local.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( db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsNormalizacaoEmpresa.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsNormalizacaoEmpresa.java new file mode 100644 index 00000000..02f17fb3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsNormalizacaoEmpresa.java @@ -0,0 +1,381 @@ +/* +* HsNormalizacaoEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsNormalizacaoEmpresa extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsNormalizacaoData.class, db.data.siprp_local.outer.HsNormalizacaoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( HsNormalizacaoEmpresa.class, HsNormalizacaoEmpresa.EMPRESA_ID, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final String TABLENAME = "hs_normalizacao_empresa"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_normalizacao_empresa"; + + 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 String TO_NORMALIZACAO_ID_FULL = "hs_normalizacao_empresa.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 String TO_EMPRESA_ID_FULL = "hs_normalizacao_empresa.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 db.data.siprp_local.outer.HsNormalizacaoData to_normalizacao_id; + private Integer empresa_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsNormalizacaoData ) value ); + break; + case HsNormalizacaoEmpresa.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case HsNormalizacaoEmpresa.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsNormalizacaoData.class; + break; + case HsNormalizacaoEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case HsNormalizacaoEmpresa.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsNormalizacaoEstabelecimento.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsNormalizacaoEstabelecimento.java new file mode 100644 index 00000000..3335fd46 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsNormalizacaoEstabelecimento.java @@ -0,0 +1,381 @@ +/* +* HsNormalizacaoEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsNormalizacaoEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsNormalizacaoData.class, db.data.siprp_local.outer.HsNormalizacaoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( HsNormalizacaoEstabelecimento.class, HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "hs_normalizacao_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_normalizacao_estabelecimento"; + + 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 String TO_NORMALIZACAO_ID_FULL = "hs_normalizacao_estabelecimento.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 String TO_ESTABELECIMENTO_ID_FULL = "hs_normalizacao_estabelecimento.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 db.data.siprp_local.outer.HsNormalizacaoData to_normalizacao_id; + private Integer estabelecimento_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsNormalizacaoData ) value ); + break; + case HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case HsNormalizacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsNormalizacaoData.class; + break; + case HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case HsNormalizacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsPosto.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsPosto.java new file mode 100644 index 00000000..532075e0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsPosto.java @@ -0,0 +1,523 @@ +/* +* HsPosto.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsPosto extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsAreaData.class, db.data.siprp_local.outer.HsAreaData.ID ); + + public static final String TABLENAME = "hs_posto"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_posto"; + + 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 String TO_AREA_ID_FULL = "hs_posto.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 db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsPostoEstabelecimento.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsPostoEstabelecimento.java new file mode 100644 index 00000000..93b4854e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsPostoEstabelecimento.java @@ -0,0 +1,381 @@ +/* +* HsPostoEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsPostoEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsPostoData.class, db.data.siprp_local.outer.HsPostoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( HsPostoEstabelecimento.class, HsPostoEstabelecimento.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "hs_posto_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_posto_estabelecimento"; + + 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 String TO_POSTO_ID_FULL = "hs_posto_estabelecimento.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 String TO_ESTABELECIMENTO_ID_FULL = "hs_posto_estabelecimento.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 db.data.siprp_local.outer.HsPostoData to_posto_id; + private Integer estabelecimento_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsPostoData ) value ); + break; + case HsPostoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case HsPostoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsPostoData.class; + break; + case HsPostoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case HsPostoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsPostoMedida.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsPostoMedida.java new file mode 100644 index 00000000..1a602619 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsPostoMedida.java @@ -0,0 +1,381 @@ +/* +* HsPostoMedida.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsPostoMedida extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsPostoData.class, db.data.siprp_local.outer.HsPostoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedida_idTohs_medida = + new com.evolute.entity.ForeignKey( HsPostoMedida.class, HsPostoMedida.MEDIDA_ID, db.data.siprp_local.outer.HsMedidaData.class, db.data.siprp_local.outer.HsMedidaData.ID ); + + public static final String TABLENAME = "hs_posto_medida"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_posto_medida"; + + 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 String TO_POSTO_ID_FULL = "hs_posto_medida.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 String TO_MEDIDA_ID_FULL = "hs_posto_medida.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 db.data.siprp_local.outer.HsPostoData to_posto_id; + private Integer medida_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsPostoData ) value ); + break; + case HsPostoMedida.MEDIDA_ID_INDEX: + setMedida_id( ( Integer ) value ); + break; + case HsPostoMedida.TO_MEDIDA_ID_INDEX: + setToMedida_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsPostoData.class; + break; + case HsPostoMedida.MEDIDA_ID_INDEX: + theClass = Integer.class; + break; + case HsPostoMedida.TO_MEDIDA_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsPostoRisco.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsPostoRisco.java new file mode 100644 index 00000000..6463e6f0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsPostoRisco.java @@ -0,0 +1,685 @@ +/* +* HsPostoRisco.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsPostoRisco extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsPostoData.class, db.data.siprp_local.outer.HsPostoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyrisco_idTohs_risco = + new com.evolute.entity.ForeignKey( HsPostoRisco.class, HsPostoRisco.RISCO_ID, db.data.siprp_local.outer.HsRiscoData.class, db.data.siprp_local.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, db.data.siprp_local.outer.HsRelatorioRiscoValorQualitativoData.class, db.data.siprp_local.outer.HsRelatorioRiscoValorQualitativoData.ID ); + + public static final String TABLENAME = "hs_posto_risco"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_posto_risco"; + + 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 String TO_POSTO_ID_FULL = "hs_posto_risco.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 String TO_RISCO_ID_FULL = "hs_posto_risco.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 String TO_VALOR_QUALITATIVO_FULL = "hs_posto_risco.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 db.data.siprp_local.outer.HsPostoData to_posto_id; + private Integer risco_id; + private db.data.siprp_local.outer.HsRiscoData to_risco_id; + private Integer probabilidade; + private Integer severidade; + private Integer valor_qualitativo; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsPostoData ) value ); + break; + case HsPostoRisco.RISCO_ID_INDEX: + setRisco_id( ( Integer ) value ); + break; + case HsPostoRisco.TO_RISCO_ID_INDEX: + setToRisco_id( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsPostoData.class; + break; + case HsPostoRisco.RISCO_ID_INDEX: + theClass = Integer.class; + break; + case HsPostoRisco.TO_RISCO_ID_INDEX: + theClass = db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorio.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorio.java new file mode 100644 index 00000000..d76381b9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorio.java @@ -0,0 +1,960 @@ +/* +* HsRelatorio.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorio extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.MarcacoesEstabelecimentoData.class, db.data.siprp_local.outer.MarcacoesEstabelecimentoData.ID ); + + public static final String TABLENAME = "hs_relatorio"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio"; + + 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 String TO_MARCACAO_ID_FULL = "hs_relatorio.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 db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioArea.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioArea.java new file mode 100644 index 00000000..709196c9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioArea.java @@ -0,0 +1,545 @@ +/* +* HsRelatorioArea.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioArea extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioData.class, db.data.siprp_local.outer.HsRelatorioData.ID ); + + public static final String TABLENAME = "hs_relatorio_area"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_area"; + + 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 String TO_RELATORIO_ID_FULL = "hs_relatorio_area.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioEquipamento.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioEquipamento.java new file mode 100644 index 00000000..82cee441 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioEquipamento.java @@ -0,0 +1,583 @@ +/* +* HsRelatorioEquipamento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioEquipamento extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioData.class, db.data.siprp_local.outer.HsRelatorioData.ID ); + + public static final String TABLENAME = "hs_relatorio_equipamento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_equipamento"; + + 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 String TO_HS_RELATORIO_ID_FULL = "hs_relatorio_equipamento.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 db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioLegislacao.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioLegislacao.java new file mode 100644 index 00000000..8df82bc7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioLegislacao.java @@ -0,0 +1,533 @@ +/* +* HsRelatorioLegislacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioLegislacao extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioData.class, db.data.siprp_local.outer.HsRelatorioData.ID ); + + public static final String TABLENAME = "hs_relatorio_legislacao"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_legislacao"; + + 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 String TO_HS_RELATORIO_ID_FULL = "hs_relatorio_legislacao.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 db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioMedida.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioMedida.java new file mode 100644 index 00000000..c4292e92 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioMedida.java @@ -0,0 +1,547 @@ +/* +* HsRelatorioMedida.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioMedida extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioRiscoData.class, db.data.siprp_local.outer.HsRelatorioRiscoData.ID ); + + public static final String TABLENAME = "hs_relatorio_medida"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_medida"; + + 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 String TO_RISCO_ID_FULL = "hs_relatorio_medida.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioNormalizacao.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioNormalizacao.java new file mode 100644 index 00000000..f586b86c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioNormalizacao.java @@ -0,0 +1,533 @@ +/* +* HsRelatorioNormalizacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioNormalizacao extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioData.class, db.data.siprp_local.outer.HsRelatorioData.ID ); + + public static final String TABLENAME = "hs_relatorio_normalizacao"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_normalizacao"; + + 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 String TO_HS_RELATORIO_ID_FULL = "hs_relatorio_normalizacao.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 db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioPosto.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioPosto.java new file mode 100644 index 00000000..41667265 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioPosto.java @@ -0,0 +1,559 @@ +/* +* HsRelatorioPosto.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioPosto extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioAreaData.class, db.data.siprp_local.outer.HsRelatorioAreaData.ID ); + + public static final String TABLENAME = "hs_relatorio_posto"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_posto"; + + 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 String TO_AREA_ID_FULL = "hs_relatorio_posto.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 db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioPostoMedida.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioPostoMedida.java new file mode 100644 index 00000000..ae0bf156 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioPostoMedida.java @@ -0,0 +1,431 @@ +/* +* HsRelatorioPostoMedida.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioPostoMedida extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioPostoData.class, db.data.siprp_local.outer.HsRelatorioPostoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedida_idTohs_relatorio_medida = + new com.evolute.entity.ForeignKey( HsRelatorioPostoMedida.class, HsRelatorioPostoMedida.MEDIDA_ID, db.data.siprp_local.outer.HsRelatorioMedidaData.class, db.data.siprp_local.outer.HsRelatorioMedidaData.ID ); + + public static final String TABLENAME = "hs_relatorio_posto_medida"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_posto_medida"; + + 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 String TO_POSTO_ID_FULL = "hs_relatorio_posto_medida.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 String TO_MEDIDA_ID_FULL = "hs_relatorio_posto_medida.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 db.data.siprp_local.outer.HsRelatorioPostoData to_posto_id; + private Integer medida_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsRelatorioPostoData ) value ); + break; + case HsRelatorioPostoMedida.MEDIDA_ID_INDEX: + setMedida_id( ( Integer ) value ); + break; + case HsRelatorioPostoMedida.TO_MEDIDA_ID_INDEX: + setToMedida_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsRelatorioPostoData.class; + break; + case HsRelatorioPostoMedida.MEDIDA_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioPostoMedida.TO_MEDIDA_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioPostoRisco.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioPostoRisco.java new file mode 100644 index 00000000..642653dc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioPostoRisco.java @@ -0,0 +1,633 @@ +/* +* HsRelatorioPostoRisco.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioPostoRisco extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioPostoData.class, db.data.siprp_local.outer.HsRelatorioPostoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyrisco_idTohs_relatorio_risco = + new com.evolute.entity.ForeignKey( HsRelatorioPostoRisco.class, HsRelatorioPostoRisco.RISCO_ID, db.data.siprp_local.outer.HsRelatorioRiscoData.class, db.data.siprp_local.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, db.data.siprp_local.outer.HsRelatorioRiscoValorQualitativoData.class, db.data.siprp_local.outer.HsRelatorioRiscoValorQualitativoData.ID ); + + public static final String TABLENAME = "hs_relatorio_posto_risco"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_posto_risco"; + + 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 String TO_POSTO_ID_FULL = "hs_relatorio_posto_risco.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 String TO_RISCO_ID_FULL = "hs_relatorio_posto_risco.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 String TO_VALOR_QUALITATIVO_ID_FULL = "hs_relatorio_posto_risco.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 db.data.siprp_local.outer.HsRelatorioPostoData to_posto_id; + private Integer risco_id; + private db.data.siprp_local.outer.HsRelatorioRiscoData to_risco_id; + private Integer probabilidade; + private Integer severidade; + private Integer valor_qualitativo_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsRelatorioPostoData ) value ); + break; + case HsRelatorioPostoRisco.RISCO_ID_INDEX: + setRisco_id( ( Integer ) value ); + break; + case HsRelatorioPostoRisco.TO_RISCO_ID_INDEX: + setToRisco_id( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsRelatorioPostoData.class; + break; + case HsRelatorioPostoRisco.RISCO_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioPostoRisco.TO_RISCO_ID_INDEX: + theClass = db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioRisco.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioRisco.java new file mode 100644 index 00000000..37522719 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioRisco.java @@ -0,0 +1,509 @@ +/* +* HsRelatorioRisco.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioRisco extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioData.class, db.data.siprp_local.outer.HsRelatorioData.ID ); + + public static final String TABLENAME = "hs_relatorio_risco"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_risco"; + + 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 String TO_RELATORIO_ID_FULL = "hs_relatorio_risco.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 db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioRiscoValorQualitativo.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRelatorioRiscoValorQualitativo.java new file mode 100644 index 00000000..6be1a01b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class HsRelatorioRiscoValorQualitativo extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.hs_relatorio_risco_valor_qualitativo"; + + 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( db.data.siprp_local.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( db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRisco.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRisco.java new file mode 100644 index 00000000..35ff90c2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRisco.java @@ -0,0 +1,473 @@ +/* +* HsRisco.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRisco extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRiscoTemaData.class, db.data.siprp_local.outer.HsRiscoTemaData.ID ); + + public static final String TABLENAME = "hs_risco"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_risco"; + + 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 String TO_TEMA_ID_FULL = "hs_risco.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 db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRiscoEmpresa.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRiscoEmpresa.java new file mode 100644 index 00000000..b8b38a4b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRiscoEmpresa.java @@ -0,0 +1,381 @@ +/* +* HsRiscoEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRiscoEmpresa extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRiscoData.class, db.data.siprp_local.outer.HsRiscoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( HsRiscoEmpresa.class, HsRiscoEmpresa.EMPRESA_ID, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final String TABLENAME = "hs_risco_empresa"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_risco_empresa"; + + 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 String TO_RISCO_ID_FULL = "hs_risco_empresa.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 String TO_EMPRESA_ID_FULL = "hs_risco_empresa.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 db.data.siprp_local.outer.HsRiscoData to_risco_id; + private Integer empresa_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsRiscoData ) value ); + break; + case HsRiscoEmpresa.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case HsRiscoEmpresa.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsRiscoData.class; + break; + case HsRiscoEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case HsRiscoEmpresa.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRiscoMedida.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRiscoMedida.java new file mode 100644 index 00000000..6a9c6901 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRiscoMedida.java @@ -0,0 +1,381 @@ +/* +* HsRiscoMedida.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRiscoMedida extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRiscoData.class, db.data.siprp_local.outer.HsRiscoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedida_idTohs_medida = + new com.evolute.entity.ForeignKey( HsRiscoMedida.class, HsRiscoMedida.MEDIDA_ID, db.data.siprp_local.outer.HsMedidaData.class, db.data.siprp_local.outer.HsMedidaData.ID ); + + public static final String TABLENAME = "hs_risco_medida"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_risco_medida"; + + 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 String TO_RISCO_ID_FULL = "hs_risco_medida.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 String TO_MEDIDA_ID_FULL = "hs_risco_medida.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 db.data.siprp_local.outer.HsRiscoData to_risco_id; + private Integer medida_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsRiscoData ) value ); + break; + case HsRiscoMedida.MEDIDA_ID_INDEX: + setMedida_id( ( Integer ) value ); + break; + case HsRiscoMedida.TO_MEDIDA_ID_INDEX: + setToMedida_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsRiscoData.class; + break; + case HsRiscoMedida.MEDIDA_ID_INDEX: + theClass = Integer.class; + break; + case HsRiscoMedida.TO_MEDIDA_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRiscoTema.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/HsRiscoTema.java new file mode 100644 index 00000000..b82bc37c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class HsRiscoTema extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.hs_risco_tema"; + + 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( db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Ids.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Ids.java new file mode 100644 index 00000000..42cc4252 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class Ids extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.ids"; + + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Image.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Image.java new file mode 100644 index 00000000..69e6eda8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class Image extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.image"; + + 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( db.data.siprp_local.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( db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Lembretes.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Lembretes.java new file mode 100644 index 00000000..598af78b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Lembretes.java @@ -0,0 +1,1505 @@ +/* +* Lembretes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Lembretes extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + 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.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 ); + com.evolute.entity.evo.EvoDataObject.register( Lembretes.CLASS_IDENTIFIER, Lembretes.EXAME_ID, Lembretes.TO_EXAME_ID ); + FIELD_INDEXES.put( Lembretes.EXAME_ID, Lembretes.EXAME_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.EXAME_ID_FULL, Lembretes.EXAME_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.TO_EXAME_ID, Lembretes.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 ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( Lembretes.class, Lembretes.EMPRESA_ID, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( Lembretes.class, Lembretes.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores = + new com.evolute.entity.ForeignKey( Lembretes.class, Lembretes.TRABALHADOR_ID, db.data.siprp_local.outer.TrabalhadoresData.class, db.data.siprp_local.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, db.data.siprp_local.outer.MarcacoesEstabelecimentoData.class, db.data.siprp_local.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, db.data.siprp_local.outer.MarcacoesTrabalhadorData.class, db.data.siprp_local.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, db.data.siprp_local.outer.TrabalhadoresConsultasDatasData.class, db.data.siprp_local.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, db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.class, db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyexame_idToexames = + new com.evolute.entity.ForeignKey( Lembretes.class, Lembretes.EXAME_ID, db.data.siprp_local.outer.ExamesData.class, db.data.siprp_local.outer.ExamesData.ID ); + + public static final String TABLENAME = "lembretes"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.lembretes"; + + 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 DATA = "data"; + public static final String DATA_FULL = "lembretes.data"; + public static final int DATA_INDEX = 2; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "lembretes.descricao"; + public static final int DESCRICAO_INDEX = 3; + public static final String TEXTO = "texto"; + public static final String TEXTO_FULL = "lembretes.texto"; + public static final int TEXTO_INDEX = 4; + 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 = 5; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final String TO_EMPRESA_ID_FULL = "lembretes.to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 6; + 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 = 7; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID_FULL = "lembretes.to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 8; + 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 = 9; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final String TO_TRABALHADOR_ID_FULL = "lembretes.to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 10; + 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 = 11; + public static final String TO_MARCACAO_ESTABELECIMENTO_ID = "to_marcacao_estabelecimento_id"; + public static final String TO_MARCACAO_ESTABELECIMENTO_ID_FULL = "lembretes.to_marcacao_estabelecimento_id"; + public static final int TO_MARCACAO_ESTABELECIMENTO_ID_INDEX = 12; + 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 = 13; + public static final String TO_MARCACAO_TRABALHADOR_ID = "to_marcacao_trabalhador_id"; + public static final String TO_MARCACAO_TRABALHADOR_ID_FULL = "lembretes.to_marcacao_trabalhador_id"; + public static final int TO_MARCACAO_TRABALHADOR_ID_INDEX = 14; + 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 = 15; + 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 = 16; + 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 = 17; + 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 = 18; + 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 = 19; + public static final String TO_TRABALHADORES_CONSULTAS_DATAS_ID = "to_trabalhadores_consultas_datas_id"; + public static final String TO_TRABALHADORES_CONSULTAS_DATAS_ID_FULL = "lembretes.to_trabalhadores_consultas_datas_id"; + public static final int TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX = 20; + 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 = 21; + public static final String TO_TRABALHADORES_ECDS_DATAS_ID = "to_trabalhadores_ecds_datas_id"; + public static final String TO_TRABALHADORES_ECDS_DATAS_ID_FULL = "lembretes.to_trabalhadores_ecds_datas_id"; + public static final int TO_TRABALHADORES_ECDS_DATAS_ID_INDEX = 22; + 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 = 23; + public static final String EXAME_ID = "exame_id"; + public static final String EXAME_ID_FULL = "lembretes.exame_id"; + public static final int EXAME_ID_INDEX = 24; + public static final String TO_EXAME_ID = "to_exame_id"; + public static final String TO_EXAME_ID_FULL = "lembretes.to_exame_id"; + public static final int TO_EXAME_ID_INDEX = 25; + + public static final String FIELD_NAMES[] = new String[]{ + 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, + EXAME_ID, TO_EXAME_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + 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, + TABLENAME + "." + EXAME_ID, TABLENAME + "." + TO_EXAME_ID, }; + + 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, EXAME_ID, }; + + + 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, EXAME_ID, }; + + private Integer id; + private Integer tipo_id; + private java.util.Date data; + private String descricao; + private String texto; + private Integer empresa_id; + private db.data.siprp_local.outer.EmpresasData to_empresa_id; + private Integer estabelecimento_id; + private db.data.siprp_local.outer.EstabelecimentosData to_estabelecimento_id; + private Integer trabalhador_id; + private db.data.siprp_local.outer.TrabalhadoresData to_trabalhador_id; + private Integer marcacao_estabelecimento_id; + private db.data.siprp_local.outer.MarcacoesEstabelecimentoData to_marcacao_estabelecimento_id; + private Integer marcacao_trabalhador_id; + private db.data.siprp_local.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 db.data.siprp_local.outer.TrabalhadoresConsultasDatasData to_trabalhadores_consultas_datas_id; + private Integer trabalhadores_ecds_datas_id; + private db.data.siprp_local.outer.TrabalhadoresEcdsDatasData to_trabalhadores_ecds_datas_id; + private java.sql.Timestamp deleted_date; + private Integer exame_id; + private db.data.siprp_local.outer.ExamesData to_exame_id; + + 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, 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 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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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 db.data.siprp_local.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 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 db.data.siprp_local.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( db.data.siprp_local.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 Lembretes.ID_INDEX: + value = getId(); + break; + case Lembretes.TIPO_ID_INDEX: + value = getTipo_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; + case Lembretes.EXAME_ID_INDEX: + value = getExame_id(); + break; + case Lembretes.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 Lembretes.ID_INDEX: + value = this.id; + break; + case Lembretes.TIPO_ID_INDEX: + value = this.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; + case Lembretes.EXAME_ID_INDEX: + value = this.exame_id; + break; + case Lembretes.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 Lembretes.ID_INDEX: + setId( ( Integer ) value ); + break; + case Lembretes.TIPO_ID_INDEX: + setTipo_id( ( Integer ) 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( ( db.data.siprp_local.outer.EmpresasData ) value ); + break; + case Lembretes.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case Lembretes.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp_local.outer.EstabelecimentosData ) value ); + break; + case Lembretes.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case Lembretes.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.outer.TrabalhadoresEcdsDatasData ) value ); + break; + case Lembretes.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case Lembretes.EXAME_ID_INDEX: + setExame_id( ( Integer ) value ); + break; + case Lembretes.TO_EXAME_ID_INDEX: + setToExame_id( ( db.data.siprp_local.outer.ExamesData ) 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.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.outer.TrabalhadoresEcdsDatasData ) value; + break; + case Lembretes.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case Lembretes.EXAME_ID_INDEX: + this.exame_id = ( Integer ) value; + break; + case Lembretes.TO_EXAME_ID_INDEX: + this.to_exame_id = ( db.data.siprp_local.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 Lembretes.ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TIPO_ID_INDEX: + theClass = Integer.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 = db.data.siprp_local.outer.EmpresasData.class; + break; + case Lembretes.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.outer.EstabelecimentosData.class; + break; + case Lembretes.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_TRABALHADOR_ID_INDEX: + theClass = db.data.siprp_local.outer.TrabalhadoresData.class; + break; + case Lembretes.MARCACAO_ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_MARCACAO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.outer.MarcacoesEstabelecimentoData.class; + break; + case Lembretes.MARCACAO_TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_MARCACAO_TRABALHADOR_ID_INDEX: + theClass = db.data.siprp_local.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 = db.data.siprp_local.outer.TrabalhadoresConsultasDatasData.class; + break; + case Lembretes.TRABALHADORES_ECDS_DATAS_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + theClass = db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.class; + break; + case Lembretes.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case Lembretes.EXAME_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_EXAME_ID_INDEX: + theClass = db.data.siprp_local.outer.ExamesData.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/LembretesTipos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/LembretesTipos.java new file mode 100644 index 00000000..3febd3e2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/LembretesTipos.java @@ -0,0 +1,431 @@ +/* +* LembretesTipos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class LembretesTipos extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.lembretes_tipos"; + + 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 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesEmpresa.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesEmpresa.java new file mode 100644 index 00000000..bd44751d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesEmpresa.java @@ -0,0 +1,481 @@ +/* +* MarcacoesEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class MarcacoesEmpresa extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final String TABLENAME = "marcacoes_empresa"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.marcacoes_empresa"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_empresa.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_empresa.data"; + public static final int DATA_INDEX = 1; + public static final String TEXTO = "texto"; + public static final String TEXTO_FULL = "marcacoes_empresa.texto"; + public static final int TEXTO_INDEX = 2; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "marcacoes_empresa.empresa_id"; + public static final int EMPRESA_ID_INDEX = 3; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final String TO_EMPRESA_ID_FULL = "marcacoes_empresa.to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 4; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "marcacoes_empresa.realizada"; + public static final int REALIZADA_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, TEXTO, EMPRESA_ID, TO_EMPRESA_ID, REALIZADA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA, TABLENAME + "." + TEXTO, TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + REALIZADA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, TEXTO, EMPRESA_ID, REALIZADA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA, TEXTO, EMPRESA_ID, REALIZADA, }; + + private Integer id; + private java.util.Date data; + private String texto; + private Integer empresa_id; + private db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.EmpresasData ) value ); + break; + case MarcacoesEmpresa.REALIZADA_INDEX: + setRealizada( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesEmpresa.ID_INDEX: + this.id = ( Integer ) value; + break; + case MarcacoesEmpresa.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case MarcacoesEmpresa.TEXTO_INDEX: + this.texto = ( String ) value; + break; + case MarcacoesEmpresa.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case MarcacoesEmpresa.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( db.data.siprp_local.outer.EmpresasData ) value; + break; + case MarcacoesEmpresa.REALIZADA_INDEX: + this.realizada = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case MarcacoesEmpresa.ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesEmpresa.DATA_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesEmpresa.TEXTO_INDEX: + theClass = String.class; + break; + case MarcacoesEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesEmpresa.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesEstabelecimento.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesEstabelecimento.java new file mode 100644 index 00000000..c6417ef2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesEstabelecimento.java @@ -0,0 +1,866 @@ +/* +* MarcacoesEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytecnico_hstTomarcacoes_tecnicos_hst = + new com.evolute.entity.ForeignKey( MarcacoesEstabelecimento.class, MarcacoesEstabelecimento.TECNICO_HST, db.data.siprp_local.outer.MarcacoesTecnicosHstData.class, db.data.siprp_local.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, db.data.siprp_local.outer.MarcacoesTecnicosHstData.class, db.data.siprp_local.outer.MarcacoesTecnicosHstData.ID ); + + public static final String TABLENAME = "marcacoes_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.marcacoes_estabelecimento"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_estabelecimento.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_estabelecimento.data"; + public static final int DATA_INDEX = 1; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "marcacoes_estabelecimento.realizada"; + public static final int REALIZADA_INDEX = 2; + public static final String DATA_EMAIL = "data_email"; + public static final String DATA_EMAIL_FULL = "marcacoes_estabelecimento.data_email"; + public static final int DATA_EMAIL_INDEX = 3; + public static final String DATA_RELATORIO = "data_relatorio"; + public static final String DATA_RELATORIO_FULL = "marcacoes_estabelecimento.data_relatorio"; + public static final int DATA_RELATORIO_INDEX = 4; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "marcacoes_estabelecimento.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 5; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID_FULL = "marcacoes_estabelecimento.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 String TO_TECNICO_HST_FULL = "marcacoes_estabelecimento.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 String TO_TECNICO_SUPERIOR_HST_FULL = "marcacoes_estabelecimento.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 db.data.siprp_local.outer.EstabelecimentosData to_estabelecimento_id; + private Integer estado; + private Integer tecnico_hst; + private db.data.siprp_local.outer.MarcacoesTecnicosHstData to_tecnico_hst; + private String observacoes; + private Integer tecnico_superior_hst; + private db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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 = db.data.siprp_local.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 = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesGruposRealizados.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesGruposRealizados.java new file mode 100644 index 00000000..1f95dc3c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesGruposRealizados.java @@ -0,0 +1,537 @@ +/* +* MarcacoesGruposRealizados.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class MarcacoesGruposRealizados extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.MarcacoesTrabalhadorData.class, db.data.siprp_local.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, db.data.siprp_local.outer.PrtGruposProtocoloData.class, db.data.siprp_local.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, db.data.siprp_local.outer.MarcacoesTrabalhadorEstadosData.class, db.data.siprp_local.outer.MarcacoesTrabalhadorEstadosData.ID ); + + public static final String TABLENAME = "marcacoes_grupos_realizados"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.marcacoes_grupos_realizados"; + + 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 String TO_MARCACAO_TRABALHADOR_ID_FULL = "marcacoes_grupos_realizados.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 String TO_GRUPO_PROTOCOLO_ID_FULL = "marcacoes_grupos_realizados.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 String TO_MARCACOES_TRABALHADOR_ESTADO_ID_FULL = "marcacoes_grupos_realizados.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 db.data.siprp_local.outer.MarcacoesTrabalhadorData to_marcacao_trabalhador_id; + private Integer grupo_protocolo_id; + private db.data.siprp_local.outer.PrtGruposProtocoloData to_grupo_protocolo_id; + private Integer marcacoes_trabalhador_estado_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.MarcacoesTrabalhadorData.class; + break; + case MarcacoesGruposRealizados.GRUPO_PROTOCOLO_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesGruposRealizados.TO_GRUPO_PROTOCOLO_ID_INDEX: + theClass = db.data.siprp_local.outer.PrtGruposProtocoloData.class; + break; + case MarcacoesGruposRealizados.MARCACOES_TRABALHADOR_ESTADO_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesGruposRealizados.TO_MARCACOES_TRABALHADOR_ESTADO_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesTecnicosHst.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesTecnicosHst.java new file mode 100644 index 00000000..7fe45391 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesTecnicosHst.java @@ -0,0 +1,763 @@ +/* +* MarcacoesTecnicosHst.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class MarcacoesTecnicosHst extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.ImageData.class, db.data.siprp_local.outer.ImageData.ID ); + + public static final String TABLENAME = "marcacoes_tecnicos_hst"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.marcacoes_tecnicos_hst"; + + 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 String TO_ASSINATURA_FULL = "marcacoes_tecnicos_hst.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 db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesTrabalhador.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesTrabalhador.java new file mode 100644 index 00000000..6db98e5b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesTrabalhador.java @@ -0,0 +1,1030 @@ +/* +* MarcacoesTrabalhador.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class MarcacoesTrabalhador extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + FIELD_INDEXES.put( MarcacoesTrabalhador.MEDICO_ID, MarcacoesTrabalhador.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.MEDICO_ID_FULL, MarcacoesTrabalhador.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.INSERTED_STAMP, MarcacoesTrabalhador.INSERTED_STAMP_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.INSERTED_STAMP_FULL, MarcacoesTrabalhador.INSERTED_STAMP_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.DELETED_STAMP, MarcacoesTrabalhador.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.DELETED_STAMP_FULL, MarcacoesTrabalhador.DELETED_STAMP_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores = + new com.evolute.entity.ForeignKey( MarcacoesTrabalhador.class, MarcacoesTrabalhador.TRABALHADOR_ID, db.data.siprp_local.outer.TrabalhadoresData.class, db.data.siprp_local.outer.TrabalhadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( MarcacoesTrabalhador.class, MarcacoesTrabalhador.PRESTADOR_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "marcacoes_trabalhador"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.marcacoes_trabalhador"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_trabalhador.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_trabalhador.data"; + public static final int DATA_INDEX = 1; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "marcacoes_trabalhador.realizada"; + public static final int REALIZADA_INDEX = 2; + public static final String DATA_EMAIL = "data_email"; + public static final String DATA_EMAIL_FULL = "marcacoes_trabalhador.data_email"; + public static final int DATA_EMAIL_INDEX = 3; + public static final String DATA_RELATORIO = "data_relatorio"; + public static final String DATA_RELATORIO_FULL = "marcacoes_trabalhador.data_relatorio"; + public static final int DATA_RELATORIO_INDEX = 4; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "marcacoes_trabalhador.tipo"; + public static final int TIPO_INDEX = 5; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "marcacoes_trabalhador.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 6; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final String TO_TRABALHADOR_ID_FULL = "marcacoes_trabalhador.to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 7; + public static final String 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 String TO_PRESTADOR_ID_FULL = "marcacoes_trabalhador.to_prestador_id"; + public static final int TO_PRESTADOR_ID_INDEX = 12; + public static final String MEDICO_ID = "medico_id"; + public static final String MEDICO_ID_FULL = "marcacoes_trabalhador.medico_id"; + public static final int MEDICO_ID_INDEX = 13; + public static final String INSERTED_STAMP = "inserted_stamp"; + public static final String INSERTED_STAMP_FULL = "marcacoes_trabalhador.inserted_stamp"; + public static final int INSERTED_STAMP_INDEX = 14; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "marcacoes_trabalhador.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 15; + + 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, + MEDICO_ID, INSERTED_STAMP, DELETED_STAMP, }; + + 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, + TABLENAME + "." + MEDICO_ID, TABLENAME + "." + INSERTED_STAMP, TABLENAME + "." + DELETED_STAMP, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR_ID, MOTIVO, ESTADO, + OBSERVACOES, PRESTADOR_ID, MEDICO_ID, INSERTED_STAMP, DELETED_STAMP, }; + + + 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, MEDICO_ID, INSERTED_STAMP, DELETED_STAMP, }; + + private Integer id; + private java.util.Date data; + private String realizada; + private java.util.Date data_email; + private java.util.Date data_relatorio; + private Integer tipo; + private Integer trabalhador_id; + private db.data.siprp_local.outer.TrabalhadoresData to_trabalhador_id; + private Integer motivo; + private Integer estado; + private String observacoes; + private Integer prestador_id; + private db.data.siprp_local.outer.PrestadoresData to_prestador_id; + private Integer medico_id; + private java.sql.Timestamp inserted_stamp; + private java.sql.Timestamp deleted_stamp; + + 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, 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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 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 java.sql.Timestamp getInserted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( INSERTED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.inserted_stamp; + } + + public void setInserted_stamp( java.sql.Timestamp inserted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( INSERTED_STAMP, inserted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.inserted_stamp = inserted_stamp; + LAZY_LOADED_OBJECTS.put( INSERTED_STAMP, Boolean.TRUE ); + } + + public java.sql.Timestamp getDeleted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_stamp; + } + + public void setDeleted_stamp( java.sql.Timestamp deleted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_STAMP, deleted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_stamp = deleted_stamp; + LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case 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; + case MarcacoesTrabalhador.MEDICO_ID_INDEX: + value = getMedico_id(); + break; + case MarcacoesTrabalhador.INSERTED_STAMP_INDEX: + value = getInserted_stamp(); + break; + case MarcacoesTrabalhador.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + 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; + case MarcacoesTrabalhador.MEDICO_ID_INDEX: + value = this.medico_id; + break; + case MarcacoesTrabalhador.INSERTED_STAMP_INDEX: + value = this.inserted_stamp; + break; + case MarcacoesTrabalhador.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTrabalhador.ID_INDEX: + setId( ( Integer ) value ); + break; + case MarcacoesTrabalhador.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case MarcacoesTrabalhador.REALIZADA_INDEX: + setRealizada( ( String ) value ); + break; + case MarcacoesTrabalhador.DATA_EMAIL_INDEX: + setData_email( ( java.util.Date ) value ); + break; + case MarcacoesTrabalhador.DATA_RELATORIO_INDEX: + setData_relatorio( ( java.util.Date ) value ); + break; + case MarcacoesTrabalhador.TIPO_INDEX: + setTipo( ( Integer ) value ); + break; + case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( db.data.siprp_local.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( ( db.data.siprp_local.outer.PrestadoresData ) value ); + break; + case MarcacoesTrabalhador.MEDICO_ID_INDEX: + setMedico_id( ( Integer ) value ); + break; + case MarcacoesTrabalhador.INSERTED_STAMP_INDEX: + setInserted_stamp( ( java.sql.Timestamp ) value ); + break; + case MarcacoesTrabalhador.DELETED_STAMP_INDEX: + setDeleted_stamp( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTrabalhador.ID_INDEX: + this.id = ( Integer ) value; + break; + case MarcacoesTrabalhador.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case MarcacoesTrabalhador.REALIZADA_INDEX: + this.realizada = ( String ) value; + break; + case MarcacoesTrabalhador.DATA_EMAIL_INDEX: + this.data_email = ( java.util.Date ) value; + break; + case MarcacoesTrabalhador.DATA_RELATORIO_INDEX: + this.data_relatorio = ( java.util.Date ) value; + break; + case MarcacoesTrabalhador.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX: + this.to_trabalhador_id = ( db.data.siprp_local.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 = ( db.data.siprp_local.outer.PrestadoresData ) value; + break; + case MarcacoesTrabalhador.MEDICO_ID_INDEX: + this.medico_id = ( Integer ) value; + break; + case MarcacoesTrabalhador.INSERTED_STAMP_INDEX: + this.inserted_stamp = ( java.sql.Timestamp ) value; + break; + case MarcacoesTrabalhador.DELETED_STAMP_INDEX: + this.deleted_stamp = ( java.sql.Timestamp ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case MarcacoesTrabalhador.ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.DATA_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesTrabalhador.REALIZADA_INDEX: + theClass = String.class; + break; + case MarcacoesTrabalhador.DATA_EMAIL_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesTrabalhador.DATA_RELATORIO_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesTrabalhador.TIPO_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX: + theClass = db.data.siprp_local.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 = db.data.siprp_local.outer.PrestadoresData.class; + break; + case MarcacoesTrabalhador.MEDICO_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.INSERTED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + case MarcacoesTrabalhador.DELETED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : 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, ( 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesTrabalhadorEstados.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesTrabalhadorEstados.java new file mode 100644 index 00000000..6d386be3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/MarcacoesTrabalhadorEstados.java @@ -0,0 +1,545 @@ +/* +* MarcacoesTrabalhadorEstados.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class MarcacoesTrabalhadorEstados extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.MarcacoesTrabalhadorData.class, db.data.siprp_local.outer.MarcacoesTrabalhadorData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( MarcacoesTrabalhadorEstados.class, MarcacoesTrabalhadorEstados.PRESTADOR_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "marcacoes_trabalhador_estados"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.marcacoes_trabalhador_estados"; + + 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 String TO_MARCACAO_ID_FULL = "marcacoes_trabalhador_estados.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 String TO_PRESTADOR_ID_FULL = "marcacoes_trabalhador_estados.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 db.data.siprp_local.outer.MarcacoesTrabalhadorData to_marcacao_id; + private Integer prestador_id; + private db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.outer.MarcacoesTrabalhadorData ) value ); + break; + case MarcacoesTrabalhadorEstados.PRESTADOR_ID_INDEX: + setPrestador_id( ( Integer ) value ); + break; + case MarcacoesTrabalhadorEstados.TO_PRESTADOR_ID_INDEX: + setToPrestador_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.MarcacoesTrabalhadorData.class; + break; + case MarcacoesTrabalhadorEstados.PRESTADOR_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhadorEstados.TO_PRESTADOR_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Medicos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Medicos.java new file mode 100644 index 00000000..b85284be --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Medicos.java @@ -0,0 +1,409 @@ +/* +* Medicos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Medicos extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.medicos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "medicos.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "medicos.nome"; + public static final int NOME_INDEX = 1; + public static final String NUMERO_CEDULA = "numero_cedula"; + public static final String NUMERO_CEDULA_FULL = "medicos.numero_cedula"; + public static final int NUMERO_CEDULA_INDEX = 2; + public static final String INACTIVO = "inactivo"; + public static final String INACTIVO_FULL = "medicos.inactivo"; + public static final int INACTIVO_INDEX = 3; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, NUMERO_CEDULA, INACTIVO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + NUMERO_CEDULA, TABLENAME + "." + INACTIVO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, NUMERO_CEDULA, INACTIVO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, NUMERO_CEDULA, INACTIVO, }; + + private Integer id; + private String nome; + private String numero_cedula; + private String inactivo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Medicos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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( db.data.siprp_local.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( db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Paises.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Paises.java new file mode 100644 index 00000000..338dd7ba --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Paises.java @@ -0,0 +1,583 @@ +/* +* Paises.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Paises extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Paises.ID, Paises.ID_INDEX ); + FIELD_INDEXES.put( Paises.ID_FULL, Paises.ID_INDEX ); + FIELD_INDEXES.put( Paises.DESCRICAO, Paises.DESCRICAO_INDEX ); + FIELD_INDEXES.put( Paises.DESCRICAO_FULL, Paises.DESCRICAO_INDEX ); + FIELD_INDEXES.put( Paises.DESCRICAO_PLAIN, Paises.DESCRICAO_PLAIN_INDEX ); + FIELD_INDEXES.put( Paises.DESCRICAO_PLAIN_FULL, Paises.DESCRICAO_PLAIN_INDEX ); + FIELD_INDEXES.put( Paises.ORDEM, Paises.ORDEM_INDEX ); + FIELD_INDEXES.put( Paises.ORDEM_FULL, Paises.ORDEM_INDEX ); + FIELD_INDEXES.put( Paises.ACTIVO, Paises.ACTIVO_INDEX ); + FIELD_INDEXES.put( Paises.ACTIVO_FULL, Paises.ACTIVO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Paises.CLASS_IDENTIFIER, Paises.CONTINENTE_ID, Paises.TO_CONTINENTE_ID ); + FIELD_INDEXES.put( Paises.CONTINENTE_ID, Paises.CONTINENTE_ID_INDEX ); + FIELD_INDEXES.put( Paises.CONTINENTE_ID_FULL, Paises.CONTINENTE_ID_INDEX ); + FIELD_INDEXES.put( Paises.TO_CONTINENTE_ID, Paises.TO_CONTINENTE_ID_INDEX ); + FIELD_INDEXES.put( Paises.NACIONALIDADE, Paises.NACIONALIDADE_INDEX ); + FIELD_INDEXES.put( Paises.NACIONALIDADE_FULL, Paises.NACIONALIDADE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeycontinente_idTopaises_continentes = + new com.evolute.entity.ForeignKey( Paises.class, Paises.CONTINENTE_ID, db.data.siprp_local.outer.PaisesContinentesData.class, db.data.siprp_local.outer.PaisesContinentesData.ID ); + + public static final String TABLENAME = "paises"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.paises"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "paises.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "paises.descricao"; + public static final int DESCRICAO_INDEX = 1; + public static final String DESCRICAO_PLAIN = "descricao_plain"; + public static final String DESCRICAO_PLAIN_FULL = "paises.descricao_plain"; + public static final int DESCRICAO_PLAIN_INDEX = 2; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "paises.ordem"; + public static final int ORDEM_INDEX = 3; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "paises.activo"; + public static final int ACTIVO_INDEX = 4; + public static final String CONTINENTE_ID = "continente_id"; + public static final String CONTINENTE_ID_FULL = "paises.continente_id"; + public static final int CONTINENTE_ID_INDEX = 5; + public static final String TO_CONTINENTE_ID = "to_continente_id"; + public static final String TO_CONTINENTE_ID_FULL = "paises.to_continente_id"; + public static final int TO_CONTINENTE_ID_INDEX = 6; + public static final String NACIONALIDADE = "nacionalidade"; + public static final String NACIONALIDADE_FULL = "paises.nacionalidade"; + public static final int NACIONALIDADE_INDEX = 7; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, DESCRICAO_PLAIN, ORDEM, ACTIVO, CONTINENTE_ID, TO_CONTINENTE_ID, + NACIONALIDADE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + DESCRICAO_PLAIN, TABLENAME + "." + ORDEM, TABLENAME + "." + ACTIVO, TABLENAME + "." + CONTINENTE_ID, TABLENAME + "." + TO_CONTINENTE_ID, + TABLENAME + "." + NACIONALIDADE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, DESCRICAO_PLAIN, ORDEM, ACTIVO, CONTINENTE_ID, NACIONALIDADE, }; + + + 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, CONTINENTE_ID, NACIONALIDADE, }; + + private Integer id; + private String descricao; + private String descricao_plain; + private Integer ordem; + private String activo; + private Integer continente_id; + private db.data.siprp_local.outer.PaisesContinentesData to_continente_id; + private String nacionalidade; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Paises() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 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 Integer getContinente_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONTINENTE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.continente_id; + } + + public void setContinente_id( Integer continente_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONTINENTE_ID, continente_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.continente_id = continente_id; + LAZY_LOADED_OBJECTS.put( CONTINENTE_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.PaisesContinentesData toContinente_id() + { + try + { + prepare( TO_CONTINENTE_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_continente_id; + } + + public void setToContinente_id( db.data.siprp_local.outer.PaisesContinentesData to_continente_id ) + { + try + { + preProcess( TO_CONTINENTE_ID, to_continente_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_continente_id = to_continente_id; + } + + 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Paises.ID_INDEX: + value = getId(); + break; + case Paises.DESCRICAO_INDEX: + value = getDescricao(); + break; + case Paises.DESCRICAO_PLAIN_INDEX: + value = getDescricao_plain(); + break; + case Paises.ORDEM_INDEX: + value = getOrdem(); + break; + case Paises.ACTIVO_INDEX: + value = getActivo(); + break; + case Paises.CONTINENTE_ID_INDEX: + value = getContinente_id(); + break; + case Paises.TO_CONTINENTE_ID_INDEX: + value = toContinente_id(); + break; + case Paises.NACIONALIDADE_INDEX: + value = getNacionalidade(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Paises.ID_INDEX: + value = this.id; + break; + case Paises.DESCRICAO_INDEX: + value = this.descricao; + break; + case Paises.DESCRICAO_PLAIN_INDEX: + value = this.descricao_plain; + break; + case Paises.ORDEM_INDEX: + value = this.ordem; + break; + case Paises.ACTIVO_INDEX: + value = this.activo; + break; + case Paises.CONTINENTE_ID_INDEX: + value = this.continente_id; + break; + case Paises.TO_CONTINENTE_ID_INDEX: + value = this.to_continente_id; + break; + case Paises.NACIONALIDADE_INDEX: + value = this.nacionalidade; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Paises.ID_INDEX: + setId( ( Integer ) value ); + break; + case Paises.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case Paises.DESCRICAO_PLAIN_INDEX: + setDescricao_plain( ( String ) value ); + break; + case Paises.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + case Paises.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + case Paises.CONTINENTE_ID_INDEX: + setContinente_id( ( Integer ) value ); + break; + case Paises.TO_CONTINENTE_ID_INDEX: + setToContinente_id( ( db.data.siprp_local.outer.PaisesContinentesData ) value ); + break; + case Paises.NACIONALIDADE_INDEX: + setNacionalidade( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Paises.ID_INDEX: + this.id = ( Integer ) value; + break; + case Paises.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case Paises.DESCRICAO_PLAIN_INDEX: + this.descricao_plain = ( String ) value; + break; + case Paises.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + case Paises.ACTIVO_INDEX: + this.activo = ( String ) value; + break; + case Paises.CONTINENTE_ID_INDEX: + this.continente_id = ( Integer ) value; + break; + case Paises.TO_CONTINENTE_ID_INDEX: + this.to_continente_id = ( db.data.siprp_local.outer.PaisesContinentesData ) value; + break; + case Paises.NACIONALIDADE_INDEX: + this.nacionalidade = ( 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 Paises.ID_INDEX: + theClass = Integer.class; + break; + case Paises.DESCRICAO_INDEX: + theClass = String.class; + break; + case Paises.DESCRICAO_PLAIN_INDEX: + theClass = String.class; + break; + case Paises.ORDEM_INDEX: + theClass = Integer.class; + break; + case Paises.ACTIVO_INDEX: + theClass = String.class; + break; + case Paises.CONTINENTE_ID_INDEX: + theClass = Integer.class; + break; + case Paises.TO_CONTINENTE_ID_INDEX: + theClass = db.data.siprp_local.outer.PaisesContinentesData.class; + break; + case Paises.NACIONALIDADE_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Paises._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, Paises.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PaisesContinentes.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PaisesContinentes.java new file mode 100644 index 00000000..455da067 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PaisesContinentes.java @@ -0,0 +1,445 @@ +/* +* PaisesContinentes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class PaisesContinentes extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PaisesContinentes.ID, PaisesContinentes.ID_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.ID_FULL, PaisesContinentes.ID_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.DESCRICAO, PaisesContinentes.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.DESCRICAO_FULL, PaisesContinentes.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.DESCRICAO_PLAIN, PaisesContinentes.DESCRICAO_PLAIN_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.DESCRICAO_PLAIN_FULL, PaisesContinentes.DESCRICAO_PLAIN_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.ORDEM, PaisesContinentes.ORDEM_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.ORDEM_FULL, PaisesContinentes.ORDEM_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.ACTIVO, PaisesContinentes.ACTIVO_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.ACTIVO_FULL, PaisesContinentes.ACTIVO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "paises_continentes"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.paises_continentes"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "paises_continentes.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "paises_continentes.descricao"; + public static final int DESCRICAO_INDEX = 1; + public static final String DESCRICAO_PLAIN = "descricao_plain"; + public static final String DESCRICAO_PLAIN_FULL = "paises_continentes.descricao_plain"; + public static final int DESCRICAO_PLAIN_INDEX = 2; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "paises_continentes.ordem"; + public static final int ORDEM_INDEX = 3; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "paises_continentes.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 PaisesContinentes() + { + 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.ListfromPaises_continente_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.PaisesData.class , getPrimaryKey().getMap().get("id"), "continente_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 PaisesContinentes.ID_INDEX: + value = getId(); + break; + case PaisesContinentes.DESCRICAO_INDEX: + value = getDescricao(); + break; + case PaisesContinentes.DESCRICAO_PLAIN_INDEX: + value = getDescricao_plain(); + break; + case PaisesContinentes.ORDEM_INDEX: + value = getOrdem(); + break; + case PaisesContinentes.ACTIVO_INDEX: + value = getActivo(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PaisesContinentes.ID_INDEX: + value = this.id; + break; + case PaisesContinentes.DESCRICAO_INDEX: + value = this.descricao; + break; + case PaisesContinentes.DESCRICAO_PLAIN_INDEX: + value = this.descricao_plain; + break; + case PaisesContinentes.ORDEM_INDEX: + value = this.ordem; + break; + case PaisesContinentes.ACTIVO_INDEX: + value = this.activo; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PaisesContinentes.ID_INDEX: + setId( ( Integer ) value ); + break; + case PaisesContinentes.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case PaisesContinentes.DESCRICAO_PLAIN_INDEX: + setDescricao_plain( ( String ) value ); + break; + case PaisesContinentes.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + case PaisesContinentes.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PaisesContinentes.ID_INDEX: + this.id = ( Integer ) value; + break; + case PaisesContinentes.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case PaisesContinentes.DESCRICAO_PLAIN_INDEX: + this.descricao_plain = ( String ) value; + break; + case PaisesContinentes.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + case PaisesContinentes.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 PaisesContinentes.ID_INDEX: + theClass = Integer.class; + break; + case PaisesContinentes.DESCRICAO_INDEX: + theClass = String.class; + break; + case PaisesContinentes.DESCRICAO_PLAIN_INDEX: + theClass = String.class; + break; + case PaisesContinentes.ORDEM_INDEX: + theClass = Integer.class; + break; + case PaisesContinentes.ACTIVO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PaisesContinentes._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, PaisesContinentes.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PesDocumento.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PesDocumento.java new file mode 100644 index 00000000..04662e0f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PesDocumento.java @@ -0,0 +1,545 @@ +/* +* PesDocumento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class PesDocumento extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PesDocumento.ID, PesDocumento.ID_INDEX ); + FIELD_INDEXES.put( PesDocumento.ID_FULL, PesDocumento.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PesDocumento.CLASS_IDENTIFIER, PesDocumento.TIPO_ID, PesDocumento.TO_TIPO_ID ); + FIELD_INDEXES.put( PesDocumento.TIPO_ID, PesDocumento.TIPO_ID_INDEX ); + FIELD_INDEXES.put( PesDocumento.TIPO_ID_FULL, PesDocumento.TIPO_ID_INDEX ); + FIELD_INDEXES.put( PesDocumento.TO_TIPO_ID, PesDocumento.TO_TIPO_ID_INDEX ); + FIELD_INDEXES.put( PesDocumento.NUMERO, PesDocumento.NUMERO_INDEX ); + FIELD_INDEXES.put( PesDocumento.NUMERO_FULL, PesDocumento.NUMERO_INDEX ); + FIELD_INDEXES.put( PesDocumento.LOCAL_EMISSAO, PesDocumento.LOCAL_EMISSAO_INDEX ); + FIELD_INDEXES.put( PesDocumento.LOCAL_EMISSAO_FULL, PesDocumento.LOCAL_EMISSAO_INDEX ); + FIELD_INDEXES.put( PesDocumento.DATA_EMISSAO, PesDocumento.DATA_EMISSAO_INDEX ); + FIELD_INDEXES.put( PesDocumento.DATA_EMISSAO_FULL, PesDocumento.DATA_EMISSAO_INDEX ); + FIELD_INDEXES.put( PesDocumento.DATA_VALIDADE, PesDocumento.DATA_VALIDADE_INDEX ); + FIELD_INDEXES.put( PesDocumento.DATA_VALIDADE_FULL, PesDocumento.DATA_VALIDADE_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_idTopes_documento_tipo = + new com.evolute.entity.ForeignKey( PesDocumento.class, PesDocumento.TIPO_ID, db.data.siprp_local.outer.PesDocumentoTipoData.class, db.data.siprp_local.outer.PesDocumentoTipoData.ID ); + + public static final String TABLENAME = "pes_documento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.pes_documento"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "pes_documento.id"; + public static final int ID_INDEX = 0; + public static final String TIPO_ID = "tipo_id"; + public static final String TIPO_ID_FULL = "pes_documento.tipo_id"; + public static final int TIPO_ID_INDEX = 1; + public static final String TO_TIPO_ID = "to_tipo_id"; + public static final String TO_TIPO_ID_FULL = "pes_documento.to_tipo_id"; + public static final int TO_TIPO_ID_INDEX = 2; + public static final String NUMERO = "numero"; + public static final String NUMERO_FULL = "pes_documento.numero"; + public static final int NUMERO_INDEX = 3; + public static final String LOCAL_EMISSAO = "local_emissao"; + public static final String LOCAL_EMISSAO_FULL = "pes_documento.local_emissao"; + public static final int LOCAL_EMISSAO_INDEX = 4; + public static final String DATA_EMISSAO = "data_emissao"; + public static final String DATA_EMISSAO_FULL = "pes_documento.data_emissao"; + public static final int DATA_EMISSAO_INDEX = 5; + public static final String DATA_VALIDADE = "data_validade"; + public static final String DATA_VALIDADE_FULL = "pes_documento.data_validade"; + public static final int DATA_VALIDADE_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + TIPO_ID, TO_TIPO_ID, NUMERO, LOCAL_EMISSAO, DATA_EMISSAO, DATA_VALIDADE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TIPO_ID, TABLENAME + "." + TO_TIPO_ID, TABLENAME + "." + NUMERO, TABLENAME + "." + LOCAL_EMISSAO, TABLENAME + "." + DATA_EMISSAO, TABLENAME + "." + DATA_VALIDADE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TIPO_ID, NUMERO, LOCAL_EMISSAO, DATA_EMISSAO, DATA_VALIDADE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TIPO_ID, NUMERO, LOCAL_EMISSAO, DATA_EMISSAO, DATA_VALIDADE, }; + + private Integer id; + private Integer tipo_id; + private db.data.siprp_local.outer.PesDocumentoTipoData to_tipo_id; + private String numero; + private String local_emissao; + private java.util.Date data_emissao; + private java.util.Date data_validade; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PesDocumento() + { + 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.ListfromPesPessoaDocumento_documento_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.PesPessoaDocumentoData.class , getPrimaryKey().getMap().get("id"), "documento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 db.data.siprp_local.outer.PesDocumentoTipoData 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( db.data.siprp_local.outer.PesDocumentoTipoData 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 String getNumero() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NUMERO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.numero; + } + + public void setNumero( String numero ) + { + try + { + setLockedForRefresh( true ); + preProcess( NUMERO, numero ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.numero = numero; + LAZY_LOADED_OBJECTS.put( NUMERO, Boolean.TRUE ); + } + + public String getLocal_emissao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LOCAL_EMISSAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.local_emissao; + } + + public void setLocal_emissao( String local_emissao ) + { + try + { + setLockedForRefresh( true ); + preProcess( LOCAL_EMISSAO, local_emissao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.local_emissao = local_emissao; + LAZY_LOADED_OBJECTS.put( LOCAL_EMISSAO, Boolean.TRUE ); + } + + public java.util.Date getData_emissao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_EMISSAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_emissao; + } + + public void setData_emissao( java.util.Date data_emissao ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_EMISSAO, data_emissao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_emissao = data_emissao; + LAZY_LOADED_OBJECTS.put( DATA_EMISSAO, Boolean.TRUE ); + } + + public java.util.Date getData_validade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_VALIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_validade; + } + + public void setData_validade( java.util.Date data_validade ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_VALIDADE, data_validade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_validade = data_validade; + LAZY_LOADED_OBJECTS.put( DATA_VALIDADE, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesDocumento.ID_INDEX: + value = getId(); + break; + case PesDocumento.TIPO_ID_INDEX: + value = getTipo_id(); + break; + case PesDocumento.TO_TIPO_ID_INDEX: + value = toTipo_id(); + break; + case PesDocumento.NUMERO_INDEX: + value = getNumero(); + break; + case PesDocumento.LOCAL_EMISSAO_INDEX: + value = getLocal_emissao(); + break; + case PesDocumento.DATA_EMISSAO_INDEX: + value = getData_emissao(); + break; + case PesDocumento.DATA_VALIDADE_INDEX: + value = getData_validade(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesDocumento.ID_INDEX: + value = this.id; + break; + case PesDocumento.TIPO_ID_INDEX: + value = this.tipo_id; + break; + case PesDocumento.TO_TIPO_ID_INDEX: + value = this.to_tipo_id; + break; + case PesDocumento.NUMERO_INDEX: + value = this.numero; + break; + case PesDocumento.LOCAL_EMISSAO_INDEX: + value = this.local_emissao; + break; + case PesDocumento.DATA_EMISSAO_INDEX: + value = this.data_emissao; + break; + case PesDocumento.DATA_VALIDADE_INDEX: + value = this.data_validade; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesDocumento.ID_INDEX: + setId( ( Integer ) value ); + break; + case PesDocumento.TIPO_ID_INDEX: + setTipo_id( ( Integer ) value ); + break; + case PesDocumento.TO_TIPO_ID_INDEX: + setToTipo_id( ( db.data.siprp_local.outer.PesDocumentoTipoData ) value ); + break; + case PesDocumento.NUMERO_INDEX: + setNumero( ( String ) value ); + break; + case PesDocumento.LOCAL_EMISSAO_INDEX: + setLocal_emissao( ( String ) value ); + break; + case PesDocumento.DATA_EMISSAO_INDEX: + setData_emissao( ( java.util.Date ) value ); + break; + case PesDocumento.DATA_VALIDADE_INDEX: + setData_validade( ( java.util.Date ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesDocumento.ID_INDEX: + this.id = ( Integer ) value; + break; + case PesDocumento.TIPO_ID_INDEX: + this.tipo_id = ( Integer ) value; + break; + case PesDocumento.TO_TIPO_ID_INDEX: + this.to_tipo_id = ( db.data.siprp_local.outer.PesDocumentoTipoData ) value; + break; + case PesDocumento.NUMERO_INDEX: + this.numero = ( String ) value; + break; + case PesDocumento.LOCAL_EMISSAO_INDEX: + this.local_emissao = ( String ) value; + break; + case PesDocumento.DATA_EMISSAO_INDEX: + this.data_emissao = ( java.util.Date ) value; + break; + case PesDocumento.DATA_VALIDADE_INDEX: + this.data_validade = ( 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 PesDocumento.ID_INDEX: + theClass = Integer.class; + break; + case PesDocumento.TIPO_ID_INDEX: + theClass = Integer.class; + break; + case PesDocumento.TO_TIPO_ID_INDEX: + theClass = db.data.siprp_local.outer.PesDocumentoTipoData.class; + break; + case PesDocumento.NUMERO_INDEX: + theClass = String.class; + break; + case PesDocumento.LOCAL_EMISSAO_INDEX: + theClass = String.class; + break; + case PesDocumento.DATA_EMISSAO_INDEX: + theClass = java.util.Date.class; + break; + case PesDocumento.DATA_VALIDADE_INDEX: + theClass = java.util.Date.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PesDocumento._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, PesDocumento.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PesDocumentoTipo.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PesDocumentoTipo.java new file mode 100644 index 00000000..64adc61d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PesDocumentoTipo.java @@ -0,0 +1,445 @@ +/* +* PesDocumentoTipo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class PesDocumentoTipo extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PesDocumentoTipo.ID, PesDocumentoTipo.ID_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.ID_FULL, PesDocumentoTipo.ID_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.CODIGO, PesDocumentoTipo.CODIGO_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.CODIGO_FULL, PesDocumentoTipo.CODIGO_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.DESCRICAO, PesDocumentoTipo.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.DESCRICAO_FULL, PesDocumentoTipo.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.ORDEM, PesDocumentoTipo.ORDEM_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.ORDEM_FULL, PesDocumentoTipo.ORDEM_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.DELETED_DATE, PesDocumentoTipo.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.DELETED_DATE_FULL, PesDocumentoTipo.DELETED_DATE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "pes_documento_tipo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.pes_documento_tipo"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "pes_documento_tipo.id"; + public static final int ID_INDEX = 0; + public static final String CODIGO = "codigo"; + public static final String CODIGO_FULL = "pes_documento_tipo.codigo"; + public static final int CODIGO_INDEX = 1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "pes_documento_tipo.descricao"; + public static final int DESCRICAO_INDEX = 2; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "pes_documento_tipo.ordem"; + public static final int ORDEM_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "pes_documento_tipo.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + CODIGO, DESCRICAO, ORDEM, DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + CODIGO, TABLENAME + "." + DESCRICAO, TABLENAME + "." + ORDEM, TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, CODIGO, DESCRICAO, ORDEM, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, CODIGO, DESCRICAO, ORDEM, DELETED_DATE, }; + + private Integer id; + private String codigo; + private String descricao; + private Integer ordem; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PesDocumentoTipo() + { + 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.ListfromPesDocumento_tipo_id() + { + java.util.List result = null; + try + { + result = fromReference( db.data.siprp_local.outer.PesDocumentoData.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 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 PesDocumentoTipo.ID_INDEX: + value = getId(); + break; + case PesDocumentoTipo.CODIGO_INDEX: + value = getCodigo(); + break; + case PesDocumentoTipo.DESCRICAO_INDEX: + value = getDescricao(); + break; + case PesDocumentoTipo.ORDEM_INDEX: + value = getOrdem(); + break; + case PesDocumentoTipo.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesDocumentoTipo.ID_INDEX: + value = this.id; + break; + case PesDocumentoTipo.CODIGO_INDEX: + value = this.codigo; + break; + case PesDocumentoTipo.DESCRICAO_INDEX: + value = this.descricao; + break; + case PesDocumentoTipo.ORDEM_INDEX: + value = this.ordem; + break; + case PesDocumentoTipo.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesDocumentoTipo.ID_INDEX: + setId( ( Integer ) value ); + break; + case PesDocumentoTipo.CODIGO_INDEX: + setCodigo( ( String ) value ); + break; + case PesDocumentoTipo.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case PesDocumentoTipo.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + case PesDocumentoTipo.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesDocumentoTipo.ID_INDEX: + this.id = ( Integer ) value; + break; + case PesDocumentoTipo.CODIGO_INDEX: + this.codigo = ( String ) value; + break; + case PesDocumentoTipo.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case PesDocumentoTipo.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + case PesDocumentoTipo.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 PesDocumentoTipo.ID_INDEX: + theClass = Integer.class; + break; + case PesDocumentoTipo.CODIGO_INDEX: + theClass = String.class; + break; + case PesDocumentoTipo.DESCRICAO_INDEX: + theClass = String.class; + break; + case PesDocumentoTipo.ORDEM_INDEX: + theClass = Integer.class; + break; + case PesDocumentoTipo.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 : PesDocumentoTipo._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, PesDocumentoTipo.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PesPessoaDocumento.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PesPessoaDocumento.java new file mode 100644 index 00000000..2dee83cd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PesPessoaDocumento.java @@ -0,0 +1,431 @@ +/* +* PesPessoaDocumento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class PesPessoaDocumento extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PesPessoaDocumento.ID, PesPessoaDocumento.ID_INDEX ); + FIELD_INDEXES.put( PesPessoaDocumento.ID_FULL, PesPessoaDocumento.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PesPessoaDocumento.CLASS_IDENTIFIER, PesPessoaDocumento.PESSOA_ID, PesPessoaDocumento.TO_PESSOA_ID ); + FIELD_INDEXES.put( PesPessoaDocumento.PESSOA_ID, PesPessoaDocumento.PESSOA_ID_INDEX ); + FIELD_INDEXES.put( PesPessoaDocumento.PESSOA_ID_FULL, PesPessoaDocumento.PESSOA_ID_INDEX ); + FIELD_INDEXES.put( PesPessoaDocumento.TO_PESSOA_ID, PesPessoaDocumento.TO_PESSOA_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PesPessoaDocumento.CLASS_IDENTIFIER, PesPessoaDocumento.DOCUMENTO_ID, PesPessoaDocumento.TO_DOCUMENTO_ID ); + FIELD_INDEXES.put( PesPessoaDocumento.DOCUMENTO_ID, PesPessoaDocumento.DOCUMENTO_ID_INDEX ); + FIELD_INDEXES.put( PesPessoaDocumento.DOCUMENTO_ID_FULL, PesPessoaDocumento.DOCUMENTO_ID_INDEX ); + FIELD_INDEXES.put( PesPessoaDocumento.TO_DOCUMENTO_ID, PesPessoaDocumento.TO_DOCUMENTO_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 ForeignKeypessoa_idToevo_pessoa = + new com.evolute.entity.ForeignKey( PesPessoaDocumento.class, PesPessoaDocumento.PESSOA_ID, db.data.siprp_local.outer.EvoPessoaData.class, db.data.siprp_local.outer.EvoPessoaData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeydocumento_idTopes_documento = + new com.evolute.entity.ForeignKey( PesPessoaDocumento.class, PesPessoaDocumento.DOCUMENTO_ID, db.data.siprp_local.outer.PesDocumentoData.class, db.data.siprp_local.outer.PesDocumentoData.ID ); + + public static final String TABLENAME = "pes_pessoa_documento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.pes_pessoa_documento"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "pes_pessoa_documento.id"; + public static final int ID_INDEX = 0; + public static final String PESSOA_ID = "pessoa_id"; + public static final String PESSOA_ID_FULL = "pes_pessoa_documento.pessoa_id"; + public static final int PESSOA_ID_INDEX = 1; + public static final String TO_PESSOA_ID = "to_pessoa_id"; + public static final String TO_PESSOA_ID_FULL = "pes_pessoa_documento.to_pessoa_id"; + public static final int TO_PESSOA_ID_INDEX = 2; + public static final String DOCUMENTO_ID = "documento_id"; + public static final String DOCUMENTO_ID_FULL = "pes_pessoa_documento.documento_id"; + public static final int DOCUMENTO_ID_INDEX = 3; + public static final String TO_DOCUMENTO_ID = "to_documento_id"; + public static final String TO_DOCUMENTO_ID_FULL = "pes_pessoa_documento.to_documento_id"; + public static final int TO_DOCUMENTO_ID_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + PESSOA_ID, TO_PESSOA_ID, DOCUMENTO_ID, TO_DOCUMENTO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + PESSOA_ID, TABLENAME + "." + TO_PESSOA_ID, TABLENAME + "." + DOCUMENTO_ID, TABLENAME + "." + TO_DOCUMENTO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, PESSOA_ID, DOCUMENTO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, PESSOA_ID, DOCUMENTO_ID, }; + + private Integer id; + private Integer pessoa_id; + private db.data.siprp_local.outer.EvoPessoaData to_pessoa_id; + private Integer documento_id; + private db.data.siprp_local.outer.PesDocumentoData to_documento_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PesPessoaDocumento() + { + 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 getPessoa_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PESSOA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.pessoa_id; + } + + public void setPessoa_id( Integer pessoa_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PESSOA_ID, pessoa_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.pessoa_id = pessoa_id; + LAZY_LOADED_OBJECTS.put( PESSOA_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EvoPessoaData toPessoa_id() + { + try + { + prepare( TO_PESSOA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_pessoa_id; + } + + public void setToPessoa_id( db.data.siprp_local.outer.EvoPessoaData to_pessoa_id ) + { + try + { + preProcess( TO_PESSOA_ID, to_pessoa_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_pessoa_id = to_pessoa_id; + } + + public Integer getDocumento_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DOCUMENTO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.documento_id; + } + + public void setDocumento_id( Integer documento_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( DOCUMENTO_ID, documento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.documento_id = documento_id; + LAZY_LOADED_OBJECTS.put( DOCUMENTO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.PesDocumentoData toDocumento_id() + { + try + { + prepare( TO_DOCUMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_documento_id; + } + + public void setToDocumento_id( db.data.siprp_local.outer.PesDocumentoData to_documento_id ) + { + try + { + preProcess( TO_DOCUMENTO_ID, to_documento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_documento_id = to_documento_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesPessoaDocumento.ID_INDEX: + value = getId(); + break; + case PesPessoaDocumento.PESSOA_ID_INDEX: + value = getPessoa_id(); + break; + case PesPessoaDocumento.TO_PESSOA_ID_INDEX: + value = toPessoa_id(); + break; + case PesPessoaDocumento.DOCUMENTO_ID_INDEX: + value = getDocumento_id(); + break; + case PesPessoaDocumento.TO_DOCUMENTO_ID_INDEX: + value = toDocumento_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesPessoaDocumento.ID_INDEX: + value = this.id; + break; + case PesPessoaDocumento.PESSOA_ID_INDEX: + value = this.pessoa_id; + break; + case PesPessoaDocumento.TO_PESSOA_ID_INDEX: + value = this.to_pessoa_id; + break; + case PesPessoaDocumento.DOCUMENTO_ID_INDEX: + value = this.documento_id; + break; + case PesPessoaDocumento.TO_DOCUMENTO_ID_INDEX: + value = this.to_documento_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesPessoaDocumento.ID_INDEX: + setId( ( Integer ) value ); + break; + case PesPessoaDocumento.PESSOA_ID_INDEX: + setPessoa_id( ( Integer ) value ); + break; + case PesPessoaDocumento.TO_PESSOA_ID_INDEX: + setToPessoa_id( ( db.data.siprp_local.outer.EvoPessoaData ) value ); + break; + case PesPessoaDocumento.DOCUMENTO_ID_INDEX: + setDocumento_id( ( Integer ) value ); + break; + case PesPessoaDocumento.TO_DOCUMENTO_ID_INDEX: + setToDocumento_id( ( db.data.siprp_local.outer.PesDocumentoData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesPessoaDocumento.ID_INDEX: + this.id = ( Integer ) value; + break; + case PesPessoaDocumento.PESSOA_ID_INDEX: + this.pessoa_id = ( Integer ) value; + break; + case PesPessoaDocumento.TO_PESSOA_ID_INDEX: + this.to_pessoa_id = ( db.data.siprp_local.outer.EvoPessoaData ) value; + break; + case PesPessoaDocumento.DOCUMENTO_ID_INDEX: + this.documento_id = ( Integer ) value; + break; + case PesPessoaDocumento.TO_DOCUMENTO_ID_INDEX: + this.to_documento_id = ( db.data.siprp_local.outer.PesDocumentoData ) 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 PesPessoaDocumento.ID_INDEX: + theClass = Integer.class; + break; + case PesPessoaDocumento.PESSOA_ID_INDEX: + theClass = Integer.class; + break; + case PesPessoaDocumento.TO_PESSOA_ID_INDEX: + theClass = db.data.siprp_local.outer.EvoPessoaData.class; + break; + case PesPessoaDocumento.DOCUMENTO_ID_INDEX: + theClass = Integer.class; + break; + case PesPessoaDocumento.TO_DOCUMENTO_ID_INDEX: + theClass = db.data.siprp_local.outer.PesDocumentoData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PesPessoaDocumento._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, PesPessoaDocumento.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Prestadores.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Prestadores.java new file mode 100644 index 00000000..f59122de --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Prestadores.java @@ -0,0 +1,1054 @@ +/* +* Prestadores.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Prestadores extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.ContactosData.class, db.data.siprp_local.outer.ContactosData.ID ); + + public static final String TABLENAME = "prestadores"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.prestadores"; + + 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 String TO_CONTACTO_ID_FULL = "prestadores.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 db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PrestadoresGruposProtocolo.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PrestadoresGruposProtocolo.java new file mode 100644 index 00000000..3d3e72d1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PrestadoresGruposProtocolo.java @@ -0,0 +1,431 @@ +/* +* PrestadoresGruposProtocolo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class PrestadoresGruposProtocolo extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.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, db.data.siprp_local.outer.PrtGruposProtocoloData.class, db.data.siprp_local.outer.PrtGruposProtocoloData.ID ); + + public static final String TABLENAME = "prestadores_grupos_protocolo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.prestadores_grupos_protocolo"; + + 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 String TO_PRESTADOR_ID_FULL = "prestadores_grupos_protocolo.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 String TO_GRUPO_PROTOCOLO_ID_FULL = "prestadores_grupos_protocolo.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 db.data.siprp_local.outer.PrestadoresData to_prestador_id; + private Integer grupo_protocolo_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.PrestadoresData.class; + break; + case PrestadoresGruposProtocolo.GRUPO_PROTOCOLO_ID_INDEX: + theClass = Integer.class; + break; + case PrestadoresGruposProtocolo.TO_GRUPO_PROTOCOLO_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PrtElementosProtocolo.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PrtElementosProtocolo.java new file mode 100644 index 00000000..7f0afc71 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PrtElementosProtocolo.java @@ -0,0 +1,483 @@ +/* +* PrtElementosProtocolo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class PrtElementosProtocolo extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.PrtTiposElementosProtocoloData.class, db.data.siprp_local.outer.PrtTiposElementosProtocoloData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( PrtElementosProtocolo.class, PrtElementosProtocolo.EMPRESA_ID, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final String TABLENAME = "prt_elementos_protocolo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.prt_elementos_protocolo"; + + 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 String TO_TIPO_ELEMENTO_PROTOCOLO_ID_FULL = "prt_elementos_protocolo.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 String TO_EMPRESA_ID_FULL = "prt_elementos_protocolo.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 db.data.siprp_local.outer.PrtTiposElementosProtocoloData to_tipo_elemento_protocolo_id; + private Integer empresa_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.PrtTiposElementosProtocoloData ) value ); + break; + case PrtElementosProtocolo.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case PrtElementosProtocolo.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.PrtTiposElementosProtocoloData.class; + break; + case PrtElementosProtocolo.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case PrtElementosProtocolo.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PrtGruposProtocolo.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PrtGruposProtocolo.java new file mode 100644 index 00000000..70b12732 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PrtGruposProtocolo.java @@ -0,0 +1,587 @@ +/* +* PrtGruposProtocolo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class PrtGruposProtocolo extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "prt_grupos_protocolo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.prt_grupos_protocolo"; + + 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 String TO_ANALISADOR_ID_FULL = "prt_grupos_protocolo.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 db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PrtTiposElementosProtocolo.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PrtTiposElementosProtocolo.java new file mode 100644 index 00000000..234d4ad0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/PrtTiposElementosProtocolo.java @@ -0,0 +1,509 @@ +/* +* PrtTiposElementosProtocolo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class PrtTiposElementosProtocolo extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.PrtGruposProtocoloData.class, db.data.siprp_local.outer.PrtGruposProtocoloData.ID ); + + public static final String TABLENAME = "prt_tipos_elementos_protocolo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.prt_tipos_elementos_protocolo"; + + 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 String TO_GRUPO_PROTOCOLO_ID_FULL = "prt_tipos_elementos_protocolo.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 db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TiposExamesComp.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TiposExamesComp.java new file mode 100644 index 00000000..38794c5f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TiposExamesComp.java @@ -0,0 +1,344 @@ +/* +* TiposExamesComp.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TiposExamesComp extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.tipos_exames_comp"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "tipos_exames_comp.id"; + public static final int ID_INDEX = 0; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "tipos_exames_comp.ordem"; + public static final int ORDEM_INDEX = 1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "tipos_exames_comp.descricao"; + public static final int DESCRICAO_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + ORDEM, DESCRICAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ORDEM, TABLENAME + "." + DESCRICAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ORDEM, DESCRICAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ORDEM, DESCRICAO, }; + + private Integer id; + private Integer ordem; + private String descricao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TiposExamesComp() + { + super(); + dirtyProperties = new boolean[]{ false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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( db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Trabalhadores.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Trabalhadores.java new file mode 100644 index 00000000..e83c9b32 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Trabalhadores.java @@ -0,0 +1,1597 @@ +/* +* Trabalhadores.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Trabalhadores extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + FIELD_INDEXES.put( Trabalhadores.NIF, Trabalhadores.NIF_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NIF_FULL, Trabalhadores.NIF_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NUMERO_UTENTE, Trabalhadores.NUMERO_UTENTE_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NUMERO_UTENTE_FULL, Trabalhadores.NUMERO_UTENTE_INDEX ); + FIELD_INDEXES.put( Trabalhadores.PROCESSO_MOTIVO_ID, Trabalhadores.PROCESSO_MOTIVO_ID_INDEX ); + FIELD_INDEXES.put( Trabalhadores.PROCESSO_MOTIVO_ID_FULL, Trabalhadores.PROCESSO_MOTIVO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Trabalhadores.CLASS_IDENTIFIER, Trabalhadores.PESSOA_ID, Trabalhadores.TO_PESSOA_ID ); + FIELD_INDEXES.put( Trabalhadores.PESSOA_ID, Trabalhadores.PESSOA_ID_INDEX ); + FIELD_INDEXES.put( Trabalhadores.PESSOA_ID_FULL, Trabalhadores.PESSOA_ID_INDEX ); + FIELD_INDEXES.put( Trabalhadores.TO_PESSOA_ID, Trabalhadores.TO_PESSOA_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( Trabalhadores.class, Trabalhadores.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeypessoa_idToevo_pessoa = + new com.evolute.entity.ForeignKey( Trabalhadores.class, Trabalhadores.PESSOA_ID, db.data.siprp_local.outer.EvoPessoaData.class, db.data.siprp_local.outer.EvoPessoaData.ID ); + + public static final String TABLENAME = "trabalhadores"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores"; + + 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 String TO_ESTABELECIMENTO_ID_FULL = "trabalhadores.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 NIF = "nif"; + public static final String NIF_FULL = "trabalhadores.nif"; + public static final int NIF_INDEX = 21; + public static final String NUMERO_UTENTE = "numero_utente"; + public static final String NUMERO_UTENTE_FULL = "trabalhadores.numero_utente"; + public static final int NUMERO_UTENTE_INDEX = 22; + public static final String PROCESSO_MOTIVO_ID = "processo_motivo_id"; + public static final String PROCESSO_MOTIVO_ID_FULL = "trabalhadores.processo_motivo_id"; + public static final int PROCESSO_MOTIVO_ID_INDEX = 23; + public static final String PESSOA_ID = "pessoa_id"; + public static final String PESSOA_ID_FULL = "trabalhadores.pessoa_id"; + public static final int PESSOA_ID_INDEX = 24; + public static final String TO_PESSOA_ID = "to_pessoa_id"; + public static final String TO_PESSOA_ID_FULL = "trabalhadores.to_pessoa_id"; + public static final int TO_PESSOA_ID_INDEX = 25; + + 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, NIF, NUMERO_UTENTE, + PROCESSO_MOTIVO_ID, PESSOA_ID, TO_PESSOA_ID, }; + + 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, TABLENAME + "." + NIF, TABLENAME + "." + NUMERO_UTENTE, + TABLENAME + "." + PROCESSO_MOTIVO_ID, TABLENAME + "." + PESSOA_ID, TABLENAME + "." + TO_PESSOA_ID, }; + + 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, NIF, NUMERO_UTENTE, + PROCESSO_MOTIVO_ID, PESSOA_ID, }; + + + 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, NIF, NUMERO_UTENTE, + PROCESSO_MOTIVO_ID, PESSOA_ID, }; + + 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 db.data.siprp_local.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; + private String nif; + private String numero_utente; + private Integer processo_motivo_id; + private Integer pessoa_id; + private db.data.siprp_local.outer.EvoPessoaData to_pessoa_id; + + 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, 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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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 String getNif() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NIF ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nif; + } + + public void setNif( String nif ) + { + try + { + setLockedForRefresh( true ); + preProcess( NIF, nif ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nif = nif; + LAZY_LOADED_OBJECTS.put( NIF, Boolean.TRUE ); + } + + public String getNumero_utente() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NUMERO_UTENTE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.numero_utente; + } + + public void setNumero_utente( String numero_utente ) + { + try + { + setLockedForRefresh( true ); + preProcess( NUMERO_UTENTE, numero_utente ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.numero_utente = numero_utente; + LAZY_LOADED_OBJECTS.put( NUMERO_UTENTE, Boolean.TRUE ); + } + + public Integer getProcesso_motivo_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROCESSO_MOTIVO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.processo_motivo_id; + } + + public void setProcesso_motivo_id( Integer processo_motivo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROCESSO_MOTIVO_ID, processo_motivo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.processo_motivo_id = processo_motivo_id; + LAZY_LOADED_OBJECTS.put( PROCESSO_MOTIVO_ID, Boolean.TRUE ); + } + + public Integer getPessoa_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PESSOA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.pessoa_id; + } + + public void setPessoa_id( Integer pessoa_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PESSOA_ID, pessoa_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.pessoa_id = pessoa_id; + LAZY_LOADED_OBJECTS.put( PESSOA_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EvoPessoaData toPessoa_id() + { + try + { + prepare( TO_PESSOA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_pessoa_id; + } + + public void setToPessoa_id( db.data.siprp_local.outer.EvoPessoaData to_pessoa_id ) + { + try + { + preProcess( TO_PESSOA_ID, to_pessoa_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_pessoa_id = to_pessoa_id; + } + + 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; + case Trabalhadores.NIF_INDEX: + value = getNif(); + break; + case Trabalhadores.NUMERO_UTENTE_INDEX: + value = getNumero_utente(); + break; + case Trabalhadores.PROCESSO_MOTIVO_ID_INDEX: + value = getProcesso_motivo_id(); + break; + case Trabalhadores.PESSOA_ID_INDEX: + value = getPessoa_id(); + break; + case Trabalhadores.TO_PESSOA_ID_INDEX: + value = toPessoa_id(); + 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; + case Trabalhadores.NIF_INDEX: + value = this.nif; + break; + case Trabalhadores.NUMERO_UTENTE_INDEX: + value = this.numero_utente; + break; + case Trabalhadores.PROCESSO_MOTIVO_ID_INDEX: + value = this.processo_motivo_id; + break; + case Trabalhadores.PESSOA_ID_INDEX: + value = this.pessoa_id; + break; + case Trabalhadores.TO_PESSOA_ID_INDEX: + value = this.to_pessoa_id; + 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( ( db.data.siprp_local.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; + case Trabalhadores.NIF_INDEX: + setNif( ( String ) value ); + break; + case Trabalhadores.NUMERO_UTENTE_INDEX: + setNumero_utente( ( String ) value ); + break; + case Trabalhadores.PROCESSO_MOTIVO_ID_INDEX: + setProcesso_motivo_id( ( Integer ) value ); + break; + case Trabalhadores.PESSOA_ID_INDEX: + setPessoa_id( ( Integer ) value ); + break; + case Trabalhadores.TO_PESSOA_ID_INDEX: + setToPessoa_id( ( db.data.siprp_local.outer.EvoPessoaData ) 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 = ( db.data.siprp_local.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; + case Trabalhadores.NIF_INDEX: + this.nif = ( String ) value; + break; + case Trabalhadores.NUMERO_UTENTE_INDEX: + this.numero_utente = ( String ) value; + break; + case Trabalhadores.PROCESSO_MOTIVO_ID_INDEX: + this.processo_motivo_id = ( Integer ) value; + break; + case Trabalhadores.PESSOA_ID_INDEX: + this.pessoa_id = ( Integer ) value; + break; + case Trabalhadores.TO_PESSOA_ID_INDEX: + this.to_pessoa_id = ( db.data.siprp_local.outer.EvoPessoaData ) 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 = db.data.siprp_local.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; + case Trabalhadores.NIF_INDEX: + theClass = String.class; + break; + case Trabalhadores.NUMERO_UTENTE_INDEX: + theClass = String.class; + break; + case Trabalhadores.PROCESSO_MOTIVO_ID_INDEX: + theClass = Integer.class; + break; + case Trabalhadores.PESSOA_ID_INDEX: + theClass = Integer.class; + break; + case Trabalhadores.TO_PESSOA_ID_INDEX: + theClass = db.data.siprp_local.outer.EvoPessoaData.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, ( 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresConsultas.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresConsultas.java new file mode 100644 index 00000000..3b0710c4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresConsultas.java @@ -0,0 +1,647 @@ +/* +* TrabalhadoresConsultas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresConsultas extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresData.class, db.data.siprp_local.outer.TrabalhadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( TrabalhadoresConsultas.class, TrabalhadoresConsultas.PRESTADOR_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprocesso_idTotrabalhadores_processo = + new com.evolute.entity.ForeignKey( TrabalhadoresConsultas.class, TrabalhadoresConsultas.PROCESSO_ID, db.data.siprp_local.outer.TrabalhadoresProcessoData.class, db.data.siprp_local.outer.TrabalhadoresProcessoData.ID ); + + public static final String TABLENAME = "trabalhadores_consultas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_consultas"; + + 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 String TO_TRABALHADOR_ID_FULL = "trabalhadores_consultas.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 String TO_PRESTADOR_ID_FULL = "trabalhadores_consultas.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 String TO_PROCESSO_ID_FULL = "trabalhadores_consultas.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 db.data.siprp_local.outer.TrabalhadoresData to_trabalhador_id; + private java.util.Date data; + private Integer estado; + private Integer prestador_id; + private db.data.siprp_local.outer.PrestadoresData to_prestador_id; + private Integer processo_id; + private db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.outer.PrestadoresData ) value ); + break; + case TrabalhadoresConsultas.PROCESSO_ID_INDEX: + setProcesso_id( ( Integer ) value ); + break; + case TrabalhadoresConsultas.TO_PROCESSO_ID_INDEX: + setToProcesso_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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 = db.data.siprp_local.outer.PrestadoresData.class; + break; + case TrabalhadoresConsultas.PROCESSO_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresConsultas.TO_PROCESSO_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatas.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatas.java new file mode 100644 index 00000000..1436e5b5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatas.java @@ -0,0 +1,575 @@ +/* +* TrabalhadoresConsultasDatas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresConsultasDatas extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresConsultasData.class, db.data.siprp_local.outer.TrabalhadoresConsultasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( TrabalhadoresConsultasDatas.class, TrabalhadoresConsultasDatas.PRESTADOR_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "trabalhadores_consultas_datas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_consultas_datas"; + + 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 String TO_TRABALHADORES_CONSULTAS_ID_FULL = "trabalhadores_consultas_datas.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 String TO_PRESTADOR_ID_FULL = "trabalhadores_consultas_datas.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 db.data.siprp_local.outer.TrabalhadoresConsultasData to_trabalhadores_consultas_id; + private Integer estado; + private Integer prestador_id; + private db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatasEmails.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatasEmails.java new file mode 100644 index 00000000..1460608b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatasEmails.java @@ -0,0 +1,533 @@ +/* +* TrabalhadoresConsultasDatasEmails.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresConsultasDatasEmails extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresConsultasDatasData.class, db.data.siprp_local.outer.TrabalhadoresConsultasDatasData.ID ); + + public static final String TABLENAME = "trabalhadores_consultas_datas_emails"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_consultas_datas_emails"; + + 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 String TO_TRABALHADORES_CONSULTAS_DATAS_ID_FULL = "trabalhadores_consultas_datas_emails.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 db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatasObservacoes.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatasObservacoes.java new file mode 100644 index 00000000..ad09fb94 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatasObservacoes.java @@ -0,0 +1,383 @@ +/* +* TrabalhadoresConsultasDatasObservacoes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresConsultasDatasObservacoes extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresConsultasDatasData.class, db.data.siprp_local.outer.TrabalhadoresConsultasDatasData.ID ); + + public static final String TABLENAME = "trabalhadores_consultas_datas_observacoes"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_consultas_datas_observacoes"; + + 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 String TO_TRABALHADORES_CONSULTAS_DATAS_ID_FULL = "trabalhadores_consultas_datas_observacoes.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 db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcd.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcd.java new file mode 100644 index 00000000..3db97f83 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcd.java @@ -0,0 +1,838 @@ +/* +* TrabalhadoresEcd.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresEcd extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.PrtTiposElementosProtocoloData.class, db.data.siprp_local.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, db.data.siprp_local.outer.EcdOficialData.class, db.data.siprp_local.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, db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.class, db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyanalisador_idToprestadores = + new com.evolute.entity.ForeignKey( TrabalhadoresEcd.class, TrabalhadoresEcd.ANALISADOR_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "trabalhadores_ecd"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_ecd"; + + 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 String TO_ECD_ID_FULL = "trabalhadores_ecd.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 String TO_ECD_OFICIAL_ID_FULL = "trabalhadores_ecd.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 String TO_TRABALHADORES_ECDS_DATAS_ID_FULL = "trabalhadores_ecd.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 String TO_ANALISADOR_ID_FULL = "trabalhadores_ecd.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 db.data.siprp_local.outer.PrtTiposElementosProtocoloData to_ecd_id; + private Integer ecd_oficial_id; + private db.data.siprp_local.outer.EcdOficialData to_ecd_oficial_id; + private Integer estado; + private Integer trabalhadores_ecds_datas_id; + private db.data.siprp_local.outer.TrabalhadoresEcdsDatasData to_trabalhadores_ecds_datas_id; + private String enviado; + private Integer analisador_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.PrtTiposElementosProtocoloData.class; + break; + case TrabalhadoresEcd.ECD_OFICIAL_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcd.TO_ECD_OFICIAL_ID_INDEX: + theClass = db.data.siprp_local.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 = db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcds.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcds.java new file mode 100644 index 00000000..650c3f88 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcds.java @@ -0,0 +1,545 @@ +/* +* TrabalhadoresEcds.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresEcds extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresData.class, db.data.siprp_local.outer.TrabalhadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprocesso_idTotrabalhadores_processo = + new com.evolute.entity.ForeignKey( TrabalhadoresEcds.class, TrabalhadoresEcds.PROCESSO_ID, db.data.siprp_local.outer.TrabalhadoresProcessoData.class, db.data.siprp_local.outer.TrabalhadoresProcessoData.ID ); + + public static final String TABLENAME = "trabalhadores_ecds"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_ecds"; + + 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 String TO_TRABALHADOR_ID_FULL = "trabalhadores_ecds.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 String TO_PROCESSO_ID_FULL = "trabalhadores_ecds.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 db.data.siprp_local.outer.TrabalhadoresData to_trabalhador_id; + private Integer estado; + private java.util.Date data; + private Integer processo_id; + private db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsAnalise.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsAnalise.java new file mode 100644 index 00000000..e92c4ea1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsAnalise.java @@ -0,0 +1,481 @@ +/* +* TrabalhadoresEcdsAnalise.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresEcdsAnalise extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.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, db.data.siprp_local.outer.PrtGruposProtocoloData.class, db.data.siprp_local.outer.PrtGruposProtocoloData.ID ); + + public static final String TABLENAME = "trabalhadores_ecds_analise"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_ecds_analise"; + + 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 String TO_PRESTADOR_ID_FULL = "trabalhadores_ecds_analise.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 String TO_GRUPO_ECDS_ID_FULL = "trabalhadores_ecds_analise.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 db.data.siprp_local.outer.PrestadoresData to_prestador_id; + private Integer grupo_ecds_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.PrestadoresData.class; + break; + case TrabalhadoresEcdsAnalise.GRUPO_ECDS_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcdsAnalise.TO_GRUPO_ECDS_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatas.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatas.java new file mode 100644 index 00000000..4964fe95 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatas.java @@ -0,0 +1,791 @@ +/* +* TrabalhadoresEcdsDatas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresEcdsDatas extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresEcdsData.class, db.data.siprp_local.outer.TrabalhadoresEcdsData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( TrabalhadoresEcdsDatas.class, TrabalhadoresEcdsDatas.PRESTADOR_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyanalisador_idToprestadores = + new com.evolute.entity.ForeignKey( TrabalhadoresEcdsDatas.class, TrabalhadoresEcdsDatas.ANALISADOR_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "trabalhadores_ecds_datas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_ecds_datas"; + + 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 String TO_TRABALHADORES_ECDS_ID_FULL = "trabalhadores_ecds_datas.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 String TO_PRESTADOR_ID_FULL = "trabalhadores_ecds_datas.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 String TO_ANALISADOR_ID_FULL = "trabalhadores_ecds_datas.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 db.data.siprp_local.outer.TrabalhadoresEcdsData to_trabalhadores_ecds_id; + private java.util.Date data; + private Integer estado; + private Integer prestador_id; + private db.data.siprp_local.outer.PrestadoresData to_prestador_id; + private Integer analisador_id; + private db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.outer.PrestadoresData ) value ); + break; + case TrabalhadoresEcdsDatas.ANALISADOR_ID_INDEX: + setAnalisador_id( ( Integer ) value ); + break; + case TrabalhadoresEcdsDatas.TO_ANALISADOR_ID_INDEX: + setToAnalisador_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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 = db.data.siprp_local.outer.PrestadoresData.class; + break; + case TrabalhadoresEcdsDatas.ANALISADOR_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcdsDatas.TO_ANALISADOR_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatasEmails.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatasEmails.java new file mode 100644 index 00000000..94d63e48 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatasEmails.java @@ -0,0 +1,533 @@ +/* +* TrabalhadoresEcdsDatasEmails.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresEcdsDatasEmails extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.class, db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.ID ); + + public static final String TABLENAME = "trabalhadores_ecds_datas_emails"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_ecds_datas_emails"; + + 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 String TO_TRABALHADORES_ECDS_DATAS_ID_FULL = "trabalhadores_ecds_datas_emails.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 db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatasObservacoes.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatasObservacoes.java new file mode 100644 index 00000000..aac5d0cb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatasObservacoes.java @@ -0,0 +1,381 @@ +/* +* TrabalhadoresEcdsDatasObservacoes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresEcdsDatasObservacoes extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.class, db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.ID ); + + public static final String TABLENAME = "trabalhadores_ecds_datas_observacoes"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_ecds_datas_observacoes"; + + 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 String TO_TRABALHADORES_ECDS_DATAS_ID_FULL = "trabalhadores_ecds_datas_observacoes.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 db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresFichasAptidao.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresFichasAptidao.java new file mode 100644 index 00000000..c9080499 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresFichasAptidao.java @@ -0,0 +1,431 @@ +/* +* TrabalhadoresFichasAptidao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresFichasAptidao extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresProcessoData.class, db.data.siprp_local.outer.TrabalhadoresProcessoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyexame_idToexames = + new com.evolute.entity.ForeignKey( TrabalhadoresFichasAptidao.class, TrabalhadoresFichasAptidao.EXAME_ID, db.data.siprp_local.outer.ExamesData.class, db.data.siprp_local.outer.ExamesData.ID ); + + public static final String TABLENAME = "trabalhadores_fichas_aptidao"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_fichas_aptidao"; + + 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 String TO_PROCESSO_ID_FULL = "trabalhadores_fichas_aptidao.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 String TO_EXAME_ID_FULL = "trabalhadores_fichas_aptidao.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 db.data.siprp_local.outer.TrabalhadoresProcessoData to_processo_id; + private Integer exame_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.outer.TrabalhadoresProcessoData ) value ); + break; + case TrabalhadoresFichasAptidao.EXAME_ID_INDEX: + setExame_id( ( Integer ) value ); + break; + case TrabalhadoresFichasAptidao.TO_EXAME_ID_INDEX: + setToExame_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.TrabalhadoresProcessoData.class; + break; + case TrabalhadoresFichasAptidao.EXAME_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresFichasAptidao.TO_EXAME_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresProcesso.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresProcesso.java new file mode 100644 index 00000000..87236b9f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/TrabalhadoresProcesso.java @@ -0,0 +1,675 @@ +/* +* TrabalhadoresProcesso.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresProcesso extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresData.class, db.data.siprp_local.outer.TrabalhadoresData.ID ); + + public static final String TABLENAME = "trabalhadores_processo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_processo"; + + 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 String TO_TRABALHADOR_ID_FULL = "trabalhadores_processo.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 db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Versao.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Versao.java new file mode 100644 index 00000000..37bb6d94 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/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 db.data.siprp_local.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 = "db.data.siprp_local.inner.versao"; + + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Version.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Version.java new file mode 100644 index 00000000..5c74c9d0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/Version.java @@ -0,0 +1,330 @@ +/* +* Version.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Version extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Version.CURRENT_VERSION, Version.CURRENT_VERSION_INDEX ); + FIELD_INDEXES.put( Version.CURRENT_VERSION_FULL, Version.CURRENT_VERSION_INDEX ); + FIELD_INDEXES.put( Version.ID, Version.ID_INDEX ); + FIELD_INDEXES.put( Version.ID_FULL, Version.ID_INDEX ); + FIELD_INDEXES.put( Version.MODULE_NAME, Version.MODULE_NAME_INDEX ); + FIELD_INDEXES.put( Version.MODULE_NAME_FULL, Version.MODULE_NAME_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "version"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.version"; + + public static final int _INVALID__INDEX = -1; + public static final String CURRENT_VERSION = "current_version"; + public static final String CURRENT_VERSION_FULL = "version.current_version"; + public static final int CURRENT_VERSION_INDEX = 0; + public static final String ID = "id"; + public static final String ID_FULL = "version.id"; + public static final int ID_INDEX = 1; + public static final String MODULE_NAME = "module_name"; + public static final String MODULE_NAME_FULL = "version.module_name"; + public static final int MODULE_NAME_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + CURRENT_VERSION, MODULE_NAME, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + CURRENT_VERSION, TABLENAME + "." + MODULE_NAME, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + CURRENT_VERSION, ID, MODULE_NAME, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + CURRENT_VERSION, ID, MODULE_NAME, }; + + private Double current_version; + private Integer id; + private String module_name; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Version() + { + super(); + dirtyProperties = new boolean[]{ false, false, false }; + } + + public Double getCurrent_version() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURRENT_VERSION ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.current_version; + } + + public void setCurrent_version( Double current_version ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURRENT_VERSION, current_version ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.current_version = current_version; + LAZY_LOADED_OBJECTS.put( CURRENT_VERSION, Boolean.TRUE ); + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 getModule_name() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MODULE_NAME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.module_name; + } + + public void setModule_name( String module_name ) + { + try + { + setLockedForRefresh( true ); + preProcess( MODULE_NAME, module_name ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.module_name = module_name; + LAZY_LOADED_OBJECTS.put( MODULE_NAME, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + value = getCurrent_version(); + break; + case Version.ID_INDEX: + value = getId(); + break; + case Version.MODULE_NAME_INDEX: + value = getModule_name(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + value = this.current_version; + break; + case Version.ID_INDEX: + value = this.id; + break; + case Version.MODULE_NAME_INDEX: + value = this.module_name; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + setCurrent_version( ( Double ) value ); + break; + case Version.ID_INDEX: + setId( ( Integer ) value ); + break; + case Version.MODULE_NAME_INDEX: + setModule_name( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + this.current_version = ( Double ) value; + break; + case Version.ID_INDEX: + this.id = ( Integer ) value; + break; + case Version.MODULE_NAME_INDEX: + this.module_name = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + theClass = Double.class; + break; + case Version.ID_INDEX: + theClass = Integer.class; + break; + case Version.MODULE_NAME_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Version._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Version.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/package.xml b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/package.xml new file mode 100644 index 00000000..b4c99ea6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/inner/package.xml @@ -0,0 +1,3341 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ActualizacaoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ActualizacaoData.java new file mode 100644 index 00000000..0c20f558 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ActualizacaoData.java @@ -0,0 +1,18 @@ +/* +* ActualizacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class ActualizacaoData extends db.data.siprp_local.inner.Actualizacao +{ + + public ActualizacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/AptAppointmentData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/AptAppointmentData.java new file mode 100644 index 00000000..29449f4a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/AptAppointmentData.java @@ -0,0 +1,18 @@ +/* +* AptAppointmentData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class AptAppointmentData extends db.data.siprp_local.inner.AptAppointment +{ + + public AptAppointmentData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/AptSegurancaAlimentarData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/AptSegurancaAlimentarData.java new file mode 100644 index 00000000..56f9d6f3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/AptSegurancaAlimentarData.java @@ -0,0 +1,18 @@ +/* +* AptSegurancaAlimentarData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class AptSegurancaAlimentarData extends db.data.siprp_local.inner.AptSegurancaAlimentar +{ + + public AptSegurancaAlimentarData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/AptStateData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/AptStateData.java new file mode 100644 index 00000000..5a80373c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/AptStateData.java @@ -0,0 +1,18 @@ +/* +* AptStateData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class AptStateData extends db.data.siprp_local.inner.AptState +{ + + public AptStateData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/AvisosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/AvisosData.java new file mode 100644 index 00000000..be35e00d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/AvisosData.java @@ -0,0 +1,18 @@ +/* +* AvisosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class AvisosData extends db.data.siprp_local.inner.Avisos +{ + + public AvisosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ContactosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ContactosData.java new file mode 100644 index 00000000..dcf0758f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ContactosData.java @@ -0,0 +1,18 @@ +/* +* ContactosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class ContactosData extends db.data.siprp_local.inner.Contactos +{ + + public ContactosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurArsData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurArsData.java new file mode 100644 index 00000000..7c4caa4e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurArsData.java @@ -0,0 +1,18 @@ +/* +* CurArsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurArsData extends db.data.siprp_local.inner.CurArs +{ + + public CurArsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurAulasData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurAulasData.java new file mode 100644 index 00000000..27442b59 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurAulasData.java @@ -0,0 +1,18 @@ +/* +* CurAulasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurAulasData extends db.data.siprp_local.inner.CurAulas +{ + + public CurAulasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurAulasFormadoresData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurAulasFormadoresData.java new file mode 100644 index 00000000..e5a75b70 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurAulasFormadoresData.java @@ -0,0 +1,18 @@ +/* +* CurAulasFormadoresData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurAulasFormadoresData extends db.data.siprp_local.inner.CurAulasFormadores +{ + + public CurAulasFormadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurCursosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurCursosData.java new file mode 100644 index 00000000..0c8a4328 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurCursosData.java @@ -0,0 +1,18 @@ +/* +* CurCursosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurCursosData extends db.data.siprp_local.inner.CurCursos +{ + + public CurCursosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurDiasData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurDiasData.java new file mode 100644 index 00000000..cffa22c6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurDiasData.java @@ -0,0 +1,18 @@ +/* +* CurDiasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurDiasData extends db.data.siprp_local.inner.CurDias +{ + + public CurDiasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurFormadoresCursosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurFormadoresCursosData.java new file mode 100644 index 00000000..68fa9681 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurFormadoresCursosData.java @@ -0,0 +1,18 @@ +/* +* CurFormadoresCursosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurFormadoresCursosData extends db.data.siprp_local.inner.CurFormadoresCursos +{ + + public CurFormadoresCursosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurFormadoresData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurFormadoresData.java new file mode 100644 index 00000000..f4179b43 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurFormadoresData.java @@ -0,0 +1,18 @@ +/* +* CurFormadoresData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurFormadoresData extends db.data.siprp_local.inner.CurFormadores +{ + + public CurFormadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurFormandosCursosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurFormandosCursosData.java new file mode 100644 index 00000000..404428ba --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurFormandosCursosData.java @@ -0,0 +1,18 @@ +/* +* CurFormandosCursosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurFormandosCursosData extends db.data.siprp_local.inner.CurFormandosCursos +{ + + public CurFormandosCursosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurFormandosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurFormandosData.java new file mode 100644 index 00000000..513befc5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurFormandosData.java @@ -0,0 +1,18 @@ +/* +* CurFormandosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurFormandosData extends db.data.siprp_local.inner.CurFormandos +{ + + public CurFormandosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurHospitaisData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurHospitaisData.java new file mode 100644 index 00000000..d241c7f3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurHospitaisData.java @@ -0,0 +1,18 @@ +/* +* CurHospitaisData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurHospitaisData extends db.data.siprp_local.inner.CurHospitais +{ + + public CurHospitaisData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurNumeroCertificadoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurNumeroCertificadoData.java new file mode 100644 index 00000000..5562388b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurNumeroCertificadoData.java @@ -0,0 +1,18 @@ +/* +* CurNumeroCertificadoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurNumeroCertificadoData extends db.data.siprp_local.inner.CurNumeroCertificado +{ + + public CurNumeroCertificadoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurNumeroCertificadoFormadorData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurNumeroCertificadoFormadorData.java new file mode 100644 index 00000000..2449c28f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurNumeroCertificadoFormadorData.java @@ -0,0 +1,18 @@ +/* +* CurNumeroCertificadoFormadorData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurNumeroCertificadoFormadorData extends db.data.siprp_local.inner.CurNumeroCertificadoFormador +{ + + public CurNumeroCertificadoFormadorData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurPagamentosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurPagamentosData.java new file mode 100644 index 00000000..ce2a1f96 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurPagamentosData.java @@ -0,0 +1,18 @@ +/* +* CurPagamentosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurPagamentosData extends db.data.siprp_local.inner.CurPagamentos +{ + + public CurPagamentosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurPagamentosTiposData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurPagamentosTiposData.java new file mode 100644 index 00000000..c29b5d0d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurPagamentosTiposData.java @@ -0,0 +1,18 @@ +/* +* CurPagamentosTiposData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurPagamentosTiposData extends db.data.siprp_local.inner.CurPagamentosTipos +{ + + public CurPagamentosTiposData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurPresencasData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurPresencasData.java new file mode 100644 index 00000000..40b63317 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurPresencasData.java @@ -0,0 +1,18 @@ +/* +* CurPresencasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurPresencasData extends db.data.siprp_local.inner.CurPresencas +{ + + public CurPresencasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurTopicosAulasData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurTopicosAulasData.java new file mode 100644 index 00000000..966ad307 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurTopicosAulasData.java @@ -0,0 +1,18 @@ +/* +* CurTopicosAulasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurTopicosAulasData extends db.data.siprp_local.inner.CurTopicosAulas +{ + + public CurTopicosAulasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurTopicosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurTopicosData.java new file mode 100644 index 00000000..7f565b61 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/CurTopicosData.java @@ -0,0 +1,18 @@ +/* +* CurTopicosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurTopicosData extends db.data.siprp_local.inner.CurTopicos +{ + + public CurTopicosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EcdOficialData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EcdOficialData.java new file mode 100644 index 00000000..69291a55 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EcdOficialData.java @@ -0,0 +1,18 @@ +/* +* EcdOficialData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EcdOficialData extends db.data.siprp_local.inner.EcdOficial +{ + + public EcdOficialData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EmailPlanoDeActuacaoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EmailPlanoDeActuacaoData.java new file mode 100644 index 00000000..e251a8bd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EmailPlanoDeActuacaoData.java @@ -0,0 +1,18 @@ +/* +* EmailPlanoDeActuacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EmailPlanoDeActuacaoData extends db.data.siprp_local.inner.EmailPlanoDeActuacao +{ + + public EmailPlanoDeActuacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EmpresaPrecoPeriodicidadeTipoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EmpresaPrecoPeriodicidadeTipoData.java new file mode 100644 index 00000000..57479c87 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EmpresaPrecoPeriodicidadeTipoData.java @@ -0,0 +1,18 @@ +/* +* EmpresaPrecoPeriodicidadeTipoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EmpresaPrecoPeriodicidadeTipoData extends db.data.siprp_local.inner.EmpresaPrecoPeriodicidadeTipo +{ + + public EmpresaPrecoPeriodicidadeTipoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EmpresaPrecoServicoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EmpresaPrecoServicoData.java new file mode 100644 index 00000000..1392ad33 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EmpresaPrecoServicoData.java @@ -0,0 +1,18 @@ +/* +* EmpresaPrecoServicoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EmpresaPrecoServicoData extends db.data.siprp_local.inner.EmpresaPrecoServico +{ + + public EmpresaPrecoServicoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EmpresaPrecoServicoTipoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EmpresaPrecoServicoTipoData.java new file mode 100644 index 00000000..dc8d6935 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EmpresaPrecoServicoTipoData.java @@ -0,0 +1,18 @@ +/* +* EmpresaPrecoServicoTipoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EmpresaPrecoServicoTipoData extends db.data.siprp_local.inner.EmpresaPrecoServicoTipo +{ + + public EmpresaPrecoServicoTipoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EmpresasData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EmpresasData.java new file mode 100644 index 00000000..4ca2924a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EmpresasData.java @@ -0,0 +1,18 @@ +/* +* EmpresasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EmpresasData extends db.data.siprp_local.inner.Empresas +{ + + public EmpresasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ErrorsData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ErrorsData.java new file mode 100644 index 00000000..001f926d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ErrorsData.java @@ -0,0 +1,18 @@ +/* +* ErrorsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class ErrorsData extends db.data.siprp_local.inner.Errors +{ + + public ErrorsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EstabelecimentosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EstabelecimentosData.java new file mode 100644 index 00000000..0c2ef031 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EstabelecimentosData.java @@ -0,0 +1,18 @@ +/* +* EstabelecimentosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EstabelecimentosData extends db.data.siprp_local.inner.Estabelecimentos +{ + + public EstabelecimentosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EtiquetasData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EtiquetasData.java new file mode 100644 index 00000000..f5cc4335 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EtiquetasData.java @@ -0,0 +1,18 @@ +/* +* EtiquetasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EtiquetasData extends db.data.siprp_local.inner.Etiquetas +{ + + public EtiquetasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoPessoaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoPessoaData.java new file mode 100644 index 00000000..c8ace64c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoPessoaData.java @@ -0,0 +1,18 @@ +/* +* EvoPessoaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EvoPessoaData extends db.data.siprp_local.inner.EvoPessoa +{ + + public EvoPessoaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUpdateData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUpdateData.java new file mode 100644 index 00000000..2549cd82 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUpdateData.java @@ -0,0 +1,18 @@ +/* +* EvoUpdateData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EvoUpdateData extends db.data.siprp_local.inner.EvoUpdate +{ + + public EvoUpdateData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUsrPermissionData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUsrPermissionData.java new file mode 100644 index 00000000..0a773f45 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUsrPermissionData.java @@ -0,0 +1,18 @@ +/* +* EvoUsrPermissionData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EvoUsrPermissionData extends db.data.siprp_local.inner.EvoUsrPermission +{ + + public EvoUsrPermissionData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUsrRoleData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUsrRoleData.java new file mode 100644 index 00000000..afa56c6d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUsrRoleData.java @@ -0,0 +1,18 @@ +/* +* EvoUsrRoleData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EvoUsrRoleData extends db.data.siprp_local.inner.EvoUsrRole +{ + + public EvoUsrRoleData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUsrRolesPermissionsData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUsrRolesPermissionsData.java new file mode 100644 index 00000000..a2d78b95 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUsrRolesPermissionsData.java @@ -0,0 +1,18 @@ +/* +* EvoUsrRolesPermissionsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EvoUsrRolesPermissionsData extends db.data.siprp_local.inner.EvoUsrRolesPermissions +{ + + public EvoUsrRolesPermissionsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUsrUserData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUsrUserData.java new file mode 100644 index 00000000..262fde8a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUsrUserData.java @@ -0,0 +1,18 @@ +/* +* EvoUsrUserData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EvoUsrUserData extends db.data.siprp_local.inner.EvoUsrUser +{ + + public EvoUsrUserData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUsrUsersRolesData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUsrUsersRolesData.java new file mode 100644 index 00000000..d0842712 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/EvoUsrUsersRolesData.java @@ -0,0 +1,18 @@ +/* +* EvoUsrUsersRolesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EvoUsrUsersRolesData extends db.data.siprp_local.inner.EvoUsrUsersRoles +{ + + public EvoUsrUsersRolesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ExamesData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ExamesData.java new file mode 100644 index 00000000..fb4cf9b9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ExamesData.java @@ -0,0 +1,18 @@ +/* +* ExamesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class ExamesData extends db.data.siprp_local.inner.Exames +{ + + public ExamesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ExamesPerfisData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ExamesPerfisData.java new file mode 100644 index 00000000..cf9aabc9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ExamesPerfisData.java @@ -0,0 +1,18 @@ +/* +* ExamesPerfisData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class ExamesPerfisData extends db.data.siprp_local.inner.ExamesPerfis +{ + + public ExamesPerfisData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ExamesPortariaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ExamesPortariaData.java new file mode 100644 index 00000000..ade72d19 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ExamesPortariaData.java @@ -0,0 +1,18 @@ +/* +* ExamesPortariaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class ExamesPortariaData extends db.data.siprp_local.inner.ExamesPortaria +{ + + public ExamesPortariaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/FilFileAppointmentData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/FilFileAppointmentData.java new file mode 100644 index 00000000..4ec472cf --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/FilFileAppointmentData.java @@ -0,0 +1,18 @@ +/* +* FilFileAppointmentData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class FilFileAppointmentData extends db.data.siprp_local.inner.FilFileAppointment +{ + + public FilFileAppointmentData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/FilFileData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/FilFileData.java new file mode 100644 index 00000000..40fefdcf --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/FilFileData.java @@ -0,0 +1,18 @@ +/* +* FilFileData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class FilFileData extends db.data.siprp_local.inner.FilFile +{ + + public FilFileData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HistoricoEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HistoricoEstabelecimentoData.java new file mode 100644 index 00000000..34a8e0b7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HistoricoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HistoricoEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HistoricoEstabelecimentoData extends db.data.siprp_local.inner.HistoricoEstabelecimento +{ + + public HistoricoEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsAreaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsAreaData.java new file mode 100644 index 00000000..d096fdfd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsAreaData.java @@ -0,0 +1,18 @@ +/* +* HsAreaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsAreaData extends db.data.siprp_local.inner.HsArea +{ + + public HsAreaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsEmailData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsEmailData.java new file mode 100644 index 00000000..8ca79d85 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsEmailData.java @@ -0,0 +1,18 @@ +/* +* HsEmailData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsEmailData extends db.data.siprp_local.inner.HsEmail +{ + + public HsEmailData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsEmailEmpresaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsEmailEmpresaData.java new file mode 100644 index 00000000..8e1489ee --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsEmailEmpresaData.java @@ -0,0 +1,18 @@ +/* +* HsEmailEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsEmailEmpresaData extends db.data.siprp_local.inner.HsEmailEmpresa +{ + + public HsEmailEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsEmailEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsEmailEstabelecimentoData.java new file mode 100644 index 00000000..67b053a9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsEmailEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HsEmailEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsEmailEstabelecimentoData extends db.data.siprp_local.inner.HsEmailEstabelecimento +{ + + public HsEmailEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsEquipamentoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsEquipamentoData.java new file mode 100644 index 00000000..fc253f7f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsEquipamentoData.java @@ -0,0 +1,18 @@ +/* +* HsEquipamentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsEquipamentoData extends db.data.siprp_local.inner.HsEquipamento +{ + + public HsEquipamentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsLegislacaoCategoriaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsLegislacaoCategoriaData.java new file mode 100644 index 00000000..50fc7216 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsLegislacaoCategoriaData.java @@ -0,0 +1,18 @@ +/* +* HsLegislacaoCategoriaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsLegislacaoCategoriaData extends db.data.siprp_local.inner.HsLegislacaoCategoria +{ + + public HsLegislacaoCategoriaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsLegislacaoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsLegislacaoData.java new file mode 100644 index 00000000..d67e3767 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsLegislacaoData.java @@ -0,0 +1,18 @@ +/* +* HsLegislacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsLegislacaoData extends db.data.siprp_local.inner.HsLegislacao +{ + + public HsLegislacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsLegislacaoEmpresaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsLegislacaoEmpresaData.java new file mode 100644 index 00000000..f4318e06 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsLegislacaoEmpresaData.java @@ -0,0 +1,18 @@ +/* +* HsLegislacaoEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsLegislacaoEmpresaData extends db.data.siprp_local.inner.HsLegislacaoEmpresa +{ + + public HsLegislacaoEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsLegislacaoEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsLegislacaoEstabelecimentoData.java new file mode 100644 index 00000000..d9564909 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsLegislacaoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HsLegislacaoEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsLegislacaoEstabelecimentoData extends db.data.siprp_local.inner.HsLegislacaoEstabelecimento +{ + + public HsLegislacaoEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsMedidaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsMedidaData.java new file mode 100644 index 00000000..4b15e2bd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsMedidaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsMedidaData extends db.data.siprp_local.inner.HsMedida +{ + + public HsMedidaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsNormalizacaoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsNormalizacaoData.java new file mode 100644 index 00000000..32beaebd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsNormalizacaoData.java @@ -0,0 +1,18 @@ +/* +* HsNormalizacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsNormalizacaoData extends db.data.siprp_local.inner.HsNormalizacao +{ + + public HsNormalizacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsNormalizacaoEmpresaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsNormalizacaoEmpresaData.java new file mode 100644 index 00000000..b67fc3c1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsNormalizacaoEmpresaData.java @@ -0,0 +1,18 @@ +/* +* HsNormalizacaoEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsNormalizacaoEmpresaData extends db.data.siprp_local.inner.HsNormalizacaoEmpresa +{ + + public HsNormalizacaoEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsNormalizacaoEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsNormalizacaoEstabelecimentoData.java new file mode 100644 index 00000000..7b7ab0d6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsNormalizacaoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HsNormalizacaoEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsNormalizacaoEstabelecimentoData extends db.data.siprp_local.inner.HsNormalizacaoEstabelecimento +{ + + public HsNormalizacaoEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsPostoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsPostoData.java new file mode 100644 index 00000000..492a2a3b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsPostoData.java @@ -0,0 +1,18 @@ +/* +* HsPostoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsPostoData extends db.data.siprp_local.inner.HsPosto +{ + + public HsPostoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsPostoEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsPostoEstabelecimentoData.java new file mode 100644 index 00000000..153c1971 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsPostoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HsPostoEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsPostoEstabelecimentoData extends db.data.siprp_local.inner.HsPostoEstabelecimento +{ + + public HsPostoEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsPostoMedidaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsPostoMedidaData.java new file mode 100644 index 00000000..82c7505e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsPostoMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsPostoMedidaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsPostoMedidaData extends db.data.siprp_local.inner.HsPostoMedida +{ + + public HsPostoMedidaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsPostoRiscoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsPostoRiscoData.java new file mode 100644 index 00000000..20a3ed92 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsPostoRiscoData.java @@ -0,0 +1,18 @@ +/* +* HsPostoRiscoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsPostoRiscoData extends db.data.siprp_local.inner.HsPostoRisco +{ + + public HsPostoRiscoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioAreaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioAreaData.java new file mode 100644 index 00000000..c0be2955 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioAreaData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioAreaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioAreaData extends db.data.siprp_local.inner.HsRelatorioArea +{ + + public HsRelatorioAreaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioData.java new file mode 100644 index 00000000..16aba4b9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioData extends db.data.siprp_local.inner.HsRelatorio +{ + + public HsRelatorioData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioEquipamentoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioEquipamentoData.java new file mode 100644 index 00000000..8e1a7fdd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioEquipamentoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioEquipamentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioEquipamentoData extends db.data.siprp_local.inner.HsRelatorioEquipamento +{ + + public HsRelatorioEquipamentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioLegislacaoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioLegislacaoData.java new file mode 100644 index 00000000..34580b9d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioLegislacaoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioLegislacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioLegislacaoData extends db.data.siprp_local.inner.HsRelatorioLegislacao +{ + + public HsRelatorioLegislacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioMedidaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioMedidaData.java new file mode 100644 index 00000000..fb3ebf35 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioMedidaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioMedidaData extends db.data.siprp_local.inner.HsRelatorioMedida +{ + + public HsRelatorioMedidaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioNormalizacaoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioNormalizacaoData.java new file mode 100644 index 00000000..b8a07e57 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioNormalizacaoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioNormalizacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioNormalizacaoData extends db.data.siprp_local.inner.HsRelatorioNormalizacao +{ + + public HsRelatorioNormalizacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioPostoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioPostoData.java new file mode 100644 index 00000000..00e1d30d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioPostoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioPostoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioPostoData extends db.data.siprp_local.inner.HsRelatorioPosto +{ + + public HsRelatorioPostoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioPostoMedidaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioPostoMedidaData.java new file mode 100644 index 00000000..23a9c63c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioPostoMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioPostoMedidaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioPostoMedidaData extends db.data.siprp_local.inner.HsRelatorioPostoMedida +{ + + public HsRelatorioPostoMedidaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioPostoRiscoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioPostoRiscoData.java new file mode 100644 index 00000000..7fe89842 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioPostoRiscoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioPostoRiscoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioPostoRiscoData extends db.data.siprp_local.inner.HsRelatorioPostoRisco +{ + + public HsRelatorioPostoRiscoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioRiscoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioRiscoData.java new file mode 100644 index 00000000..5742674d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioRiscoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioRiscoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioRiscoData extends db.data.siprp_local.inner.HsRelatorioRisco +{ + + public HsRelatorioRiscoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioRiscoValorQualitativoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioRiscoValorQualitativoData.java new file mode 100644 index 00000000..43866573 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRelatorioRiscoValorQualitativoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioRiscoValorQualitativoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioRiscoValorQualitativoData extends db.data.siprp_local.inner.HsRelatorioRiscoValorQualitativo +{ + + public HsRelatorioRiscoValorQualitativoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRiscoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRiscoData.java new file mode 100644 index 00000000..77292c22 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRiscoData.java @@ -0,0 +1,18 @@ +/* +* HsRiscoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRiscoData extends db.data.siprp_local.inner.HsRisco +{ + + public HsRiscoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRiscoEmpresaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRiscoEmpresaData.java new file mode 100644 index 00000000..c379a4d7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRiscoEmpresaData.java @@ -0,0 +1,18 @@ +/* +* HsRiscoEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRiscoEmpresaData extends db.data.siprp_local.inner.HsRiscoEmpresa +{ + + public HsRiscoEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRiscoMedidaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRiscoMedidaData.java new file mode 100644 index 00000000..8c2f14f8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRiscoMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsRiscoMedidaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRiscoMedidaData extends db.data.siprp_local.inner.HsRiscoMedida +{ + + public HsRiscoMedidaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRiscoTemaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRiscoTemaData.java new file mode 100644 index 00000000..7c0c1468 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/HsRiscoTemaData.java @@ -0,0 +1,18 @@ +/* +* HsRiscoTemaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRiscoTemaData extends db.data.siprp_local.inner.HsRiscoTema +{ + + public HsRiscoTemaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/IdsData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/IdsData.java new file mode 100644 index 00000000..41b23b07 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/IdsData.java @@ -0,0 +1,18 @@ +/* +* IdsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class IdsData extends db.data.siprp_local.inner.Ids +{ + + public IdsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ImageData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ImageData.java new file mode 100644 index 00000000..55daf68b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/ImageData.java @@ -0,0 +1,18 @@ +/* +* ImageData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class ImageData extends db.data.siprp_local.inner.Image +{ + + public ImageData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/LembretesData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/LembretesData.java new file mode 100644 index 00000000..35b41584 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/LembretesData.java @@ -0,0 +1,18 @@ +/* +* LembretesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class LembretesData extends db.data.siprp_local.inner.Lembretes +{ + + public LembretesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/LembretesTiposData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/LembretesTiposData.java new file mode 100644 index 00000000..a88f1f75 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/LembretesTiposData.java @@ -0,0 +1,18 @@ +/* +* LembretesTiposData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class LembretesTiposData extends db.data.siprp_local.inner.LembretesTipos +{ + + public LembretesTiposData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesEmpresaData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesEmpresaData.java new file mode 100644 index 00000000..b4833a64 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesEmpresaData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class MarcacoesEmpresaData extends db.data.siprp_local.inner.MarcacoesEmpresa +{ + + public MarcacoesEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesEstabelecimentoData.java new file mode 100644 index 00000000..7082c58f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class MarcacoesEstabelecimentoData extends db.data.siprp_local.inner.MarcacoesEstabelecimento +{ + + public MarcacoesEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesGruposRealizadosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesGruposRealizadosData.java new file mode 100644 index 00000000..d4f509be --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesGruposRealizadosData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesGruposRealizadosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class MarcacoesGruposRealizadosData extends db.data.siprp_local.inner.MarcacoesGruposRealizados +{ + + public MarcacoesGruposRealizadosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesTecnicosHstData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesTecnicosHstData.java new file mode 100644 index 00000000..52776b28 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesTecnicosHstData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesTecnicosHstData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class MarcacoesTecnicosHstData extends db.data.siprp_local.inner.MarcacoesTecnicosHst +{ + + public MarcacoesTecnicosHstData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesTrabalhadorData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesTrabalhadorData.java new file mode 100644 index 00000000..347d6683 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesTrabalhadorData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesTrabalhadorData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class MarcacoesTrabalhadorData extends db.data.siprp_local.inner.MarcacoesTrabalhador +{ + + public MarcacoesTrabalhadorData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesTrabalhadorEstadosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesTrabalhadorEstadosData.java new file mode 100644 index 00000000..4ec3e0d1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MarcacoesTrabalhadorEstadosData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesTrabalhadorEstadosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class MarcacoesTrabalhadorEstadosData extends db.data.siprp_local.inner.MarcacoesTrabalhadorEstados +{ + + public MarcacoesTrabalhadorEstadosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MedicosData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MedicosData.java new file mode 100644 index 00000000..01e45d62 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/MedicosData.java @@ -0,0 +1,18 @@ +/* +* MedicosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class MedicosData extends db.data.siprp_local.inner.Medicos +{ + + public MedicosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PaisesContinentesData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PaisesContinentesData.java new file mode 100644 index 00000000..b08e4856 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PaisesContinentesData.java @@ -0,0 +1,18 @@ +/* +* PaisesContinentesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PaisesContinentesData extends db.data.siprp_local.inner.PaisesContinentes +{ + + public PaisesContinentesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PaisesData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PaisesData.java new file mode 100644 index 00000000..9c381def --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PaisesData.java @@ -0,0 +1,18 @@ +/* +* PaisesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PaisesData extends db.data.siprp_local.inner.Paises +{ + + public PaisesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PesDocumentoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PesDocumentoData.java new file mode 100644 index 00000000..5ff276bf --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PesDocumentoData.java @@ -0,0 +1,18 @@ +/* +* PesDocumentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PesDocumentoData extends db.data.siprp_local.inner.PesDocumento +{ + + public PesDocumentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PesDocumentoTipoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PesDocumentoTipoData.java new file mode 100644 index 00000000..6a60e193 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PesDocumentoTipoData.java @@ -0,0 +1,18 @@ +/* +* PesDocumentoTipoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PesDocumentoTipoData extends db.data.siprp_local.inner.PesDocumentoTipo +{ + + public PesDocumentoTipoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PesPessoaDocumentoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PesPessoaDocumentoData.java new file mode 100644 index 00000000..c693287e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PesPessoaDocumentoData.java @@ -0,0 +1,18 @@ +/* +* PesPessoaDocumentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PesPessoaDocumentoData extends db.data.siprp_local.inner.PesPessoaDocumento +{ + + public PesPessoaDocumentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PrestadoresData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PrestadoresData.java new file mode 100644 index 00000000..7d855c68 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PrestadoresData.java @@ -0,0 +1,18 @@ +/* +* PrestadoresData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PrestadoresData extends db.data.siprp_local.inner.Prestadores +{ + + public PrestadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PrestadoresGruposProtocoloData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PrestadoresGruposProtocoloData.java new file mode 100644 index 00000000..46ad4cd2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PrestadoresGruposProtocoloData.java @@ -0,0 +1,18 @@ +/* +* PrestadoresGruposProtocoloData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PrestadoresGruposProtocoloData extends db.data.siprp_local.inner.PrestadoresGruposProtocolo +{ + + public PrestadoresGruposProtocoloData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PrtElementosProtocoloData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PrtElementosProtocoloData.java new file mode 100644 index 00000000..a90aba18 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PrtElementosProtocoloData.java @@ -0,0 +1,18 @@ +/* +* PrtElementosProtocoloData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PrtElementosProtocoloData extends db.data.siprp_local.inner.PrtElementosProtocolo +{ + + public PrtElementosProtocoloData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PrtGruposProtocoloData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PrtGruposProtocoloData.java new file mode 100644 index 00000000..0789d2c4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PrtGruposProtocoloData.java @@ -0,0 +1,18 @@ +/* +* PrtGruposProtocoloData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PrtGruposProtocoloData extends db.data.siprp_local.inner.PrtGruposProtocolo +{ + + public PrtGruposProtocoloData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PrtTiposElementosProtocoloData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PrtTiposElementosProtocoloData.java new file mode 100644 index 00000000..b44b7da1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/PrtTiposElementosProtocoloData.java @@ -0,0 +1,18 @@ +/* +* PrtTiposElementosProtocoloData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PrtTiposElementosProtocoloData extends db.data.siprp_local.inner.PrtTiposElementosProtocolo +{ + + public PrtTiposElementosProtocoloData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TiposExamesCompData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TiposExamesCompData.java new file mode 100644 index 00000000..bcfd5279 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TiposExamesCompData.java @@ -0,0 +1,18 @@ +/* +* TiposExamesCompData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TiposExamesCompData extends db.data.siprp_local.inner.TiposExamesComp +{ + + public TiposExamesCompData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasData.java new file mode 100644 index 00000000..698423e0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresConsultasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresConsultasData extends db.data.siprp_local.inner.TrabalhadoresConsultas +{ + + public TrabalhadoresConsultasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasData.java new file mode 100644 index 00000000..126abd92 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresConsultasDatasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresConsultasDatasData extends db.data.siprp_local.inner.TrabalhadoresConsultasDatas +{ + + public TrabalhadoresConsultasDatasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasEmailsData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasEmailsData.java new file mode 100644 index 00000000..1dd76cfb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasEmailsData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresConsultasDatasEmailsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresConsultasDatasEmailsData extends db.data.siprp_local.inner.TrabalhadoresConsultasDatasEmails +{ + + public TrabalhadoresConsultasDatasEmailsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasObservacoesData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasObservacoesData.java new file mode 100644 index 00000000..56272c70 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasObservacoesData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresConsultasDatasObservacoesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresConsultasDatasObservacoesData extends db.data.siprp_local.inner.TrabalhadoresConsultasDatasObservacoes +{ + + public TrabalhadoresConsultasDatasObservacoesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresData.java new file mode 100644 index 00000000..5abfcdb3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresData extends db.data.siprp_local.inner.Trabalhadores +{ + + public TrabalhadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdData.java new file mode 100644 index 00000000..3096b8ed --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresEcdData extends db.data.siprp_local.inner.TrabalhadoresEcd +{ + + public TrabalhadoresEcdData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsAnaliseData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsAnaliseData.java new file mode 100644 index 00000000..ebe19019 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsAnaliseData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsAnaliseData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresEcdsAnaliseData extends db.data.siprp_local.inner.TrabalhadoresEcdsAnalise +{ + + public TrabalhadoresEcdsAnaliseData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsData.java new file mode 100644 index 00000000..1e37f77b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresEcdsData extends db.data.siprp_local.inner.TrabalhadoresEcds +{ + + public TrabalhadoresEcdsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasData.java new file mode 100644 index 00000000..dca02f91 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsDatasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresEcdsDatasData extends db.data.siprp_local.inner.TrabalhadoresEcdsDatas +{ + + public TrabalhadoresEcdsDatasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasEmailsData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasEmailsData.java new file mode 100644 index 00000000..b5e99d45 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasEmailsData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsDatasEmailsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresEcdsDatasEmailsData extends db.data.siprp_local.inner.TrabalhadoresEcdsDatasEmails +{ + + public TrabalhadoresEcdsDatasEmailsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasObservacoesData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasObservacoesData.java new file mode 100644 index 00000000..d7262b35 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasObservacoesData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsDatasObservacoesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresEcdsDatasObservacoesData extends db.data.siprp_local.inner.TrabalhadoresEcdsDatasObservacoes +{ + + public TrabalhadoresEcdsDatasObservacoesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresFichasAptidaoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresFichasAptidaoData.java new file mode 100644 index 00000000..54b190dd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresFichasAptidaoData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresFichasAptidaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresFichasAptidaoData extends db.data.siprp_local.inner.TrabalhadoresFichasAptidao +{ + + public TrabalhadoresFichasAptidaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresProcessoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresProcessoData.java new file mode 100644 index 00000000..3defc1fe --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/TrabalhadoresProcessoData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresProcessoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresProcessoData extends db.data.siprp_local.inner.TrabalhadoresProcesso +{ + + public TrabalhadoresProcessoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/VersaoData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/VersaoData.java new file mode 100644 index 00000000..5966e58b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/VersaoData.java @@ -0,0 +1,18 @@ +/* +* VersaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class VersaoData extends db.data.siprp_local.inner.Versao +{ + + public VersaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/VersionData.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/VersionData.java new file mode 100644 index 00000000..80068f97 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/data/siprp_local/outer/VersionData.java @@ -0,0 +1,18 @@ +/* +* VersionData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class VersionData extends db.data.siprp_local.inner.Version +{ + + public VersionData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/AnalisesActualDataProvider.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/AnalisesActualDataProvider.java new file mode 100644 index 00000000..9128c883 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/AnalisesActualDataProvider.java @@ -0,0 +1,24 @@ +/* + * AnalisesActualDataProvider.java + * + * Created on September 20, 2007, 1:41 PM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package db.providers; + +import com.sun.data.provider.impl.ObjectListDataProvider; + +/** + * + * @author lluis + */ +public class AnalisesActualDataProvider extends ObjectListDataProvider { + + /** Creates a new instance of AnalisesActualDataProvider */ + public AnalisesActualDataProvider() { + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/AnalisesConcluidasDataProvider.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/AnalisesConcluidasDataProvider.java new file mode 100644 index 00000000..77701e56 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/AnalisesConcluidasDataProvider.java @@ -0,0 +1,24 @@ +/* + * AnalisesConcluidasDataProvider.java + * + * Created on September 20, 2007, 1:43 PM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package db.providers; + +import com.sun.data.provider.impl.ObjectListDataProvider; + +/** + * + * @author lluis + */ +public class AnalisesConcluidasDataProvider extends ObjectListDataProvider { + + /** Creates a new instance of AnalisesConcluidasDataProvider */ + public AnalisesConcluidasDataProvider() { + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/AnalisesDataProvider.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/AnalisesDataProvider.java new file mode 100644 index 00000000..e294d3d7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/AnalisesDataProvider.java @@ -0,0 +1,2983 @@ +/* + * AnalisesDataProvider.java + * + * Created on September 20, 2007, 1:44 PM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package db.providers; + +import beans.Acidentado; +import beans.AnaliseAcidente; +import beans.Causa; +import beans.Controle; +import beans.Correcao; +import beans.Departamento; +import beans.Estabelecimento; +import beans.Medico; +import beans.Medida; +import beans.Recomendacao; +import beans.Seccao; +import beans.TecnicoSaude; +import beans.TipoUtilizador; +import beans.Trabalhador; +import com.evolute.utils.strings.StringPlainer; +import com.sun.rave.web.ui.model.Option; +import global.Global; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.Statement; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.HashMap; +import java.util.ListIterator; +import java.util.StringTokenizer; +import utils.Strings; +import utils.Utils; + +/** + * + * @author lluis + */ +public class AnalisesDataProvider extends GenericDataProvider +{ + private static AnalisesDataProvider INSTANCE = null; + +// private final static int ESTADO_SEG = 1; +// private final static int ESTADO_RH1 = 2; +// private final static int ESTADO_HS = 3; +// private final static int ESTADO_RH2 = 4; +// private final static int ESTADO_MEDICO = 5; +// private final static int ESTADO_ASSINATURAS = 6; +// private final static int ESTADO_IMPRESSAO = 7; +// private final static int ESTADO_FECHAR = 8; +// private final static int ESTADO_CONCLUIDO = 9; + + private final static int ESTADO_ASSINATURA_1 = 1; + private final static int ESTADO_ASSINATURA_2 = 2; + private final static int ESTADO_ASSINATURA_3 = 3; + + private final static int ESTADO_ASSINATURA_RESP_SEG = 1; + private final static int ESTADO_ASSINATURA_SEG = 2; + private final static int ESTADO_ASSINATURA_HS = 3; + private final static int ESTADO_ASSINATURA_MED = 4; + private final static int ESTADO_ASSINATURA_RH = 5; + private final static int ESTADO_ASSINATURA_RESP_RH = 6; + + + private AnalisesDataProvider() throws Exception + { + super(); + } + + public static synchronized AnalisesDataProvider getInstance() throws Exception + { + if ( INSTANCE == null ) + { + INSTANCE = new AnalisesDataProvider(); + } + return INSTANCE; + } + + public Controle getControle() throws Exception + { + Statement st = createStatement(); + String sql = "SELECT * FROM controle WHERE id = 1"; + ResultSet rs = st.executeQuery(sql); + rs.first(); + Controle c = new Controle(); + c.setId(new Integer( rs.getInt("id") )); + c.setAnalise_year( new Integer( rs.getInt( "analise_year" ) )); + c.setLast_analise_nr( new Integer( rs.getInt( "last_analise_nr" ) ) ); + return c; + } + + public Controle getControloByAno(Integer ano) throws Exception + { + Controle c = null; + Statement st = createStatement(); + String sql = "SELECT * FROM controle WHERE analise_year = " + ano; + ResultSet rs = st.executeQuery(sql); + + if(rs.isBeforeFirst()) + { + rs.first(); + c = new Controle(); + c.setId(new Integer( rs.getInt("id") )); + c.setAnalise_year( new Integer( rs.getInt( "analise_year" ) )); + c.setLast_analise_nr( new Integer( rs.getInt( "last_analise_nr" ) ) ); + } + return c; + } + + public Controle createAnoNumeracao(Integer ano) throws Exception + { + Controle c = new Controle(); + Integer newId = getMaxControleId(); + c.setId(newId); + c.setAnalise_year(ano); + c.setLast_analise_nr(new Integer(0)); + Statement st = createStatement(); + + String sql = "INSERT INTO controle (id, analise_year, last_analise_nr) VALUES ("; + sql += c.getId() + ", "; + sql += c.getAnalise_year() + ", "; + sql += c.getLast_analise_nr() + ")"; + st.execute(sql); + return c; + } + + public void updateControle( Controle c ) throws Exception + { + Statement st = createStatement(); + String sql = "UPDATE controle SET analise_year = " + c.getAnalise_year() + ", "; + sql += "last_analise_nr = " + c.getLast_analise_nr() + " "; + sql += "WHERE id = " + c.getId(); + st.execute(sql); + } + + + public String getExpression( String nome, String estabelecimento, String visitaDate, String POR ) + { + String tables = "analises_acidentes"; + String joinConditions = ""; + String whereExpression = "analises_acidentes.apagada = 'n' "; + + if ( nome != null || POR != null ) + { + tables += ", acidentados"; + joinConditions += "acidentados.id = analises_acidentes.acidentado_id AND "; + } + + + if ( nome != null ) + { + nome = StringPlainer.convertString( nome.trim() ); + nome = nome.replaceAll( " ", "%" ); + whereExpression += "AND plain_utf8( acidentados.nome ) LIKE '%" + nome + "%' "; + } + if ( estabelecimento != null ) + { + estabelecimento = StringPlainer.convertString( estabelecimento.trim() ); + estabelecimento = estabelecimento.replaceAll( " ", "%" ); + + tables += ", estabelecimentos"; + joinConditions += "analises_acidentes.estabelecimento_id = estabelecimentos.id AND "; + whereExpression += "AND plain_utf8( estabelecimentos.nome ) LIKE '%" + estabelecimento + "%' "; + } + if ( visitaDate != null ) + { + whereExpression += "AND analises_acidentes.data_acidente = '" + visitaDate + "' "; + } + if ( POR != null ) + { + whereExpression += "AND acidentados.numero_mecanografico LIKE '%" + POR.toUpperCase() + "%' "; + } + + return "SELECT * FROM " + tables + " WHERE " + joinConditions + whereExpression + " "; + } + + + + /*************************************************************************/ + /********************************* ACTUAIS *******************************/ + /*************************************************************************/ + + public ArrayList searchAnalisesActualSeg( Integer estabelecimento_id, + String nome, String visitaDate, String POR, String responsavel_loja ) + throws Exception + { + if ( nome == null && visitaDate == null && POR == null ) + { + return getAnalisesActuaisSegList( estabelecimento_id, responsavel_loja ); + } + + Statement st = createStatement(); + String sql = getExpression( nome, null, visitaDate, POR ); + + if ( responsavel_loja.matches( "y" ) ) + { + sql += "AND (estado = " + Global.ESTADO_SEG + " OR (averiguacao_posterior = 'y' AND averiguacao_obs = '')" + + " OR estado = " + Global.ESTADO_ASSINATURA_SEG + ")" + " AND estabelecimento_id = " + estabelecimento_id + + " ORDER BY analise_nr"; + } + else + { + sql += "AND (estado = " + Global.ESTADO_SEG + " OR (averiguacao_posterior = 'y' AND averiguacao_obs = ''))" + + " AND estabelecimento_id = " + estabelecimento_id + + " ORDER BY analise_nr"; + } + + System.out.println( "SQL: " + sql ); + ResultSet rs = st.executeQuery( sql ); + ArrayList list = fillAnaliseFields( rs ); + return list; + } + + public ArrayList getAnalisesActuaisSegList(Integer estabelecimento_id, String responsavel_loja) throws Exception + { + Statement st = createStatement(); + String sql = ""; + if(responsavel_loja.matches("y")) + { + sql ="SELECT * FROM analises_acidentes WHERE (estado = " + Global.ESTADO_SEG + " OR (averiguacao_posterior = 'y' AND averiguacao_obs = '')" + " OR estado = " + Global.ESTADO_ASSINATURA_SEG + ")" + " AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr"; + } + else + { + sql ="SELECT * FROM analises_acidentes WHERE (estado = " + Global.ESTADO_SEG + " OR (averiguacao_posterior = 'y' AND averiguacao_obs = ''))" + " AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr"; + } + + ResultSet rs = st.executeQuery(sql); + ArrayList list = fillAnaliseFields(rs); + return list; + } + + + public ArrayList searchAnalisesActualRH( Integer estabelecimento_id, + String nome, String visitaDate, String POR, String responsavel_loja ) + throws Exception + { + if ( nome == null && visitaDate == null && POR == null ) + { + return getAnalisesActuaisRhList( estabelecimento_id, responsavel_loja ); + } + + Statement st = createStatement(); + String sql = getExpression( nome, null, visitaDate, POR ); + + if(responsavel_loja.matches("y")) + { + sql += "AND (estado = " + Global.ESTADO_RH1 + " OR estado = " + Global.ESTADO_RH2 + + " OR estado = " + Global.ESTADO_ASSINATURA_RH + ") AND estabelecimento_id = " + estabelecimento_id + + " ORDER BY analise_nr"; + } + else + { + sql += "AND (estado = " + Global.ESTADO_RH1 + " OR estado = " + Global.ESTADO_RH2 + + ") AND estabelecimento_id = " + estabelecimento_id + + " ORDER BY analise_nr"; + } + + ResultSet rs = st.executeQuery( sql ); + ArrayList list = fillAnaliseFields( rs ); + return list; + } + + public ArrayList getAnalisesActuaisRhList(Integer estabelecimento_id, String responsavel_loja) throws Exception + { + Statement st = createStatement(); + String sql = ""; + if(responsavel_loja.matches("y")) + { + sql ="SELECT * FROM analises_acidentes WHERE (estado = " + Global.ESTADO_RH1 + " OR estado = " + Global.ESTADO_RH2 + " OR estado = " + Global.ESTADO_ASSINATURA_RH + ") AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr"; + } + else + { + sql ="SELECT * FROM analises_acidentes WHERE (estado = " + Global.ESTADO_RH1 + " OR estado = " + Global.ESTADO_RH2 + ") AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr"; + } + + ResultSet rs = st.executeQuery(sql); + ArrayList list = fillAnaliseFields(rs); + return list; + } + + + public ArrayList searchAnalisesActuaisHS( Integer estabelecimento_id, + String nome, String estabelecimento, String visitaDate, String POR ) + throws Exception + { + if ( nome == null && estabelecimento == null && visitaDate == null && POR == null ) + { + return getAnalisesActuaisHsList( estabelecimento_id ); + } + + Statement st = createStatement(); + String sql = getExpression( nome, estabelecimento, visitaDate, POR ); + + sql += "AND (estado = " + Global.ESTADO_HS + " OR estado = " + Global.ESTADO_FECHAR + + " OR estado = " + Global.ESTADO_CONSOLIDACAO + ")" + + " ORDER BY analise_nr"; + + ResultSet rs = st.executeQuery( sql ); + ArrayList list = fillAnaliseFields( rs ); + return list; + } + + public ArrayList getAnalisesActuaisHsList(Integer estabelecimento_id) throws Exception + { + Statement st = createStatement(); + String sql ="SELECT * FROM analises_acidentes WHERE (estado = " + Global.ESTADO_HS + " OR estado = " + Global.ESTADO_FECHAR + " OR estado = " + Global.ESTADO_CONSOLIDACAO + ")" + " AND apagada = 'n' ORDER BY analise_nr"; //AND estabelecimento_id = " + estabelecimento_id; + ResultSet rs = st.executeQuery(sql); + ArrayList list = fillAnaliseFields(rs); + return list; + } + +// public ArrayList searchAnalisesActuaisMedico( Integer estabelecimento_id, String nome ) +// throws Exception +// { +// if ( nome == null ) +// { +// return getAnalisesActuaisMedicoList( estabelecimento_id ); +// } +// +// Statement st = createStatement(); +// String sql = getExpression( nome, null ); +// +// sql += "AND (estado = " + Global.ESTADO_MEDICINA + " OR (estado = " + Global.ESTADO_ASSINATURAS + +// " AND estado_assinatura = 2 and ass_med = 'n')) AND estabelecimento_id = " + estabelecimento_id; +// +// ResultSet rs = st.executeQuery( sql ); +// ArrayList list = fillAnaliseFields( rs ); +// return list; +// } + +// public ArrayList getAnalisesActuaisMedicoList(Integer estabelecimento_id) throws Exception +// { +// Statement st = createStatement(); +// String sql ="SELECT * FROM analises_acidentes WHERE (estado = " + Global.ESTADO_MEDICINA + " OR (estado = " + Global.ESTADO_ASSINATURAS + " AND estado_assinatura = 2 and ass_med = 'n')) AND estabelecimento_id = " + estabelecimento_id; +// ResultSet rs = st.executeQuery(sql); +// ArrayList list = fillAnaliseFields(rs); +// return list; +// } + + + + + /*************************************************************************/ + /******************************* SEGUIMENTO ******************************/ + /*************************************************************************/ + + public ArrayList searchAnalisesSeguimentoSeg( Integer estabelecimento_id, + String nome, String visitaDate, String POR, String responsavel_loja ) + throws Exception + { + if ( nome == null && visitaDate == null && POR == null ) + { + return getAnalisesSeguimentoSegList( estabelecimento_id, responsavel_loja ); + } + + Statement st = createStatement(); + String sql = getExpression( nome, null, visitaDate, POR ); + + if ( responsavel_loja.matches( "y" ) ) + { + sql += "AND estabelecimento_id = " + estabelecimento_id + " AND (" + + "estado > " + Global.ESTADO_SEG + " AND estado < " + Global.ESTADO_ASSINATURA_SEG + " AND (" + + "averiguacao_posterior = 'n' OR (averiguacao_posterior = 'y' AND averiguacao_obs <> '')" + + ") " + + "OR (estado > " + Global.ESTADO_ASSINATURA_SEG + " AND estado < " + Global.ESTADO_CONCLUIDO + ")" + + ")" + " ORDER BY analise_nr"; + } + else + { + sql += "AND estabelecimento_id = " + estabelecimento_id + " AND (" + + "(estado > " + Global.ESTADO_SEG + " AND estado < " + Global.ESTADO_FECHAR + " AND (" + + "averiguacao_posterior = 'n' OR (averiguacao_posterior = 'y' AND averiguacao_obs <> '')" + + ")) OR estado = " + Global.ESTADO_FECHAR + + ")" + " ORDER BY analise_nr"; + } + System.out.println( "SQL: " + sql ); + ResultSet rs = st.executeQuery( sql ); + ArrayList list = fillAnaliseFields( rs ); + return list; + } + + public ArrayList getAnalisesSeguimentoSegList( Integer estabelecimento_id, String responsavel_loja ) + throws Exception + { + Statement st = createStatement(); + String sql = null; + + if ( responsavel_loja.matches( "y" ) ) + { + sql ="SELECT * FROM analises_acidentes WHERE " + + "estabelecimento_id = " + estabelecimento_id + " AND (" + + "estado > " + Global.ESTADO_SEG + " AND estado < " + Global.ESTADO_ASSINATURA_SEG + " AND (" + + "averiguacao_posterior = 'n' OR (averiguacao_posterior = 'y' AND averiguacao_obs <> '')" + + ") " + + "OR (estado > " + Global.ESTADO_ASSINATURA_SEG + " AND estado < " + Global.ESTADO_CONCLUIDO + ")" + + ")" + " AND apagada = 'n' " + + "ORDER BY analise_nr"; +// sql ="SELECT * FROM analises_acidentes WHERE estabelecimento_id = " + estabelecimento_id + " AND ((estado = 7 and ass_resp_seg = 'y') OR (estado > 1 AND estado < 7 AND (averiguacao_posterior = 'n' OR (averiguacao_posterior = 'y' AND averiguacao_obs <> ''))) OR (estado > 7 AND estado < 10))"; + } + else + { +// sql ="SELECT * FROM analises_acidentes WHERE estabelecimento_id = " + estabelecimento_id + " AND ((estado > " + Global.ESTADO_SEG + " AND estado < 8 AND (averiguacao_posterior = 'n' OR (averiguacao_posterior = 'y' AND averiguacao_obs <> ''))) OR (estado > 7 AND estado < 10))"; + sql ="SELECT * FROM analises_acidentes WHERE " + + "estabelecimento_id = " + estabelecimento_id + " AND (" + + "(estado > " + Global.ESTADO_SEG + " AND estado < " + Global.ESTADO_FECHAR + " AND (" + + "averiguacao_posterior = 'n' OR (averiguacao_posterior = 'y' AND averiguacao_obs <> '')" + + ")) OR estado = " + Global.ESTADO_FECHAR + + ")" + " AND apagada = 'n' " + + "ORDER BY analise_nr"; + } + + ResultSet rs = st.executeQuery( sql ); + ArrayList list = fillAnaliseFields( rs ); + return list; + } + + public ArrayList searchAnalisesSeguimentoHS( Integer estabelecimento_id, + String nome, String estabelecimento, String visitaDate, String POR ) + throws Exception + { + if ( nome == null && estabelecimento == null && visitaDate == null && POR == null ) + { + return getAnalisesSeguimentoHsList( estabelecimento_id ); + } + + Statement st = createStatement(); + String sql = getExpression( nome, estabelecimento, visitaDate, POR ); + + sql += "AND (" + + "estado < " + Global.ESTADO_HS + " OR (estado > " + Global.ESTADO_HS + " AND estado < " + Global.ESTADO_CONSOLIDACAO + ") " + + "OR (estado > " + Global.ESTADO_CONSOLIDACAO + " AND estado < " + Global.ESTADO_FECHAR + ")" + + ")" + " ORDER BY analise_nr"; + + ResultSet rs = st.executeQuery( sql ); + ArrayList list = fillAnaliseFields( rs ); + return list; + } + + public ArrayList getAnalisesSeguimentoHsList( Integer estabelecimento_id ) + throws Exception + { + Statement st = createStatement(); + String sql = null; + + sql = "SELECT * FROM analises_acidentes WHERE (" + + "estado < " + Global.ESTADO_HS + " OR (estado > " + Global.ESTADO_HS + " AND estado < " + Global.ESTADO_CONSOLIDACAO + ") " + + "OR (estado > " + Global.ESTADO_CONSOLIDACAO + " AND estado < " + Global.ESTADO_FECHAR + ")" + + ")" + " AND apagada = 'n' " + + "ORDER BY analise_nr"; // AND estabelecimento_id = " + estabelecimento_id; + + ResultSet rs = st.executeQuery(sql); + System.out.println("SEGUIMENTO HS SQL : " + sql); + ArrayList list = fillAnaliseFields(rs); + return list; + } + + + public ArrayList searchAnalisesSeguimentoRH( Integer estabelecimento_id, + String nome, String visitaDate, String POR, String responsavel_loja ) + throws Exception + { + if ( nome == null && visitaDate == null && POR == null ) + { + return getAnalisesSeguimentoRhList( estabelecimento_id, responsavel_loja ); + } + + Statement st = createStatement(); + String sql = getExpression( nome, null, visitaDate, POR ); + + if ( responsavel_loja.matches( "y" ) ) + { + sql += "AND (estado = " + Global.ESTADO_SEG + " OR estado = " + Global.ESTADO_HS + + " OR estado = " + Global.ESTADO_CONSOLIDACAO + " OR estado = " + Global.ESTADO_ASSINATURA_SEG + + " OR estado = " + Global.ESTADO_FECHAR + ") AND estabelecimento_id = " + estabelecimento_id + + " ORDER BY analise_nr"; + } + else + { + sql += "AND ( estado = " + Global.ESTADO_SEG + " OR estado = " + Global.ESTADO_HS + + " OR estado = " + Global.ESTADO_CONSOLIDACAO + " OR estado = " + Global.ESTADO_ASSINATURA_SEG + + " OR estado = " + Global.ESTADO_ASSINATURA_RH + " OR estado = " + Global.ESTADO_FECHAR + + ") AND estabelecimento_id = " + estabelecimento_id + + " ORDER BY analise_nr"; + } + ResultSet rs = st.executeQuery( sql ); + ArrayList list = fillAnaliseFields( rs ); + return list; + } + + public ArrayList getAnalisesSeguimentoRhList( Integer estabelecimento_id, String responsavel_loja ) + throws Exception + { + Statement st = createStatement(); + String sql = null; + + if ( responsavel_loja.matches( "y" ) ) + { +// sql ="SELECT * FROM analises_acidentes WHERE (estado = 1 OR estado = 3 OR estado = 6 OR (estado = 7 AND estado_assinatura < 2) OR estado = 9) AND estabelecimento_id = " + estabelecimento_id; +// sql ="SELECT * FROM analises_acidentes WHERE (estado = 1 OR estado = 3 OR estado = 6 OR (estado = 7 AND estado_assinatura < 2) OR (estado = 7 and ass_resp_rh = 'y') OR estado = 9) AND estabelecimento_id = " + estabelecimento_id; + sql ="SELECT * FROM analises_acidentes WHERE (" + + "estado = " + Global.ESTADO_SEG + " OR estado = " + Global.ESTADO_HS + " OR estado = " + Global.ESTADO_CONSOLIDACAO + + " OR estado = " + Global.ESTADO_ASSINATURA_SEG + " OR estado = " + Global.ESTADO_FECHAR + + ") AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' " + + "ORDER BY analise_nr"; + } + else + { + sql ="SELECT * FROM analises_acidentes WHERE (" + + "estado = " + Global.ESTADO_SEG + " OR estado = " + Global.ESTADO_HS + " OR estado = " + Global.ESTADO_CONSOLIDACAO + + " OR estado = " + Global.ESTADO_ASSINATURA_SEG + " OR estado = " + Global.ESTADO_ASSINATURA_RH + " OR estado = " + Global.ESTADO_FECHAR + + ") AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' " + + "ORDER BY analise_nr"; + } + + ResultSet rs = st.executeQuery(sql); + ArrayList list = fillAnaliseFields(rs); + return list; + } + + + public ArrayList searchAnalisesSeguimentoMedico( Integer estabelecimento_id, + String nome, String visitaDate, String POR ) + throws Exception + { + if ( nome == null && visitaDate == null && POR == null ) + { + return getAnalisesSeguimentoMedList( estabelecimento_id ); + } + + Statement st = createStatement(); + String sql = getExpression( nome, null, visitaDate, POR ); + + sql += "AND estado < 5 OR (estado = 6 AND estado_assinatura <> 2) OR (estado = 6 AND estado_assinatura = 2 AND ass_med = 'y') " + + "OR (estado > 6 AND estado < 9) " + + "AND estabelecimento_id = " + estabelecimento_id + + " ORDER BY analise_nr"; + + ResultSet rs = st.executeQuery(sql); + ArrayList list = fillAnaliseFields(rs); + return list; + } + + public ArrayList getAnalisesSeguimentoMedList( Integer estabelecimento_id ) + throws Exception + { + Statement st = createStatement(); + String sql = null; + + sql = "SELECT * FROM analises_acidentes WHERE " + + "estado < 5 OR (estado = 6 AND estado_assinatura <> 2) OR (estado = 6 AND estado_assinatura = 2 AND ass_med = 'y') " + + "OR (estado > 6 AND estado < 9) " + + "AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' " + + "ORDER BY analise_nr"; + + ResultSet rs = st.executeQuery(sql); + ArrayList list = fillAnaliseFields(rs); + return list; + } + + + public ArrayList searchAnalisesSeguimentoDirSiprp( + String nome, String estabelecimento, String visitaDate, String POR ) + throws Exception + { + if ( nome == null && estabelecimento == null && visitaDate == null && POR == null ) + { + return getAnalisesSeguimentoDirSiprpList(); + } + + Statement st = createStatement(); + String sql = getExpression( nome, estabelecimento, visitaDate, POR ); + sql += " AND estado < " + Global.ESTADO_CONCLUIDO + " ORDER BY analise_nr"; + + ResultSet rs = st.executeQuery(sql); + ArrayList list = fillAnaliseFields(rs); + return list; + } + + public ArrayList getAnalisesSeguimentoDirSiprpList() throws Exception + { + Statement st = createStatement(); + String sql = null; + + sql = "SELECT * FROM analises_acidentes WHERE estado < " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; + + ResultSet rs = st.executeQuery(sql); + ArrayList list = fillAnaliseFields(rs); + return list; + } + + public ArrayList searchAnalisesSeguimentoDirGerRh( + String nome, String estabelecimento, String visitaDate, String POR ) + throws Exception + { + return searchAnalisesSeguimentoDirSiprp( nome, estabelecimento, visitaDate, POR ); + } + + public ArrayList getAnalisesSeguimentoDirGerRhList() throws Exception + { + return getAnalisesSeguimentoDirSiprpList(); +// Statement st = createStatement(); +// String sql = null; +// +// sql ="SELECT * FROM analises_acidentes WHERE estado < " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; +// +// ResultSet rs = st.executeQuery(sql); +// ArrayList list = fillAnaliseFields(rs); +// return list; + } + + public ArrayList searchAnalisesSeguimentoGestor( Integer estabelecimento_id, + String nome, String estabelecimento, String visitaDate, String POR ) + throws Exception + { + if ( nome == null && estabelecimento == null && visitaDate == null && POR == null ) + { + return getAnalisesSeguimentoGestorList( estabelecimento_id ); + } + + Statement st = createStatement(); + String sql = getExpression( nome, estabelecimento, visitaDate, POR ); + + if ( estabelecimento_id == null ) + { + sql += "AND estado < " + Global.ESTADO_CONCLUIDO + + " ORDER BY analise_nr"; + } + else + { + sql += "AND estado < " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + + " ORDER BY analise_nr"; + } + + ResultSet rs = st.executeQuery(sql); + ArrayList list = fillAnaliseFields(rs); + return list; + } + + public ArrayList getAnalisesSeguimentoGestorList( Integer estabelecimento_id ) + throws Exception + { + Statement st = createStatement(); + String sql = null; + + if ( estabelecimento_id == null ) + { + sql = "SELECT * FROM analises_acidentes WHERE " + + "estado < " + Global.ESTADO_CONCLUIDO + + " AND apagada = 'n' " + + "ORDER BY analise_nr"; + } + else + { + sql = "SELECT * FROM analises_acidentes WHERE " + + "estado < " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + + " AND apagada = 'n' " + + "ORDER BY analise_nr"; + } + + + ResultSet rs = st.executeQuery(sql); + ArrayList list = fillAnaliseFields(rs); + return list; + } + + + + + + /*************************************************************************/ + /****************************** CONCLUIDOS *******************************/ + /*************************************************************************/ + + public ArrayList getAnalisesConcluidasList(Integer estabelecimento_id) throws Exception + { + Statement st = createStatement(); + String sql = ""; + if(estabelecimento_id == null) + { + sql ="SELECT * FROM analises_acidentes WHERE estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; + } + else + { + sql ="SELECT * FROM analises_acidentes WHERE estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr"; + } + + ResultSet rs = st.executeQuery(sql); + ArrayList list = fillAnaliseFields(rs); + + return list; + } + + public ArrayList getAnalisesConcluidasHsList() throws Exception + { + Statement st = createStatement(); + String sql ="SELECT * FROM analises_acidentes WHERE estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; + ResultSet rs = st.executeQuery(sql); + ArrayList list = fillAnaliseFields(rs); + + return list; + } + + public ArrayList searchAanalisesConcluidasList( Integer estabelecimento_id, + Integer ano, Integer mes, Integer dia, String POR, String nome, String estabelecimento ) + throws Exception + { + String sql = null; + + sql = getExpression( nome, estabelecimento, null, POR ); + + if ( estabelecimento_id != null && estabelecimento_id.intValue() > 0 ) + { + sql += "AND analises_acidentes.estabelecimento_id = " + estabelecimento_id + " "; + } + + if ( ano != null ) + { + final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + Calendar calendar_from = Calendar.getInstance(); + Calendar calendar_to = Calendar.getInstance(); + + calendar_from.set( Calendar.YEAR, ano.intValue() ); + calendar_from.set( Calendar.MONTH, 0 ); + calendar_from.set( Calendar.DATE, 1 ); + + calendar_to.set( Calendar.YEAR, ano.intValue() ); + calendar_to.set( Calendar.MONTH, 11 ); + calendar_to.set( Calendar.DATE, 31 ); + + if ( mes != null ) + { + calendar_from.set( Calendar.MONTH, mes.intValue() - 1 ); + calendar_to.set( Calendar.MONTH, mes.intValue() - 1 ); + + if ( dia != null ) + { + calendar_from.set( Calendar.DATE, dia.intValue() ); + calendar_to.set( Calendar.DATE, dia.intValue() ); + } + else + { + calendar_from.set( Calendar.DATE, 1 ); + calendar_to.set( Calendar.DATE, 31 ); + } + } + else + { + calendar_from.set( Calendar.MONTH, 0 ); + calendar_to.set( Calendar.MONTH, 11 ); + } + + Date dateStart = calendar_from.getTime(); + Date dateEnd = calendar_to.getTime(); + + if ( dateStart.compareTo( dateEnd ) == 0 ) + { + sql += "AND analises_acidentes.data_acidente = '" + D_F.format( dateStart ) + "' "; + } + else + { + sql += "AND ( analises_acidentes.data_acidente >= '" + D_F.format( dateStart ) + "' AND analises_acidentes.data_acidente <= '" + D_F.format( dateEnd ) + "' ) "; + } + } + + sql += "AND estado = " + Global.ESTADO_CONCLUIDO + " ORDER BY analises_acidentes.analise_nr ASC"; + + System.out.println( "CONCLUIDAS SQL: " + sql ); + + Statement st = createStatement(); + ResultSet rs = st.executeQuery( sql ); + ArrayList list = fillAnaliseFields( rs ); + return list; + } + + + //by lino +// public ArrayList searchAanalisesConcluidasList( Integer estabelecimento_id, +// Integer ano, Integer mes, Integer dia, String por, String nome, String estabelecimento ) +// throws Exception +// { +// Calendar cal = Calendar.getInstance(); +// Statement st = createStatement(); +// String sql = ""; +// if(por != null) +// { +// por = por.toUpperCase(); +// } +// if(nome != null) +// { +// nome = nome.toUpperCase(); +// } +// +// if( ano != null) +// { +// if( mes != null) +// { +// if( dia != null) +// { +// cal.set( cal.YEAR, ano.intValue() ); +// cal.set( cal.MONTH, mes.intValue() -1 ); +// cal.set( cal.DATE, dia.intValue() ); +// java.sql.Date data_acidente = new java.sql.Date( cal.getTime().getTime() ); +// if(por != null && nome != null) +// { +// if(estabelecimento_id == null) +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente = '" + data_acidente + +// "' AND (numero_mecanografico LIKE '%" + por + "%' OR nome LIKE '%" + nome + "%') " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente = '" + data_acidente + +// "' AND (numero_mecanografico LIKE '%" + por + "%' OR nome LIKE '%" + nome + "%') " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// } +// else if(por != null) +// { +// if(estabelecimento_id == null) +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente = '" + data_acidente + +// "' AND numero_mecanografico LIKE '%" + por + "%' AND estado = " + Global.ESTADO_CONCLUIDO + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente = '" + data_acidente + +// "' AND numero_mecanografico LIKE '%" + por + "%' AND estado = " + Global.ESTADO_CONCLUIDO + +// " AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr"; +// } +// +// } +// else if( nome != null) +// { +// if(estabelecimento_id == null) +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente = '" + data_acidente + +// "' AND nome LIKE '%" + nome + "%' AND estado = " + Global.ESTADO_CONCLUIDO + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente = '" + data_acidente + +// "' AND nome LIKE '%" + nome + "%' AND estado = " + Global.ESTADO_CONCLUIDO + +// " AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr"; +// } +// } +// else +// { +// if(estabelecimento_id == null) +// { +// sql = "SELECT * FROM analises_acidentes " + +// "WHERE data_acidente = '" + data_acidente + "' AND estado = " + Global.ESTADO_CONCLUIDO + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * FROM analises_acidentes " + +// "WHERE data_acidente = '" + data_acidente + "' AND estado = " + Global.ESTADO_CONCLUIDO + +// " AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr"; +// } +// } +// } +// else +// { +// cal.set( cal.YEAR, ano.intValue() ); +// cal.set( cal.MONTH, mes.intValue() -1 ); +// cal.set( cal.DATE, 1 ); +// java.sql.Date data_acidente_from = new java.sql.Date( cal.getTime().getTime() ); +// cal.set( cal.DATE, 31 ); +// java.sql.Date data_acidente_to = new java.sql.Date( cal.getTime().getTime() ); +// if(por != null && nome != null) +// { +// if(estabelecimento_id == null) +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from + +// "' AND data_acidente <= '" + data_acidente_to + +// "' AND (numero_mecanografico LIKE '%" + por + "%' OR nome LIKE '%" + nome + "%') " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from + +// "' AND data_acidente <= '" + data_acidente_to + +// "' AND (numero_mecanografico LIKE '%" + por + "%' OR nome LIKE '%" + nome + "%') " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// } +// else if(por != null) +// { +// if(estabelecimento_id == null) +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from + +// "' AND data_acidente <= '" + data_acidente_to + "' AND numero_mecanografico LIKE '%" + por + "%' " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from + +// "' AND data_acidente <= '" + data_acidente_to + "' AND numero_mecanografico LIKE '%" + por + "%' " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// +// } +// else if( nome != null) +// { +// if(estabelecimento_id == null) +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from + +// "' AND data_acidente <= '" + data_acidente_to + "' AND nome LIKE '%" + nome + "%' " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * FROM analises_acidentes, acidentados" + +// " WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from + +// "' AND data_acidente <= '" + data_acidente_to + "' AND nome LIKE '%" + nome + "%' " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// } +// else +// { +// if(estabelecimento_id == null) +// { +// sql = "SELECT * FROM analises_acidentes " + +// "WHERE data_acidente >= '" + data_acidente_from + "' AND data_acidente <= '" + data_acidente_to + +// "' AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * FROM analises_acidentes " + +// "WHERE data_acidente >= '" + data_acidente_from + "' AND data_acidente <= '" + data_acidente_to + +// "' AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// +// } +// } // dia +// } // mes +// else +// { +// cal.set( cal.YEAR, ano.intValue() ); +// cal.set( cal.MONTH, 0 ); +// cal.set( cal.DATE, 1 ); +// java.sql.Date data_acidente_from = new java.sql.Date( cal.getTime().getTime() ); +// cal.set( cal.MONTH, 11 ); +// cal.set( cal.DATE, 31 ); +// java.sql.Date data_acidente_to = new java.sql.Date( cal.getTime().getTime() ); +// if(por != null && nome != null) +// { +// if(estabelecimento_id == null) +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from + +// "' AND data_acidente <= '" + data_acidente_to + +// "' AND (numero_mecanografico LIKE '%" + por + "%' OR nome LIKE '%" + nome + "%') " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from + +// "' AND data_acidente <= '" + data_acidente_to + +// "' AND (numero_mecanografico LIKE '%" + por + "%' OR nome LIKE '%" + nome + "%') " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// } +// else if(por != null) +// { +// if(estabelecimento_id == null) +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from + +// "' AND data_acidente <= '" + data_acidente_to + +// "' AND numero_mecanografico LIKE '%" + por + "%' AND estado = " + Global.ESTADO_CONCLUIDO + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from + +// "' AND data_acidente <= '" + data_acidente_to + "' AND numero_mecanografico LIKE '%" + por + "%' " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// +// } +// else if( nome != null) +// { +// if(estabelecimento_id == null) +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from + +// "' AND data_acidente <= '" + data_acidente_to + "' AND nome LIKE '%" + nome + "%' " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from + +// "' AND data_acidente <= '" + data_acidente_to + "' AND nome LIKE '%" + nome + "%' " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// } +// else +// { +// if(estabelecimento_id == null) +// { +// sql = "SELECT * FROM analises_acidentes " + +// "WHERE data_acidente >= '" + data_acidente_from + "' AND data_acidente <= '" + data_acidente_to + +// "' AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * FROM analises_acidentes " + +// "WHERE data_acidente >= '" + data_acidente_from + "' AND data_acidente <= '" + data_acidente_to + +// "' AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// } +// } +// } // ano +// else +// { +// if(por != null && nome != null) +// { +// if(estabelecimento_id == null) +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND (numero_mecanografico LIKE '%" + por + "%' OR nome LIKE '%" + nome + "%') " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND (numero_mecanografico LIKE '%" + por + "%' OR nome LIKE '%" + nome + "%') " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// } +// else if(por != null) +// { +// if(estabelecimento_id == null) +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND numero_mecanografico LIKE '%" + por + "%' " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND numero_mecanografico LIKE '%" + por + "%' " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// +// } +// else if( nome != null ) +// { +// if(estabelecimento_id == null) +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND nome LIKE '%" + nome + "%' " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * FROM analises_acidentes, acidentados " + +// "WHERE acidentado_id = acidentados.id AND nome LIKE '%" + nome + "%' " + +// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// +// } +// else +// { +// if(estabelecimento_id == null) +// { +// sql = "SELECT * FROM analises_acidentes " + +// "WHERE estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * FROM analises_acidentes " + +// "WHERE estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + +// " AND apagada = 'n' ORDER BY analise_nr"; +// } +// +// } +// } +// ResultSet rs = st.executeQuery(sql); +// ArrayList list = fillAnaliseFields(rs); +// +// return list; +// } + + private ArrayList fillAnaliseFields( ResultSet rs ) throws Exception + { +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); +// Statement stlocal1 = dblocal.createStatement(); + + ArrayList list = new ArrayList(); + if ( ! rs.isBeforeFirst() ) //rs empty + { + return list; + } + + Statement stlocal = createLocalStatement(); + Statement stlocal1 = createLocalStatement(); + + rs.first(); + int nr = 0; + do + { + AnaliseAcidente a = new AnaliseAcidente(); + a.setId(new Integer(rs.getInt("id"))); + + nr++; + a.setNr(new Integer(nr)); + a.setData_acidente(rs.getDate("data_acidente")); + a.setEmpresa_id(new Integer(rs.getInt("empresa_id"))); + a.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id"))); + String sqllocal1 = "SELECT nome FROM estabelecimentos WHERE id = " + a.getEstabelecimento_id(); + ResultSet rslocal1 = stlocal1.executeQuery(sqllocal1); + rslocal1.first(); + a.setNome_estabelecimento( utils.Utils.unicodeToHTML( rslocal1.getString("nome") ) ); + + a.setEstado(new Integer(rs.getInt("estado"))); + a.setEstado_assinatura(new Integer(rs.getInt("estado_assinatura"))); + a.setFase(getFase(a.getEstado().intValue())); + a.setAcidentado_id(new Integer( rs.getInt("acidentado_id"))); + Acidentado ac = getAcidentado(a.getAcidentado_id()); + String sqllocal = "SELECT nome, numero_mecanografico FROM trabalhadores WHERE id = " + ac.getTrabalhador_id(); + ResultSet rslocal = stlocal.executeQuery(sqllocal); + String nome_acidentado = ""; + String numero_mecanografico = ""; + if ( rslocal.first() ) + { + nome_acidentado = rslocal.getString("nome"); + numero_mecanografico = rslocal.getString( "numero_mecanografico" ); + } + a.setNome_acidentado(utils.Utils.unicodeToHTML(nome_acidentado)); + a.setNumero_mecanografico( numero_mecanografico ); + Object horas_turno = rs.getObject("horas_turno"); + if(horas_turno == null) + { + a.setHoras_turno(null); + } + else + { + a.setHoras_turno(new Integer(rs.getInt("horas_turno"))); + } + + a.setAveriguador(rs.getString("averiguador")); + //a.setSeccao(rs.getString("seccao")); + a.setDepartamento_id( new Integer(rs.getInt("departamento_id")) ); + a.setSeccao_id( new Integer(rs.getInt("seccao_id")) ); + a.setLocal_trabalho(rs.getString("local_trabalho")); + a.setTarefa(rs.getString("tarefa")); + a.setSubstancias(rs.getString("substancias")); +// a.setSuperior_hierarquico(rs.getString("superior_hierarquico")); + a.setCondicoes(rs.getString("condicoes")); + a.setTestemunhas(rs.getString("testemunhas")); + a.setCausas( new Integer(rs.getInt("causas")) ); + a.setDescricao(rs.getString("descricao")); + a.setConclusoes(rs.getString("conclusoes")); + a.setAccoes(rs.getString("accoes")); + a.setAveriguacao_posterior(rs.getString("averiguacao_posterior")); + a.setAveriguacao_obs(rs.getString("averiguacao_obs")); + + a.setHora_acidente(rs.getTime("hora_acidente")); + a.setFormacao_shst(rs.getString("formacao_shst")); + Object o = rs.getString("formacao_shst_nao_porque"); + if(o == null) + { + a.setFormacao_shst_nao_porque(""); + } + else + { + a.setFormacao_shst_nao_porque(rs.getString("formacao_shst_nao_porque")); + } + a.setOutros_acidentes_com_colaborador(rs.getString("outros_acidentes_com_colaborador")); + a.setNr_acidentes_com_colaborador(new Integer(rs.getInt("nr_acidentes_com_colaborador"))); + a.setNr_relatorio_acidente_colaborador1(new Integer(rs.getInt("nr_relatorio_acidente_colaborador1"))); + a.setNr_relatorio_acidente_colaborador2(new Integer(rs.getInt("nr_relatorio_acidente_colaborador2"))); + a.setNr_relatorio_acidente_colaborador3(new Integer(rs.getInt("nr_relatorio_acidente_colaborador3"))); + a.setNr_relatorio_acidente_colaborador4(new Integer(rs.getInt("nr_relatorio_acidente_colaborador4"))); + a.setAcidentes_outros_colaboradores(rs.getString("acidentes_outros_colaboradores")); + a.setNr_acidentes_outros_colaboradores(new Integer(rs.getInt("nr_acidentes_outros_colaboradores"))); + a.setNr_relatorio_acidente_outros_colaboradores1(new Integer(rs.getInt("nr_relatorio_acidente_outros_colaboradores1"))); + a.setNr_relatorio_acidente_outros_colaboradores2(new Integer(rs.getInt("nr_relatorio_acidente_outros_colaboradores2"))); + a.setNr_relatorio_acidente_outros_colaboradores3(new Integer(rs.getInt("nr_relatorio_acidente_outros_colaboradores3"))); + a.setNr_relatorio_acidente_outros_colaboradores4(new Integer(rs.getInt("nr_relatorio_acidente_outros_colaboradores4"))); + + a.setLesao_cabeca(rs.getString("lesao_cabeca")); + a.setLesao_pescoco(rs.getString("lesao_pescoco")); + a.setLesao_tronco(rs.getString("lesao_tronco")); + a.setLesao_membro_sup_dir(rs.getString("lesao_membro_sup_dir")); + a.setLesao_membro_sup_esq(rs.getString("lesao_membro_sup_esq")); + a.setLesao_membro_inf_dir(rs.getString("lesao_membro_inf_dir")); + a.setLesao_membro_inf_esq(rs.getString("lesao_membro_inf_esq")); + Object ob = rs.getString("especif1"); + if(ob == null) + { + a.setEspecif1(""); + } + else + { + a.setEspecif1(rs.getString("especif1")); + } + ob = rs.getString("especif2"); + if(ob == null) + { + a.setEspecif2(""); + } + else + { + a.setEspecif2(rs.getString("especif2")); + } + ob = rs.getString("especif3"); + if(ob == null) + { + a.setEspecif3(""); + } + else + { + a.setEspecif3(rs.getString("especif3")); + } + ob = rs.getString("especif4"); + if(ob == null) + { + a.setEspecif4(""); + } + else + { + a.setEspecif4(rs.getString("especif4")); + } + ob = rs.getString("tipo_lesao"); + if(ob == null) + { + a.setTipo_lesao(""); + } + else + { + a.setTipo_lesao(rs.getString("tipo_lesao")); + } + a.setTipo_incapacidade(rs.getString("tipo_incapacidade")); + //a.setCoef_incapacidade(new Integer(( rs.getInt("coef_incapacidade") ))); + a.setCoef_incapacidade((Integer) rs.getObject("coef_incapacidade")); + a.setData_aval_incapacidade(rs.getDate("data_aval_incapacidade")); + a.setData_rev_incapacidade(rs.getDate("data_rev_incapacidade")); + a.setPeriodo_incapacidade_de(rs.getDate("periodo_incapacidade_de")); + a.setPeriodo_incapacidade_a(rs.getDate("periodo_incapacidade_a")); + a.setImg_flexao(rs.getString("img_flexao")); + a.setImg_ext1(rs.getString("img_ext1")); + a.setImg_ext2(rs.getString("img_ext2")); + a.setImg_cab2(rs.getString("img_cab2")); + a.setImg_cab3(rs.getString("img_cab3")); + a.setImg_ma2(rs.getString("img_ma2")); + a.setImg_ma3(rs.getString("img_ma3")); + a.setImg_ma5(rs.getString("img_ma5")); + a.setImg_ma6(rs.getString("img_ma6")); + a.setImg_ma8(rs.getString("img_ma8")); + a.setImg_ma10(rs.getString("img_ma10")); + a.setImg_rot1(rs.getString("img_rot1")); + a.setImg_rot2(rs.getString("img_rot2")); + a.setImg_cab1(rs.getString("img_cab1")); + a.setImg_cab4(rs.getString("img_cab4")); + a.setImg_ma1(rs.getString("img_ma1")); + a.setImg_ma4(rs.getString("img_ma4")); + a.setImg_ma7(rs.getString("img_ma7")); + a.setImg_ma9(rs.getString("img_ma9")); + a.setRestricao_carga(new Integer( rs.getInt("restricao_carga") )); + a.setRestricao_motricidade(rs.getString("restricao_motricidade")); + a.setRestricao_conducao(rs.getString("restricao_conducao")); + a.setRestricao_vibracoes(rs.getString("restricao_vibracoes")); + ob = rs.getString("restricao_outras"); + if(ob == null) + { + a.setRestricao_outras(""); + } + else + { + a.setRestricao_outras(rs.getString("restricao_outras")); + } + ob = rs.getString("med_observ"); + if(ob == null) + { + a.setMed_observ(""); + } + else + { + a.setMed_observ(rs.getString("med_observ")); + } + a.setAnalise_nr(rs.getString("analise_nr")); + a.setMedico_id(new Integer(rs.getInt("medico_id"))); + a.setTecnico_saude_id(new Integer(rs.getInt("tecnico_saude_id"))); + + //a.setAss_hs(rs.getString("ass_hs")); + //a.setAss_seg(rs.getString("ass_seg")); + a.setAss_resp_seg(rs.getString("ass_resp_seg")); + //a.setAss_med(rs.getString("ass_med")); + a.setAss_resp_rh(rs.getString("ass_resp_rh")); + a.setAss_consolidacao(rs.getString("ass_consolidacao")); + a.setData_consolidacao(rs.getDate("data_consolidacao")); + a.setData_assinatura_seg(rs.getDate("data_assinatura_seg")); + a.setData_assinatura_rh(rs.getDate("data_assinatura_rh")); + a.setNome_resp_seg(rs.getString("nome_resp_seg")); + a.setNome_resp_rh(rs.getString("nome_resp_rh")); + a.setCorrecao(rs.getString("correcao")); + a.setObservacoes_correcao(rs.getString("observacoes_correcao")); + a.setEstado_antes_correcao( new Integer(rs.getInt("estado_antes_correcao"))); + a.setAss_superior(rs.getString("ass_superior")); + a.setNome_superior(rs.getString("nome_superior")); + a.setData_assinatura_superior(rs.getDate("data_assinatura_superior")); + a.setData_inicio_processo(rs.getDate("data_inicio_processo")); + a.setNome_resp_consolidacao(rs.getString("nome_resp_consolidacao")); + //System.out.println("ANALISE NR : " + a.getAnalise_nr()); + a.setRh_fase4(new Integer( rs.getInt("rh_fase4") )); + + a.setConcluido_por_desactivacao( rs.getBoolean( "concluido_por_desactivacao" ) ); + a.setData_desactivacao( rs.getDate( "data_desactivacao" ) ); + a.setComentario_desactivacao( rs.getString( "comentario_desactivacao" ) ); + list.add( a ); + } while ( rs.next() ); + + return list; + } + + public ArrayList searchTrabalhador(Integer empresa_id, Integer estabelecimento_id, String nrMecanografico, String nome) + throws Exception + { + ArrayList list = new ArrayList(); + +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); + Statement stlocal = createLocalStatement(); + + String sql = ""; + // trabalhadores do estabelecimento + if(nrMecanografico != null) + { + if(nome != null) + { + sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND estabelecimento_id = " + estabelecimento_id + " AND (trabalhadores.nome LIKE '%" + nome + "%' OR LOWER(numero_mecanografico) LIKE '%" + nrMecanografico.toLowerCase() + "%') AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'"; + } + else + { + sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND estabelecimento_id = " + estabelecimento_id + " AND LOWER(numero_mecanografico) LIKE '%" + nrMecanografico.toLowerCase() + "%' AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'"; + } + } + else + { + if(nome != null) + { + sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND estabelecimento_id = " + estabelecimento_id + " AND trabalhadores.nome LIKE '%" + nome + "%' AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'"; + } + } + + System.out.println("TRABALHADORES SQL B : " + sql); + ResultSet rslocal = stlocal.executeQuery(sql); + if(rslocal.isBeforeFirst()) + { + rslocal.first(); + do + { + Trabalhador t = new Trabalhador(); + t.setId(new Integer(rslocal.getInt(1))); //id + String nome_trab = rslocal.getString(2); + t.setNome(utils.Utils.unicodeToHTML(nome_trab)); + t.setData_nascimento(rslocal.getDate("data_nascimento")); + t.setFuncao(rslocal.getString("funcao_proposta")); + t.setData_admissao(rslocal.getDate("data_admissao")); + t.setNumero_mecanografico(rslocal.getString("numero_mecanografico")); + t.setEstabelecimento_id(new Integer( rslocal.getInt(7) )); + //if(nome != null) + //{ + t.setEstabelecimento(utils.Utils.unicodeToHTML(rslocal.getString(8))); + //} + + list.add(t); + }while(rslocal.next()); + } + + + //restantes trabalhadores + if(nrMecanografico != null) + { + if(nome != null) + { + sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND estabelecimento_id <> " + estabelecimento_id + " AND (trabalhadores.nome LIKE '%" + nome + "%' OR LOWER(numero_mecanografico) LIKE '%" + nrMecanografico.toLowerCase() + "%') AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'"; + } + else + { + sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND estabelecimento_id <> " + estabelecimento_id + " AND LOWER(numero_mecanografico) LIKE '%" + nrMecanografico.toLowerCase() + "%' AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'"; + } + } + else + { + if(nome != null) + { + sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND estabelecimento_id <> " + estabelecimento_id + " AND trabalhadores.nome LIKE '%" + nome + "%' AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'"; + } + } + + +// if(nrMecanografico != null) +// { +// sql = "SELECT * FROM trabalhadores WHERE LOWER(numero_mecanografico) = '" + nrMecanografico.toLowerCase() + "'"; +// } +// else if(nome != null) +// { +// sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND trabalhadores.nome LIKE '%" + nome + "%'"; +// } + System.out.println("TRABALHADORES SQL : " + sql); + rslocal = stlocal.executeQuery(sql); + if(rslocal.isBeforeFirst()) + { + rslocal.first(); + do + { + Trabalhador t = new Trabalhador(); + t.setId(new Integer(rslocal.getInt(1))); //id + String nome_trab = rslocal.getString(2); + t.setNome(utils.Utils.unicodeToHTML(nome_trab)); + t.setData_nascimento(rslocal.getDate("data_nascimento")); + t.setFuncao(rslocal.getString("funcao_proposta")); + t.setData_admissao(rslocal.getDate("data_admissao")); + t.setNumero_mecanografico(rslocal.getString("numero_mecanografico")); + t.setEstabelecimento_id(new Integer( rslocal.getInt(7) )); + //if(nome != null) + //{ + t.setEstabelecimento(utils.Utils.unicodeToHTML(rslocal.getString(8))); + //} + + list.add(t); + }while(rslocal.next()); + } + return list; + } + + public ArrayList searchTrabalhador(Integer empresa_id, String nrMecanografico, String nome) throws Exception + { + ArrayList list = new ArrayList(); + +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); + Statement stlocal = createLocalStatement(); + + String sql = ""; + + StringTokenizer st = null; + + if(nrMecanografico != null) + { + if(nome != null) + { + String sql1 = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND ("; + String sql2 = ""; + String sql3 = ") AND LOWER(numero_mecanografico) LIKE '%" + nrMecanografico.toLowerCase() + "%' AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'"; + st = new StringTokenizer (nome); + int n = 0; + while (st.hasMoreTokens ()) { + if(n > 0) + { + sql2 += "AND "; + } + sql2 += "trabalhadores.nome LIKE '%" + st.nextToken () + "%' "; + n++; + } + sql = sql1 + sql2 + sql3; + //sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND (trabalhadores.nome LIKE '%" + nome + "%' AND LOWER(numero_mecanografico) LIKE '%" + nrMecanografico.toLowerCase() + "%') AND estabelecimentos.empresa_id = " + empresa_id; + } + else + { + sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND LOWER(numero_mecanografico) LIKE '%" + nrMecanografico.toLowerCase() + "%' AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'"; + } + } + else + { + if(nome != null) + { + //sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND trabalhadores.nome LIKE '%" + nome + "%' AND estabelecimentos.empresa_id = " + empresa_id; + String sql1 = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND ("; + String sql2 = ""; + String sql3 = ") AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'"; + st = new StringTokenizer (nome); + int n = 0; + while (st.hasMoreTokens ()) { + if(n > 0) + { + sql2 += "AND "; + } + sql2 += "trabalhadores.nome LIKE '%" + st.nextToken () + "%' "; + n++; + } + sql = sql1 + sql2 + sql3; + + } + } + + System.out.println("TRABALHADORES SQL A : " + sql); +// if(nrMecanografico != null) +// { +// sql = "SELECT * FROM trabalhadores WHERE LOWER(numero_mecanografico) = '" + nrMecanografico.toLowerCase() + "'"; +// } +// else if(nome != null) +// { +// sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND trabalhadores.nome LIKE '%" + nome + "%'"; +// } + ResultSet rslocal = stlocal.executeQuery(sql); + rslocal.first(); + do + { + Trabalhador t = new Trabalhador(); + t.setId(new Integer(rslocal.getInt(1))); //id + String nome_trab = rslocal.getString(2); + t.setNome(utils.Utils.unicodeToHTML(nome_trab)); + t.setData_nascimento(rslocal.getDate("data_nascimento")); + t.setFuncao(rslocal.getString("funcao_proposta")); + t.setData_admissao(rslocal.getDate("data_admissao")); + t.setNumero_mecanografico(rslocal.getString("numero_mecanografico")); + t.setEstabelecimento_id(new Integer( rslocal.getInt(7) )); + //if(nome != null) + //{ + t.setEstabelecimento(utils.Utils.unicodeToHTML(rslocal.getString(8))); + //} + + list.add(t); + }while(rslocal.next()); + return list; + } + + public ArrayList getTrabalhadoresListByEstabelecimento(Integer estabelecimento_id) throws Exception + { + Utils utils = new Utils(); + ArrayList list = new ArrayList(); + +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); + Statement stlocal = createLocalStatement(); + + String sql ="SELECT * FROM trabalhadores WHERE estabelecimento_id = " + estabelecimento_id; + ResultSet rslocal = stlocal.executeQuery(sql); + rslocal.first(); + int nr = 0; + do + { + Trabalhador t = new Trabalhador(); + t.setId(new Integer(rslocal.getInt("id"))); + String nome = rslocal.getString("nome"); + t.setNome(utils.unicodeToHTML(nome)); + t.setData_nascimento(rslocal.getDate("data_nascimento")); + t.setFuncao(rslocal.getString("funcao_proposta")); + t.setData_admissao(rslocal.getDate("data_admissao")); + list.add(t); + }while(rslocal.next()); + + return list; + } + + public Trabalhador getTrabalhador(Integer id) throws Exception + { +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); + Statement stlocal = createLocalStatement(); + + String sql ="SELECT * FROM trabalhadores WHERE id = " + id; + ResultSet rslocal = stlocal.executeQuery(sql); + rslocal.first(); + Trabalhador t = new Trabalhador(); + t.setId(new Integer(rslocal.getInt("id"))); + t.setNome(rslocal.getString("nome")); + t.setData_nascimento(rslocal.getDate("data_nascimento")); + t.setFuncao(rslocal.getString("funcao_proposta")); + t.setData_admissao(rslocal.getDate("data_admissao")); + return t; + } + + public Acidentado getAcidentado(Integer acidentado_id) throws Exception + { + Strings strings = new Strings(); + Acidentado a = new Acidentado(); + Statement st = createStatement(); + String sql ="SELECT * FROM acidentados WHERE id = " + acidentado_id; + ResultSet rs = st.executeQuery(sql); + rs.first(); + a.setId(new Integer(rs.getInt("id"))); + a.setNome(rs.getString("nome")); + a.setData_nascimento(rs.getDate("data_nascimento")); + a.setBilhete_identidade(rs.getString("bilhete_identidade")); + a.setMorada(rs.getString("morada")); + a.setCod_postal(rs.getString("cod_postal")); + a.setLocalidade(rs.getString("localidade")); + a.setContacto_telefonico(rs.getString("contacto_telefonico")); + a.setData_admissao(rs.getDate("data_admissao")); + a.setTurno(rs.getString("turno")); + String funcao = rs.getString("funcao"); + a.setFuncao(utils.Utils.unicodeToHTML(funcao)); + a.setTrabalhador_id(new Integer(rs.getInt("trabalhador_id"))); + a.setNumero_mecanografico(rs.getString("numero_mecanografico")); + a.setNome_superior_hierarquico(rs.getString("nome_superior_hierarquico")); + a.setEmail_superior_hierarquico(rs.getString("email_superior_hierarquico")); + a.setEstabelecimento_origem(rs.getString("estabelecimento_origem")); + a.setData_email_superior_hierarquico(rs.getDate("data_email_superior_hierarquico")); + //a.setAnalise_acidente_id(new Integer("analise_acidente_id")); + return a; + } + + public String getEmpresaNome(Integer empresa_id) throws Exception + { +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); + Statement stlocal = createLocalStatement(); + + String sql ="SELECT designacao_social FROM empresas WHERE id = " + empresa_id; + ResultSet rslocal = stlocal.executeQuery(sql); + rslocal.first(); + String nome = rslocal.getString("designacao_social"); + return nome; + } + + + + public String getEstabelecimentoNome( Integer estabelecimento_id ) throws Exception + { +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); + Statement stlocal = createLocalStatement(); + + String sql = "SELECT nome FROM estabelecimentos WHERE id = " + estabelecimento_id; + ResultSet rslocal = stlocal.executeQuery( sql ); + + String nome = ""; + if ( rslocal.first() ) + { + nome = rslocal.getString( "nome" ); + } + return Utils.unicodeToHTML( nome ); + } + + public String getMedicoNome(Integer medico_id) throws Exception + { +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); + Statement stlocal = createLocalStatement(); + + String sql ="SELECT nome FROM medicos WHERE id = " + medico_id; + ResultSet rslocal = stlocal.executeQuery(sql); + rslocal.first(); + String nome = rslocal.getString("nome"); + return Utils.unicodeToHTML(nome); + } + + public Medico getMedico(Integer id) throws Exception + { +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); + Statement stlocal = createLocalStatement(); + + String sql ="SELECT * FROM medicos WHERE id = " + id; + ResultSet rslocal = stlocal.executeQuery(sql); + rslocal.first(); + Medico m = new Medico(); + m.setId(new Integer( rslocal.getInt("id") )); + m.setNome(rslocal.getString("nome")); + m.setNumero_cedula(rslocal.getString("numero_cedula")); + return m; + } + + public String getTecnicoSaudeNome(Integer tecnico_id) throws Exception + { +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); + Statement stlocal = createLocalStatement(); + + String sql ="SELECT nome FROM marcacoes_tecnicos_hst WHERE id = " + tecnico_id; + ResultSet rslocal = stlocal.executeQuery(sql); + rslocal.first(); + String nome = rslocal.getString("nome"); + return nome; + } + + + public Integer getMaxAcidentadoId() + { + Statement st = createStatement(); + String sql = "SELECT max(acidentados.id)+1 AS MAXACIDENTADOID FROM acidentados"; + try + { + ResultSet rs = st.executeQuery(sql); + rs.first(); + Integer newId = new Integer(rs.getInt("MAXACIDENTADOID")); + if(newId.intValue() == 0) + { + newId = new Integer(1); + } + return newId; + } + catch(Exception ex) + { + return new Integer(1); + } + } + + public Integer createAcidentado(Acidentado a) throws Exception + { + Statement st = createStatement(); + Integer newId = getMaxAcidentadoId(); + String sql = "INSERT INTO acidentados (id, nome, data_nascimento, bilhete_identidade, morada, cod_postal, localidade, contacto_telefonico, data_admissao, turno, funcao, trabalhador_id, numero_mecanografico, nome_superior_hierarquico, email_superior_hierarquico, estabelecimento_origem, data_email_superior_hierarquico) VALUES ("; + sql += newId + ", '"; + sql += a.getNome() + "', "; + if(a.getData_nascimento() == null) + { + sql += null + ", '"; + } + else + { + sql += "'" + a.getData_nascimento() + "', '"; + } + //sql += a.getData_nascimento() + "', '"; + sql += a.getBilhete_identidade() + "', '"; + sql += a.getMorada() + "', '"; + sql += a.getCod_postal() + "', '"; + sql += a.getLocalidade() + "', '"; + sql += a.getContacto_telefonico() + "', "; + if(a.getData_admissao() == null) + { + sql += null + ", '"; + } + else + { + sql += "'" + a.getData_admissao() + "', '"; + } +// sql += a.getData_admissao() + "', '"; + sql += a.getTurno() + "', '"; + sql += a.getFuncao() + "', "; + sql += a.getTrabalhador_id() + ", '"; + sql += a.getNumero_mecanografico() + "', '"; + sql += a.getNome_superior_hierarquico() + "', '"; + sql += a.getEmail_superior_hierarquico() + "', '"; + sql += a.getEstabelecimento_origem() + "', "; + if(a.getData_email_superior_hierarquico() == null) + { + sql += null + ")"; + } + else + { + sql += "'" + a.getData_email_superior_hierarquico() + "')"; + } + //sql += a.getAnalise_acidente_id() + ")"; + System.out.println("SQL ACIDENTADO : " + sql); + st.execute(sql); + + return newId; + } + + public void updateAcidentado(Acidentado a) throws Exception + { + Statement st = createStatement(); + String sql = "UPDATE acidentados SET nome = '" + a.getNome() + "', "; + if(a.getData_nascimento() == null) + { + sql += "data_nascimento = " + null + ", "; + } + else + { + sql += "data_nascimento = '" + a.getData_nascimento() + "', "; + } +// sql += "data_nascimento = '" + a.getData_nascimento() + "', "; + sql += "bilhete_identidade = '" + a.getBilhete_identidade() + "', "; + sql += "morada = '" + a.getMorada() + "', "; + sql += "cod_postal = '" + a.getCod_postal() + "', "; + sql += "localidade = '" + a.getLocalidade() + "', "; + sql += "contacto_telefonico = '" + a.getContacto_telefonico() + "', "; + if(a.getData_admissao() == null) + { + sql += "data_admissao = " + null + ", "; + } + else + { + sql += "data_admissao = '" + a.getData_admissao() + "', "; + } +// sql += "data_admissao = '" + a.getData_admissao() + "', "; + sql += "turno = '" + a.getTurno() + "', "; + sql += "funcao = '" + a.getFuncao() + "', "; + sql += "trabalhador_id = " + a.getTrabalhador_id() + ", "; + sql += "numero_mecanografico = '" + a.getNumero_mecanografico() + "', "; + sql += "nome_superior_hierarquico = '" + a.getNome_superior_hierarquico() + "', "; + sql += "email_superior_hierarquico = '" + a.getEmail_superior_hierarquico() + "', "; + sql += "estabelecimento_origem = '" + a.getEstabelecimento_origem() + "', "; + if(a.getData_email_superior_hierarquico() == null) + { + sql += "data_email_superior_hierarquico = " + null + " "; + } + else + { + sql += "data_email_superior_hierarquico = '" + a.getData_email_superior_hierarquico() + "' "; + } + //sql += "analise_acidente_id = '" + a.getAnalise_acidente_id() + " "; + sql += "WHERE id = " + a.getId(); + System.out.println("SQL UPDATE ACIDENTADO : " + sql); + st.execute(sql); + } + + public Integer getMaxControleId() + { + Statement st = createStatement(); + String sql = "SELECT max(controle.id)+1 AS MAXCONTROLEID FROM controle"; + try + { + ResultSet rs = st.executeQuery(sql); + rs.first(); + Integer newId = new Integer(rs.getInt("MAXCONTROLEID")); + if(newId.intValue() == 0 ) + { + newId = new Integer(1); + } + return newId; + } + catch(Exception ex) + { + return new Integer(1); + } + } + + public Integer getMaxAnaliseId() + { + Statement st = createStatement(); + String sql = "SELECT max(analises_acidentes.id)+1 AS MAXANALISEID FROM analises_acidentes"; + try + { + ResultSet rs = st.executeQuery(sql); + rs.first(); + Integer newId = new Integer(rs.getInt("MAXANALISEID")); + if(newId.intValue() == 0 ) + { + newId = new Integer(1); + } + return newId; + } + catch(Exception ex) + { + return new Integer(1); + } + } + + + public AnaliseAcidente createAnalise(AnaliseAcidente a) throws Exception + { + //Controle c = getControle(); + Statement st = createStatement(); + Integer newId = getMaxAnaliseId(); + + //calc analise_nr + java.util.Date data_acidente = new java.util.Date(a.getData_acidente().getTime()); + //java.util.Date now = new java.util.Date(); + Calendar cal = new GregorianCalendar(); + //cal.setTime(now); + cal.setTime(data_acidente); + int ano = cal.get(Calendar.YEAR); + Controle c = getControloByAno(new Integer(ano)); + if(c == null) + { + c = createAnoNumeracao(new Integer(ano)); + } +// if(c.getAnalise_year().intValue() != ano) +// { +// c.setAnalise_year(new Integer(ano)); +// c.setLast_analise_nr(new Integer(0)); +// } + //String seq_str = new Integer(10000 + newId.intValue()).toString(); + int i_analise_nr = c.getLast_analise_nr().intValue() + 1; + c.setLast_analise_nr(new Integer(i_analise_nr)); + //updateControle(c); + String seq_str = new Integer(10000 + i_analise_nr).toString(); + String ano_str = new Integer(ano).toString(); + String analise_nr = ano_str.substring(2) + "/" + seq_str.substring(1); + a.setAnalise_nr(analise_nr); + a.setId(newId); + + String sql = "INSERT INTO analises_acidentes (id, averiguador, data_acidente, acidentado_id, estado, empresa_id, estabelecimento_id, horas_turno, departamento_id, seccao_id, local_trabalho, tarefa, substancias, condicoes, testemunhas, causas, descricao, conclusoes, accoes, hora_acidente, medico_id, tecnico_saude_id, averiguacao_posterior, averiguacao_obs, data_inicio_processo, analise_nr, coef_incapacidade, concluido_por_desactivacao, data_desactivacao, comentario_desactivacao) VALUES ("; + sql += newId + ", '"; + sql += a.getAveriguador() + "', '"; + sql += a.getData_acidente() + "', "; + sql += a.getAcidentado_id() + ", "; + sql += a.getEstado() + ", "; + sql += a.getEmpresa_id() + ", "; + sql += a.getEstabelecimento_id() + ", "; + sql += a.getHoras_turno() + ", "; + sql += a.getDepartamento_id() + ", "; + sql += a.getSeccao_id() + ", '"; + sql += a.getLocal_trabalho() + "', '"; + sql += a.getTarefa() + "', '"; + sql += a.getSubstancias() + "', '"; +// sql += a.getSuperior_hierarquico() + "', '"; + sql += a.getCondicoes() + "', '"; + sql += a.getTestemunhas() + "', "; + sql += a.getCausas() + ", '"; + sql += a.getDescricao() + "', '"; + sql += a.getConclusoes() + "', '"; + sql += a.getAccoes() + "', "; + if(a.getHora_acidente() == null) + { + sql += null + ", "; + } + else + { + sql += "'" + a.getHora_acidente() + "', "; + } + + sql += a.getMedico_id() + ", "; + sql += a.getTecnico_saude_id() + ", '"; + sql += a.getAveriguacao_posterior() + "', '"; + sql += a.getAveriguacao_obs() + "', "; + if(a.getData_inicio_processo() == null) + { + sql += null + ", "; + } + else + { + sql += "'" + a.getData_inicio_processo() + "', '"; + } + + sql += analise_nr + "', "; + sql += null + ", "; + + sql += false + ", " + null + ", " + null; //concluido_por_desactivacao, data_desactivacao, comentario_desactivacao + + sql += ")"; + +// sql += null + ")"; +// sql += a.getFormacao_shst() + "', '"; +// sql += a.getFormacao_shst_nao_porque() + "', '"; +// sql += a.getOutros_acidentes_com_colaborador() + "', "; +// sql += a.getNr_acidentes_com_colaborador() + ", "; +// sql += a.getNr_relatorio_acidente_colaborador1() + ", "; +// sql += a.getNr_relatorio_acidente_colaborador2() + ", "; +// sql += a.getNr_relatorio_acidente_colaborador3() + ", "; +// sql += a.getNr_relatorio_acidente_colaborador4() + ", '"; +// sql += a.getAcidentes_outros_colaboradores()+ "', "; +// sql += a.getNr_acidentes_outros_colaboradores()+ ", "; +// sql += a.getNr_relatorio_acidente_outros_colaboradores1() + ", "; +// sql += a.getNr_relatorio_acidente_outros_colaboradores2() + ", "; +// sql += a.getNr_relatorio_acidente_outros_colaboradores3() + ", "; +// sql += a.getNr_relatorio_acidente_outros_colaboradores4() + ")"; + System.out.println("SQL : " + sql); + st.execute(sql); + updateControle(c); + return a; + } + + public void updateAnalise(AnaliseAcidente a) throws Exception + { + if(a.getEspecif1().matches("null")) + { + a.setEspecif1(""); + } + if(a.getEspecif2().matches("null")) + { + a.setEspecif2(""); + } + if(a.getEspecif3().matches("null")) + { + a.setEspecif3(""); + } + if(a.getEspecif4().matches("null")) + { + a.setEspecif4(""); + } + if(a.getRestricao_outras().matches("null")) + { + a.setRestricao_outras(""); + } + if(a.getTipo_lesao().matches("null")) + { + a.setTipo_lesao(""); + } + if(a.getMed_observ().matches("null")) + { + a.setMed_observ(""); + } + if(a.getFormacao_shst_nao_porque().matches("null")) + { + a.setFormacao_shst_nao_porque(""); + } + if ( a.getConcluido_por_desactivacao() == null ) + { + a.setConcluido_por_desactivacao( Boolean.FALSE ); + a.setData_desactivacao( null ); + a.setComentario_desactivacao( null ); + } + if ( a.getConcluido_por_desactivacao() != null && a.getConcluido_por_desactivacao().equals( Boolean.TRUE ) && a.getData_desactivacao() == null ) + { + a.setData_desactivacao( new Date() ); + } + if ( a.getComentario_desactivacao() != null && "".equals( a.getComentario_desactivacao().trim() ) ) + { + a.setComentario_desactivacao( null ); + } + + + Statement st = createStatement(); + String sql = "UPDATE analises_acidentes SET data_acidente = '" + a.getData_acidente() + "', "; + sql += "acidentado_id = " + a.getAcidentado_id() + ", "; + sql += "estado = " + a.getEstado() + ", "; + sql += "empresa_id = " + a.getEmpresa_id() + ", "; + sql += "estabelecimento_id = " + a.getEstabelecimento_id() + ", "; + sql += "horas_turno = " + a.getHoras_turno() + ", "; + sql += "departamento_id = " + a.getDepartamento_id() + ", "; + sql += "seccao_id = " + a.getSeccao_id() + ", "; + sql += "local_trabalho = '" + a.getLocal_trabalho() + "', "; + sql += "tarefa = '" + a.getTarefa() + "', "; + sql += "substancias = '" + a.getSubstancias() + "', "; +// sql += "superior_hierarquico = '" + a.getSuperior_hierarquico() + "', "; + sql += "condicoes = '" + a.getCondicoes() + "', "; + sql += "testemunhas = '" + a.getTestemunhas() + "', "; + sql += "causas = " + a.getCausas() + ", "; + sql += "descricao = '" + a.getDescricao() + "', "; + sql += "conclusoes = '" + a.getConclusoes() + "', "; + sql += "accoes = '" + a.getAccoes() + "', "; + sql += "averiguador = '" + a.getAveriguador() + "', "; + if(a.getHora_acidente() == null) + { + sql += "hora_acidente = " + null + ", "; + } + else + { + sql += "hora_acidente = '" + a.getHora_acidente() + "', "; + } + + sql += "formacao_shst = '" + a.getFormacao_shst() + "', "; + sql += "formacao_shst_nao_porque = '" + a.getFormacao_shst_nao_porque() + "', "; + sql += "outros_acidentes_com_colaborador = '" + a.getOutros_acidentes_com_colaborador() + "', "; + sql += "nr_acidentes_com_colaborador = " + a.getNr_acidentes_com_colaborador() + ", "; + sql += "nr_relatorio_acidente_colaborador1 = " + a.getNr_relatorio_acidente_colaborador1() + ", "; + sql += "nr_relatorio_acidente_colaborador2 = " + a.getNr_relatorio_acidente_colaborador2() + ", "; + sql += "nr_relatorio_acidente_colaborador3 = " + a.getNr_relatorio_acidente_colaborador3() + ", "; + sql += "nr_relatorio_acidente_colaborador4 = " + a.getNr_relatorio_acidente_colaborador4() + ", "; + sql += "acidentes_outros_colaboradores = '" + a.getAcidentes_outros_colaboradores() + "', "; + sql += "nr_acidentes_outros_colaboradores = " + a.getNr_acidentes_outros_colaboradores() + ", "; + sql += "nr_relatorio_acidente_outros_colaboradores1 = " + a.getNr_relatorio_acidente_outros_colaboradores1() + ", "; + sql += "nr_relatorio_acidente_outros_colaboradores2 = " + a.getNr_relatorio_acidente_outros_colaboradores2() + ", "; + sql += "nr_relatorio_acidente_outros_colaboradores3 = " + a.getNr_relatorio_acidente_outros_colaboradores3() + ", "; + sql += "nr_relatorio_acidente_outros_colaboradores4 = " + a.getNr_relatorio_acidente_outros_colaboradores4() + ", "; + sql += "lesao_cabeca = '" + a.getLesao_cabeca() + "', "; + sql += "lesao_pescoco = '" + a.getLesao_pescoco() + "', "; + sql += "lesao_tronco = '" + a.getLesao_tronco() + "', "; + sql += "lesao_membro_sup_dir = '" + a.getLesao_membro_sup_dir() + "', "; + sql += "lesao_membro_sup_esq = '" + a.getLesao_membro_sup_esq() + "', "; + sql += "lesao_membro_inf_dir = '" + a.getLesao_membro_inf_dir() + "', "; + sql += "lesao_membro_inf_esq = '" + a.getLesao_membro_inf_esq() + "', "; + sql += "especif1 = '" + a.getEspecif1() + "', "; + sql += "especif2 = '" + a.getEspecif2() + "', "; + sql += "especif3 = '" + a.getEspecif3() + "', "; + sql += "especif4 = '" + a.getEspecif4() + "', "; + sql += "tipo_lesao = '" + a.getTipo_lesao() + "', "; + sql += "tipo_incapacidade = '" + a.getTipo_incapacidade() + "', "; + sql += "coef_incapacidade = " + a.getCoef_incapacidade() + ", "; + if(a.getData_aval_incapacidade() == null) + { + sql += "data_aval_incapacidade = " + null + ", "; + } + else + { + sql += "data_aval_incapacidade = '" + a.getData_aval_incapacidade() + "', "; + } + if(a.getData_rev_incapacidade() == null) + { + sql += "data_rev_incapacidade = " + null + ", "; + } + else + { + sql += "data_rev_incapacidade = '" + a.getData_rev_incapacidade() + "', "; + } + if(a.getPeriodo_incapacidade_de() == null) + { + sql += "periodo_incapacidade_de = " + null + ", "; + } + else + { + sql += "periodo_incapacidade_de = '" + a.getPeriodo_incapacidade_de() + "', "; + } + if(a.getPeriodo_incapacidade_a() == null) + { + sql += "periodo_incapacidade_a = " + null + ", "; + } + else + { + sql += "periodo_incapacidade_a = '" + a.getPeriodo_incapacidade_a() + "', "; + } + sql += "img_flexao = '" + a.getImg_flexao() + "', "; + sql += "img_ext1 = '" + a.getImg_ext1() + "', "; + sql += "img_ext2 = '" + a.getImg_ext2() + "', "; + sql += "img_cab2 = '" + a.getImg_cab2() + "', "; + sql += "img_cab3 = '" + a.getImg_cab3() + "', "; + sql += "img_ma2 = '" + a.getImg_ma2() + "', "; + sql += "img_ma3 = '" + a.getImg_ma3() + "', "; + sql += "img_ma5 = '" + a.getImg_ma5() + "', "; + sql += "img_ma6 = '" + a.getImg_ma6() + "', "; + sql += "img_ma8 = '" + a.getImg_ma8() + "', "; + sql += "img_ma10 = '" + a.getImg_ma10() + "', "; + sql += "img_rot1 = '" + a.getImg_rot1() + "', "; + sql += "img_rot2 = '" + a.getImg_rot2() + "', "; + sql += "img_cab1 = '" + a.getImg_cab1() + "', "; + sql += "img_cab4 = '" + a.getImg_cab4() + "', "; + sql += "img_ma1 = '" + a.getImg_ma1() + "', "; + sql += "img_ma4 = '" + a.getImg_ma4() + "', "; + sql += "img_ma7 = '" + a.getImg_ma7() + "', "; + sql += "img_ma9 = '" + a.getImg_ma9() + "', "; + sql += "restricao_carga = " + a.getRestricao_carga() + ", "; + sql += "restricao_motricidade = '" + a.getRestricao_motricidade() + "', "; + sql += "restricao_conducao = '" + a.getRestricao_conducao() + "', "; + sql += "restricao_vibracoes = '" + a.getRestricao_vibracoes() + "', "; + sql += "restricao_outras = '" + a.getRestricao_outras() + "', "; + sql += "med_observ = '" + a.getMed_observ() + "', "; + sql += "estado_assinatura = " + a.getEstado_assinatura() + ", "; + sql += "tecnico_saude_id = " + a.getTecnico_saude_id() + ", "; + sql += "medico_id = " + a.getMedico_id() + ", "; + sql += "ass_consolidacao = '" + a.getAss_consolidacao() + "', "; + sql += "ass_resp_seg = '" + a.getAss_resp_seg() + "', "; + sql += "ass_resp_rh = '" + a.getAss_resp_rh() + "', "; + if(a.getData_consolidacao() == null) + { + sql += "data_consolidacao = " + null + ", "; + } + else + { + sql += "data_consolidacao = '" + a.getData_consolidacao() + "', "; + } + if(a.getData_assinatura_seg() == null) + { + sql += "data_assinatura_seg = " + null + ", "; + } + else + { + sql += "data_assinatura_seg = '" + a.getData_consolidacao() + "', "; + } + if(a.getData_assinatura_rh() == null) + { + sql += "data_assinatura_rh = " + null + ", "; + } + else + { + sql += "data_assinatura_rh = '" + a.getData_consolidacao() + "', "; + } + sql += "nome_resp_seg = '" + a.getNome_resp_seg() + "', "; + sql += "nome_resp_rh = '" + a.getNome_resp_rh() + "', "; + sql += "correcao = '" + a.getCorrecao() + "', "; + sql += "observacoes_correcao = '" + a.getObservacoes_correcao() + "', "; + sql += "estado_antes_correcao = " + a.getEstado_antes_correcao() + ", "; + sql += "ass_superior = '" + a.getAss_superior() + "', "; + sql += "nome_superior = '" + a.getNome_superior() + "', "; + sql += "averiguacao_posterior = '" + a.getAveriguacao_posterior() + "', "; + sql += "averiguacao_obs = '" + a.getAveriguacao_obs() + "', "; + sql += "nome_resp_consolidacao = '" + a.getNome_resp_consolidacao() + "', "; + if(a.getData_assinatura_superior() == null) + { + sql += "data_assinatura_superior = " + null + ", "; + } + else + { + sql += "data_assinatura_superior = '" + a.getData_assinatura_superior() + "', "; + } + sql += "rh_fase4 = " + a.getRh_fase4() + ", "; + sql += "concluido_por_desactivacao = " + a.getConcluido_por_desactivacao() + ", "; + sql += "comentario_desactivacao = " + ( a.getComentario_desactivacao() == null ? "null" : "'" + a.getComentario_desactivacao() + "'" ) + ", "; + sql += "data_desactivacao = " + ( a.getData_desactivacao() == null ? "null" : "'" + new java.sql.Date( a.getData_desactivacao().getTime() ) + "'" ); + sql += " WHERE id = " + a.getId(); + System.out.println("SQL UPDATE : " + sql); + st.execute( sql ); + } + + public void changeEstado(Correcao c) throws Exception + { + Statement st = createStatement(); + String sql = "UPDATE analises_acidentes SET correcao = '" + c.getCorrecao() + "', estado = " + c.getEstado_corr() + ", estado_antes_correcao = " + c.getEstado_actual() + ", observacoes_correcao = '" + c.getObservacoes() + "' WHERE id = " + c.getAnalise_id(); + st.execute(sql); + } + + public Integer getMaxRecomendacaoId() + { + Statement st = createStatement(); + String sql = "SELECT max(recomendacoes.id)+1 AS MAXRECOMENDACAOID FROM recomendacoes"; + try + { + ResultSet rs = st.executeQuery(sql); + rs.first(); + Integer newId = new Integer(rs.getInt("MAXRECOMENDACAOID")); + if(newId.intValue() == 0) + { + newId = new Integer(1); + } + return newId; + } + catch(Exception ex) + { + return new Integer(1); + } + } + + public Integer createRecomendacao(Recomendacao r) throws Exception + { + Statement st = createStatement(); + Integer newId = getMaxRecomendacaoId(); + String sql = "INSERT INTO recomendacoes (id, analise_id, recomendacao) VALUES ("; + sql += newId + ", "; + sql += r.getAnalise_id() + ", '"; + sql += r.getRecomendacao() + "')"; + st.execute(sql); + + return newId; + } + + public void updateRecomendacao(Recomendacao r) throws Exception + { + Statement st = createStatement(); + String sql = "UPDATE recomendacoes SET analise_id = " + r.getAnalise_id() + ", "; + sql += "recomendacao = '" + r.getRecomendacao() + "' "; + sql += "WHERE id = " + r.getId(); + //System.out.println("SQL : " + sql); + st.execute(sql); + } + + public void deleteRecomendacoesByAnalise(Integer analise_id) throws Exception + { + System.out.println("DELETE RECOMENDACOES"); + Statement st = createStatement(); + String sql = "DELETE FROM recomendacoes WHERE analise_id = " + analise_id; + st.execute(sql); + } + + public void deleteAnaliseAcidente(Integer analise_id) throws Exception + { + Statement st = createStatement(); + //String sql = "DELETE FROM analises_acidentes WHERE id = " + analise_id; + String sql = "UPDATE analises_acidentes SET apagada = 'y' WHERE id = " + analise_id; + st.execute(sql); + } + + public void deleteAcidentado(Integer acidentado_id) throws Exception + { + Statement st = createStatement(); + String sql = "DELETE FROM acidentados WHERE id = " + acidentado_id; + st.execute(sql); + } + + public ArrayList getRecomendacoesByAnalise(Integer analiseId) throws Exception + { + ArrayList list = new ArrayList(); + Statement st = createStatement(); + String sql = "SELECT * FROM recomendacoes WHERE analise_id = " + analiseId; + //System.out.println("SQL : " + sql); + ResultSet rs = st.executeQuery(sql); + if(rs.isBeforeFirst()) + { + rs.first(); + do + { + Recomendacao r = new Recomendacao(); + r.setId(new Integer(rs.getInt("id"))); + r.setAnalise_id(new Integer(rs.getInt("analise_id"))); + r.setRecomendacao(rs.getString("recomendacao")); + list.add(r); + }while(rs.next()); + } + + return list; + } + + public Integer getMaxMedidaId() + { + Statement st = createStatement(); + String sql = "SELECT max(medidas.id)+1 AS MAXMEDIDAID FROM medidas"; + try + { + ResultSet rs = st.executeQuery(sql); + rs.first(); + Integer newId = new Integer(rs.getInt("MAXMEDIDAID")); + if(newId.intValue() == 0) + { + newId = new Integer(1); + } + return newId; + } + catch(Exception ex) + { + return new Integer(1); + } + } + + public Integer createMedida(Medida m) throws Exception + { + Statement st = createStatement(); + Integer newId = getMaxMedidaId(); + String sql = "INSERT INTO medidas (id, analise_id, medida) VALUES ("; + sql += newId + ", "; + sql += m.getAnalise_id() + ", '"; + sql += m.getMedida() + "')"; + st.execute(sql); + + return newId; + } + + + + public void updateMedida(Medida m) throws Exception + { + Statement st = createStatement(); + String sql = "UPDATE medidas SET analise_id = " + m.getAnalise_id() + ", "; + sql += "medida = '" + m.getMedida() + "' "; + sql += "WHERE id = " + m.getId(); + //System.out.println("SQL : " + sql); + st.execute(sql); + } + + public void deleteMedidasByAnalise(Integer analise_id) throws Exception + { + Statement st = createStatement(); + String sql = "DELETE FROM medidas WHERE analise_id = " + analise_id; + st.execute(sql); + } + + public ArrayList getMedidasByAnalise(Integer analiseId) throws Exception + { + ArrayList list = new ArrayList(); + Statement st = createStatement(); + String sql = "SELECT * FROM medidas WHERE analise_id = " + analiseId; + //System.out.println("SQL : " + sql); + ResultSet rs = st.executeQuery(sql); + if(rs.isBeforeFirst()) + { + rs.first(); + do + { + Medida m = new Medida(); + m.setId(new Integer(rs.getInt("id"))); + m.setAnalise_id(new Integer(rs.getInt("analise_id"))); + m.setMedida(rs.getString("medida")); + list.add(m); + }while(rs.next()); + } + + return list; + } + + + + public String getNumeroCedula(Integer medico_id) throws Exception + { +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); + Statement stlocal = createLocalStatement(); + + String sql ="SELECT numero_cedula FROM medicos WHERE id = " + medico_id; + ResultSet rslocal = stlocal.executeQuery(sql); + rslocal.first(); + String numero_cedula = rslocal.getString("numero_cedula"); + return numero_cedula; + } + + public String getTipoDescricao(Integer tipo) throws Exception + { + Statement st = createStatement(); + String sql = "SELECT descricao FROM tipos_utilizadores WHERE tipo = " + tipo; + ResultSet rs = st.executeQuery(sql); + rs.first(); + String descricao = rs.getString("descricao"); + return descricao; + } + + public com.sun.rave.web.ui.model.Option[] getTiposList() throws Exception + { + ArrayList list = new ArrayList(); + TipoUtilizador t = new TipoUtilizador(); + t.setId(new Integer(0)); + t.setTipo(new Integer(0)); + t.setDescricao(""); + list.add(t); + Statement st = createStatement(); + String sql ="SELECT * FROM tipos_utilizadores WHERE activo = 'y' ORDER BY ordem"; + ResultSet rs = st.executeQuery(sql); + if(rs.isBeforeFirst()) + { + rs.first(); + do + { + t = new TipoUtilizador(); + t.setId(new Integer(rs.getInt("id"))); + t.setTipo(new Integer(rs.getInt("tipo"))); + t.setDescricao(rs.getString("descricao")); + //t.setActivo(rs.getString("activo")); + //t.setOrdem(new Integer(rs.getInt("ordem"))); + list.add(t); + }while(rs.next()); + } + + com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; + ListIterator iter = list.listIterator(); + int i = 0; + while(iter.hasNext()) + { + t = (TipoUtilizador) iter.next(); + + listOptions[i] = new Option(t.getTipo(), t.getDescricao()); + i++; + } + return listOptions; + } + + public com.sun.rave.web.ui.model.Option[] getTiposList(Integer permissao) throws Exception + { + ArrayList list = new ArrayList(); + TipoUtilizador t = new TipoUtilizador(); + t.setId(new Integer(0)); + t.setTipo(new Integer(0)); + t.setDescricao(""); + list.add(t); + Statement st = createStatement(); + String sql ="SELECT * FROM tipos_utilizadores WHERE activo = 'y' ORDER BY ordem"; + ResultSet rs = st.executeQuery(sql); + if(rs.isBeforeFirst()) + { + rs.first(); + do + { + t = new TipoUtilizador(); + if(permissao.intValue() == 7) //director rh + { + t.setTipo(new Integer(rs.getInt("tipo"))); + if(t.getTipo().intValue() == 1 || t.getTipo().intValue() == 2 || t.getTipo().intValue() == 6) // seguranca || rh || gestor + { + t.setId(new Integer(rs.getInt("id"))); + t.setDescricao(rs.getString("descricao")); + //t.setActivo(rs.getString("activo")); + //t.setOrdem(new Integer(rs.getInt("ordem"))); + list.add(t); + } + } + else + { + t.setId(new Integer(rs.getInt("id"))); + t.setTipo(new Integer(rs.getInt("tipo"))); + t.setDescricao(rs.getString("descricao")); + //t.setActivo(rs.getString("activo")); + //t.setOrdem(new Integer(rs.getInt("ordem"))); + list.add(t); + } + + }while(rs.next()); + } + + com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; + ListIterator iter = list.listIterator(); + int i = 0; + while(iter.hasNext()) + { + t = (TipoUtilizador) iter.next(); + + listOptions[i] = new Option(t.getTipo(), t.getDescricao()); + i++; + } + return listOptions; + } + + public com.sun.rave.web.ui.model.Option[] getEstabelecimentosList(Integer empresa_id, Boolean booGestor) throws Exception + { +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); + Statement stlocal = createLocalStatement(); + + ArrayList list = new ArrayList(); + Estabelecimento e = new Estabelecimento(); + e.setId(new Integer(-1)); + + e.setNome("-Seleccionar-"); + + list.add(e); + if(booGestor.equals(new Boolean(true))) + { + e = new Estabelecimento(); + e.setId(new Integer(0)); + e.setNome("-Todos os estabelecimentos-"); + + list.add(e); + } + String sql ="SELECT * FROM estabelecimentos WHERE empresa_id = " + empresa_id + " AND inactivo = 'n' ORDER BY nome_plain"; + + ResultSet rslocal = stlocal.executeQuery(sql); + if(rslocal.isBeforeFirst()) + { + rslocal.first(); + do + { + e = new Estabelecimento(); + e.setId(new Integer(rslocal.getInt("id"))); + //e.setNome_plain(rslocal.getString("nome_plain")); + e.setNome(rslocal.getString("nome")); + System.out.println("ESTABELECIMENTOAA : " + e.getId().toString() + " - " + e.getNome()); + //t.setActivo(rs.getString("activo")); + //t.setOrdem(new Integer(rs.getInt("ordem"))); + list.add(e); + }while(rslocal.next()); + } + + com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; + ListIterator iter = list.listIterator(); + int i = 0; + while(iter.hasNext()) + { + e = (Estabelecimento) iter.next(); + System.out.println("ESTABELECIMENTOL : " + e.getId().toString() + " - " + e.getNome()); + listOptions[i] = new Option(e.getId(), Utils.unicodeToHTML(e.getNome())); + i++; + } + return listOptions; + } + + public com.sun.rave.web.ui.model.Option[] getEstabelecimentosGestorList(Integer empresa_id, Boolean booGestor) throws Exception + { +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); + Statement stlocal = createLocalStatement(); + + ArrayList list = new ArrayList(); + Estabelecimento e = null; + //Estabelecimento e = new Estabelecimento(); + //e.setId(new Integer(-1)); + + //e.setNome("-Seleccionar-"); + + //list.add(e); + if(booGestor.equals(new Boolean(true))) + { + e = new Estabelecimento(); + e.setId(new Integer(0)); + e.setNome("-Todos os estabelecimentos-"); + + list.add(e); + } + String sql ="SELECT * FROM estabelecimentos WHERE empresa_id = " + empresa_id + " AND inactivo = 'n' ORDER BY nome_plain"; + + ResultSet rslocal = stlocal.executeQuery(sql); + if(rslocal.isBeforeFirst()) + { + rslocal.first(); + do + { + e = new Estabelecimento(); + e.setId(new Integer(rslocal.getInt("id"))); + //e.setNome_plain(rslocal.getString("nome_plain")); + e.setNome(rslocal.getString("nome")); + System.out.println("ESTABELECIMENTOAA : " + e.getId().toString() + " - " + e.getNome()); + //t.setActivo(rs.getString("activo")); + //t.setOrdem(new Integer(rs.getInt("ordem"))); + list.add(e); + }while(rslocal.next()); + } + + com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; + ListIterator iter = list.listIterator(); + int i = 0; + while(iter.hasNext()) + { + e = (Estabelecimento) iter.next(); + System.out.println("ESTABELECIMENTOL : " + e.getId().toString() + " - " + e.getNome()); + listOptions[i] = new Option(e.getId(), Utils.unicodeToHTML(e.getNome())); + i++; + } + return listOptions; + } + + public com.sun.rave.web.ui.model.Option[] getMedicosList() throws Exception + { +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); + Statement stlocal = createLocalStatement(); + + ArrayList list = new ArrayList(); + Medico m = new Medico(); + m.setId(new Integer(0)); + m.setNome("-Seleccionar-"); + list.add(m); + String sql ="SELECT * FROM medicos WHERE inactivo = 'n'"; + ResultSet rslocal = stlocal.executeQuery(sql); + if(rslocal.isBeforeFirst()) + { + rslocal.first(); + do + { + m = new Medico(); + m.setId(new Integer(rslocal.getInt("id"))); + m.setNome(rslocal.getString("nome")); + list.add(m); + }while(rslocal.next()); + } + + com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; + ListIterator iter = list.listIterator(); + int i = 0; + while(iter.hasNext()) + { + m = (Medico) iter.next(); + + listOptions[i] = new Option(m.getId(), Utils.unicodeToHTML(m.getNome())); + i++; + } + return listOptions; + } + + public com.sun.rave.web.ui.model.Option[] getTecnicosSaudeList() throws Exception + { +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); + Statement stlocal = createLocalStatement(); + + ArrayList list = new ArrayList(); + TecnicoSaude t = new TecnicoSaude(); + t.setId(new Integer(0)); + t.setNome("-Seleccionar-"); + list.add(t); + String sql ="SELECT * FROM marcacoes_tecnicos_hst WHERE inactivo = 'n'"; + ResultSet rslocal = stlocal.executeQuery(sql); + if(rslocal.isBeforeFirst()) + { + rslocal.first(); + do + { + t = new TecnicoSaude(); + t.setId(new Integer(rslocal.getInt("id"))); + t.setNome(rslocal.getString("nome")); + list.add(t); + }while(rslocal.next()); + } + + com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; + ListIterator iter = list.listIterator(); + int i = 0; + while(iter.hasNext()) + { + t = (TecnicoSaude) iter.next(); + + listOptions[i] = new Option(t.getId(), Utils.unicodeToHTML(t.getNome())); + i++; + } + return listOptions; + } + + public com.sun.rave.web.ui.model.Option[] getCausasList() throws Exception + { + ArrayList list = new ArrayList(); + Causa c = new Causa(); + c.setId(new Integer(0)); + c.setCausa("-Seleccionar-"); + list.add(c); + Statement st = createStatement(); + String sql = "SELECT * FROM causas WHERE activa = 'y'"; + ResultSet rs = st.executeQuery(sql); + if(rs.isBeforeFirst()) + { + rs.first(); + do + { + c = new Causa(); + c.setId( new Integer(rs.getInt("id")) ); + c.setCausa(rs.getString("causa")); + list.add(c); + }while(rs.next()); + } + + com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; + ListIterator iter = list.listIterator(); + int i = 0; + while(iter.hasNext()) + { + c = (Causa) iter.next(); + + listOptions[i] = new Option(c.getId(), c.getCausa()); + i++; + } + return listOptions; + } + + public com.sun.rave.web.ui.model.Option[] getDepartamentosList() throws Exception + { + ArrayList list = new ArrayList(); + Departamento d = new Departamento(); + + d.setId(new Integer(0)); + d.setDescricao("-Todos-"); + list.add(d); + Statement st = createStatement(); + String sql = "SELECT * FROM departamentos WHERE activo = 'y'"; + ResultSet rs = st.executeQuery(sql); + if(rs.isBeforeFirst()) + { + rs.first(); + do + { + d = new Departamento(); + d.setId( new Integer(rs.getInt("id")) ); + d.setDescricao(rs.getString("descricao")); + list.add(d); + }while(rs.next()); + } + + com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; + ListIterator iter = list.listIterator(); + int i = 0; + while(iter.hasNext()) + { + d = (Departamento) iter.next(); + + listOptions[i] = new Option(d.getId(), d.getDescricao()); + i++; + } + return listOptions; + } + + public com.sun.rave.web.ui.model.Option[] getSeccoesList(Integer departamento_id) throws Exception + { + ArrayList list = new ArrayList(); + Seccao s = new Seccao(); + + s.setId(new Integer(0)); + s.setDescricao("-Seleccionar-"); + list.add(s); + Statement st = createStatement(); + String sql = ""; + if(departamento_id == null) // todos + { + sql = "SELECT * FROM seccoes WHERE activo = 'y'"; + } + else + { + sql = "SELECT * FROM seccoes WHERE activo = 'y' AND departamento_id = " + departamento_id; + } + + ResultSet rs = st.executeQuery(sql); + if(rs.isBeforeFirst()) + { + rs.first(); + do + { + s = new Seccao(); + s.setId( new Integer(rs.getInt("id")) ); + s.setDescricao(rs.getString("descricao")); + s.setDepartamento_id( new Integer(rs.getInt("departamento_id")) ); + list.add(s); + }while(rs.next()); + } + + com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; + ListIterator iter = list.listIterator(); + int i = 0; + while(iter.hasNext()) + { + s = (Seccao) iter.next(); + + listOptions[i] = new Option(s.getId(), s.getDescricao()); + i++; + } + return listOptions; + } + + + + public Causa getCausa(Integer id) throws Exception + { + Statement st = createStatement(); + String sql = null; + + sql ="SELECT * FROM causas WHERE id = " + id; + + ResultSet rs = st.executeQuery(sql); + Causa c = null; + if ( rs.first() ) + { + c = new Causa(); + c.setId( new Integer( rs.getInt( "id" ) ) ); + c.setCausa( rs.getString( "causa" ) ); + } + return c; + } + + public Seccao getSeccao(Integer id) throws Exception + { + Statement st = createStatement(); + String sql = null; + + sql ="SELECT * FROM seccoes WHERE id = " + id + " AND activo = 'y'"; + + ResultSet rs = st.executeQuery(sql); + rs.first(); + Seccao s = new Seccao(); + s.setId( new Integer(rs.getInt("id")) ); + s.setDescricao(rs.getString("descricao")); + return s; + } + + public ArrayList getAnosListFromAnalises() throws Exception + { + ArrayList list = new ArrayList(); + Statement st = createStatement(); + String sql = null; + + sql ="select distinct extract(year from data_acidente) as ano from analises_acidentes where estado = " + Global.ESTADO_CONCLUIDO + " order by ano"; + + ResultSet rs = st.executeQuery(sql); + if(rs.isBeforeFirst()) + { + rs.first(); + do + { + Double dAno = new Double(rs.getDouble("ano")); + Integer iAno = new Integer(dAno.intValue()); + list.add(iAno); + }while(rs.next()); + } + + return list; + } + + + + public String getFase(int estado) + { + if(estado == Global.ESTADO_SEG) + { + return "FASE 1 - SEG - ABERTURA"; + } + else if(estado == Global.ESTADO_RH1) + { + return "FASE 2 - RH - ACOMPANHAMENTO"; + } + else if(estado == Global.ESTADO_HS) + { + return "FASE 3 - SIPRP - RECOMENDAÇÕES"; + } + else if(estado == Global.ESTADO_RH2) + { + return "FASE 4 - RH - MEDIDAS + LESÃO"; + } +// else if(estado == Global.ESTADO_MEDICINA) +// { +// return "Medicina"; +// } + else if(estado == Global.ESTADO_CONSOLIDACAO) + { + return "FASE 5 - SIPRP - CONSOLIDAÇÃO"; + } +// else if(estado == Global.ESTADO_ASSINATURAS) +// { +// return "Verificação"; +// } +// else if(estado == Global.ESTADO_IMPRESSAO) +// { +// return "Impressão"; +// } + else if(estado == Global.ESTADO_ASSINATURA_SEG) + { + return "FASE 6 - SEG - VERIFICAÇÃO SEG."; + } + else if(estado == Global.ESTADO_ASSINATURA_RH) + { + return "FASE 7 - RH - VERIFICAÇÃO RH"; + } + else if(estado == Global.ESTADO_FECHAR) + { + return "FASE 8 - SIPRP - CONCLUSÃO"; + } + else if ( estado == Global.ESTADO_CONCLUIDO ) + { + return "FASE 9 - CONCLUÃDO"; + } + return null; + } + + public HashMap getMetaData(String table) throws Exception + { + Statement st = createStatement(); + String sql = "select * from " + table; + + ResultSet rs = st.executeQuery(sql); + ResultSetMetaData rsmd = rs.getMetaData(); + + HashMap hash = new HashMap(); + int cols = rsmd.getColumnCount(); + + for(int i=0; i < cols; i++) + { + String field = rsmd.getColumnName(i + 1); + int len = rsmd.getPrecision(i+1); + hash.put(field, new Integer(len)); + } + return hash; + } + + public byte[] getLogoByEmpresa(Integer empresaId) throws Exception + { +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement st = dblocal.createStatement(); + Statement st = createLocalStatement(); + + String sql = "select empresa_logo_id from empresas where id = " + empresaId; + ResultSet rslocal = st.executeQuery(sql); + if ( rslocal.isBeforeFirst() ) + { + rslocal.first(); + Integer logoId = new Integer(rslocal.getInt("empresa_logo_id")); + byte[] logo = getLogo(logoId); + return logo; + } + + return null; + } + + public byte[] getLogo(Integer logoId) throws Exception + { +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement st = dblocal.createStatement(); + Statement st = createLocalStatement(); + + String sql = "select image_data from image where id = " + logoId; + ResultSet rslocal = st.executeQuery(sql); + rslocal.first(); + byte[] logo = rslocal.getBytes("image_data"); + System.out.println("LOGO SIZE : " + logo.length); + return logo; + } + +// private Statement createStatement() +// { +// Db db = new Db(); +// return db.createStatement(); +// } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/AnalisesSeguimentoDataProvider.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/AnalisesSeguimentoDataProvider.java new file mode 100644 index 00000000..f6c95e32 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/AnalisesSeguimentoDataProvider.java @@ -0,0 +1,24 @@ +/* + * AnalisesSeguimentoDataProvider.java + * + * Created on September 20, 2007, 1:42 PM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package db.providers; + +import com.sun.data.provider.impl.ObjectListDataProvider; + +/** + * + * @author lluis + */ +public class AnalisesSeguimentoDataProvider extends ObjectListDataProvider { + + /** Creates a new instance of AnalisesSeguimentoDataProvider */ + public AnalisesSeguimentoDataProvider() { + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/EstadosCorrecaoDataProvider.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/EstadosCorrecaoDataProvider.java new file mode 100644 index 00000000..84fa6987 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/EstadosCorrecaoDataProvider.java @@ -0,0 +1,24 @@ +/* + * EstadosCorrecaoDataProvider.java + * + * Created on November 29, 2007, 9:50 AM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package db.providers; + +import com.sun.data.provider.impl.ObjectListDataProvider; + +/** + * + * @author lluis + */ +public class EstadosCorrecaoDataProvider extends ObjectListDataProvider { + + /** Creates a new instance of EstadosCorrecaoDataProvider */ + public EstadosCorrecaoDataProvider() { + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/EstatisticasDataProvider.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/EstatisticasDataProvider.java new file mode 100644 index 00000000..3f68084c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/EstatisticasDataProvider.java @@ -0,0 +1,294 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.providers; + +import db.*; +import beans.EstatisticaProcessoBean; +import com.evolute.utils.arrays.Virtual2DArray; +import com.evolute.utils.error.ErrorLogger; +import com.evolute.utils.sql.Expression; +import com.evolute.utils.sql.Field; +import com.evolute.utils.sql.Select; +import com.evolute.utils.sql.Select2; +import com.sun.rave.web.ui.model.Option; +import db.data.siprp.outer.CausasData; +import db.data.siprp.outer.SeccoesData; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +/** + * + * @author dneves + */ +public class EstatisticasDataProvider extends GenericDataProvider +{ + private static final SimpleDateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + private static final SimpleDateFormat T_F = new SimpleDateFormat( "HH:mm:ss" ); + + + private static EstatisticasDataProvider INSTANCE = null; + + private EstatisticasDataProvider() throws Exception + { + super(); + } + + public static synchronized EstatisticasDataProvider getInstance() throws Exception + { + if ( INSTANCE == null ) + { + INSTANCE = new EstatisticasDataProvider(); + } + return INSTANCE; + } + +// private Statement createStatement() +// { +// if ( db == null ) +// { +// db = new Db(); +// } +// return db.createStatement(); +// } + + public List< EstatisticaProcessoBean > getEstatisticas( Map< String, Object > searchProperties ) + { + String por = ( String ) searchProperties.get( EstatisticasConstants.KEY_POR ); + String nome = ( String ) searchProperties.get( EstatisticasConstants.KEY_NOME ); + String anoOcorrencia = ( String ) searchProperties.get( EstatisticasConstants.KEY_ANO_OCORRENCIA ); + Date dataOcorrencia = ( Date ) searchProperties.get( EstatisticasConstants.KEY_DATA_OCORRENCIA ); + String horaOcorrencia = ( String ) searchProperties.get( EstatisticasConstants.KEY_HORA_OCORRENCIA ); + String horasTrabalhadas = ( String ) searchProperties.get( EstatisticasConstants.KEY_HORAS_TRABALHADAS ); +// String departamento = ( String ) searchProperties.get( EstatisticasConstants.KEY_DEPARTAMENTO ); + Integer seccaoID = ( Integer ) searchProperties.get( EstatisticasConstants.KEY_SECCAO ); + Integer causas = ( Integer ) searchProperties.get( EstatisticasConstants.KEY_CAUSAS_ACIDENTE ); + String turno = ( String ) searchProperties.get( EstatisticasConstants.KEY_TURNO_TRABALHO ); + Boolean formacao_shst = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_FORMACAO_SHST ); + Boolean postoAcidentado = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_POSTO_ACIDENTADO ); + Boolean outrosAcidentados = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_OUTROS_ACIDENTADOS ); + + String tableNames = "analises_acidentes"; + String joinConditions = ""; + String whereConditions = " analises_acidentes.apagada = 'n' "; + + if ( por != null || nome != null || turno != null ) + { + tableNames += ", acidentados"; + joinConditions += " analises_acidentes.acidentado_id = acidentados.id "; + } +// if ( departamento != null ) +// { +// tableNames += ", departamentos"; +// joinConditions += ( "".equals( joinConditions ) ? "" : " AND " ) + " analises_acidentes.departamento_id = departamentos.id "; +// } + + if ( por != null ) + { + whereConditions += " AND " + EstatisticasConstants.KEY_POR + " = '" + por + "' "; + } + if ( nome != null ) + { + nome = nome.replaceAll( " ", "%" ); + whereConditions += " AND " + EstatisticasConstants.KEY_NOME + " ILIKE '%" + nome + "%' "; + } + if ( turno != null ) + { + whereConditions += " AND " + EstatisticasConstants.KEY_TURNO_TRABALHO + " = '" + turno + "' "; + } + + if ( anoOcorrencia != null ) + { + whereConditions += " AND " + EstatisticasConstants.KEY_ANO_OCORRENCIA + " = '" + anoOcorrencia + "' "; + } + if ( dataOcorrencia != null ) + { + whereConditions += " AND " + EstatisticasConstants.KEY_DATA_OCORRENCIA + " = '" + D_F.format( dataOcorrencia ) + "' "; + } + if ( horaOcorrencia != null ) + { + String hora = null; + try + { + Date dateOcorrencia = T_F.parse( horaOcorrencia ); + hora = T_F.format( dateOcorrencia ); + } + catch ( ParseException ex ) + { + ErrorLogger.logException( ex ); + } + if ( hora != null ) + { + whereConditions += " AND " + EstatisticasConstants.KEY_HORA_OCORRENCIA + " = '" + hora + "' " ; + } + } + if ( horasTrabalhadas != null ) + { + Integer nrHoras = null; + try + { + nrHoras = Integer.parseInt( horasTrabalhadas ); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + if ( nrHoras != null ) + { + whereConditions += " AND " + EstatisticasConstants.KEY_HORAS_TRABALHADAS + " = " + nrHoras + " "; + } + } + if ( causas != null ) + { + whereConditions += " AND " + EstatisticasConstants.KEY_CAUSAS_ACIDENTE + " = " + causas + " "; + } +// if ( departamento != null ) +// { +// departamento = departamento.replaceAll( " ", "%" ); +// whereConditions += " AND " + EstatisticasConstants.KEY_DEPARTAMENTO + " ILIKE '%" + departamento + "%' "; +// } + if ( seccaoID != null ) + { + whereConditions += " AND " + EstatisticasConstants.KEY_SECCAO + " = " + seccaoID + " "; + } + if ( formacao_shst != null ) + { + /** + * opcoes possiveis : 'y', 'n', 't' ( AnaliseAcidentesTrabalho.java ) + * 'y' -> if ( yes selected ) + * 'n' -> if ( ! yes selected ) && ( no selected ) + * 't' -> else + */ + whereConditions += " AND " + EstatisticasConstants.KEY_FORMACAO_SHST + " = '" + ( formacao_shst ? "y" : "n" ) + "' "; + } + + + String sql = "SELECT analises_acidentes.estado, COUNT( analises_acidentes.* ) AS count " + + "FROM " + tableNames + " " + + "WHERE " + ( "".equals( joinConditions ) ? "" : joinConditions + " AND " ) + whereConditions + " " + + "GROUP BY analises_acidentes.estado " + + "ORDER BY analises_acidentes.estado"; + + List< EstatisticaProcessoBean > stats = new LinkedList< EstatisticaProcessoBean >(); + try + { + stats = getEstatisticasForSQL( sql ); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + return stats; + } + + + private List< EstatisticaProcessoBean > getEstatisticasForSQL( String sql ) throws Exception + { + System.out.println( "\nEstatisticasQuery : " + sql + "\n" ); + + List< EstatisticaProcessoBean > stats = new LinkedList< EstatisticaProcessoBean >(); + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + Virtual2DArray array = getExecuter().executeQuery( new Select( sql ) ); + if ( array != null ) + { + for ( int i = 0; i < array.columnLength(); i++ ) + { + Integer estado = array.get( i, 0 ); + Long count = array.get( i, 1 ); + String fase = adp.getFase( estado ); + + if ( fase != null ) + { + EstatisticaProcessoBean bean = new EstatisticaProcessoBean(); + bean.setEstado( estado ); + bean.setCount( count ); + bean.setFase( fase ); + stats.add( bean ); + } + } + } + return stats; + } + + public com.sun.rave.web.ui.model.Option[] getSeccoesList( ) throws Exception + { + com.sun.rave.web.ui.model.Option[] options = null; + Select2 query = new Select2( + new String[] { SeccoesData.TABLENAME }, + new Integer[] { }, + new Expression[] { }, + new String[] { SeccoesData.ID_FULL, SeccoesData.DESCRICAO_FULL }, + new Field( SeccoesData.ACTIVO_FULL ).isEqual( "y" ).and( new Field( SeccoesData.DESCRICAO_FULL ).isDifferent( null ) ), + new String[] { SeccoesData.DESCRICAO_FULL }, + null, null, null + ); + + Virtual2DArray array = getExecuter().executeQuery( query ); + if ( array != null ) + { + options = new com.sun.rave.web.ui.model.Option[ array.columnLength() + 1 ]; + options[ 0 ] = new Option( "", "" ); + for ( int i = 0; i < array.columnLength(); i++ ) + { + Integer seccaoID = array.get( i, 0 ); + String seccao = array.get( i, 1 ); + + options[ (i+1) ] = new Option( seccaoID, seccao ); + } + } + return options; + } + + public SeccoesData loadSeccaoByID( Integer seccaoID ) throws Exception + { + return getProvider().load( SeccoesData.class, seccaoID, SeccoesData.ID ); + } + + public com.sun.rave.web.ui.model.Option[] getCausasAcidente( ) throws Exception + { + com.sun.rave.web.ui.model.Option[] options = null; + + Select2 query = new Select2( + new String[] { CausasData.TABLENAME }, + new Integer[] { }, + new Expression[] { }, + new String[] { CausasData.ID_FULL, CausasData.CAUSA_FULL }, + new Field( CausasData.ACTIVA_FULL ).isEqual( "y" ), + new String[] { CausasData.CAUSA_FULL }, + null, null, null + ); + Virtual2DArray array = getExecuter().executeQuery( query ); + if ( array != null ) + { + options = new com.sun.rave.web.ui.model.Option[ array.columnLength() + 1 ]; + options[ 0 ] = new Option( "", "" ); + for ( int i = 0; i < array.columnLength(); i++ ) + { + Integer causaID = array.get( i, 0 ); + String causa = array.get( i, 1 ); + options[ (i+1) ] = new Option( causaID, causa ); + } + } + return options; + } + + public String getCausaByID( Integer causaID ) throws Exception + { + String causa = ""; + + CausasData causaData = getProvider().load( CausasData.class, causaID, CausasData.ID ); + if ( causaData != null ) + { + causa = causaData.getCausa(); + } + return causa; + } +} + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/EvoBaseProvider.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/EvoBaseProvider.java new file mode 100644 index 00000000..553b2469 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/EvoBaseProvider.java @@ -0,0 +1,370 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.providers; + +import com.evolute.entity.ProviderInterface; +import com.evolute.entity.ProviderRegistry; +import com.evolute.entity.evo.EvoDataException; +import com.evolute.entity.evo.EvoDataObject; +import com.evolute.entity.evo.EvoDataProvider; +import com.evolute.entity.evo.EvoDataProviderFactory; +import com.evolute.entity.utils.ConnectionIdentity; +import com.evolute.utils.Singleton; +import com.evolute.utils.db.DBException; +import com.evolute.utils.db.DBManager; +import com.evolute.utils.db.Executer; +import com.evolute.utils.db.JDBCManager; +import com.evolute.utils.db.keyretrievers.PostgresqlAutoKeyRetriever; +import com.evolute.utils.error.ErrorLogger; +import com.evolute.utils.jdbc.DBStatementExecuter; +import com.evolute.utils.jdbc.StatementExecuterFactory; +import com.evolute.utils.sql.Insert; +import com.evolute.utils.sql.SQLQuery; +import com.evolute.utils.strings.UnicodeChecker; +import db.DBConstants; +import db.DBPropertiesLoader; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.Statement; +import javax.faces.context.ExternalContext; +import javax.faces.context.FacesContext; +import javax.servlet.http.HttpSession; + +/** + * + * @author dneves + */ +public class EvoBaseProvider +{ + private static EvoBaseProvider INSTANCE = null; + + private ProviderInterface< EvoDataObject< ? >, EvoDataException > providerInterface; + private DBManager dbManager; + + private ProviderInterface< EvoDataObject< ? >, EvoDataException > localProviderInterface; + private DBManager localDBManager; + + private EvoBaseProvider() throws DBException + { + init(); + } + + public static synchronized EvoBaseProvider getInstance() throws DBException + { + if ( INSTANCE == null ) + { + INSTANCE = new EvoBaseProvider(); + } + return INSTANCE; + } + + private void init() throws DBException + { + System.out.println( "EvoBaseProvider . init() : " ); + + String server = DBPropertiesLoader.getInstance().findProperty( DBConstants.SERVER_SIPRP ); + int port = DBPropertiesLoader.getInstance().findProperty( DBConstants.PORT_SIPRP, -1 ); + String dbname = DBPropertiesLoader.getInstance().findProperty( DBConstants.DATABASE_SIPRP ); + String username = DBPropertiesLoader.getInstance().findProperty( DBConstants.USERNAME_SIPRP ); + String password = DBPropertiesLoader.getInstance().findProperty( DBConstants.PASSWORD_SIPRP ); + + System.out.println( "\t" + server + " : " + port + " : " + dbname + " : " + username + " : " + password ); + + String server_local = DBPropertiesLoader.getInstance().findProperty( DBConstants.SERVER_SIPRP_LOCAL ); + int port_local = DBPropertiesLoader.getInstance().findProperty( DBConstants.PORT_SIPRP_LOCAL, -1 ); + String dbname_local = DBPropertiesLoader.getInstance().findProperty( DBConstants.DATABASE_SIPRP_LOCAL ); + String username_local = DBPropertiesLoader.getInstance().findProperty( DBConstants.USERNAME_SIPRP_LOCAL ); + String password_local = DBPropertiesLoader.getInstance().findProperty( DBConstants.PASSWORD_SIPRP_LOCAL ); + + System.out.println( "\t" + server_local + " : " + port_local + " : " + dbname_local + " : " + username_local + " : " + password_local ); + + init( DBConstants.DB.SIPRP, server, port, dbname, username, password ); + init( DBConstants.DB.SIPRP_LOCAL, server_local, port_local, dbname_local, username_local, password_local ); + } + + private void init( DBConstants.DB db, String dbServer, Integer dbPort, String dbName, String dbUsername, String dbPassword ) + throws DBException + { + String dbUrl = "jdbc:postgresql://" + dbServer + ":" + dbPort + "/" + dbName + "?prepareThreshold=2"; + if ( DBConstants.DB.SIPRP.equals( db ) ) + { + Singleton.setInstance( DBConstants.CONNECTION_URL, dbUrl ); + } + else if ( DBConstants.DB.SIPRP_LOCAL.equals( db ) ) + { + Singleton.setInstance( DBConstants.LOCAL_CONNECTION_URL, dbUrl ); + } + + createDBManager( db, dbUsername, dbPassword ); + initProviderConnection( db, dbUsername, dbPassword ); + } + + private void createDBManager( DBConstants.DB db, String username, String password ) + throws DBException + { + if ( DBConstants.DB.SIPRP.equals( db ) ) + { + if( dbManager != null ) + { + dbManager.close(); + } + String dbUrl = ( String ) Singleton.getInstance( DBConstants.CONNECTION_URL ); + DBManager manager = new JDBCManager( dbUrl, username, password , 14, 7, 7, new SQLQuery[] { } ); + StatementExecuterFactory.initialize( new DBStatementExecuter( manager.getSharedExecuter( EvoBaseProvider.class ) ) ); + UnicodeChecker.setUseDoubleSlash( true ); + Insert.setDefaultKeyRetriever( PostgresqlAutoKeyRetriever.RETRIEVER ); + dbManager = manager; + System.out.println( "\nDBManager : " + dbManager ); + } + else if ( DBConstants.DB.SIPRP_LOCAL.equals( db ) ) + { + if( localDBManager != null ) + { + localDBManager.close(); + } + String dbUrl = ( String ) Singleton.getInstance( DBConstants.LOCAL_CONNECTION_URL ); + DBManager manager = new JDBCManager( dbUrl, username, password , 14, 7, 7, new SQLQuery[] { } ); + StatementExecuterFactory.initialize( new DBStatementExecuter( manager.getSharedExecuter( EvoBaseProvider.class ) ) ); + UnicodeChecker.setUseDoubleSlash( true ); + Insert.setDefaultKeyRetriever( PostgresqlAutoKeyRetriever.RETRIEVER ); + localDBManager = manager; + Singleton.setInstance( Singleton.DEFAULT_DBMANAGER, localDBManager ); + System.out.println( "\nLocalDBManager : " + localDBManager ); + } + } + + private void initProviderConnection( DBConstants.DB db, String username, String password ) + { + if ( DBConstants.DB.SIPRP.equals( db ) ) + { + String dbUrl = ( String ) Singleton.getInstance( DBConstants.CONNECTION_URL ); + providerInterface = createInstance( db, dbUrl, username, password ); + } + else if ( DBConstants.DB.SIPRP_LOCAL.equals( db ) ) + { + String dbUrl = ( String ) Singleton.getInstance( DBConstants.LOCAL_CONNECTION_URL ); + localProviderInterface = createInstance( db, dbUrl, username, password ); + } + } + + private static ProviderInterface< EvoDataObject< ? >, EvoDataException > createInstance( DBConstants.DB db, String url, String user, String password ) + { + ProviderRegistry.registerDefaultProviderFactory( new EvoDataProviderFactory() ); + ConnectionIdentity conn = new ConnectionIdentity( url, user ); + ProviderRegistry.registerDefaultConnection( conn ); + ProviderInterface< EvoDataObject< ? >, EvoDataException > provider = + ( ProviderInterface< EvoDataObject< ? >, EvoDataException > ) ProviderRegistry.getDefaultProvider( conn ); + ( ( EvoDataProvider ) provider ).setIsUsingCache( Boolean.FALSE ); + if ( DBConstants.DB.SIPRP.equals( db ) ) + { + Singleton.setInstance( DBConstants.DEFAULT_PROVIDER, provider ); + } + else if ( DBConstants.DB.SIPRP_LOCAL.equals( db ) ) + { + Singleton.setInstance( DBConstants.LOCAL_PROVIDER, provider ); + Singleton.setInstance( Singleton.DEFAULT_EVO_DATA_PROVIDER, provider ); + Singleton.setInstance( Singleton.DEFAULT_OBJECT_PROVIDER, provider ); + } + conn.setPassword( password ); + return provider; + } + + public ProviderInterface< EvoDataObject< ? >, EvoDataException > getProvider() + { + return getProvider( DBConstants.DB.SIPRP ); + } + + public ProviderInterface< EvoDataObject< ? >, EvoDataException > getProvider( DBConstants.DB db ) + { + ProviderInterface< EvoDataObject< ? >, EvoDataException > provider = null; + + if ( DBConstants.DB.SIPRP.equals( db ) ) + { + provider = providerInterface; + } + else if ( DBConstants.DB.SIPRP_LOCAL.equals( db ) ) + { + provider = localProviderInterface; + } + + return provider; + } + + public DBManager getDbManager() + { + return getDbManager( DBConstants.DB.SIPRP ); + } + + public DBManager getDbManager( DBConstants.DB db ) + { + DBManager manager = null; + if ( DBConstants.DB.SIPRP.equals( db ) ) + { + manager = dbManager; + } + else if ( DBConstants.DB.SIPRP_LOCAL.equals( db ) ) + { + manager = localDBManager; + } + return manager; + } + + public Executer getExecuter() throws DBException + { + return getExecuter( this ); + } + + private Executer getExecuter( Object clazz ) throws DBException + { + if ( getDbManager() == null ) + { + init(); + } + +// DBManager dbm = ( DBManager ) Singleton.getInstance( DBConstants.DEFAULT_DBMANAGER ); +// return dbm.getSharedExecuter( this ); + + DBManager dbm = getDbManager( DBConstants.DB.SIPRP ); + if ( dbm != null ) + { + return dbm.getSharedExecuter( this ); + } + return null; + } + + public Executer getLocalExecuter() throws DBException + { + return getLocalExecuter( this ); + } + + private Executer getLocalExecuter( Object clazz ) throws DBException + { + if ( getDbManager( DBConstants.DB.SIPRP_LOCAL ) == null ) + { + init(); + } +// DBManager dbm = ( DBManager ) Singleton.getInstance( DBConstants.LOCAL_DBMANAGER ); +// return dbm.getSharedExecuter( this ); + + DBManager dbm = getDbManager( DBConstants.DB.SIPRP_LOCAL ); + if ( dbm != null ) + { + return dbm.getSharedExecuter( this ); + } + return null; + } + + @Deprecated + public Statement createStatement() + { + String connectionURL = ( String ) Singleton.getInstance( DBConstants.CONNECTION_URL ); + String username = DBPropertiesLoader.getInstance().findProperty( DBConstants.USERNAME_SIPRP ); + String password = DBPropertiesLoader.getInstance().findProperty( DBConstants.PASSWORD_SIPRP ); + + return getStatement( DBConstants.DB.SIPRP, connectionURL, username, password ); + } + + @Deprecated + public Statement createLocalStatement() + { + String connectionURL = ( String ) Singleton.getInstance( DBConstants.LOCAL_CONNECTION_URL ); + String username = DBPropertiesLoader.getInstance().findProperty( DBConstants.USERNAME_SIPRP_LOCAL ); + String password = DBPropertiesLoader.getInstance().findProperty( DBConstants.PASSWORD_SIPRP_LOCAL ); + + return getStatement( DBConstants.DB.SIPRP_LOCAL, connectionURL, username, password ); + } + + private Statement getStatement( DBConstants.DB db, String connectionURL, String username, String password ) + { + Statement stm = null; + try + { + Connection connection = getConnection( db, connectionURL, username, password ); + if ( connection != null ) + { + stm = connection.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY ); + } + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + return stm; + } + + private Connection getConnection( DBConstants.DB db, String connectionURL, String username, String password ) throws Exception + { + Connection connection = null; +// System.out.println( "\nEvoBaseProvider . getConnection( " + connectionURL + ", " + username + " ) : " ); + + FacesContext fc = FacesContext.getCurrentInstance(); +// System.out.println( "\tFacesContext : " + fc ); + if ( fc != null ) + { + + ExternalContext ec = fc.getExternalContext(); + // System.out.println( "\tExternalContext : " + ec ); + if ( ec != null ) + { + HttpSession session = ( HttpSession ) ec.getSession( false ); + // System.out.println( "\tSession : " + session ); + + if ( session != null ) + { + if ( DBConstants.DB.SIPRP.equals( db ) ) + { + connection = ( Connection ) session.getAttribute( DBConstants.SESSION_CONNECTION ); + if ( connection == null ) + { + // System.out.println( "\n-> Creating new SIPRP connection ..." ); + Class.forName( "org.postgresql.Driver" ).newInstance(); + connection = DriverManager.getConnection( connectionURL, username, password ); + session.setAttribute( DBConstants.SESSION_CONNECTION, connection ); + } + } + else if ( DBConstants.DB.SIPRP_LOCAL.equals( db ) ) + { + connection = ( Connection ) session.getAttribute( DBConstants.SESSION_CONNECTION_LOCAL ); + if ( connection == null ) + { + // System.out.println( "\n-> Creating new SIPRP_LOCAL connection ..." ); + Class.forName( "org.postgresql.Driver" ).newInstance(); + connection = DriverManager.getConnection( connectionURL, username, password ); + session.setAttribute( DBConstants.SESSION_CONNECTION_LOCAL, connection ); + } + } + } + } + } + + if ( connection == null ) + { + connection = ( Connection ) Singleton.getInstance( "CONNECTION_OBJECT" ); + if ( connection == null ) + { + // System.out.println( "\nEvoBaseProvider . getConnection() : session is null !" ); + + if ( DBConstants.DB.SIPRP.equals( db ) ) + { + // System.out.println( "\t-> Creating new SIPRP connection ..." ); + Class.forName( "org.postgresql.Driver" ).newInstance(); + connection = DriverManager.getConnection( connectionURL, username, password ); + } + else if ( DBConstants.DB.SIPRP_LOCAL.equals( db ) ) + { + // System.out.println( "\t-> Creating new SIPRP_LOCAL connection ..." ); + Class.forName( "org.postgresql.Driver" ).newInstance(); + connection = DriverManager.getConnection( connectionURL, username, password ); + } + Singleton.setInstance( "CONNECTION_OBJECT", connection ); + } + } + +// System.out.println( "<-- getConnection() : " + connection ); + return connection; + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/GenericDataProvider.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/GenericDataProvider.java new file mode 100644 index 00000000..0da93335 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/GenericDataProvider.java @@ -0,0 +1,122 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.providers; + +import com.evolute.entity.ProviderInterface; +import com.evolute.entity.evo.EvoDataException; +import com.evolute.entity.evo.EvoDataObject; +import com.evolute.utils.db.DBException; +import com.evolute.utils.db.Executer; +import com.evolute.utils.error.ErrorLogger; +import db.DBConstants; +import java.sql.ResultSet; +import java.sql.Statement; + + +public abstract class GenericDataProvider +{ + private ProviderInterface< EvoDataObject< ? >, EvoDataException > provider = null; + private Executer executer = null; + + private ProviderInterface< EvoDataObject< ? >, EvoDataException > localProvider = null; + private Executer localExecuter = null; + + protected GenericDataProvider() throws Exception + { + provider = EvoBaseProvider.getInstance().getProvider( DBConstants.DB.SIPRP ); + executer = EvoBaseProvider.getInstance().getExecuter(); + + localProvider = EvoBaseProvider.getInstance().getProvider( DBConstants.DB.SIPRP_LOCAL ); + localExecuter = EvoBaseProvider.getInstance().getLocalExecuter(); + } + + public Executer getExecuter() + { + return executer; + } + + public Executer getLocalExecuter() + { + return localExecuter; + } + + public ProviderInterface< EvoDataObject< ? >, EvoDataException > getProvider() + { + return provider; + } + + public ProviderInterface< EvoDataObject< ? >, EvoDataException > getLocalProvider() + { + return localProvider; + } + + +// public void checkConnection() +// { +// Db db = Db.getInstance(); +// if ( db.getConnection() == null ) +// { +// try +// { +// db.connect(); +// } +// catch ( Exception ex ) +// { +// ErrorLogger.logException( ex ); +// } +// } +// } + + protected Integer getMaxTableId(String table) + { + Statement st = createStatement(); + String id = table + ".id"; + String sql = "SELECT max(" + id + ")+1 AS MAXID FROM " + table; + try + { + ResultSet rs = st.executeQuery(sql); + rs.first(); + Integer newId = new Integer(rs.getInt("MAXID")); + if(newId.intValue() == 0) + { + newId = new Integer(1); + } + return newId; + } + catch(Exception ex) + { + return new Integer(1); + } + } + + protected Statement createStatement() + { + try + { +// Db db = Db.getInstance(); +// return db.createStatement(); + return EvoBaseProvider.getInstance().createStatement(); + } + catch ( DBException ex ) + { + ErrorLogger.logException( ex ); + } + return null; + } + + protected Statement createLocalStatement() + { + try + { + return EvoBaseProvider.getInstance().createLocalStatement(); + } + catch ( DBException ex ) + { + ErrorLogger.logException( ex ); + } + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/TrabalhadoresListDataProvider.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/TrabalhadoresListDataProvider.java new file mode 100644 index 00000000..a77dbac3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/TrabalhadoresListDataProvider.java @@ -0,0 +1,24 @@ +/* + * TrabalhadoresListDataProvider.java + * + * Created on September 26, 2007, 4:25 PM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package db.providers; + +import com.sun.data.provider.impl.ObjectListDataProvider; + +/** + * + * @author lluis + */ +public class TrabalhadoresListDataProvider extends ObjectListDataProvider { + + /** Creates a new instance of TrabalhadoresListDataProvider */ + public TrabalhadoresListDataProvider() { + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/UtilizadoresActivosListDataProvider.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/UtilizadoresActivosListDataProvider.java new file mode 100644 index 00000000..5a810776 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/UtilizadoresActivosListDataProvider.java @@ -0,0 +1,24 @@ +/* + * UtilizadoresListDataProvider.java + * + * Created on November 30, 2007, 2:51 PM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package db.providers; + +import com.sun.data.provider.impl.ObjectListDataProvider; + +/** + * + * @author lluis + */ +public class UtilizadoresActivosListDataProvider extends ObjectListDataProvider { + + /** Creates a new instance of UtilizadoresListDataProvider */ + public UtilizadoresActivosListDataProvider() { + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/UtilizadoresDataProvider.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/UtilizadoresDataProvider.java new file mode 100644 index 00000000..8fe6b590 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/UtilizadoresDataProvider.java @@ -0,0 +1,714 @@ +/* + * UtilizadoresDataProvider.java + * + * Created on September 20, 2007, 10:03 AM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package db.providers; + +import beans.Medico; +import beans.Permissao; +import beans.TecnicoSaude; +import beans.Utilizador; +import com.evolute.utils.arrays.Virtual2DArray; +import com.evolute.utils.error.ErrorLogger; +import com.evolute.utils.sql.Expression; +import com.evolute.utils.sql.Field; +import com.evolute.utils.sql.Select2; +import com.evolute.utils.sql.expression.Par; +import com.evolute.utils.strings.StringPlainer; +import com.sun.rave.web.ui.model.Option; +import db.data.siprp.outer.TiposUtilizadoresData; +import db.data.siprp.outer.UtilizadoresData; +import global.Global; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.Date; +import java.util.LinkedList; +import java.util.List; +import java.util.ListIterator; +import utils.Utils; + +/** + * + * @author lluis + */ +public class UtilizadoresDataProvider extends GenericDataProvider +{ + private static UtilizadoresDataProvider INSTANCE = null; + + private UtilizadoresDataProvider() throws Exception + { + super(); + } + + public static synchronized UtilizadoresDataProvider getInstance() throws Exception + { + if ( INSTANCE == null ) + { + INSTANCE = new UtilizadoresDataProvider(); + } + return INSTANCE; + } + + + public Integer getMaxUserId() + { + Integer newId = new Integer( 1 ); + + Statement st = createStatement(); + String sql = "SELECT max( utilizadores.id ) + 1 AS MAXUSERID FROM utilizadores"; + try + { + ResultSet rs = st.executeQuery( sql ); + rs.first(); + newId = new Integer( rs.getInt( "MAXUSERID" ) ); + if ( newId.intValue() == 0 ) + { + newId = new Integer( 1 ); + } + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + return newId; + } + + public Integer createNewUtilizador( Utilizador u ) throws Exception + { + Statement st = createStatement(); + Integer newUserId = getMaxUserId(); + + String sql = "INSERT INTO utilizadores (id, login, password, data_password, email, empresa_id, estabelecimento_id, administrador, tipo, numero_cedula, cap, nome, medico_id, funcionario_hst_id, activo, responsavel_loja, gestor_geral, numero_mecanografico) VALUES ("; + sql += newUserId + ", '"; + sql += u.getLogin() + "', '"; + sql += u.getPassword() + "', "; + if(u.getData_password() == null) + { + sql += null + ", '"; + } + else + { + sql += "'" + u.getData_password() + "', '"; + } + sql += u.getEmail() + "', "; + sql += u.getEmpresa_id() + ", "; + sql += u.getEstabelecimento_id() + ", '"; + sql += u.getAdministrador() + "', "; + sql += u.getTipo() + ", '"; + sql += u.getNumero_cedula() + "', '"; + sql += u.getCap() + "', '"; + sql += u.getNome() + "', "; + sql += u.getMedico_id() + ", "; + sql += u.getFuncionario_hst_id() + ", '"; + sql += u.getActivo() + "', '"; + sql += u.getResponsavel_loja() + "', '"; + sql += u.getGestor_geral() + "', '"; + sql += u.getNumero_mecanografico() + "')"; + System.out.println("USER SQL : " + sql); + st.execute(sql); + return newUserId; + } + + public void updateUtilizador(Utilizador u) throws Exception + { + Statement st = createStatement(); + String sql = ""; + if(u.getData_password() == null) + { + sql = "UPDATE utilizadores SET login = '" + u.getLogin() + "', password = '" + u.getPassword() + "', data_password = " + null + ", email = '" + u.getEmail() + "', empresa_id = " + u.getEmpresa_id() + ", estabelecimento_id = " + u.getEstabelecimento_id() + ", administrador = '" + u.getAdministrador() + "', tipo = " + u.getTipo() + ", numero_cedula = '" + u.getNumero_cedula() + "', cap = '" + u.getCap() + "', nome = '" + u.getNome() + "', medico_id = " + u.getMedico_id() + ", funcionario_hst_id = " + u.getFuncionario_hst_id() + ", activo = '" + u.getActivo() + "', responsavel_loja = '" + u.getResponsavel_loja() + "', gestor_geral = '" + u.getGestor_geral() + "', primeiro_login = '" + u.getPrimeiro_login() + "' WHERE id = " + u.getId(); + } + else + { + sql = "UPDATE utilizadores SET login = '" + u.getLogin() + "', password = '" + u.getPassword() + "', data_password = '" + u.getData_password() + "', email = '" + u.getEmail() + "', empresa_id = " + u.getEmpresa_id() + ", estabelecimento_id = " + u.getEstabelecimento_id() + ", administrador = '" + u.getAdministrador() + "', tipo = " + u.getTipo() + ", numero_cedula = '" + u.getNumero_cedula() + "', cap = '" + u.getCap() + "', nome = '" + u.getNome() + "', medico_id = " + u.getMedico_id() + ", funcionario_hst_id = " + u.getFuncionario_hst_id() + ", activo = '" + u.getActivo() + "', responsavel_loja = '" + u.getResponsavel_loja() + "', gestor_geral = '" + u.getGestor_geral() + "', primeiro_login = '" + u.getPrimeiro_login() + "' WHERE id = " + u.getId(); + } + + System.out.println("SQL UPDATE USER : " + sql); + st.execute(sql); + } + + public void deleteUser( Integer userID ) throws Exception + { + Statement st = createStatement(); + String sql = "UPDATE utilizadores SET apagado = 'y', activo = 'n' WHERE id = " + userID; + st.execute(sql); + } + + public Utilizador getUtilizador(String login) throws Exception + { + Utilizador u = new Utilizador(); + Statement st = createStatement(); + String sql = "SELECT * FROM utilizadores WHERE LOWER(login) = '" + login.toLowerCase() + "' AND apagado = 'n'"; + ResultSet rs = st.executeQuery(sql); + if ( rs.first() ) + { + u.setId(new Integer(rs.getInt("id"))); + u.setLogin(rs.getString("login")); + u.setPassword(rs.getString("password")); + u.setData_password(rs.getDate("data_password")); + u.setEmail(rs.getString("email")); + u.setEmpresa_id(new Integer(rs.getInt("empresa_id"))); + u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id"))); + u.setAdministrador(rs.getString("administrador")); + u.setTipo(new Integer(rs.getInt("tipo"))); + u.setNumero_cedula(rs.getString("numero_cedula")); + u.setCap(rs.getString("cap")); + u.setNome(rs.getString("nome")); + u.setMedico_id(new Integer(rs.getInt("medico_id"))); + u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id"))); + u.setActivo(rs.getString("activo")); + u.setResponsavel_loja(rs.getString("responsavel_loja")); + u.setGestor_geral(rs.getString("gestor_geral")); + u.setPrimeiro_login(rs.getString("primeiro_login")); + u.setApagado(rs.getString("apagado")); + } + return u; + } + + public Utilizador getUtilizador(Integer id) throws Exception + { + Utilizador u = new Utilizador(); + Statement st = createStatement(); + String sql = "SELECT * FROM utilizadores WHERE id = " + id; + ResultSet rs = st.executeQuery(sql); + + if ( rs.first() ) + { + u.setId(new Integer(rs.getInt("id"))); + u.setLogin(rs.getString("login")); + u.setPassword(rs.getString("password")); + u.setData_password(rs.getDate("data_password")); + u.setEmail(rs.getString("email")); + u.setEmpresa_id(new Integer(rs.getInt("empresa_id"))); + u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id"))); + u.setAdministrador(rs.getString("administrador")); + u.setTipo(new Integer(rs.getInt("tipo"))); + u.setNumero_cedula(rs.getString("numero_cedula")); + u.setCap(rs.getString("cap")); + u.setNome(rs.getString("nome")); + u.setMedico_id(new Integer(rs.getInt("medico_id"))); + u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id"))); + u.setActivo(rs.getString("activo")); + u.setResponsavel_loja(rs.getString("responsavel_loja")); + u.setGestor_geral(rs.getString("gestor_geral")); + u.setApagado(rs.getString("apagado")); + } + return u; + } + + public ArrayList getUtilizadoresListByTipo( Integer tipo, String responsavel_loja, Integer estabelecimento_id ) + throws Exception + { + ArrayList list = new ArrayList(); + Statement st = createStatement(); + String sql = "SELECT * FROM utilizadores WHERE activo = 'y' AND apagado = 'n' AND tipo = " + tipo; + String estabelecimento_constraint = ""; + if( tipo != null && ( tipo.intValue() == Global.TIPO_UTILIZADOR_RH || tipo.intValue() == Global.TIPO_UTILIZADOR_SEGURANCA ) ) + { + estabelecimento_constraint = " AND estabelecimento_id = " + estabelecimento_id; + } + sql += estabelecimento_constraint; + + if ( "y".equals( responsavel_loja ) ) + { + sql += " AND responsavel_loja = 'y'"; +// sql = "SELECT * FROM utilizadores WHERE activo = 'y' AND apagado = 'n' AND responsavel_loja = 'y' AND tipo = " + tipo + estabelecimento_constraint; + } +// else +// { +// sql = "SELECT * FROM utilizadores WHERE activo = 'y' AND apagado = 'n' AND tipo = " + tipo + estabelecimento_constraint; +// } + + ResultSet rs = st.executeQuery( sql ); +// rs.first(); +// do +// { + while ( rs != null && rs.next() ) + { + Utilizador u = new Utilizador(); + u.setId(new Integer(rs.getInt("id"))); + u.setLogin(rs.getString("login")); + u.setPassword(rs.getString("password")); + u.setData_password(rs.getDate("data_password")); + u.setEmail(rs.getString("email")); + u.setEmpresa_id(new Integer(rs.getInt("empresa_id"))); + u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id"))); + u.setAdministrador(rs.getString("administrador")); + u.setTipo(new Integer(rs.getInt("tipo"))); + u.setNumero_cedula(rs.getString("numero_cedula")); + u.setCap(rs.getString("cap")); + u.setNome(rs.getString("nome")); + u.setMedico_id(new Integer(rs.getInt("medico_id"))); + u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id"))); + u.setActivo(rs.getString("activo")); + u.setResponsavel_loja(rs.getString("responsavel_loja")); + list.add( u ); + } +// }while(rs.next()); + return list; + } + + + public List< Utilizador > getUtilizadoresList( String por, String nome, String login, Integer estabelecimentoID, String activo, String dirRH ) + throws Exception + { + List< Utilizador > listUtilizadores = new LinkedList< Utilizador >(); + +// por = por == null ? "" : por; + nome = nome == null ? null : StringPlainer.convertString( nome.replaceAll( " ", "%" ) ); + login = login == null ? null : StringPlainer.convertString( login.replaceAll( " ", "%" ) ); + activo = activo == null ? "y" : activo; + dirRH = dirRH == null ? "n" : dirRH; + boolean isDirRH = "y".equals( dirRH ); + + Expression whereExpression = new Field( UtilizadoresData.APAGADO_FULL ).isEqual( "n" ); + whereExpression = whereExpression.and( new Field( UtilizadoresData.ACTIVO_FULL ).isEqual( activo ) ); + whereExpression = whereExpression.and( new Field( UtilizadoresData.TIPO_FULL ).isDifferent( Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP ) ); + if ( por != null ) + { + whereExpression = whereExpression.and( new Field( "plain( " + UtilizadoresData.NUMERO_MECANOGRAFICO_FULL + " )" ).isILike( "%" + por + "%" ) ); + } + if ( nome != null ) + { + Expression nomeExpression = new Field( "plain( " + UtilizadoresData.NOME_FULL + " )" ).isILike( "%" + nome + "%" ).or( + new Field( "plain_utf8( " + UtilizadoresData.NOME_FULL + " )" ).isILike( "%" + nome + "%" ) ); + whereExpression = whereExpression.and( new Par( nomeExpression ) ); + } + if ( login != null ) + { + Expression loginExpression = new Field( "plain( " + UtilizadoresData.LOGIN_FULL + " )" ).isILike( "%" + login + "%" ).or( + new Field( "plain_utf8( " + UtilizadoresData.LOGIN_FULL + " )" ).isILike( "%" + login + "%" ) ); + whereExpression = whereExpression.and( new Par( loginExpression ) ); + + } + if ( estabelecimentoID != null ) + { + whereExpression = whereExpression.and( new Field( UtilizadoresData.ESTABELECIMENTO_ID_FULL ).isEqual( estabelecimentoID ) ); + } + + Select2 query = new Select2( + new String[] { UtilizadoresData.TABLENAME, TiposUtilizadoresData.TABLENAME }, + new Integer[] { Select2.JOIN_INNER }, + new Expression[] { + new Field( UtilizadoresData.TIPO_FULL ).isEqual( new Field( TiposUtilizadoresData.TIPO_FULL ) ) + }, + new String[] { + UtilizadoresData.ID_FULL, UtilizadoresData.LOGIN_FULL, UtilizadoresData.PASSWORD_FULL, UtilizadoresData.EMAIL_FULL, + UtilizadoresData.EMPRESA_ID_FULL, UtilizadoresData.ESTABELECIMENTO_ID_FULL, UtilizadoresData.ADMINISTRADOR_FULL, + UtilizadoresData.MEDICO_ID_FULL, UtilizadoresData.TIPO_FULL, UtilizadoresData.NUMERO_CEDULA_FULL, + UtilizadoresData.CAP_FULL, UtilizadoresData.NOME_FULL, UtilizadoresData.FUNCIONARIO_HST_ID_FULL, + UtilizadoresData.ACTIVO_FULL, UtilizadoresData.RESPONSAVEL_LOJA_FULL, UtilizadoresData.NUMERO_MECANOGRAFICO_FULL, + UtilizadoresData.GESTOR_GERAL_FULL, UtilizadoresData.PRIMEIRO_LOGIN_FULL, UtilizadoresData.APAGADO_FULL, + UtilizadoresData.DATA_PASSWORD_FULL, + TiposUtilizadoresData.DESCRICAO_FULL + }, + whereExpression, + new String[] { UtilizadoresData.NUMERO_MECANOGRAFICO_FULL, UtilizadoresData.TIPO_FULL }, + null, + null, + null + ); + + System.out.println( "\nUtilizadores SQL : " + query.toString() ); + Virtual2DArray array = getExecuter().executeQuery( query ); + if ( array != null ) + { + for ( int i = 0; i < array.columnLength(); i++ ) + { + Integer userID = array.get( i, 0 ); + String loginUtilizador = array.get( i, 1 ); + String password = array.get( i, 2 ); + String email = array.get( i, 3 ); + Integer empresaID = array.get( i, 4 ); + Integer estabelecimento_ID = array.get( i, 5 ); + String administrador = array.get( i, 6 ); + Integer medicoID = array.get( i, 7 ); + Integer tipoTIPO = array.get( i, 8 ); + String numeroCedula = array.get( i, 9 ); + String cap = array.get( i, 10 ); + String nomeUtilizador = array.get( i, 11 ); + Integer funcionarioHSTID = array.get( i, 12 ); + String activoUtilizador = array.get( i, 13 ); + String responsavelLoja = array.get( i, 14 ); + String numeroMecanografico = array.get( i, 15 ); + String gestorGeral = array.get( i, 16 ); + String primeiroLogin = array.get( i, 17 ); + String apagado = array.get( i, 18 ); + Date dataPassword = array.get( i, 19 ); + java.sql.Date sqlDataPassword = dataPassword == null ? null : new java.sql.Date( dataPassword.getTime() ); + String categoria = array.get( i, 20 ); + + String nomeEstabelecimento = ""; + try + { + nomeEstabelecimento = AnalisesDataProvider.getInstance().getEstabelecimentoNome( estabelecimento_ID ); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + + Utilizador u = new Utilizador(); + u.setId( userID ); + u.setLogin( loginUtilizador ); + u.setPassword( password ); + u.setData_password( sqlDataPassword ); + u.setEmail( email ); + u.setEmpresa_id( empresaID ); + u.setEstabelecimento_id( estabelecimento_ID ); + u.setAdministrador( administrador ); + u.setTipo( tipoTIPO ); + u.setNumero_cedula( numeroCedula ); + u.setCap( cap ); + u.setNome( Utils.htmlToText( Utils.unicodeToHTML( nomeUtilizador ) ) ); + u.setMedico_id( medicoID ); + u.setFuncionario_hst_id( funcionarioHSTID ); + u.setActivo( activoUtilizador ); + u.setResponsavel_loja( responsavelLoja ); + u.setGestor_geral( gestorGeral ); + u.setNumero_mecanografico( numeroMecanografico ); + u.setCategoria( categoria ); + u.setApagado( apagado ); + u.setNome_estabelecimento( Utils.htmlToText( Utils.unicodeToHTML( nomeEstabelecimento ) ) ); + + listUtilizadores.add( u ); + } + } + + return listUtilizadores; + } + +// public List< Utilizador > getUtilizadoresList(String por, String nome, Integer estabelecimento_id, String activo, String booDirRh) throws Exception +// { +// StringTokenizer stk = null; +// AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); +// List< Utilizador > list = new LinkedList< Utilizador >(); +// Statement st = createStatement(); +// +// String sql = ""; +// String sql1 = ""; +// String sql2 = ""; +// String sql3 = ""; +// if(por != null && nome != null && estabelecimento_id != null) +// { +// sql1 = "SELECT * FROM utilizadores, tipos_utilizadores " + +// "WHERE utilizadores.tipo = tipos_utilizadores.tipo AND LOWER(numero_mecanografico) LIKE '%" + por + "%' AND ("; +// sql3 = ") AND estabelecimento_id = " + estabelecimento_id + " AND utilizadores.activo ='" + activo + "' AND apagado = 'n' AND utilizadores.tipo <> " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + " ORDER BY numero_mecanografico"; +// stk = new StringTokenizer (nome); +// int n = 0; +// while (stk.hasMoreTokens ()) { +// if(n > 0) +// { +// sql2 += "AND "; +// } +// sql2 += "LOWER(nome) LIKE '%" + stk.nextToken () + "%' "; +// n++; +// } +// sql = sql1 + sql2 + sql3; +// } +// else if(por != null && nome != null) +// { +// sql1 = "SELECT * FROM utilizadores, tipos_utilizadores " + +// "WHERE utilizadores.tipo = tipos_utilizadores.tipo AND LOWER(numero_mecanografico) LIKE '%" + por + "%' AND ("; +// sql3 = ") AND utilizadores.activo ='" + activo + "' AND apagado = 'n' AND utilizadores.tipo <> " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + +// " ORDER BY numero_mecanografico"; +// stk = new StringTokenizer (nome); +// int n = 0; +// while (stk.hasMoreTokens ()) { +// if(n > 0) +// { +// sql2 += "AND "; +// } +// sql2 += "LOWER(nome) LIKE '%" + stk.nextToken () + "%' "; +// n++; +// } +// sql = sql1 + sql2 + sql3; +// } +// else if(por != null && estabelecimento_id != null) +// { +// sql = "SELECT * FROM utilizadores, tipos_utilizadores " + +// "WHERE utilizadores.tipo = tipos_utilizadores.tipo " + +// "AND LOWER(numero_mecanografico) LIKE '%" + por + "%' AND estabelecimento_id = " + estabelecimento_id + +// " AND utilizadores.activo ='" + activo + "' AND apagado = 'n' AND utilizadores.tipo <> " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + +// " ORDER BY numero_mecanografico"; +// } +// else if(nome != null && estabelecimento_id != null) +// { +// sql1 = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo AND ("; +// sql3 = ") AND estabelecimento_id = " + estabelecimento_id + " AND utilizadores.activo ='" + activo + "' AND apagado = 'n' " + +// "AND utilizadores.tipo <> " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + +// " ORDER BY numero_mecanografico"; +// stk = new StringTokenizer (nome); +// int n = 0; +// while (stk.hasMoreTokens ()) { +// if(n > 0) +// { +// sql2 += "AND "; +// } +// sql2 += "LOWER(nome) LIKE '%" + stk.nextToken () + "%' "; +// n++; +// } +// sql = sql1 + sql2 + sql3; +// } +// else if(por != null) +// { +// sql = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo " + +// "AND LOWER(numero_mecanografico) LIKE '%" + por + "%' AND utilizadores.activo ='" + activo + "' AND apagado = 'n' " + +// "AND utilizadores.tipo <> " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + +// " ORDER BY numero_mecanografico"; +// } +// else if(nome != null) +// { +// sql1 = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo AND ("; +// sql3 = ") AND utilizadores.activo ='" + activo + "' AND apagado = 'n' AND utilizadores.tipo <> " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + +// " ORDER BY numero_mecanografico"; +// stk = new StringTokenizer (nome); +// int n = 0; +// while (stk.hasMoreTokens ()) { +// if(n > 0) +// { +// sql2 += "AND "; +// } +// sql2 += "LOWER(nome) LIKE '%" + stk.nextToken () + "%' "; +// n++; +// } +// sql = sql1 + sql2 + sql3; +// } +// else if(estabelecimento_id != null) +// { +// sql = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo " + +// "AND estabelecimento_id = " + estabelecimento_id + " AND utilizadores.activo ='" + activo + "' AND apagado = 'n' " + +// "AND utilizadores.tipo <> " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + +// " ORDER BY numero_mecanografico"; +// } +// else +// { +// sql = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo " + +// "AND utilizadores.activo ='" + activo + "' AND apagado = 'n' AND utilizadores.tipo <> " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + +// " ORDER BY numero_mecanografico"; +// } +// System.out.println("UTILIZADORES SQL : " + sql); +// ResultSet rs = st.executeQuery(sql); +// rs.first(); +// do +// { +// Utilizador u = new Utilizador(); +// u.setId(new Integer(rs.getInt(1))); +// u.setLogin(rs.getString("login")); +// u.setPassword(rs.getString("password")); +// u.setData_password(rs.getDate("data_password")); +// u.setEmail(rs.getString("email")); +// u.setEmpresa_id(new Integer(rs.getInt("empresa_id"))); +// u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id"))); +// u.setAdministrador(rs.getString("administrador")); +// u.setTipo(new Integer(rs.getInt("tipo"))); +// u.setNumero_cedula(rs.getString("numero_cedula")); +// u.setCap(rs.getString("cap")); +// u.setNome(Utils.unicodeToHTML(rs.getString("nome")) ); +// u.setMedico_id(new Integer(rs.getInt("medico_id"))); +// u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id"))); +// u.setActivo(rs.getString(14)); +// u.setResponsavel_loja(rs.getString("responsavel_loja")); +// u.setGestor_geral(rs.getString("gestor_geral")); +// u.setNumero_mecanografico(rs.getString("numero_mecanografico")); +// u.setCategoria(rs.getString("descricao")); +// u.setApagado(rs.getString("apagado")); +// try +// { +// u.setNome_estabelecimento( adp.getEstabelecimentoNome(u.getEstabelecimento_id()) ); +// } +// catch(Exception e) +// { +// ErrorLogger.logException( e ); +// } +// +// if ( booDirRh.matches( "y" ) ) +// { +// int uType = u.getTipo().intValue(); +// if ( uType == Global.TIPO_UTILIZADOR_SEGURANCA || uType == Global.TIPO_UTILIZADOR_RH || +// uType == Global.TIPO_UTILIZADOR_GESTOR || uType == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA) +// { +// list.add( u ); +// } +// } +// else +// { +// list.add( u ); +// } +// +// }while(rs.next()); +// return list; +// } + + public ArrayList getResponsavelRhList(Integer estabelecimento_id) + { + ArrayList list = new ArrayList(); + Utilizador u = null; + Statement st = createStatement(); + String sql ="SELECT * FROM utilizadores WHERE activo = 'y' AND tipo = " + Global.TIPO_UTILIZADOR_RH + " AND apagado = 'n' AND responsavel_loja = 'y' AND estabelecimento_id = " + estabelecimento_id; + try + { + ResultSet rs = st.executeQuery(sql); + rs.first(); + do + { + u = new Utilizador(); + u.setId(new Integer(rs.getInt("id"))); + u.setNome(rs.getString("nome")); + u.setLogin(rs.getString("login")); + u.setEmail(rs.getString("email")); + list.add(u); + }while(rs.next()); + return list; + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + return null; + } + } + + public Medico getMedico(Integer estabelecimento_id) + { + Medico m = null; + Statement st = createStatement(); + String sql ="SELECT * FROM utilizadores WHERE activo = 'y' AND tipo = " + Global.TIPO_UTILIZADOR_MEDICO + " AND apagado = 'n' AND estabelecimento_id = " + estabelecimento_id; + try + { + ResultSet rs = st.executeQuery(sql); + rs.first(); + m = new Medico(); + m.setId(new Integer(rs.getInt("id"))); + m.setNome(rs.getString("nome")); + m.setNumero_cedula(rs.getString("numero_cedula")); + return m; + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + return null; + } + } + + + public com.sun.rave.web.ui.model.Option[] getMedicosList() throws Exception + { +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); + Statement st = createStatement(); + ArrayList list = new ArrayList(); +// Medico m = new Medico(); +// m.setId(new Integer(0)); +// m.setNome("-Seleccionar-"); +// list.add(m); + String sql ="SELECT * FROM utilizadores WHERE activo = 'y' AND tipo = 5 AND apagado = 'n' "; + ResultSet rs = st.executeQuery(sql); + rs.first(); + do + { + Medico m = new Medico(); + m.setId(new Integer(rs.getInt("id"))); + m.setNome(Utils.unicodeToHTML(rs.getString("nome"))); + list.add(m); + }while(rs.next()); + com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; + ListIterator iter = list.listIterator(); + int i = 0; + while(iter.hasNext()) + { + Medico m = (Medico) iter.next(); + + listOptions[i] = new Option(m.getId(), Utils.unicodeToHTML(m.getNome())); + i++; + } +// dblocal.close(); + return listOptions; + } + + public com.sun.rave.web.ui.model.Option[] getTecnicosSaudeList() throws Exception + { +// Dblocal dblocal = new Dblocal(); +// dblocal.connect(); +// Statement stlocal = dblocal.createStatement(); + Statement st = createStatement(); + ArrayList list = new ArrayList(); + TecnicoSaude t = new TecnicoSaude(); + t.setId(new Integer(0)); + t.setNome(""); + list.add(t); + String sql ="SELECT * FROM utilizadores WHERE activo = 'y' AND tipo = " + Global.TIPO_UTILIZADOR_HS; + ResultSet rs = st.executeQuery(sql); + rs.first(); + do + { + t = new TecnicoSaude(); + t.setId(new Integer(rs.getInt("id"))); + t.setNome(Utils.unicodeToHTML(rs.getString("nome"))); + list.add(t); + }while(rs.next()); + com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; + ListIterator iter = list.listIterator(); + int i = 0; + while(iter.hasNext()) + { + t = (TecnicoSaude) iter.next(); + + listOptions[i] = new Option(t.getId(), Utils.unicodeToHTML(t.getNome())); + i++; + } +// dblocal.close(); + return listOptions; + } + + public Integer getMaxPermissaoId() + { + Statement st = createStatement(); + String sql = "SELECT max(permissoes.id)+1 AS MAXPERMISSAOID FROM permissoes"; + try + { + ResultSet rs = st.executeQuery(sql); + rs.first(); + Integer newId = new Integer(rs.getInt("MAXPERMISSAOID")); + if(newId.intValue() == 0) + { + newId = new Integer(1); + } + return newId; + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + return new Integer(1); + } + } + + public Integer createPermissao(Permissao p) throws Exception + { + Statement st = createStatement(); + Integer newId = getMaxPermissaoId(); + + String sql = "INSERT INTO permissoes (id, user_id, codigo_permissao) VALUES (" + newId + ", " + p.getUser_id() + ", " + p.getCodigo_permissao() + ")"; + st.execute(sql); + return newId; + } + + public Integer getPermissionCode( Integer userId ) throws Exception + { + Integer permission = null; + Statement st = createStatement(); + String sql = "SELECT * FROM permissoes WHERE user_id = " + userId; + ResultSet rs = st.executeQuery( sql ); + if ( rs.first() ) + { + permission = new Integer( rs.getInt( "codigo_permissao" ) ); + } + return permission; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/UtilizadoresInactivosListDataProvider.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/UtilizadoresInactivosListDataProvider.java new file mode 100644 index 00000000..2f73e63b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/db/providers/UtilizadoresInactivosListDataProvider.java @@ -0,0 +1,24 @@ +/* + * UtilizadoresInactivosListDataProvider.java + * + * Created on November 30, 2007, 4:48 PM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package db.providers; + +import com.sun.data.provider.impl.ObjectListDataProvider; + +/** + * + * @author lluis + */ +public class UtilizadoresInactivosListDataProvider extends ObjectListDataProvider { + + /** Creates a new instance of UtilizadoresInactivosListDataProvider */ + public UtilizadoresInactivosListDataProvider() { + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/global/Global.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/global/Global.java new file mode 100755 index 00000000..b8787a82 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/global/Global.java @@ -0,0 +1,185 @@ +/* + * Global.java + * + * Created on November 23, 2007, 10:08 AM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package global; + +import beans.Utilizador; +//import com.sun.org.apache.bcel.internal.generic.GETFIELD; +import com.evolute.utils.error.ErrorLogger; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.io.OutputStream; +import javax.faces.context.ExternalContext; +import javax.faces.context.FacesContext; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import utils.JSFUtils; + +/** + * + * @author lluis2 + */ +public class Global { + public final static int ESTADO_SEG = 1; + public final static int ESTADO_RH1 = 2; + public final static int ESTADO_HS = 3; + public final static int ESTADO_RH2 = 4; + //public final static int ESTADO_MEDICINA = 5; + public final static int ESTADO_CONSOLIDACAO = 5; + //public final static int ESTADO_ASSINATURAS = 7; + public final static int ESTADO_ASSINATURA_SEG = 6; + public final static int ESTADO_ASSINATURA_RH = 7; + //public final static int ESTADO_IMPRESSAO = 8; + public final static int ESTADO_FECHAR = 8; + public final static int ESTADO_CONCLUIDO = 9; + + + public final static int ESTADO_ASSINATURA_1 = 1; + public final static int ESTADO_ASSINATURA_2 = 2; + public final static int ESTADO_ASSINATURA_3 = 3; + + public final static int TIPO_UTILIZADOR_SEGURANCA = 1; + public final static int TIPO_UTILIZADOR_RH = 2; + public final static int TIPO_UTILIZADOR_HS = 3; + public final static int TIPO_UTILIZADOR_MEDICO = 5; + public final static int TIPO_UTILIZADOR_GESTOR = 6; + public final static int TIPO_UTILIZADOR_DIRECTOR_GERAL_RH = 7; + public final static int TIPO_UTILIZADOR_DIRECTOR_SIPRP = 8; + public final static int TIPO_UTILIZADOR_DIRECTOR_LOJA = 9; + public final static int TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA = 10; + + public final static int AUCHAN = 32; + + + public final static String SERVIDOR_SMTP = "smtp.netcabo.pt"; + public final static String SERVIDOR_SMTP_PASSWORD = "EVOLUTE"; + public final static String ENDERECO_ENVIO = "acidentes.auchan@siprp.pt"; + //public final static String ENDERECO_ENVIO = "lluis@evolute.pt"; //testes + + public final static String IMAGE_FOLDER = "/home/siprp/imagens_acidentes"; + //public final static String IMAGE_FOLDER = "/home/lluis/imagens_acidentes"; + public final static String RESOURCES_IMAGE_FOLDER = "/resources/images"; + + public static final String PDF_FOLDER_URL = "/resources/pdf"; + + + //public static final String PLANOS_ACTUACAO_URL = "http://localhost:8084/PlanosActuacao/faces/ListaPlanos.jsp"; //testes + //public static final String PLANOS_ACTUACAO_URL = "http://192.168.111.24:8084/PlanosActuacao/faces/ListaPlanos.jsp"; //testes portatil + public static final String PLANOS_ACTUACAO_URL = "https://www.siprp.pt/PlanosActuacao/faces/ListaPlanos.jsp"; //real + + public static final String LOGOS_FOLDER = "/resources/images"; + + /** Creates a new instance of Global */ + public Global() { + } + + public void copyImage(File fSource, File fDest) + { + try + { + InputStream in = new FileInputStream(fSource); + OutputStream out = new FileOutputStream(fDest); + + // Transfer bytes from in to out + byte[] buf = new byte[1024]; + int len; + while ((len = in.read(buf)) > 0) { + out.write(buf, 0, len); + } + in.close(); + out.close(); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + + public void deleteFolderFiles(File folder) + { + File files[] = folder.listFiles(); + for(int i=0;i 0) + { + //fos.write(buf, 0, buf.length); + } + fis.close(); + FacesContext ctx = FacesContext.getCurrentInstance(); + if (!ctx.getResponseComplete()) + { + HttpServletResponse response = (HttpServletResponse)ctx.getExternalContext().getResponse(); + String contentType = "application/pdf"; + response.setContentType(contentType); + response.setHeader("Content-Disposition","attachment;filename=\"" + "Ajuda.pdf" + "\""); + + ServletOutputStream out = response.getOutputStream(); + + //out.write(model.getInfo().getBytes()); + out.write(buf, 0, buf.length); + out.flush(); + out.close(); + ctx.responseComplete(); + ctx.release(); + } + } + + + public static void redirectToPlanos( FacesContext fc, Utilizador currentUser ) + { + if ( fc != null ) + { + String url = Global.PLANOS_ACTUACAO_URL; +// String url = "http://localhost:8084/PlanosActuacao/faces/ListaPlanos.jsp"; + + ExternalContext ec = fc.getExternalContext(); + if ( ec != null ) + { + HttpSession session = ( HttpSession ) ec.getSession( false ); + if ( session != null ) + { + url += "?sessionID=" + session.getId(); + + int userType = currentUser == null ? -1 : currentUser.getTipo() == null ? -1 : currentUser.getTipo().intValue(); + if ( userType == Global.TIPO_UTILIZADOR_GESTOR ) + { + url += "&estab_gestor=" + currentUser.getEstabelecimento_gestor(); + } + + try + { + System.out.println( "\tRedirecting to : " + url ); + JSFUtils.redirect( fc, url ); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + } + } + } + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pagestate/AnaliseAcidenteTrabalhoState.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pagestate/AnaliseAcidenteTrabalhoState.java new file mode 100644 index 00000000..7be51517 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pagestate/AnaliseAcidenteTrabalhoState.java @@ -0,0 +1,464 @@ +/* + * AnaliseAcidenteTrabalhoState.java + * + * Created on September 27, 2007, 5:18 PM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package pagestate; + +/** + * + * @author lluis + */ +public class AnaliseAcidenteTrabalhoState { + private Object header_nr; + private Object header_date; + private int estado; + private Object empresa; + private Object estabelecimento; + private Object trabalhador; + private Object data_nascimento; + private Object data_admissao; + private Object funcao; + + private Object bi; + private Object morada; + private Object cod_postal1; + private Object cod_postal2; + private Object localidade; + private Object contacto_telefonico; + private Object turno; + + private Object data_acidente; + private Object horas_turno; + private Object seccao; + private Object local_trabalho; + private Integer hours; + private Integer minutes; + private Object tarefa; + private Object substancias; + + private Object superior_hierarquico; + private Object condicoes; + private Object testemunhas; + private Object causas; + private Object descricao; + private Object conclusoes; + private Object accoes; + + + private String formacao_shst; + private Object formacao_shsht_n_why; + private String acidentes_colaborador; + private Object nr_acidentes_colaborador; + private String acidentes_colaboradores; + private Object nr_acidentes_colaboradores; + + private Object nr_relatorio_acidentes_colaborador_1; + private Object nr_relatorio_acidentes_colaborador_2; + private Object nr_relatorio_acidentes_colaborador_3; + private Object nr_relatorio_acidentes_colaborador_4; + + private Object nr_relatorio_acidentes_colaboradores_1; + private Object nr_relatorio_acidentes_colaboradores_2; + private Object nr_relatorio_acidentes_colaboradores_3; + private Object nr_relatorio_acidentes_colaboradores_4; + + private Object averiguador; + private String averiguacao_posterior; + private Object averiguacao_obs; + + /** Creates a new instance of AnaliseAcidenteTrabalhoState */ + public AnaliseAcidenteTrabalhoState() { + } + + public Object getEstabelecimento() { + return estabelecimento; + } + + public void setEstabelecimento(Object estabelecimento) { + this.estabelecimento = estabelecimento; + } + + public Object getTrabalhador() { + return trabalhador; + } + + public void setTrabalhador(Object trabalhador) { + this.trabalhador = trabalhador; + } + + public Object getData_nascimento() { + return data_nascimento; + } + + public void setData_nascimento(Object data_nascimento) { + this.data_nascimento = data_nascimento; + } + + public Object getHoras_turno() { + return horas_turno; + } + + public void setHoras_turno(Object horas_turno) { + this.horas_turno = horas_turno; + } + + public Object getSeccao() { + return seccao; + } + + public void setSeccao(Object seccao) { + this.seccao = seccao; + } + + public Object getLocal_trabalho() { + return local_trabalho; + } + + public void setLocal_trabalho(Object local_trabalho) { + this.local_trabalho = local_trabalho; + } + + public Object getTarefa() { + return tarefa; + } + + public void setTarefa(Object tarefa) { + this.tarefa = tarefa; + } + + public Object getSubstancias() { + return substancias; + } + + public void setSubstancias(Object substancias) { + this.substancias = substancias; + } + + public Object getSuperior_hierarquico() { + return superior_hierarquico; + } + + public void setSuperior_hierarquico(Object superior_hierarquico) { + this.superior_hierarquico = superior_hierarquico; + } + + public Object getCondicoes() { + return condicoes; + } + + public void setCondicoes(Object condicoes) { + this.condicoes = condicoes; + } + + public Object getTestemunhas() { + return testemunhas; + } + + public void setTestemunhas(Object testemunhas) { + this.testemunhas = testemunhas; + } + + public Object getCausas() { + return causas; + } + + public void setCausas(Object causas) { + this.causas = causas; + } + + public Object getDescricao() { + return descricao; + } + + public void setDescricao(Object descricao) { + this.descricao = descricao; + } + + public Object getAccoes() { + return accoes; + } + + public void setAccoes(Object accoes) { + this.accoes = accoes; + } + + public Object getConclusoes() { + return conclusoes; + } + + public void setConclusoes(Object conclusoes) { + this.conclusoes = conclusoes; + } + + public Object getEmpresa() { + return empresa; + } + + public void setEmpresa(Object empresa) { + this.empresa = empresa; + } + + public int getEstado() { + return estado; + } + + public void setEstado(int estado) { + this.estado = estado; + } + + public Object getBi() { + return bi; + } + + public void setBi(Object bi) { + this.bi = bi; + } + + public Object getMorada() { + return morada; + } + + public void setMorada(Object morada) { + this.morada = morada; + } + + public Object getCod_postal1() { + return cod_postal1; + } + + public void setCod_postal1(Object cod_postal1) { + this.cod_postal1 = cod_postal1; + } + + public Object getCod_postal2() { + return cod_postal2; + } + + public void setCod_postal2(Object cod_postal2) { + this.cod_postal2 = cod_postal2; + } + + public Object getLocalidade() { + return localidade; + } + + public void setLocalidade(Object localidade) { + this.localidade = localidade; + } + + public Object getContacto_telefonico() { + return contacto_telefonico; + } + + public void setContacto_telefonico(Object contacto_telefonico) { + this.contacto_telefonico = contacto_telefonico; + } + + public Object getTurno() { + return turno; + } + + public void setTurno(Object turno) { + this.turno = turno; + } + + public Integer getHours() { + return hours; + } + + public void setHours(Integer hours) { + this.hours = hours; + } + + public Integer getMinutes() { + return minutes; + } + + public void setMinutes(Integer minutes) { + this.minutes = minutes; + } + + public String getFormacao_shst() { + return formacao_shst; + } + + public void setFormacao_shst(String formacao_shst) { + this.formacao_shst = formacao_shst; + } + + public Object getFormacao_shsht_n_why() { + return formacao_shsht_n_why; + } + + public void setFormacao_shsht_n_why(Object formacao_shsht_n_why) { + this.formacao_shsht_n_why = formacao_shsht_n_why; + } + + public String getAcidentes_colaborador() { + return acidentes_colaborador; + } + + public void setAcidentes_colaborador(String acidentes_colaborador) { + this.acidentes_colaborador = acidentes_colaborador; + } + + public Object getNr_acidentes_colaborador() { + return nr_acidentes_colaborador; + } + + public void setNr_acidentes_colaborador(Object nr_acidentes_colaborador) { + this.nr_acidentes_colaborador = nr_acidentes_colaborador; + } + + public String getAcidentes_colaboradores() { + return acidentes_colaboradores; + } + + public void setAcidentes_colaboradores(String acidentes_colaboradores) { + this.acidentes_colaboradores = acidentes_colaboradores; + } + + public Object getNr_acidentes_colaboradores() { + return nr_acidentes_colaboradores; + } + + public void setNr_acidentes_colaboradores(Object nr_acidentes_colaboradores) { + this.nr_acidentes_colaboradores = nr_acidentes_colaboradores; + } + + public Object getNr_relatorio_acidentes_colaborador_1() { + return nr_relatorio_acidentes_colaborador_1; + } + + public void setNr_relatorio_acidentes_colaborador_1(Object nr_relatorio_acidentes_colaborador_1) { + this.nr_relatorio_acidentes_colaborador_1 = nr_relatorio_acidentes_colaborador_1; + } + + public Object getNr_relatorio_acidentes_colaborador_2() { + return nr_relatorio_acidentes_colaborador_2; + } + + public void setNr_relatorio_acidentes_colaborador_2(Object nr_relatorio_acidentes_colaborador_2) { + this.nr_relatorio_acidentes_colaborador_2 = nr_relatorio_acidentes_colaborador_2; + } + + public Object getNr_relatorio_acidentes_colaborador_3() { + return nr_relatorio_acidentes_colaborador_3; + } + + public void setNr_relatorio_acidentes_colaborador_3(Object nr_relatorio_acidentes_colaborador_3) { + this.nr_relatorio_acidentes_colaborador_3 = nr_relatorio_acidentes_colaborador_3; + } + + public Object getNr_relatorio_acidentes_colaborador_4() { + return nr_relatorio_acidentes_colaborador_4; + } + + public void setNr_relatorio_acidentes_colaborador_4(Object nr_relatorio_acidentes_colaborador_4) { + this.nr_relatorio_acidentes_colaborador_4 = nr_relatorio_acidentes_colaborador_4; + } + + public Object getNr_relatorio_acidentes_colaboradores_1() { + return nr_relatorio_acidentes_colaboradores_1; + } + + public void setNr_relatorio_acidentes_colaboradores_1(Object nr_relatorio_acidentes_colaboradores_1) { + this.nr_relatorio_acidentes_colaboradores_1 = nr_relatorio_acidentes_colaboradores_1; + } + + public Object getNr_relatorio_acidentes_colaboradores_2() { + return nr_relatorio_acidentes_colaboradores_2; + } + + public void setNr_relatorio_acidentes_colaboradores_2(Object nr_relatorio_acidentes_colaboradores_2) { + this.nr_relatorio_acidentes_colaboradores_2 = nr_relatorio_acidentes_colaboradores_2; + } + + public Object getNr_relatorio_acidentes_colaboradores_3() { + return nr_relatorio_acidentes_colaboradores_3; + } + + public void setNr_relatorio_acidentes_colaboradores_3(Object nr_relatorio_acidentes_colaboradores_3) { + this.nr_relatorio_acidentes_colaboradores_3 = nr_relatorio_acidentes_colaboradores_3; + } + + public Object getNr_relatorio_acidentes_colaboradores_4() { + return nr_relatorio_acidentes_colaboradores_4; + } + + public void setNr_relatorio_acidentes_colaboradores_4(Object nr_relatorio_acidentes_colaboradores_4) { + this.nr_relatorio_acidentes_colaboradores_4 = nr_relatorio_acidentes_colaboradores_4; + } + + public Object getHeader_nr() { + return header_nr; + } + + public void setHeader_nr(Object header_nr) { + this.header_nr = header_nr; + } + + public Object getHeader_date() { + return header_date; + } + + public void setHeader_date(Object header_date) { + this.header_date = header_date; + } + + public Object getFuncao() { + return funcao; + } + + public void setFuncao(Object funcao) { + this.funcao = funcao; + } + + public Object getData_acidente() { + return data_acidente; + } + + public void setData_acidente(Object data_acidente) { + this.data_acidente = data_acidente; + } + + public Object getData_admissao() { + return data_admissao; + } + + public void setData_admissao(Object data_admissao) { + this.data_admissao = data_admissao; + } + + public Object getAveriguador() { + return averiguador; + } + + public void setAveriguador(Object averiguador) { + this.averiguador = averiguador; + } + + public String getAveriguacao_posterior() { + return averiguacao_posterior; + } + + public void setAveriguacao_posterior(String averiguacao_posterior) { + this.averiguacao_posterior = averiguacao_posterior; + } + + public Object getAveriguacao_obs() { + return averiguacao_obs; + } + + public void setAveriguacao_obs(Object averiguacao_obs) { + this.averiguacao_obs = averiguacao_obs; + } + + + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/Logotipos.eml b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/Logotipos.eml new file mode 100644 index 00000000..4510d78f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/Logotipos.eml @@ -0,0 +1,330 @@ +X-Account-Key: account2 +X-Mozilla-Keys: +Return-Path: +Delivered-To: 4-malves@evolute.pt +Received: (qmail 19936 invoked from network); 26 Dec 2007 15:28:46 +0000 +Received: from localhost (127.0.0.1) + by localhost with SMTP; 26 Dec 2007 15:28:46 +0000 +Received: from a213-22-140-174.cpe.netcabo.pt + (a213-22-140-174.cpe.netcabo.pt [213.22.140.174]) by webmail.evolute.pt + (Horde MIME library) with HTTP; Wed, 26 Dec 2007 15:28:45 +0000 +Message-ID: <20071226152845.ecq9t84xcswo4wow@webmail.evolute.pt> +Date: Wed, 26 Dec 2007 15:28:45 +0000 +From: lluis@evolute.pt +To: malves@evolute.pt +Subject: Logotipos +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="=_6xaiexiy7y80" +Content-Transfer-Encoding: 7bit +User-Agent: Internet Messaging Program (IMP) H3 (4.1.1) +X-Spam-Checker-Version: SpamAssassin 3.0.6 (2005-12-07) on plesk.evolute.pt +X-Spam-Level: +X-Spam-Status: No, score=1.0 required=7.0 tests=AWL,HELO_DYNAMIC_HCC, + HELO_DYNAMIC_IPADDR,NO_REAL_NAME,RCVD_IN_SORBS_DUL autolearn=no + version=3.0.6 + +This message is in MIME format. + +--=_6xaiexiy7y80 +Content-Type: text/plain; + charset=ISO-8859-1; + DelSp="Yes"; + format="flowed" +Content-Disposition: inline +Content-Transfer-Encoding: 7bit + + + +--=_6xaiexiy7y80 +Content-Type: image/gif; + name="auchan_logo.gif" +Content-Disposition: attachment; + filename="auchan_logo.gif" +Content-Transfer-Encoding: base64 + +R0lGODlhJwHRAPAAAAAA/wD//yH5BAEAAP0ALAAAAAAnAdEAhx2YWxulWRayazaYWSuaZjyIYzmb +aDqcciinXj2iTjimWzeobzjBa0mXWkiOYUebZ0ibc1OMZlOPclWaZlObckWjW1alWkamaUepdUi0 +akeyeFSlaFSpdVeybFW0eGSeXW+Ba2mZZ3eTaWylXmSnaGerdmq1aWi2d3WpaHKpdHmza3a1eDmw +iEerhUmqkEmzhUq4lFWsg1a1hVe3mFi3o2ari2OskmW1hGe1mHW3hnW0lW+8rVDDi1vCq2fDhmnC +m3fEjnvHlXHIsHTSy5R9XJh6Zq16Wa97Y/g1T/lIOs5zVNlmVthwXMJ2Y9xpadd/Zu1HWexWWvtJ +SfpLWfxWS/tYWulVZPtMY/xaZf5bculoXP5kS/xjW/1yXOZqZuhzY/1lZ/5oc/50af51df5pgftu +kP54hv17lpCIWoGLYY+OcoiQa5aGaZmJcIWqZ4qqdoWya4a3d5W7eK2AXrWDaaGneIfCd6PJfcCK +XMSKaN2Ib92FddqQfuWLe+SSfP2Fav6Gd/+Qb/6SfP+jeoa5g5avlZa7iJm8k4+ytZuqpa2ZlKq2 +i4jCh4bHl4PRn5nEiJjImJ3VmYjIqofIt4nTu5nFpJnOtJjXqJXUuqbFi6nImKrZi6rRnLXJlrDR +jrrWmarMpqvPs6vTpKrYuLfMprfPubjUqbfXtbfisZHTyp/jxp/i4qLPyqjVyaXc2LfZxrnd0avc +5Ljl0bLn6teQgNqtp+OUh+yXkv6Hhv6Ilv6Vh/6Xlv6Kpv6Xpv6atf+kjP6ll/+zmv+npv6ouP+3 +p/+3t9euwP+rxP6r1f63xv+508nZs8vjrcXjudLhuOPJt//Dq//Gt//Uvcbcw87f1Nvdws7f4cTk +xcfp2Mfx3NXmxtfo1Nry2sTq6cXr98X06cn0+dPq6dTs9tbz69n3/OjLw+XUx//Gxv/H1//WyP/X +1v7J5f7Y6P/a9Obrxefq1e/4zenz2v/kzP7m2PX02ufs5eLu8ev15uf8/f7n5//o+Pj26f7+/vwD ++wAAAP///wj/APsJHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePIEOKHEmypMmTKFOq +XMmypcuXMGPKnEmzps2bOHPq3Mmzp8+fQIMKHUq0qNGjSJMqXcq0qdOnUKNKnUq1qtWrWLNq3cq1 +q9evYMOKHUu2rNmzaNOqXcu2rdu3cOPKnUu3rt27ePOWTFasGN9kf88lOycYneDBgAkP1qe38cV0 +VKpInlyFCpcqWKJ0qdIljGQqWKpskXzMsemJwLqAAcOl9Wouq1nHBiNmdRjaXKiMOc37YaAqrT1H +AY5lim0wqrlk2YK8dhUwWBj3no5QnWQsoUNXsYLZOXQsrrFj/4fOZRj18wV/ZVmNGbOVLuuxgGkP +xvP65/Vv774KTdAuYMAIg8suuhAoHXof8SMGbNg9F992YcQnX3tYWFFffZetc5V6l2WhGhjrhXEg +gh1Fs5p88tUXGmtZUJHML6FNEcUVKI6BnxTmWfWLarWFAdt8YLBD4ke6dKFdFWGgKB507cxzHYUn +gtGLOiNOFQyStV0YRmf5DNkRP0aiCAZ32XExBRS4CPRHFuNhZwUWxPDTTzitIJKIIsYkUyVTv6w2 +RooXViGklxup4xl0mH1HI3vKCATNddqBgU4/0+iQRhNLwOYFFmPkoqFTujw33noX7kloRX2e2CBm +8Y0xhnT7eP82oRXt9GPIAEWIQQaQxuVWRS5OARPGFBLKt96gp160z4LQzaedsVVAUQZB6k1oniYU +sHFhlidu+WtTutwWxm3KySdishhF4yODm2qnxWo4EnQOkqvpM00CIWjxnBa3sSbGc89xkeZSunCx +5RjQORcGsuhSpEuzXDw75neCFvQvF6W94QAdFIN4SyH2zEtxaUoBk99qpEJnasMO7WNjF8qZeUUU +IM7HhRkGBSMFFuy4s8EGTLgGxhVjqDCDQIJg1sUUVZgDyyvY4GMUMMaJcUUWZkIhWZcsT5QOkBOW +yRppBs2zCzv8aDJBCV80CN0eJOBgSSV50DgcLjlsYAEFG3D/0Ag5Q8GYhY9hV3HFyl0vBGNsmNEs +6n0ME3RPDhMYIIKz+mLXxgAOOKAEFlfM54UIG1wQxCWQtELUw1yM0W92YCCeOEIuX6b0FRGPJxkZ +CJUyAQUh0KFFdpJNgYUWRhTRBGZtmhEPT/rIqZAgIFaRBcKIZhH57AtFk2iUoA/NGhW+GLSNBwpE +YMS7xV83HxTEQ7cpGAal0xdffqHTV44LoYOOOupgxzn+B8CIqKMXuCCDjTi1i2KYChdhqA3oUGQ8 +2RWFH/pQxzCSwY58WPAnBWNTzWTFqvkwbB+iMMEE2MAEyUSMadyJAnayMBklTWFSBQHEZcyEHM5g +gQrbK0g0/yyzJdmQC4cLUQcwAIGw20hmNmDAhTrSo6oVVSgLXBMIP84hjF3g4ou7EMY5PniQeZyj +GMQQRi+A8R9hCKMYVGrIPtjYCzfqwo1uHNEBs9QFMURQDLvQk1EU9L0kVVEyWSDINnxwgRAwYWzs +iQISmBYhZ4lnV2Agw55w4UfYWO91QSQIMRjEOMlI4VMJSQcEkdMvMWzhQ7Tp1y4OpAu3YYdGz0FW +MLYkBqxFzFsCI2M/iCEGhHGBOWAATRcWFRkxmOEcC5mHwUZDG/xwYVD5AIQP+yWbbiJRKNH4kXiw +V7jy9WMflvBACJpgs+G0pwpMe2JmVsQ4/hHkD8/xjO0EVv8FC6bjObBUzWZQeRBigMc5PvwQbPzY +mX8hK2nGilgNhaQOQBznQxHEGoqSoRB9CINbpEQZcGITsdX0IpT9mEcTxdBJ23RJHf+60IdYyjjW +8EJ6QQkEFZAzBSpAQQoAi4wUzCCnUsTAAWlYgqgkSsMqSIFpFNQa7EJjKkFMyHbYuQUVaqUQaABK +NuL5JkH0EdMVIZIKlRyXGJh2mTHgtJZKihhsRHQOH9FGNbcxkidlQwVeJEQaWGJQbcQwHG4aDFBG +sidB2KEa19GGpVtqRzg746cf0WZXflwN+YaiD314sLOfzUc+2tFZfbzDEB9owPJeUwUyjGs+NMvd +downKhn/VuEMCMGFmOaDnylwNSHRMBd4LgQdgg5EHn/gJsBo6CEajqdZYMDZQARxKPFEqhibAWvA +UoQd1/qRCoo9bmcsGxt6OhZIx+ECR8vWUOi+thi1CZEfk8StbRUTC+u9iShQoQlRvAIVnBjFKQYs +YFSEYsDNaMYrTtGMU2jCAhD4QBPCgygUGY5NxakCEpY0hS14xpwGCUSS2DSZ0PWze7285XxukwXj +9oMeP+oX076TIqwhyVybHUjB2DNcwpUXC4MDsiHBYBzbiMFIppLHE5NUHCxESIROrg0ZuCvBLA5k +HoMLQxNjI65ucvnLrInQH3FKE36o4AIe2EADLkCBDlyA/wMbeIADNoCBCWzAARDQQAcwYIELXAAN +TliSm9pjHMwwaDgUkyF0QlkbmKVIVFNAqaN2StxmTcG4+7Aoa1oDu/JWspc1qwKI+0G9sKXIM0ga +g2yVZK5m9YsLvTiINPLDIOzEE4qsXE9tVA2sgszjQ9hjD6lgeWrbdNnJrxGrTPZhAg184AES8DMF +LjABDgzgARCIwAIgcIEGKGDbDxgAEcaEH+x4gbfgYdrgNGq9y0B1CtI9iCAkWtJPSuG3CPGelpRr +3FChjDXyKSkJKfPo/PYj2K+DbpvABr/YXC+Tod7TrJ2cYTD84ozC0EVMQUS0XferCmLFsqtpU59i +NpHEWP8w0ri6fNcT+fUm7zDBAjhwAQzQ3AMcwIABHoCBBhgAAxtYwMwn0AAjKPoyFDMc7Nhku/Y4 +FzM5PgggiLWuZknGggYlrqjmQ9B0HLm8zoVOysywCwS6jjgM0zR7mjVcUbk9O5F6TWyooOx0+KgK +z7SyvCQYISeL61sEmUdssoTsFWuZ8CCqLhayRKrWkZkm3DABtTFwAZ7H+QERwMACNkCBBdR8AwNo +A/MQRaOIufMK8lSO0hcPHKZBAXELUtJ6Xoj1cm8hNDS6Qtrxg2oKXiEJZFjH4/MhjPXgW4ehY3uK +5IoFKIQhgcPicYOyIMIqhDcdGWqIGKBQ4XxGl8yCf63/+/rlxLN19oAOUtX86lOxmzyDAw/wMwda +cAEDLIAFFziABgSwgAdo4AIVwAaTAQZRkCRcIFXagXoNojtLgiijZhCAcBtugygnphDE4HayMRnI +gn1bNx+kEgVWgAwdJQwjkjTpZ0WbgQVlgA4Hog/psEAgAmScBh27YBDScAbCFFzlRR6wwTCCRy8o +UkwAcwbbkw+48CPf0yaNYhPaYAGlA23U9gBS+AALgAEEwH/ftgEgoGhgUz2hcR/bwSbOdSbz8SaZ +0X4IYVUVdhkpYkGP0jpAxmNVgEq/UG42hjtXMAVLCBGA0Ca4dyJTQAZ6JxDqgB3MwWRmNS0FsQ8Q +wQ+z/2E9F6JegadWEcRymfR4V0YGsKEciYco4QUT+9BnUwgBUkh5VSh0D6AAcmYAIeAFz8EdWWAh +k0Fbo7eJ2vFu0ZIEvNBZCXEx70QxtVczVgRPqKRNYlBjFPSJDIFPKUNcoYFSV4I1ziI+0YURCNN4 +6DZqhoJ4EugZyigQdehe7GF9NkEPGVABPgcAA5AABjAA/bcAGoABCoABpJgAaiBVTMM0V/BTE8Q8 +U4CHinKGeWg4/QAMD0gQ1zhOzlIF+FZQE8I84CEZgzIPErQtvDUFwlQQY+BL1NdDt9FrCOEk9bEe +VmA80BFvEsGImeYhSBJB2MEFuDUQ6kBZSbJ1z6gQwv8wU652jMJwE6pACalACZiACZRgCZIwCZPg +CDFwAS3gAJ73ACFAC7awB3xgC37AB35gC7rAB33QB3uwKYgkUdwlUTc0k2GAiQJhUWHzJ9qBdRaW +Ox44KF7nOs+lHTEpEWrnSeMiGXuIEIMljMSCJLJjRsQwIEykZa7iKv+2dtCxH4RoPX8yHyaJBSh5 +EHYHdxYCBn8SazuRRmn0C0ICBwZwARGAAANgANNWc262ZyXwMxxAAg6ABt+hNe7UHsPBBUgggguC +hhoZgwwyBUtzOAsRDNx1KK0xhwJhIqKygGQzEWtyIrsTlwsBV6txjIlyLgcRDLvZdNXkLCX1XK4D +G5r/dGVVMAZ+JFxeAGvR9HZcBng5oQ4SVYD6sAwRsGZUeAGeJ20PMG1AJ2cP0ABHoDXwNI5TICMC +WgWlESqhoYzOsYDZgZELQQzGYS7MQwXaIxAXSCphsCjzoWwOMQbwIRu0GAaDmB6j0ns01JD9AF8A +N428R1J1KYHSiFPwqWU7SEPfKBCCB0WhkyQDkxPEQAUWQgXKsA8qsAAGoAAZoAB+hgCjKYULUAED +4I46dwB4YDzZRThfOKBCEgih4VNmYCphsAVNBTC2hpYEcSWh8XdA1n67BEUL6GIOMXXlhTDAgZ0J +AQy9ZV3wxDD58CGbUQV/8CcJx4b50ZGPKJwC8U/l/3WeC7oQy3JIqzEFIIkTxjQ06JAPz/AM5lAO +5mAOnCoO9mAP4zCq4XCq01BzBrAGJ2IhlTSOu6gOgjCZkuGhx6h8ZkJVC6Gnn8QFNCIeg/Io+CFS +2OGhDeEqFWmmrzKcNPIghsQzV8ZSMcYq9IJ6FxKHYMVq0SGTuUN+vEUyCRErtgEonlGZNSEPyfGS +AEcckYk4cSCFHNAuxRFPSHBbtQINW6CAFXqQ/TB1xCFoEKoQv2BibHgfWPApXhVwBisFWWBwfPhd +oVMc0HGW00kh4dNkB0JdFOhuD2k48ARPO/NEtoEZG3kgX/Na1CcekqgQyzI4USKB5koTBvUsDQJV +8v9BqQrhDApAARiAB/GjmcPADvtwDrjwHUsDIjtFsRbjY8zDsFMwRdMDJJhhrRKZnOIhjWsqBS8X +EZm2nFnwj6AzngoBDIhXXgy5qNCRgk6GH0+UC8WQDv+TD+pAfKuBSbpzIDAVQRsJJEnisAYRKykY +G1pAQzE7E9qEGUwmmZpVtQlBDyRQc3UQQYBQC7VQBzoADv0QDNEFMGRQoGsrBdsTCEQWITUUGsYq +ELFCBqO3GlcwLHIZMyAiUZJxBWi6EJnVTQGntAmhueRHQpGWlqSynPUxBQuTEOfAKSCCNeOSBTiV +Dn5HQ8ZWBX5bEPlwHDSGNT9qE1/Dp5JhJN+xBYL/uBCQwHMxoAr98A4lgHkOQAn94LziQSFPwpnU +Ah4R87VfKAX8OhDeYz0Y+LGD4jLyRDhQB64QEZlxtSIWBAzPtZDzUSuOuJwUSgXyixDQUGnPcYx4 +KxuZ1XZ9eRB/2pLsEUFgUKk18QtTILswdB9nQgW5ULsCYQo0V3NS4wYN4HM1wA/L8os/JB6BaBB6 +SiPAaVbwphC1wYbEgyK/VTALSEPdmJEDYSS/2FTMuxC74Gk/1iUfPFXs4cL9IAwkdzIgYrISVR+q +gSKnq6OthDIpkr004TJiZ12wUwVRIAUdfBCOewF3Fgv9QAoD0G0QIA79sAvG8auSMccRKVZXkijw +/xSR8NSTBRUZ4UNkuIcZyCINxkN9ZjohuFCii4iQo+dkkZlIu2qHjwYGtbK909ggJCx1KiKB2BEG +jLioq4thNDS9BFG9rWZZ7lkT6ZBd22G0KRIZVkBGcgB/BoAD51Q6GPAAquO84gRPxiMfVKCI+ttU +9rFpTIMEu2Bl8zAIYwMtNnShqBsijAMF0BsaxJAQ3VypztFUUhsGDBEM6+E6zeostUIMqsJbILLK +BSENoEFjJ0IGNLpi0EVkYGDLV7amCLNbd1kTeiomEBkt2CEFDa0Qz7ABLTABf9wPhHAAbTYD/KAg +tgRPKswFI/Jr78SG8TQZggAMvzBvhhbNzRKxjP+bnAWtO+UmBrgQDMQQDdFADMQgCDBDzf1wjIMD +KfKxrGObanT5JKcsgbMRGrzTuNoEZVoiBibrXE40zyC3ELicyuLCzzDBD3/wzSLFHRJ9Sg5hDyVQ +AZUnC/2wDA2AARSgAN4wTFIgVVOLGQIqVlbDJgUKKZzxGVDHv8BhITRiGRXWkP/CxNxFrbwlGUJo +GT2MusEWJdAx1QqxCymCV/cxxfAJGpoIhlPgyAYBDY1daw+ZBWLMiQssBWfcD9U7sUkSbIX7EtJg +OydCMygioFmgognBCDX3ADaAD+/weQ2ACSlVkzJkznBXBRMcyADjPtTKPJRxGQpokt41H7rna57/ +sSujYt2PSHKo5piElCgKK5jDqXDOyDWR+RrMNR+7kA75sA/7oA7QECr4EToiNC6wYbKQCL3Bi9A6 +OrG0QSrywcYyQT3KYSFsWAWuKM01+BCk8KQGIDU5wAEL4AAhYA/9EAgGQx60VWEnLdjQu5zPYTwz +Bh20ZRyHEgagMYjncFjyNCFr96J3p6hFja24Jx+3PRDC8M/DFTZcU0ux+1WR3XTAodoUOpKx3L6Y +MTyj2x6xnQ8LtYOqtrUzESuc+D1i90lTQOAGgb4XwG2s0A86u58U0A0rKt4SEk8drGkSq1asAhpP +FB9XULSf7ERIANxD9LNxiHRAGDasbdkDyl0r/8YQuzCsFHIbXKUOk3rUKyZXJMcFx3h3ARfV9TIQ +54Acg2OSkhnb8+Aj8ZEke6ngMDGTizJDtoZsVxcRcYCfG4AD/HAPJECFEzAJKQV1URDhq9Ja1IuE +bLK3kzF7GAZvhoIogfgdeCpEyuEZnvEnGPYdtvOsSHSr2DEGZhBjFvQLIjxDS4MZB+Kl7VFS6EbO +cmcGRVsf7x0hJuu9CB67VQ5LhhZBuywTffJVFVKXVUDUDuEMBsABOQfIkOAAGOAAR9MP644FUgAG +WiMr2FEl/+Q+iJ5uLVIcuPWn2PrFphyuSYNeP1ZCNOJESKQapGIGrgPtDGHC17pqB7IPuYDuMf+o +oVonIl71Wp0IBs2bSViSVl2tELNt4Ckj1i2xDwt5ta0hoFsABWJ+EPuAAvBoAbo+DRswAZxz19HQ +8AQY2MQjBX7b6UAVGr5qSU80BS8Hnz9kiduqEMOwVuxBBmUVhylTBUsorpP6agbDELpw1CiierFj +MRhyXnW7dgWqIcRANNV5ciZLcaA8HlxQx77WI8fGGkTPEumwC5iP+blAILuQC7qAC7nwRU48EIZQ +AQ9gAC6AD/HwuH6GzC4zBhGo7b2EMAjDz/sgDDYCMB2idLuASvIwjo+IBcBdEPxQDFaVhCNXM7OE +umFCHJ5EvBakoMZhsNihosRg6jFovdBBggL/cSWu5mTK0byFt3joBfm3rBpk0Blddu9UcQ/hEA/b +kA1Scw/YwA3bsA3EjxCyo0RmQHJjcEcAka/fQIL68h3cZ5DdQYINHTbMl05XmC5YuIDBAkaMmGLs +HBI7VyxZsWjJzoU89/DhuV/CiAkLtkvYr13A9KnsF0xMFZ5YrlDBUmWXR4LnxpjZhUsQLkBmAPEj +qK4LoDFUzYipygUdToL0wIA5OubrVy65uJ5Fm1btWrZt3b6FGxdhXLps86k7p06dwLp9/f4FHFjw +YMKFDR9GnFjxYsaNHT+GHFnyZMqVLV/GnFnzZs6HoXYGHVr0aNKlTZ9GnVr1atatXb+GHVv2/2za +tW3fxp1b927evX3/Bh5c+HDixY0fR55c+XLmzZ0/hx5d+nTq1a1fx55d+3bu3b1/Bx9e/Hjy5c2f +R59e/Xr27d2/hx9f/nz69e3fx59f/37+/f3/BzBAAQcksEADD0QwQQUXZLBBBx+EMEIJJ6SwQgsv +xDBDDTfksEMPPwQxRBFHJLFEE09EMUUVV2RRtHgm4CCGbgiyZwUGfACnRd64qWEDDSrAAJ9++Clh +gxc0wGBG/6xpJRYhySMhBh8w8GEBewZaAQMZbujAA2/44wcSEijYoIQvY6vnlVmujIyfFUiAwYMM +NHiAnH72KYGDGD3goIYn8xOlggs24KCBFv/sfO2UBhwI4YIcIWvGAQ40iDGGOodslAMMbrjgglT0 +u+cECDTtgAMHPnXtGkIv4OCCBc50bBkMONgAAx8xEGcgFDTQIIZWJ5hEP3c4WIBYGTxQQIjXDHkA +AgoemOCCHT5rLB4LLvCVh07tvMeEAySglQMFZNGPnlI56MDWDYZ4LcsOWNWgAT8h6+SBDijAgAII +7NznBA08wFZa/t4ggAMDHjCAgFhc2yeOfDHw9QIX/nTskQEMAHIAblMwAIMGLsCBYvzeMWGAGBo4 +gBXYUsAXAw02wFbkxqDCZ5+G9rGHHzb920cTHIJQkuERGlggTxc2mEHmxciRRZZvwvnmyW//sJkl +m1mUJoifc4ABBCxcxhBjF4fyIUYXXHCpSReZaMqLrxD3SeGBGFld4AasEYtnhQ3kzmDffu4ptQIO +LLgB0bGBAYOLKhL/qgpfBtrnnK4VByMMLrjAIoyxxEi8CjOKcbvDfUJ4AAMMOl4g6cfgfhkCDB7Q +wE57TDDd42JFTqciMcjooguNuOhloHkwX7zyxDH/qgvNsVqep+Cj20YUR745S5trXsF6H21GCQct +fri5RpZmXiHflFGw2flvbrSR5ZppZNnmFWru4eoeEkq3dQGI7zZsGVpjwIAHNHABIeEpBum6AAYW +QC6CzMN3YqmIRsIQhpvMI3GaA4PyKDIW/7IsrngYBAMuoLOMBrRKAUNQGiQs8LEYwIog8eDABD4m +BKyB4gQfu0C0GhAtC7iOhvdAQQcc8IAGuKwBCfjYBmSkkn3kQH8xuIACWGCDb5wiCCfwQQm4lANW +3I0f4WuaLLAhC2tg4xtlxIbhGiIKJbrqAh5YwMZcRikMVCBYBOnaV8LgQTBIIRkDAURGFheGoBhP +LBjJCBcqsriNAKIKz2NOPFKQwA1UwAGueIgmMDABKHaABRSDmwUUkMAHYPIhp3jAsyxAJwMYwAIP +gGUlexQDBuhJbr4aYKc2sIBZPKRfL5ABBw5gOg3kwAHYsiWtGhCDXj4kFCegFaEqUAEKsP+KAu8a +1Axy1RBndKxUpnuBkO4RQAC+SwGm7Mc5LqKRsWSEgv2IBgYXd5GMGK+eVcACFrKQkcyFAStgIMpy +MnEBIWqqAjNwyD5M0ClixWthBPlEBw6wgE5VIAbUGgg8RjApmC1glApYAAAGkAADtEoDDBAAAxZg +AAUogE7/ukAGlKjGO/mAkiy4wAAPUIFiYcBVmoKYoxyCCluZrlP6m6aejLoBktLUDhxggQdekEAh +1YMElNLfAl7QkF980HiYM0s/dtGFxQWFn/gMQxbQWoUrVGGdFhlLFYTRHDm4agG8kpgaq5FD0+3S +Uw2JAwUykEDTsYCmzsDWAF/n0Ul84xr/bvTpBSAgAAGwYBbXgATsfMUBCVDUhXciATEXALuVCgEI +ncopujDwLpURZB9cwpYHAggwXnUAZv/yAJmU1RB+ECK1VL3TCTaggACGrCFiqCc/wYBPsfWja/hM +Lj57krnGYdC6WVguGZqzAmKNtmMaeNRAtPG6GGpAhrsdSBzgBQFYGuCzpvDp6xQAgQuorh/LUEDp +Sqc/AZhyHyOYFTFjUAFUEYQbRYLAAjxpAAgoiRnN0tQLXncBGzTEHelqFQemegFX1IwQCHhArSQc +gxiIjB5AIO4DPsmPUM2qAhqgmDrAgF3N6TOfUhjGQDgHhitgpKxqDcpFqjDBr2SBkJMr/+tNlqMC +nj5gtA7wG0G0kdPXmc4AdxwIHCBAJ9TG0SGa6CEGWPCAixU4HhugwDGrLAPDaUJ/e+vVX28WgmEq +sAUNoERDMgHLKrdqYgRpBsxYtVoM7IAg9yAEkviEAQtQgKZDMgUhRoGPe8igZqJgRCgeQozizVhx ++axCjvfRzrcWEtT51ONYNEfkfAY0OSqAgAM69gAHGLYhey1Bp9irgAL3wxAVMAAF9PcAAoR3IJp4 +QJdf18zgaoAFCDCilweC3yFeQAIXMAA6IRcCDWSVWKtoyCkcwKsYIGlShmNGtFxVTQW4MBJ3vcEL +anUA/v2tA/zTBefGoLkxYGEMVZjCMf/uFAYpEHKeUwhKW+u5kyGToXL+RC5YuNAO5qAAlixogJMx +YOxllA5mTr5yQ1ZwAWCz13TG7kcmOrBSKC5gAeCGHAkWUE0kqfhPy2ilAg7gKgO09oVwfMCRPGCA +oPXDFBVowcpnlVeC+I9UD2gBBlxoCgfw4AZ6itGjHRIPD2D0IYCoMVi+EpRQ3wm5Vdhn5dCekX1a +FwtTaJzxwjCGiyhZOSowt0ddbuxqAGmlLg85QbK0cwD41NYN0aSrODXah4JWfyyQLwz+dHTXYXsB +Dej1nT5gAIn961XhppMCHYABBfx5IM0AGLEwIAAOUI8gnFjACZDOp9ihZR8ewPcgKQL/1yxs4XH7 +2GMiB1mRffuOnWPJQsSxKxYs2D05bmAp5AWwgMMPpBpy24AB9JcAdhEEBZxfwDCdTNNFwM50lycA +zO80ApdT9AJQn7xdxayAAWT+HhuAvAJaPvUJQADyLjedm3OVDGiBAXKvNYIYDciADAhA25MBr3OI +X1A7QEAHdUCcPfqjfKA7DtqdVfMxIxMLyxk7jNCjd1KOfTAYwPOYA1CjKWuBBUAAArgAB8CyflgB +ncMAAjCAFjgAlNMkDJioASIAZlMoBcO2BJO8pvuR0SIAn8o8hcI2DGgBbGO2fjiFTtG4jjG9fmAG +nrqrfDlAgiCFcdOAF2ABBay3e+AA/3x7uzBoCEG4iD8CPrIwst/BAjIAiqAgJD06pAmSrjFoDplz +OSRRII67AApggbtyue5Lr6MaLTFDuYFyFRVrhAFQP8BJoPa7gE8iCFPQH847HQN4wiLRn/MrOlTo +AO1TPaabNrvKABbIPheqBJ7iE2zhxLOIB7sRhlzIhT9yCFxYrrAaiGAAuAzsAuxCpJ4YO+kqJOMZ +wXqCpORQKJAqxQt4ATVCrAF4FwVigF4zgbvCNgToGJrKhIOBgAF4gB6ogMaDhxPQHy6jvj+5QsNz +FQTQtjvhGGezMheSFQmoJZzSgCQciFNggKkygI9hwYbghFlhgRZIAQ4QgDQsFT1QnP8nyAAfMBxH +ukO3GYMpCIMcywfk0pwsmAKFaxx8Wi5CyicRRDXF8cXlyBLqY0CtwkbtS7a7CoA8I4gUcJmVUiAX +iEQ3mqi7Qqd9GK7zc7ktNIUOKB1eUQADUL+BuL+OoZskaQhScJkYuKtugzGC6ITzSyCecr2BEAXi +ygAoer966wdssIY/WK5bYMs3BDUzyAtgGDIwAMnliivo2sNCwpyRpCcg45ytGIjQKY4RcJXKMxI1 +ugai2bJaQQCdbEQF6hSXoalIuIAmXIAtw4Ci7AAk2UyPUkpqxKkY4LWtO4GDMSpeaghPbJVBtDmC +YAaAUTEF2riGUKEFQMs0U8uB0IX/xHkch9CFIeOCK/gJxpECgduHCLqCfHJOiiADlAwDMhADLvDI +LEi+GZsxJfuFHEMO2gFAn1oAinGGClCxo3qAXrtBBRoz/aGpQ6imrFop9TNKu3IjFqAWrAQ8/am/ +rUMg0FSAKgSFBALNiymxpmuVZHu/zyMISMipAZI3A9A6lcCFKqAC72wIYNRLLvBALMhL6VKrtIKu +dgoK7Lon5MGC5soHgEKOfVCBnnS/6rsvBFgABoSAA3AA9OqHb4SdBhgA10G5RzAAnNI+D1jHrhCX +0RKAXWKB1qzM8JMsnxuId/AAGUASXhGAoiOFnDpDlxsAF2iIadCw1XqAAuhBhXzH/3zRn97sh43A +gpfEo7TbMb2cguBZUbgLvrKqpyzoN7M6NVWrAsIcAxFCDn6gHQUCv2u8NQIFwgUgAIQaiHgoAT5z +uQs4FIdwUAVyHdJjtngggQRige6yL6MjJpfhgP5siHg4AZc5Eg1QACnVBGfrFMjbxD/xBFPdzER0 +IUMwnQcAIJ9iU1zQHDgdCLpzTujSp7IAJJTkJ1DrU+qqiGYcSSwwg4EghjCAQOIYAUIkgBcAKYrZ +hgEAR62yAAB4KFAYgNOZqMy0NId4BFI6gFgzgMYzyjK0AEW8xX7ohIzDgAxov1FEkhZggZUzrn7A +B4sjLuoboB8ghycxhRg5vwo4p/+GyAELyBcIkAHSY1PEKTuHcCS9rCegqAJcgIpcKKvo5Im/fEaF +o7Ea04p+yIcqSAlpXNV3ZMAWAKV7jToByEGk24EdeL/7JD0dHQhPcLJiITkMUKMV0E0CqDkddYag +04AWoAANMIAqxJL4chnT6YFYcIUbcLJWrccadAagcpXaWQVy8IZGmKMmpBT8XAtglIJieAhdWEkf +c858ugliIB7nBDJUU0ayc8a5GwhhAITl4If7MTwWeEWauoO9OR3qG60NWKVuA8c6eoWHcIdrwQCV +MgAccAhPwDYBYoEE0LZ3IIHXBMKudIhO6JgMeIEMEKCWOsoFqBXqcxVsaAh6gBn/MdvGa0HazlMg +CTCARmALQeAcgXOIMcgCykHGuFqHfkgHjODQKogCtcIn5ClB5uNQ7LKZfggDVzuOfkFLl0KAfCUI +Q/DJBTimSvU/+xwAyXQIT4QdJ+uemxEu0BQCr0MFV6mVC8BayHkEqCs3XgmgTCREl7mA/R0qirpS +Z+OAZOsVl4IjJWLTfgDGN/265NrTGnseQVAunng4PRQDDFrJPWJRftgFLnC+8V0o02mBElgAnFUJ +ZiCBqVIABGAABciABLgAAQApD2AgnOgED2iAF/gsyMmBTiFagtCEKIoBVTgLR+iABhgg4uq2BCAA +AniAhKUhldiEKOI8BECSAOhX/4qSon7dpritgi1Q3oZwpCsw4crppyrwiHkACoyYAp7gHLRbJ2TE +Luuc2V1AOPE1jm2gFUJcgC+9m33Yh3uwmXxw5Elmi+/likc+i3yIh/TBCe25Bve5BmeYhmmgBm04 +hVLm5ITSBmcIhVM4BWcgBVc2BVE4hVLYhrcQhD3CUII4u8xxTh9zK++0yxFFtX6aMYpQKyoYA3UY +iHNQuxbeDUqAARYYgkdzhlopLGwTSPXAhRKORpitiL7cJygQg3Sw5IEQBGX0giHjnJVUnCqQAmIo +CizgnC6gON+ohEGxFRqgKfyCIn6tgC1MDwnsgjNwCGd+xihY5obQB3b4jGgQA/+4ozEfYxxciAa+ +0Idd8LfGuefeUIG9+UwP+GKCOIQAIwAWAKBtTo9gECQ4FQR7AgMqgKR5EIbf5IIxCChi2DcqIMEw +wIVhcL5zQC4OFQPsgubc0LLZyoAGEIKo4QdnYMrucr8eaI95gK4sOAd9UIcVHkEqMIPPEIaxsy5m +Zuh80IdzvpNzgMOHYxws6GjeWAQFeAEBciMO4BMWkFj6+kICyDz04AfjK+GyWq6MiIIrULI9YsYs +IKspMAOgxol8GIZcQOy2SrWgOGrcQCwqi6wBShe/OoBETCCUSw9oMLISvgh/WkaiwAUh6+k55YJq +fQgLWp64u5y0a77f2AcSaAD/CIiBXXKZOWkoCCAAuXa2C/4OfvgDDu0C6qyc6+1YPCZBLCArEQWL +KjDo2B7qEWSrVKuCy8YNd8iAZBuzM+QV+dSfFkAARqzqPKqnsXjjYjg+5wSbPQQD2HaIebAcIiOL +h2M+72YNekALULir/03ALrNclXaPX1CrPZ6CMgidX4ggMHC4ytmnPuYFlVCHOU21Cdo3HsvW3WAG +BPKpSfGpblMgIDDu8tiHeZgHlQAGfVI7zXErRKKCC4/t5Am7Qcogyx4OeJADBfDRBfAACUaAAXCE +ALHLY1S1fcscxbFxh5jeY9Ycj+SCOswI/94N8HmEG/AADwgCR8CEcRAQxFGrgxF0RowQxoZIh/bW +77GjMSzXEcuwy4fDoOTzwG8WHs6Z7a+YcNSG8zinDGhwJw6dOxBaLmItzAkCIeviN/sG9M4YtSqI +zrGDu7MzbJxwJOQ5bRLd5UfnDHXQiY3Yt6oY1KG4ZGE4pM7Ry5/2dOFA61aH9ViX9Vmn9Vq39VvH +9VxnjoAAACH/C1NUQVJESVYgNS4wCQGiDgAAXgoAAAA7 + +--=_6xaiexiy7y80 +Content-Type: image/gif; + name="siprp_logo.gif" +Content-Disposition: attachment; + filename="siprp_logo.gif" +Content-Transfer-Encoding: base64 + +R0lGODlhUgHeAPAAAAAA/wD//yH5BAEAACAALAAAAABSAd4Ah8IxPcVMVMpiZ850eIF/g4yKjZWU +l5+eoKmnqrGwsrm4utODh9eRlNqeod6qreK1t8LBw8nIytHQ0dfX2N/e3+bAwunKy+3U1fHd3ubm +5uzs7PXm5/ju7/Pz8/v3+P39/fwD+wAAAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE +wDy22L88tqy/PLaAvzy2VL88tii/PLb8vjy20L48tqS+PLZ4vjy2TL48tiC+PLb0vTy2yL08tpy9 +PLZwvTy2RL08thi9PLbsvDy2wLw8tpS8PLZovDy2PLw8thC8PLbkuzy2uLs8toy7PLZguzy2NLs8 +tgi7PLbcujy2sLo8toS6PLZYujy2LLo8tgC6PLbUuTy2qLk8tny5PLZQuTy2JLk8tvi4PLbMuDy2 +oLg8tnS4PLZIuDy2HLg8tvC3PLbEtzy2mLc8tmy3PLZAtzy2FLc8tui2PLa8tjy2kLY8tmS2PLY4 +tjy2DLY8tuC1PLa0tTy2iLU8tly1PLYwtTy2BLU8tti0PLastDy2gLQ8tlS0PLYotDy2/LM8ttCz +PLakszy2eAj/AEEIHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePIEOKHEmypMmTKFOq +XMmypcuXMGPKnEmzps2bOHPq3Mmzp8+fQIMKHUq0qNGjSJMqXcq0qdOnUKNKnUq1qtWrWLNq3cq1 +q9evYMOKHUu2rNmzaNOqXcu2rdu3cOPKnUu3rt27ePPq3cu3r9+/gAMLHkw4LYYLDx40WMCYsYPE +GDgUnjzTQwUGAgBo3sy5s+YBDSxIpkzapIcLDDyrXs15gIMNpWN35NAgAOvbuAEIqCC7d0ULC3IL +z91gtO/jCi1kHs4cdwPk0AtiCN68+m0BGKJDd2C9O+4F2bXH/8aw3Lv51QzEk+Z+vv3qAOHVCx7g +vv7qB/IBbyhvv//m5/nxtYFt/hW42QAB6jWggQx+luBdCzbYIIIPzhWhhBNWGBcHBGIoIYAatkVf +gQIs0EBiKDJAXYEOhMhWavYx8EB8CXFwWYfuXeBiWhXUF0BxEwHno3E7jsVhewHgdxFt7i1QZFkr +eqfkRg20x9uTYVlw3gCweVQBjtUFQCSWXPFXXYshcTBidyCSuRUG5l05UpXe0egmVms2F0CXJdFp +nZN3ZvVAd3um5Gd1dgYqFQfe6ajSocwBqihVg1onp0p5MjfmpE+ZKVx6LoEpHJqcQnWBdQHAdGp1 +ApQaFYzNOf/6Eqy5MXCpq01ZR+pLjOI2QAWjcSArrkqt2hxNlXomgAPGWZCapMQmBWmtNXX2I58X +1MZZtEt5iluiL9HJgKwbOCAqAOByG1SvzLVak40DcfCAt/+pe5Sxw+1akwWZvmevUckOxydN+Aq3 +6b8+0ZqbuzchivBQ/d4GasPNTfnwT9VZXFPErGl8MU8O4zTtbdB+vNMG1R0sU8C5lWxyTnAem1OP +kb7cU8zM6YSzcC7bbNPOwulcnc87AZ2b0DITjZPRuCE9XM9Ky8T0bTqx/F3UOYV8k9UkY41TdcPW +pDBuE3tN07kd50TvfWbbFGXLWTd3a9swjcwahTYVnFu6dLP/xPVtKoc7dN8zTb0adjehfTjhNAkX +wGs4adlc2YwL/l4DsmKAeU1v5zZ35SwxbWu8DizHcEyGszYw6C61JqeN/Vowk92snc66Swss2+zY +m9ne0pHN6Xs7S8ZlK5zHK3F82+rDs1Su4qoxnxJ7zfnefPLW4b1S6qx9fn1KklfXJkrA6/l9TNCz +Nr5Jyt+2/vkq/Z2b7Ci1z5qY8MOUPmvCh2R/9/mDCc3YRJL9eIdyAWTJ2nLDpZBYYH+qSyBMuIeb +AHjvIryrmQRhQr0DBk4iD4Dgbfi2QZQscDgMIGFDQuie/pVQJSirz24+eBDNidBXL5TJAGXoAAtI +TyAYeIAD//7HHPzlMCa0Q1JjFkDERh1xJk30kHcu+ETsSdFALqxiS6J4ReG8T4sv4WIX1QfGm4hx +jJ1BXhmRiMbuUHGNL5FfGz1TKDjC7IZdRKAdb5LBOVpwjz6Zzhw7wwAaAvJdnbsi4g4plC+NcTeM +BNgJmxS2SBIFNQbSnSWbUgFtmWdZKtwkUjZQAQckUjUlekAlRVkVDLiyAii6gCsNycpa2vKWuMyl +LnfJy1768pfADKYwh0nMYhrzmGTKgAQigAAEGIAA0IwmAQ7QzAhEIAMdQKZPKKCAZ0rzm+D8ZgEQ +EAEKYCSc6AQnQyKQzna6M5zjRAAEJKABjWjgnfjEZzMVcP/Nj+Tzn+lsZgLKmU2eZCABAM0nAuhJ +kYRKc50OjWg4E2BOi2RAohiN5kILmpGMZtQAEKjnTSjgTY+2E6QcdQhGIWrSjCogAxS5aEsxmgCY +nnOmEjVARWVCUpzi8wA7ZchKF8JOn0oUASl1iEyN6lAE2LQiTI1oASYAkw4gIKr5VIBIFTJUhRQV +qwmNQESWCtZ/QsAiZU3oAbaqkgwUIK34lMBCupqQr8L1pxAh613daQC2QmSv+SxAUE8iAcC6U6xc +lShLDevOAvg1IXplLDwHq1LJulMBKVGAZdGJ2ITQFSF23Sw4HduQyIpWmnKNyGnTiVmTUGC13+ws +Qj57kND/whaapF2IaW/71Mre9ptnJcluRRtczyqWqL8F5wEYMtzVFiCpc03uN1MrkrdKV7YHoa1B +bJvc1kJWut9c7kPAK83nigQC5MWuQbRbEO4mt7cGaS5s1Wtc8kITASHpgH2LO9vjetW+0TSAQuTr +XOj2F8AEoOpHNJve6EZ0sQCmbnwRDE3vOhjAAv6IdTFqAAVQwMAZoAAEELBhfNKXIOwliHuTm+GD +EBi2vkWwhDVSWIw6FSIaYCY++Ztd/9Y1oiceSIh1bFL4Cjmi+F1IBzIQgQOYdMYHTuhCNMDkbpo0 +yRxhMJAtIgGEpjPIAknxQFbcTjAbZAIljaiFCfJicGK5/7RXxah4LwxQHHsZowa2SJoBauaHSMDJ +4DSzmAVC5i9LRMsOLQBC2vzNNzsE0Q5tiI8dooESJxTKF8lpRzSQgBLzeL2Tru2WD43Rx4KA0dJ0 +9KMxamRQR1oilZZoAjiCaml+msbeFHSotztqiez5n5iu9X0pYul/9nnXDSl0OlucEWFD89YbOaiu +H4xch/YZITW2touRTBH0qlmo1J5IsfNJa4mueSWDBoGyw3ntg9yT2xNuakyPCu5XTyTODjX1vKUK +k3SvO9BQhXdBnK3q8Qq8vlKmyL/B2ep9HxzdyFZxryVC73gntOAxBijGURxuiSz8mw2fiLOjeW6U ++Hviqv99uEAIHnB50/mfFfm4NEMuEf1mdK0sObm2G6ryU/e8ITZ3eWLt7XGJ0pziJlVAnkWi87BS +5N0OnbXFNU6RCUgU2hwnekTunFB9UwTfHlW6ySM+ZpT7WaL0ZflEuA5QBQ894eIm+0S8PVMEUBYk +TeczRX6dz2D/fMqlrjfcI/LaiDI7I4X3aQG0OpK8G3si2c73toUOEUA79PBRrvNE+I5PqXNk3C01 +gASWnmm5q9vsDEn85Rf9d4R0wPIOxXrWB/8Q2F/aI3THqt094vh8tlsgHYB0Qj0/8NZvF/T59Prs +Nf8QNGeU9BQJelkLAAHo/9X0MofmtTVAAbZHtOHOPkD/BsZP/vKTPwLep/zbma9bCHD+nxu/SO7T +euObdhy0hm+m/vffTOSvnvUUZn1hhmT8V4A+hWka4X9MpVOld3+iRmEI6HMIJnsFQWEEgHkcoXp7 +ZQBHt37sh38IhoFHBmBzJmkQOBLzt1dINRG9J113N4LkJYIIR14lGBLpd1e/NxAt+FvxJ4HglVsG +B2DKl2Wb1YOupnUPSF6Kpls0yIIARoEdIXx7BYSCR3tJKF1UCIDJRXzXR15cWBKRZ1iClXEfeIXJ +FYFsllxjyHPgVYMnoQG2B1gdCAI7KFoFgIZpeFtfmHLSZYQoqIBRlYU95oC8poZDmIendQAC+HKr +VXIr/3GDZSWDOoh9yeWHiHhaUFiFp7WGMhF8jLWHy1eGhbhaDDhWv4VzLbdaoFhVEACIOEVzdbiB +ePhdvyWIQShaCbCILiEBYAdW8ReLkVhTFoWFuliBRTiLNdEB7pdWIQeMPmUA8hQBh1haUlWAvShn +bHhX1TSHOnFQrvh3zshuMaF2BtF9JpWJRyiKW0EB19hSM6iOErdzL0GO7haHCcWNoUhuZBEB7xdR +LxiOAAcT9IgQkIhPkph5MGcWGdCO3zaISDiKeieQxicQBflOOUiHhCgWC3llCJmQ/yWPLjGQCWGP +gcWHVlgWFPCN6LSE6QiPZQeSLSGSCBFr5taFJ1kWcP+YUR2pjx/pdBKpfj0ZUbpoemKhkurkkDcZ +jz45jxNJEAyJT46IlB5ZFMI4EmGojgAZW+PYlDAolGTIk0VxVbk4Ev3YTjuJTxD2eD95cREhhVn1 +lWh5FHF2hyLxlO50lu+Ulr63lUCpZBjFkowYl0YBduIHEnZpllI5lSC4lCHJlQThliZmgg8ZFNco +dh1BknyFl3dZbYwZk445ENKXUID5jmBJFAyJjg4RmvCnmYgZlGrJlH3JEJD5TrNIlDvxlAUQAcWY +EBWZTtCWldJ0kSAhkwwBdf/ngaU5FIdJAIxXERoIUA0HnNEknB9BnAyxnOmEh7apE9h5gaMXER3Q +m+n/NJr5mJwQ+ZqNGZuph43IKZhhmVAdRgFDyE0etYrSqX18yZZ7x2rtmZdy+VH6pwD6Z5TttHT3 +SQDU6RHWyRBWV3GsiU5I0Z2S9YuUCJMssaAMQaDSZKAZCRQSyljKd6AJ2hEYuhAp+E9RuZ058aGA +RYEimp9UVxGqCVB5pqI4waJ35YYtqZhmuJdrGaMVMZuH9aDhFKE/aH0v+qOrOYwSRZ4DOJkeioXT +mKSwqZ8WgZkWmZjuSRTZB1a2qKVb2qORqaQKhRFX+U8YaKM44YmrhYqSCaUv2ZkX+pkJUZbtBGVq +mhNsallRSaRFypkRWaVAymUctqNhehR7uleFaZJJmBmngZqeVnoRGhpNbvekjWoU/AhXopeNl3p6 +FroSJeoQXTps5emfUOGNUbV7qdipXTqi5aaeEjGp0NRbeSoUGTBiJjVOyKiJPHqePiqoS5oRo0oA +b1arRcFkI4alAYYACsBQG5FuS2Z+0jqtuxkS03qt5TeND0EB48etIdat4Pqt4tpb2Fqu+CgV16pN +6rqu7Nqu7vquHxMQACH/C1NUQVJESVYgNS4wCQE+DwAAAwoAAAA7 + +--=_6xaiexiy7y80-- + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/Pdf.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/Pdf.java new file mode 100644 index 00000000..231f8b4e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/Pdf.java @@ -0,0 +1,171 @@ +/* + * Pdf.java + * + * Created on November 13, 2007, 11:33 AM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package pdf; + +import beans.Acidentado; +import beans.AnaliseAcidente; +import com.evolute.utils.error.ErrorLogger; +import com.lowagie.text.Document; +import com.lowagie.text.Font; +import com.lowagie.text.FontFactory; +import com.lowagie.text.Paragraph; +import com.lowagie.text.Rectangle; +import com.lowagie.text.pdf.BaseFont; +import com.lowagie.text.pdf.PdfPCell; +import com.lowagie.text.pdf.PdfPTable; +import com.lowagie.text.pdf.PdfWriter; +import db.providers.AnalisesDataProvider; +import java.awt.Color; +import java.io.FileOutputStream; +import javax.faces.context.FacesContext; + +/** + * + * @author lluis + */ +public class Pdf { + + PdfPCell cell = null; + Paragraph p = null; + private final static int FONT_SIZE = 5; + /** Creates a new instance of Pdf */ + public Pdf() { + } + + public void generatePdf(String folder, AnaliseAcidente a) + { + PdfPTable table = null; + FacesContext ctx = FacesContext.getCurrentInstance(); + ////HttpServletResponse response = (HttpServletResponse)ctx.getExternalContext().getResponse(); + Document document = new Document(); + ////response.setContentType("application/pdf"); + + try + { + ////PdfWriter writer = PdfWriter.getInstance(document, response.getOutputStream()); + PdfWriter.getInstance(document, new FileOutputStream(folder + "/" + a.getId().toString() + ".pdf")); + document.open(); + //document.add(new Paragraph("Hello World")); + //document.add(new Paragraph(new Date().toString())); + + table = createTableEmpresa(a); + document.add(table); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + document.close(); + } + + private PdfPTable createTableHeader(AnaliseAcidente a) + { + PdfPTable table = new PdfPTable(3); + return table; + } + + private PdfPTable createTableEmpresa(AnaliseAcidente a) + { + String empresa_str = ""; + String estabelecimento_str = ""; + String trabalhador_str = ""; +// AnalisesDataProvider adp = new AnalisesDataProvider(); + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + String nome_empresa = adp.getEmpresaNome(a.getEmpresa_id()); + empresa_str = utils.Utils.unicodeToHTML(nome_empresa); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + estabelecimento_str = adp.getEstabelecimentoNome(a.getEstabelecimento_id()); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + Acidentado ac = null; + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + ac = adp.getAcidentado(a.getAcidentado_id()); + trabalhador_str = ac.getNome(); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + //TableEvents event = new TableEvents(); + + float[] widths = { 1f, 4f }; + PdfPTable table = new PdfPTable(widths); + table.getDefaultCell().setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.TOP | Rectangle.BOTTOM); + //PdfPCell cell = new PdfPCell(new Paragraph("header with colspan 3")); + //cell.setColspan(3); + //table.addCell(cell); + + + + + cell = new PdfPCell(new Paragraph("Empresa:", FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE))); + cell.setBorder(Rectangle.NO_BORDER); + cell.setBackgroundColor(new Color(102, 133, 151)); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph(empresa_str, FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE, Font.NORMAL, new Color(255, 255, 255)) )); + cell.setBorder(Rectangle.NO_BORDER); + cell.setBackgroundColor(new Color(102, 133, 151)); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Estabelecimento:", FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE))); + cell.setBorder(Rectangle.NO_BORDER); + cell.setBackgroundColor(new Color(102, 133, 151)); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph(estabelecimento_str, FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE, Font.NORMAL, new Color(255, 255, 255)))); + cell.setBorder(Rectangle.NO_BORDER); + cell.setBackgroundColor(new Color(102, 133, 151)); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Trabalhador:", FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE))); + cell.setBorder(Rectangle.NO_BORDER); + cell.setBackgroundColor(new Color(102, 133, 151)); + + table.addCell(cell); + + cell = new PdfPCell(new Paragraph(trabalhador_str, FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE, Font.NORMAL, new Color(255, 255, 255)))); + cell.setBorder(Rectangle.NO_BORDER); + cell.setBackgroundColor(new Color(102, 133, 151)); + table.addCell(cell); + table.getDefaultCell().setBackgroundColor(new Color(102, 133, 151)); + table.getDefaultCell().setPadding(0f); + table.setSpacingAfter(0f); + table.setSpacingBefore(0f); + return table; + } + + private PdfPTable createTableEmpresaHs(AnaliseAcidente a) + { + PdfPTable table = new PdfPTable(3); + return table; + } + + + + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/PdfGenerator.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/PdfGenerator.java new file mode 100644 index 00000000..f970d1e1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/PdfGenerator.java @@ -0,0 +1,592 @@ +package pdf; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.net.URL; +import java.sql.Time; +import java.util.Calendar; +import java.util.Date; +import java.util.Vector; + +import org.jdom.Document; +import org.jdom.Element; +import org.jdom.output.XMLOutputter; + +import beans.Acidentado; +import beans.AnaliseAcidente; +import beans.Causa; +import beans.Estabelecimento; +import beans.Medida; +import beans.Recomendacao; +import beans.Seccao; +import beans.Utilizador; + +import com.evolute.utils.fop.FOPCreator; +import com.evolute.utils.fop.PDFCreator; + +public class PdfGenerator +{ + protected final String imagePath; + protected final Estabelecimento estabelecimento; + protected final Utilizador tecnicoSuperior; + protected final Utilizador medico; + protected final AnaliseAcidente analiseAcidente; + protected final Acidentado acidentado; + protected final Seccao seccao; + protected final Recomendacao recomendacoes[]; + protected final Medida medidas[]; + protected final Causa causa; + protected final URL urlSiprp; + protected final URL urlAuchan; + //protected Vector imagens = new Vector(); + protected Vector imagens = new Vector(); + + public static void main( String args[] ) + throws Exception + { + AnaliseAcidente analise = new AnaliseAcidente(); + analise.setAnalise_nr( "12/3" ); + byte[] pdf = + new PdfGenerator( "/home/fpalma/Desktop", + new Estabelecimento(), + new Utilizador(), + new Utilizador(), + analise, + new Acidentado(), + new Seccao(), + new Recomendacao[ 0 ], + new Medida[ 0 ], + new Causa() ).generatePdf(); + File pdfFile = new File( "/home/fpalma/Desktop/siprp.pdf" ); + pdfFile.createNewFile(); + FileOutputStream fos = new FileOutputStream( pdfFile ); + fos.write( pdf ); + fos.close(); + System.out.println( "DONE" ); + } + + public PdfGenerator( + String imagePath, + Estabelecimento estabelecimento, + Utilizador tecnicoSuperior, + Utilizador medico, + AnaliseAcidente analiseAcidente, + Acidentado acidentado, + Seccao seccao, + Recomendacao recomendacoes[], + Medida medidas[], + Causa causa ) + { + this.imagePath = imagePath; + this.estabelecimento = estabelecimento; + this.tecnicoSuperior = tecnicoSuperior; + this.medico = medico; + this.analiseAcidente = analiseAcidente; + this.acidentado = acidentado; + this.seccao = seccao; + this.recomendacoes = recomendacoes; + this.medidas = medidas; + this.causa = causa; + this.urlSiprp = getClass().getResource( "siprp_logo.gif" ); + this.urlAuchan = getClass().getResource( "auchan_logo.gif" ); + carregarURLs(); + } + + protected void carregarURLs() + { + String fullPath = + imagePath + "/" + + analiseAcidente.getAnalise_nr().substring(0,2) + + analiseAcidente.getAnalise_nr().substring(3); + File dir = null; + try + { + dir = new File( fullPath ); + + if( dir == null || !dir.exists() || !dir.isDirectory() ) + { + + return; + } + File files[] = dir.listFiles(); + for( int f = 0; f < files.length; f++ ) + { + imagens.add( files[ f ].toURI().toURL() ); + } + } + catch( Exception ex ) + { + return; + } + } + + public byte[] generatePdf() + throws Exception + { + Document doc = new Document( createXml() ); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + new XMLOutputter().output( doc, baos ); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + InputStream xmlIn = new ByteArrayInputStream( baos.toByteArray() ); + InputStream xslStream = getClass().getClassLoader().getResourceAsStream( "pdf/analise_acidentes_trabalho.xsl" ); + FOPCreator.getFOPCreator().createFOfromXML( xmlIn, xslStream, out ); + return PDFCreator.getPDFCreator().createPdfFromFo( out.toByteArray() ); + } + + protected Element createXml() + { + Element rootElement = new Element( "AnaliseAcidente" ); + Element logoTipoSIPRPElement = new Element( "LogotipoSIPRP" ); + logoTipoSIPRPElement.setText( urlSiprp.toString() ); + rootElement.addContent( logoTipoSIPRPElement ); + Element logoTipoAuchanElement = new Element( "LogotipoAuchan" ); + logoTipoAuchanElement.setText( urlAuchan.toString() ); + rootElement.addContent( logoTipoAuchanElement ); + Element numeroElement = new Element( "Numero" ); + numeroElement.setText( analiseAcidente.getAnalise_nr() ); + rootElement.addContent( numeroElement ); + Date data = analiseAcidente.getData_acidente(); + rootElement.addContent( createDataElement( "Data", data ) ); + rootElement.addContent( createEntidadeEmpregadoraElement() ); + rootElement.addContent( createSeguroElement() ); + rootElement.addContent( createEmpresaSHSTElement() ); + rootElement.addContent( createAcidentadoElement() ); + rootElement.addContent( createAcidenteElement() ); + rootElement.addContent( createRecomendacoesSIPRPElement() ); + rootElement.addContent( createMedidasElement() ); + rootElement.addContent( createTomadaConhecimentoElement() ); + return rootElement; + } + + protected Element createEntidadeEmpregadoraElement() + { + Element entidadeEmpregadoraElement = new Element( "EntidadeEmpregadora" ); + Element identificacaoElement = new Element( "IdentificacaoCompleta" ); + identificacaoElement.setText( "Companhia Portuguesa de Hipermercados, S.A., com sede na Travessa Teixeira J\u00fanior, 1 - 1300-553 Lisboa" ); + entidadeEmpregadoraElement.addContent( identificacaoElement ); + Element actividadeElement = new Element( "Actividade" ); + actividadeElement.setText( "Com\u00e9rcio a Retalho em Supermercados e Hipermercados" ); + entidadeEmpregadoraElement.addContent( actividadeElement ); + Element lojaElement = new Element( "Loja" ); + lojaElement.setText( estabelecimento.getNome() ); + entidadeEmpregadoraElement.addContent( lojaElement ); + return entidadeEmpregadoraElement; + } + + protected Element createSeguroElement() + { + Element seguroElement = new Element( "Seguro" ); + Element empresaElement = new Element( "Empresa" ); + empresaElement.setText( "Mapfre Seguros Gerais, S.A." ); + seguroElement.addContent( empresaElement ); + Element apoliceElement = new Element( "Apolice" ); + apoliceElement.setText( "1500591100500" ); + seguroElement.addContent( apoliceElement ); + return seguroElement; + } + + protected Element createEmpresaSHSTElement() + { + Element empresaSHSTElement = new Element( "EmpresaSHST" ); + Element identificacaoElement = new Element( "IdentificacaoCompleta" ); + identificacaoElement.setText( + "SIPRP - Sociedade Ib\u00e9rica de Preven\u00e7\u00e3o de Riscos Profissionais Lda., " + + "com sede no Edif\u00edcio Atrium Saldanha, Pra\u00e7a Duque de Saldanha, 1 - 9\u00ba G" + + " - 1050-094 Lisboa " ); + empresaSHSTElement.addContent( identificacaoElement ); + Element tecnicoSuperiorHSTElement = new Element( "TecnicoSuperiorHST" ); + + Element nomeTecnicoSuperiorHSTElement = new Element( "Nome" ); + nomeTecnicoSuperiorHSTElement.setText( tecnicoSuperior.getNome() ); + tecnicoSuperiorHSTElement.addContent( nomeTecnicoSuperiorHSTElement ); + Element capElement = new Element( "CAP" ); + capElement.setText( tecnicoSuperior.getCap() ); + tecnicoSuperiorHSTElement.addContent( capElement ); + empresaSHSTElement.addContent( tecnicoSuperiorHSTElement ); + Element medicoTrabalhoElement = new Element( "MedicoTrabalho" ); + Element nomeMedicoTrabalhoElement = new Element( "Nome" ); + nomeMedicoTrabalhoElement.setText( medico.getNome() ); + medicoTrabalhoElement.addContent( nomeMedicoTrabalhoElement ); + Element cedulaElement = new Element( "Cedula" ); + cedulaElement.setText( medico.getNumero_cedula() ); + medicoTrabalhoElement.addContent( cedulaElement ); + empresaSHSTElement.addContent( medicoTrabalhoElement ); + return empresaSHSTElement; + } + + protected Element createAcidentadoElement() + { + Element acidentadoElement = new Element( "Acidentado" ); + Element nomeElement = new Element( "Nome" ); + nomeElement.setText( acidentado.getNome() ); + acidentadoElement.addContent( nomeElement ); + Element estabelecimentoOrigemElement = new Element( "EstabelecimentoOrigem" ); + Element nomeEstabelecimentoOrigemElement = new Element( "Nome" ); + nomeEstabelecimentoOrigemElement.setText( acidentado.getEstabelecimento_origem() ); + estabelecimentoOrigemElement.addContent( nomeEstabelecimentoOrigemElement ); + acidentadoElement.addContent( estabelecimentoOrigemElement ); + Date dataNascimento = acidentado.getData_nascimento(); + acidentadoElement.addContent( createDataElement( "DataNascimento", dataNascimento ) ); + Element biElement = new Element( "BilheteIdentidade" ); + Element numeroBiElement = new Element( "Numero" ); + numeroBiElement.setText( acidentado.getBilhete_identidade() ); + biElement.addContent( numeroBiElement ); + acidentadoElement.addContent( biElement ); + Element moradaElement = new Element( "Morada" ); + moradaElement.setText( acidentado.getMorada() + ", " + acidentado.getCod_postal() + " " + acidentado.getLocalidade() ); + acidentadoElement.addContent( moradaElement ); + Element telefoneElement = new Element( "Telefone" ); + telefoneElement.setText( acidentado.getContacto_telefonico() ); + acidentadoElement.addContent( telefoneElement ); + Date dataAdmissao = acidentado.getData_admissao(); + acidentadoElement.addContent( createDataElement( "DataAdmissao", dataAdmissao ) ); + Element funcaoElement = new Element( "Funcao" ); + funcaoElement.setText( acidentado.getFuncao() ); + acidentadoElement.addContent( funcaoElement ); + Element turnoElement = new Element( "Turno" ); + String turno = acidentado.getTurno(); + if( "m".equals( turno ) ) + { + turno = "Manh\u00e3"; + } + else if( "t".equals( turno ) ) + { + turno = "Tarde"; + } + else if( "n".equals( turno ) ) + { + turno = "Noite"; + } + turnoElement.setText( turno ); + acidentadoElement.addContent( turnoElement ); + Element superiorElement = new Element( "Superior" ); + Element nomeSuperiorElement = new Element( "Nome" ); + nomeSuperiorElement.setText( acidentado.getNome_superior_hierarquico() ); + superiorElement.addContent( nomeSuperiorElement ); + Element emailSuperiorElement = new Element( "Email" ); + emailSuperiorElement.setText( acidentado.getEmail_superior_hierarquico() ); + superiorElement.addContent( emailSuperiorElement ); + acidentadoElement.addContent( superiorElement ); + return acidentadoElement; + } + + protected Element createAcidenteElement() + { + Element acidenteElement = new Element( "Acidente" ); + Element averiguadorElement = new Element( "Averiguador" ); + Element nomeAveriguadorElement = new Element( "Nome" ); + nomeAveriguadorElement.setText( analiseAcidente.getAveriguador() ); + averiguadorElement.addContent( nomeAveriguadorElement ); + acidenteElement.addContent( averiguadorElement ); + Date dataOcorrencia = analiseAcidente.getData_acidente(); + acidenteElement.addContent( createDataElement( "DataOcorrencia", dataOcorrencia ) ); + Time horaOcorrencia = analiseAcidente.getHora_acidente(); + acidenteElement.addContent( createHoraElement( "HoraOcorrencia", horaOcorrencia ) ); + Element horasTrabalhadasElement = new Element( "HorasTrabalhadas" ); + horasTrabalhadasElement.setText( "" + analiseAcidente.getHoras_turno() ); + acidenteElement.addContent( horasTrabalhadasElement ); + Element localElement = new Element( "Local" ); + Element seccaoElement = new Element( "Seccao" ); + seccaoElement.setText( seccao.getDescricao() ); + localElement.addContent( seccaoElement ); + Element localEspecificoElement = new Element( "LocalEspecifico" ); + localEspecificoElement.setText( analiseAcidente.getLocal_trabalho() ); + localElement.addContent( localEspecificoElement ); + acidenteElement.addContent( localElement ); + Element actividadeElement = new Element( "Actividade" ); + Element descricaoActividadeElement = new Element( "Descricao" ); + descricaoActividadeElement.setText( analiseAcidente.getTarefa() ); + actividadeElement.addContent( descricaoActividadeElement ); + Element objectosActividadeElement = new Element( "Objectos" ); + objectosActividadeElement.setText( analiseAcidente.getSubstancias() ); + actividadeElement.addContent( objectosActividadeElement ); + Element condicoesActividadeElement = new Element( "Condicoes" ); + condicoesActividadeElement.setText( analiseAcidente.getCondicoes() ); + actividadeElement.addContent( condicoesActividadeElement ); + acidenteElement.addContent( actividadeElement ); + Element testemunhasElement = new Element( "Testemunhas" ); + testemunhasElement.setText( analiseAcidente.getTestemunhas() ); + acidenteElement.addContent( testemunhasElement ); + Element causasElement = new Element( "Causas" ); + causasElement.setText( causa.getCausa() ); + acidenteElement.addContent( causasElement ); + Element descricaoElement = new Element( "Descricao" ); + descricaoElement.setText( analiseAcidente.getDescricao() ); + acidenteElement.addContent( descricaoElement ); + Element imagensElement = new Element( "Imagens" ); + if( imagens.size() > 0 ) + { + Element temImagensElement = new Element( "TemImagens" ); + temImagensElement.setText( "y" ); + imagensElement.addContent( temImagensElement ); + for( int i = 0; i < imagens.size(); i++ ) + { + String imagem = imagens.get( i ).toString(); + Element imagemElement = new Element( "Imagem" ); + imagemElement.setText( imagem ); + imagensElement.addContent( imagemElement ); + } + } + acidenteElement.addContent( imagensElement ); + Element conclusoesElement = new Element( "Conclusoes" ); + conclusoesElement.setText( analiseAcidente.getConclusoes() ); + acidenteElement.addContent( conclusoesElement ); + Element accoesTomadasElement = new Element( "AccoesTomadas" ); + accoesTomadasElement.setText( analiseAcidente.getAccoes() ); + acidenteElement.addContent( accoesTomadasElement ); + Element formacaoSHSTElement = new Element( "FormacaoSHST" ); + Element teveFormacaoSHSTElement = new Element( "TeveFormacao" ); + teveFormacaoSHSTElement.setText( analiseAcidente.getFormacao_shst() ); + formacaoSHSTElement.addContent( teveFormacaoSHSTElement ); + Element motivoFormacaoSHSTElement = new Element( "Motivo" ); + motivoFormacaoSHSTElement.setText( analiseAcidente.getFormacao_shst_nao_porque() ); + formacaoSHSTElement.addContent( motivoFormacaoSHSTElement ); + acidenteElement.addContent( formacaoSHSTElement ); + Element outrasOcorrenciasMesmoPostoElement = new Element( "OutrasOcorrenciasMesmoPosto" ); + Element quantidadeOutrasOcorrenciasMesmoPostoElement = new Element( "Quantidade" ); + boolean outrasOcorrenciasMesmoPosto = "y".equals( analiseAcidente.getOutros_acidentes_com_colaborador() ); + quantidadeOutrasOcorrenciasMesmoPostoElement.setText( + outrasOcorrenciasMesmoPosto ? "" + analiseAcidente.getNr_acidentes_com_colaborador() : "0" ); + outrasOcorrenciasMesmoPostoElement.addContent( quantidadeOutrasOcorrenciasMesmoPostoElement ); + Element relatoriosOutrasOcorrenciasMesmoPostoElement = new Element( "Relatorios" ); + Integer relatorioMesmoPosto1 = analiseAcidente.getNr_relatorio_acidente_colaborador1(); + Integer relatorioMesmoPosto2 = analiseAcidente.getNr_relatorio_acidente_colaborador2(); + Integer relatorioMesmoPosto3 = analiseAcidente.getNr_relatorio_acidente_colaborador3(); + Integer relatorioMesmoPosto4 = analiseAcidente.getNr_relatorio_acidente_colaborador4(); + String numerosRelatoriosOutrasOcorrenciasMesmoPosto[] = + new String[]{ + relatorioMesmoPosto1 != null ? "" + relatorioMesmoPosto1 : null, + relatorioMesmoPosto2 != null ? "" + relatorioMesmoPosto2 : null, + relatorioMesmoPosto3 != null ? "" + relatorioMesmoPosto3 : null, + relatorioMesmoPosto4 != null ? "" + relatorioMesmoPosto4 : null + }; + for( int r = 0; r < numerosRelatoriosOutrasOcorrenciasMesmoPosto.length; r++ ) + { + if( numerosRelatoriosOutrasOcorrenciasMesmoPosto[ r ] == null ) + { + continue; + } + String numeroRelatorio = numerosRelatoriosOutrasOcorrenciasMesmoPosto[ r ]; + Element relatorioElement = new Element( "Relatorio" ); + relatorioElement.setText( numeroRelatorio ); + relatoriosOutrasOcorrenciasMesmoPostoElement.addContent( relatorioElement ); + } + outrasOcorrenciasMesmoPostoElement.addContent( relatoriosOutrasOcorrenciasMesmoPostoElement ); + acidenteElement.addContent( outrasOcorrenciasMesmoPostoElement ); + Element outrasOcorrenciasOutrosTrabalhadoresElement = new Element( "OutrasOcorrenciasOutrosTrabalhadores" ); + Element quantidadeOutrasOcorrenciasOutrosTrabalhadoresElement = new Element( "Quantidade" ); + boolean outrasOcorrenciasOutrosTrabalhadores = "y".equals( analiseAcidente.getAcidentes_outros_colaboradores() ); + quantidadeOutrasOcorrenciasOutrosTrabalhadoresElement.setText( + outrasOcorrenciasOutrosTrabalhadores ? "" + analiseAcidente.getNr_acidentes_outros_colaboradores() : "0" ); + outrasOcorrenciasOutrosTrabalhadoresElement.addContent( quantidadeOutrasOcorrenciasOutrosTrabalhadoresElement ); + Element relatoriosOutrasOcorrenciasOutrosTrabalhadoresElement = new Element( "Relatorios" ); + Integer relatorioOtrosTrabalhadores1 = analiseAcidente.getNr_relatorio_acidente_outros_colaboradores1(); + Integer relatorioOtrosTrabalhadores2 = analiseAcidente.getNr_relatorio_acidente_outros_colaboradores2(); + Integer relatorioOtrosTrabalhadores3 = analiseAcidente.getNr_relatorio_acidente_outros_colaboradores3(); + Integer relatorioOtrosTrabalhadores4 = analiseAcidente.getNr_relatorio_acidente_outros_colaboradores4(); + String numerosRelatoriosOutrasOcorrenciasOutrosTrabalhadores[] = + new String[]{ + relatorioOtrosTrabalhadores1 != null ? "" + relatorioOtrosTrabalhadores1 : null, + relatorioOtrosTrabalhadores2 != null ? "" + relatorioOtrosTrabalhadores2 : null, + relatorioOtrosTrabalhadores3 != null ? "" + relatorioOtrosTrabalhadores3 : null, + relatorioOtrosTrabalhadores4 != null ? "" + relatorioOtrosTrabalhadores4 : null + }; + for( int r = 0; r < numerosRelatoriosOutrasOcorrenciasOutrosTrabalhadores.length; r++ ) + { + if( numerosRelatoriosOutrasOcorrenciasOutrosTrabalhadores[ r ] == null ) + { + continue; + } + String numeroRelatorio = numerosRelatoriosOutrasOcorrenciasOutrosTrabalhadores[ r ]; + Element relatorioElement = new Element( "Relatorio" ); + relatorioElement.setText( numeroRelatorio ); + relatoriosOutrasOcorrenciasOutrosTrabalhadoresElement.addContent( relatorioElement ); + } + outrasOcorrenciasOutrosTrabalhadoresElement.addContent( relatoriosOutrasOcorrenciasOutrosTrabalhadoresElement ); + acidenteElement.addContent( outrasOcorrenciasOutrosTrabalhadoresElement ); + Element lesaoElement = new Element( "Lesao" ); + Element areasLesaoElement = new Element( "Areas" ); + boolean cabeca = "y".equals( analiseAcidente.getLesao_cabeca() ); + boolean pescoco = "y".equals( analiseAcidente.getLesao_pescoco() ); + boolean tronco = "y".equals( analiseAcidente.getLesao_tronco() ); + boolean superiorDireito = "y".equals( analiseAcidente.getLesao_membro_sup_dir() ); + String detalheSuperiorDireito = analiseAcidente.getEspecif1(); + boolean superiorEsquerdo = "y".equals( analiseAcidente.getLesao_membro_sup_esq() ); + String detalheSuperiorEsquerdo = analiseAcidente.getEspecif2(); + boolean inferiorDireito = "y".equals( analiseAcidente.getLesao_membro_inf_dir() ); + String detalheInferiorDireito = analiseAcidente.getEspecif3(); + boolean inferiorEsquerdo = "y".equals( analiseAcidente.getLesao_membro_inf_esq() ); + String detalheInferiorEsquerdo = analiseAcidente.getEspecif4(); + String areasLesao[][] = + new String[][]{ + cabeca ? new String[] { "Cabe\u00e7a", "" } : null, + pescoco ? new String[] { "Pesco\u00e7o", "" } : null, + tronco ? new String[] { "Tronco", "" } : null, + superiorDireito ? new String[] { "Membro Superior Direito", detalheSuperiorDireito } : null, + superiorEsquerdo ? new String[] { "Membro Superior Esquerdo", detalheSuperiorEsquerdo } : null, + inferiorDireito ? new String[] { "Membro Inferior Direito", detalheInferiorDireito } : null, + inferiorEsquerdo ? new String[] { "Membro Inferior Esquerdo", detalheInferiorEsquerdo } : null, + }; + for( int a = 0; a < areasLesao.length; a++ ) + { + if( areasLesao[ a ] == null ) + { + continue; + } + String area[] = areasLesao[ a ]; + Element areaLesaoElement = new Element( "Area" ); + Element nomeAreaLesaoElement = new Element( "Nome" ); + nomeAreaLesaoElement.setText( area[ 0 ] ); + areaLesaoElement.addContent( nomeAreaLesaoElement ); + Element detalheAreaLesaoElement = new Element( "Detalhe" ); + detalheAreaLesaoElement.setText( area[ 1 ] ); + areaLesaoElement.addContent( detalheAreaLesaoElement ); + areasLesaoElement.addContent( areaLesaoElement ); + } + lesaoElement.addContent( areasLesaoElement ); + Element tipoLesaoElement = new Element( "Tipo" ); + tipoLesaoElement.setText( analiseAcidente.getTipo_lesao() ); + lesaoElement.addContent( tipoLesaoElement ); + acidenteElement.addContent( lesaoElement ); + Element incapacidadeElement = new Element( "Incapacidade" ); + Element tipoIncapacidadeElement = new Element( "Tipo" ); + String tipoIncapacidade = analiseAcidente.getTipo_incapacidade(); + if( "n".equals( tipoIncapacidade ) ) + { + tipoIncapacidade = "Nenhuma"; + } + else if( "t".equals( tipoIncapacidade ) ) + { + tipoIncapacidade = "Tempor\u00e1ria"; + } + else if( "p".equals( tipoIncapacidade ) ) + { + tipoIncapacidade = "Permanente"; + } + tipoIncapacidadeElement.setText( tipoIncapacidade ); + incapacidadeElement.addContent( tipoIncapacidadeElement ); + Element coeficienteIncapacidadeElement = new Element( "Coeficiente" ); + coeficienteIncapacidadeElement.setText( "" + analiseAcidente.getCoef_incapacidade() ); + incapacidadeElement.addContent( coeficienteIncapacidadeElement ); + Date dataAvaliacao = analiseAcidente.getData_aval_incapacidade(); + incapacidadeElement.addContent( createDataElement( "DataAvaliacao", dataAvaliacao ) ); + Date dataRevisao = analiseAcidente.getData_rev_incapacidade(); + incapacidadeElement.addContent( createDataElement( "DataRevisao", dataRevisao ) ); + Element periodoIncapacidadeElement = new Element( "PeriodoIncapacidade" ); + Date inicioIncapacidade = analiseAcidente.getPeriodo_incapacidade_de(); + periodoIncapacidadeElement.addContent( createDataElement( "Inicio", inicioIncapacidade ) ); + Date fimIncapacidade = analiseAcidente.getPeriodo_incapacidade_a(); + periodoIncapacidadeElement.addContent( createDataElement( "Fim", fimIncapacidade ) ); + incapacidadeElement.addContent( periodoIncapacidadeElement ); + acidenteElement.addContent( incapacidadeElement ); + return acidenteElement; + } + + protected Element createRecomendacoesSIPRPElement() + { + Element recomendacoesSIPRPElement = new Element( "RecomendacoesSIPRP" ); + for( int r = 0; r < recomendacoes.length; r++ ) + { + Element recomendacaoElement = new Element( "Recomendacao" ); + recomendacaoElement.setText( recomendacoes[ r ].getRecomendacao() ); + recomendacoesSIPRPElement.addContent( recomendacaoElement ); + } + + return recomendacoesSIPRPElement; + } + + protected Element createMedidasElement() + { + Element medidasElement = new Element( "MedidasAdoptar" ); + for( int m = 0; m < medidas.length; m++ ) + { + Element medidaElement = new Element( "Medida" ); + medidaElement.setText( medidas[ m ].getMedida() ); + medidasElement.addContent( medidaElement ); + } + return medidasElement; + } + + protected Element createTomadaConhecimentoElement() + { + Element tomadaConhecimentoElement = new Element( "TomadaConhecimento" ); + tomadaConhecimentoElement.addContent( + createAssinaturaElement( "DepartamentoSeguranca", + analiseAcidente.getAveriguador(), + analiseAcidente.getData_inicio_processo() ) ); + tomadaConhecimentoElement.addContent( + createAssinaturaElement( "TecnicoHST", + analiseAcidente.getNome_resp_consolidacao(), + analiseAcidente.getData_consolidacao() ) ); + tomadaConhecimentoElement.addContent( + createAssinaturaElement( "ResponsavelSeguranca", + analiseAcidente.getNome_resp_seg(), + analiseAcidente.getData_assinatura_seg() ) ); + tomadaConhecimentoElement.addContent( + createAssinaturaElement( "ResponsavelRH", + analiseAcidente.getNome_resp_rh(), + analiseAcidente.getData_assinatura_rh() ) ); + tomadaConhecimentoElement.addContent( + createAssinaturaElement( "SuperiorHierarquico", + acidentado.getNome_superior_hierarquico(), + acidentado.getData_email_superior_hierarquico() ) ); + return tomadaConhecimentoElement; + } + + protected Element createAssinaturaElement( String nome, String nomeStr, Date data ) + { + Element assinaturaElement = new Element( nome ); + Element nomeElement = new Element( "Nome" ); + nomeElement.setText( nomeStr ); + assinaturaElement.addContent( nomeElement ); + assinaturaElement.addContent( createDataElement( "Data", data ) ); + return assinaturaElement; + } + + protected Element createDataElement( String nome, Date data ) + { + Element dataElement = new Element( nome ); + + Element anoElement = new Element( "Ano" ); + dataElement.addContent( anoElement ); + Element mesElement = new Element( "Mes" ); + dataElement.addContent( mesElement ); + Element diaElement = new Element( "Dia" ); + dataElement.addContent( diaElement ); + + if( data != null ) + { + Calendar cal = Calendar.getInstance(); + cal.setTime( data ); + anoElement.setText( "" + cal.get( Calendar.YEAR ) ); + int mes = cal.get( Calendar.MONTH ) + 1; + mesElement.setText( mes > 9 ? ( "" + mes ) : ( "0" + mes ) ); + int dia = cal.get( Calendar.DAY_OF_MONTH ); + diaElement.setText( dia > 9 ? ( "" + dia ) : ( "0" + dia ) ); + } + + return dataElement; + } + + protected Element createHoraElement( String nome, Date hora ) + { + Element horaElement = new Element( nome ); + Element horasElement = new Element( "Horas" ); + horaElement.addContent( horasElement ); + Element minutosElement = new Element( "Minutos" ); + horaElement.addContent( minutosElement ); + if( hora != null ) + { + Calendar cal = Calendar.getInstance(); + cal.setTime( hora ); + int horas = cal.get( Calendar.HOUR_OF_DAY ); + horasElement.setText( horas > 9 ? ( "" + horas ) : ( "0" + horas ) ); + int minutos = cal.get( Calendar.MINUTE ); + minutosElement.setText( minutos > 9 ? ( "" + minutos ) : ( "0" + minutos ) ); + } + return horaElement; + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/analise_acidentes_trabalho.xsl b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/analise_acidentes_trabalho.xsl new file mode 100644 index 00000000..49436f02 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/analise_acidentes_trabalho.xsl @@ -0,0 +1,841 @@ + + + + + + + + + + + + + + + + Página + + + + de + + + + + + + + + + + + + + + + + + + + + + + ANÃLISE DE ACIDENTE DE TRABALHO + + + + + + + + + N.º + + + + + + DATA: + + / + + / + + + + + + + + + + + + + + + + + + + + + + + + IDENTIFICAÇÃO DA + ENTIDADE EMPREGADORA + + + + + + Identificação + completa: + + + + + + + + Actividade desenvolvida: + + + + + + + + Loja: + + + + + + + + + + + + + EMPRESA SEGURADORA + + + + + + Identificação + completa: + + + + + + + + Nº de Apólice: + + + + + + + + + + + + + + EMPRESA PRESTADORA DE + SERVIÇOS DE + SEGURANÇA, HIGIENE E + SAÚDE DO TRABALHO + + + + + + Identificação + completa: + + + + + + + + Técnico(a) Superior + de HST: + + + + + + C.A.P. nº: + + + + + + + + Médico(a) do + Trabalho: + + + + + + Cédula Prof. nº: + + + + + + + + + + + + + + ACIDENTADO (A) + + + + + + Nome: + + + + + + + + Estabelecimento de + origem: + + + + + + + + Data Nascimento: + + / + + / + + + + + + + + Bilhete de Identidade + N°: + + + + + + + + Morada: + + + + + + + + Contacto + telefónico: + + + + + + + + Data admissão: + + / + + / + + + + + + + + Função: + + + + + + + + Turno de Trabalho: + + + + + + + Identificação do superior + hierárquico/Responsável do + posto de trabalho + + + + + + Nome: + + + + + + E-mail: + + + + + + + + + + + + + + DADOS DO ACIDENTE DE + TRABALHO + + + + + + Averiguador: + + + + + + + + Data da ocorrência: + + / + + / + + + + + + Hora do acidente: + + h + + m + + + + + + + Nº horas trabalhadas no + turno: + + + + + + + + Secção: + + + + + + Local específico: + + + + + + + + Tarefa/Actividade que se + encontrava a realizar: + + + + + + + + Substâncias, + equipamentos, + ferramentas e objectos + utilizados: + + + + + + + + Condições que + contribuíram para o + acidente e respectiva + explicação da + sua existência: + + + + + + + + Testemunhas: + + + + + + + + Causas do acidente: + + + + + + + + Descrição do + acidente: + + + + + + + + Fotografia(s) e/ou + croqui(s) do local do + acidente: + + + Ver Anexo + + + Nenhum + + + + + + + + + + + + Conclusões: + + + + + + + + Acções Imediatas + tomadas: + + + + + + + + + + O colaborador + teve formação em SHST + + + O colaborador não + teve formação em SHST + + + + + + + Motivo: + + + + + + + + + + + + Verificaram-se outras + ocorrências/incidências + no mesmo posto de + trabalho com o + colaborador acidentado. + + + Não se verificaram outras + ocorrências/incidências + no mesmo posto de + trabalho com o + colaborador acidentado. + + + + + + + Quantidade: + + Relatórios de acidente nº: + + + ; + + + + + + + + + + + + Verificaram-se + ocorrências/incidentes + semelhantes com outros + colaboradores. + + + Não se verificaram + ocorrências/incidentes + semelhantes com outros + colaboradores. + + + + + + + Quantidade: + + Relatórios de acidente nº: + + + ; + + + + + + + + + + LESÃO + + + + + + + Ãreas corporais + específicas + lesionadas: + + + + + + + : + + + + + + + + Tipo de Lesão: + + + + + + + + + INCAPACIDADE + + + + + + + Tipo de Incapacidade: + + + + + + Coeficiente de + Incapacidade + + % + + + + + + + Avaliação de + Incapacidade realizada + em + + / + + / + + + + + + Revisão de + Incapacidade + + / + + / + + + + + + + + Período da Incapacidade + Temporária: de + + / + + / + + a + + / + + / + + + + + + + + + + + + + + RECOMENDAÇÕES PROPOSTAS + pela SIPRP + + + + + + + + + + . + + + + + + + + + + + + + + + + MEDIDAS A ADOPTAR PELA + ENTIDADE EMPREGADORA + + + + + + + + + + + + . + + + + + + + + + + + + + + + + + + TOMADA DE CONHECIMENTO / + TERMO DE + RESPONSABILIDADE + + + + + + + + + Averiguado por + + (Departamento de Segurança) + a + + / + + / + + . + + + Verificado por + + (Técnico + de HST) a + + / + + / + + . + + + Verificado por + + (Responsável de Segurança) a + + / + + / + + . + + + Verificado por + + (Responsável de RH) a + + / + + / + + . + + + Com conhecimento de + + (Superior hierárquico) a + + / + + / + + . + + - processamento informático + - acesso autenticado - + + + + + + + + + + + + + ANEXO - Imagens + + + + Página + + + + de + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/auchan_logo.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/auchan_logo.gif new file mode 100644 index 00000000..92ef1c5b Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/auchan_logo.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/siprp_logo.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/siprp_logo.gif new file mode 100644 index 00000000..073ad184 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/siprp_logo.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/teste.xml b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/teste.xml new file mode 100644 index 00000000..de26bcab --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/pdf/teste.xml @@ -0,0 +1,384 @@ + + + + 1 + + + + 2008 + + + 01 + + + 01 + + + + + Companhia Portuguesa de Hipermercados, S.A., com sede na Travessa Teixeira + Júnior, 1 - 1300-553 Lisboa + + + Comércio a Retalho em Supermercados e Hipermercados + + + Jumbo Alfragide + + + + + Mapfre Seguros Gerais, S.A. + + + 1500591100500 + + + + + SIPRP - Sociedade Ibérica de Prevenção de Riscos Profissionais Lda., + com sede no Edifício Atrium Saldanha, Praça Duque de Saldanha, 1 - 9º G + - 1050-094 Lisboa + + + + Tecnico HST teste + + + C1A2P3 + + + + + Medico Trabalho teste + + + C123 + + + + + + Trablhador acidentado + + + + Jumbo de Alfragide + + + + + 1980 + + + 11 + + + 08 + + + + + 1112225585 + + + + Rua de Cima, 3º dto + + + 215465981 + + + + 2004 + + + 10 + + + 01 + + + + Varredor + + + Tarde + + + + António Pedro + + + apedro@hotmail.com + + + + + + + João António + + + + + 2007 + + + 12 + + + 23 + + + + + 12 + + + 35 + + + + 4 + + + + Congelados + + + Corredor Esquerdo + + + + + A varrer + + + Vassoura + + + Chão molhado + + + + Pedro Silva, Marco Pedro + + + Sono + + + Escorregou e caiu + + + + + + + + + Conclusao sem indicios nenhuns q a suportem + + + gritar. correr as voltas em panico + + + + y + + + + + + + 3 + + + + 3487 + + + 23424 + + + + + + 0 + + + + + + + + + + + + + Cabeça + + + + + Tronco + + + + + Membro Superior Direito + + + Mão + + + + + Grave + + + + + Permanente + + + 10 + + + + 2005 + + + 01 + + + 01 + + + + + 2007 + + + 01 + + + 01 + + + + + + + + + + + + + + + + + + + + + + + + + beber mta agua + + + fazer aerobica + + + + + despedir o trabalhador + + + lamber sabao + + + + + + Joao + + + + 2007 + + + 01 + + + 01 + + + + + + Pedro + + + + 2007 + + + 01 + + + 02 + + + + + + Simao + + + + 2007 + + + 01 + + + 03 + + + + + + Rafael + + + + 2007 + + + 01 + + + 04 + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/phaselistener/ContextListener.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/phaselistener/ContextListener.java new file mode 100644 index 00000000..28cc5094 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/phaselistener/ContextListener.java @@ -0,0 +1,73 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package phaselistener; + +import com.evolute.utils.error.ErrorLogger; +import java.text.SimpleDateFormat; +import java.util.Date; +import javax.servlet.ServletContextEvent; +import javax.servlet.ServletContextListener; +import shst.companydataloaders.SIPRPPropertiesLoader; +import utils.AnaliseAcidentesTrabalhoLogger; + +/** + * + * @author dneves + */ +public class ContextListener implements ServletContextListener +{ + + private static Boolean loggerIsLoaded = Boolean.FALSE; + + static + { + try + { + if ( ! loggerIsLoaded ) + { + System.out.println( "\nInitializing AAT logger ..." ); + AnaliseAcidentesTrabalhoLogger.init(); + loggerIsLoaded = Boolean.TRUE; + } + } + catch ( Throwable e ) + { + e.printStackTrace( System.err ); + } + } + + private long startedTime = 0L; + + + public void contextInitialized( ServletContextEvent sce ) + { + startedTime = System.currentTimeMillis(); + System.out.println( "\n\ncontextInitialized : " + startedTime ); + + try + { + System.out.println( "\tReading app.properties ..." ); + SIPRPPropertiesLoader props = SIPRPPropertiesLoader.getInstance(); + props.load(); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + System.out.println( "\n\n<---- ERROR ! " + e.getMessage() ); + } + } + + public void contextDestroyed( ServletContextEvent sce ) + { + long endTime = System.currentTimeMillis(); + + SimpleDateFormat D_F = new SimpleDateFormat( "dd-MM-yyyy HH:mm:ss" ); + Date startDate = new Date( startedTime ); + Date endDate = new Date( endTime ); + + System.out.println( "\ncontextDestroyed : " + D_F.format( startDate ) + " -> " + D_F.format( endDate ) + " = " + ( (endTime - startedTime) / 1000 ) + " s" ); + } +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/phaselistener/MainPhaseListener.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/phaselistener/MainPhaseListener.java new file mode 100644 index 00000000..9ef109f2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/phaselistener/MainPhaseListener.java @@ -0,0 +1,85 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package phaselistener; + +import javax.faces.context.FacesContext; +import javax.faces.event.PhaseEvent; +import javax.faces.event.PhaseId; +import javax.faces.event.PhaseListener; +import analiseacidentestrabalho.SessionBean1; +import com.evolute.utils.error.ErrorLogger; +import javax.faces.component.UIViewRoot; +import javax.servlet.http.HttpServletRequest; +import utils.AnaliseAcidentesTrabalhoLogger; +import utils.JSFUtils; +import utils.Logos; + +/** + * + * @author lluis + */ +public class MainPhaseListener implements PhaseListener +{ + private boolean firstEntry = true; + + @Override + public void afterPhase(PhaseEvent pe) + { + + } + + @Override + public void beforePhase( PhaseEvent pe ) + { + if ( pe.getPhaseId() == PhaseId.RENDER_RESPONSE ) + { + FacesContext fc = pe.getFacesContext(); + SessionBean1 session = JSFUtils.getSessionBean( fc ); + + HttpServletRequest req = ( HttpServletRequest ) fc.getExternalContext().getRequest(); + boolean sessionValid = req.isRequestedSessionIdValid(); + + UIViewRoot view = fc.getViewRoot(); + String viewID = view.getViewId(); + System.out.println( "\tView ID :" + viewID ); + + boolean loggedIn = session.isLoggedIn(); + System.out.println( "\tSessionValid : " + sessionValid ); + System.out.println( "\tLogged In : " + loggedIn ); + + if ( sessionValid && loggedIn ) + { + //insert logos + Integer empresaId = new Integer( 32 ); + Logos logos = new Logos(); + String logourl = logos.getLogo( fc, empresaId ); + session.setLogoEmpresaUrl( logourl ); + } + else + { + if ( ! viewID.endsWith( "/Login.jsp" ) && ! viewID.endsWith( "/RecuperarPassword.jsp" ) ) + { + try + { + JSFUtils.redirect( fc.getCurrentInstance(), "faces/Login.jsp" ); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + System.out.println( "\n\t\t\tERROR REDIRECTING TO LOGIN !" ); + } + } + } + } + } + + @Override + public PhaseId getPhaseId() + { + return PhaseId.ANY_PHASE; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/phaselistener/SessionListener.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/phaselistener/SessionListener.java new file mode 100644 index 00000000..2ae59746 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/phaselistener/SessionListener.java @@ -0,0 +1,33 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package phaselistener; + +import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpSessionEvent; +import javax.servlet.http.HttpSessionListener; + +/** + * + * @author dneves + */ +public class SessionListener implements HttpSessionListener +{ + + @Override + public void sessionCreated( HttpSessionEvent se ) + { + HttpSession session = se.getSession(); + System.out.println( "AnaliseAcidentesTrabalho : new Session Created : " + session.getId() ); + } + + @Override + public void sessionDestroyed( HttpSessionEvent se ) + { + HttpSession session = se.getSession(); + System.out.println( "AnaliseAcidentesTrabalho : session destroyed : " + session.getId() ); + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/utils/AnaliseAcidentesTrabalhoLogger.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/utils/AnaliseAcidentesTrabalhoLogger.java new file mode 100644 index 00000000..deb63049 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/utils/AnaliseAcidentesTrabalhoLogger.java @@ -0,0 +1,40 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package utils; + +import com.evolute.utils.error.ErrorLogger; +import com.evolute.utils.error.LoggerProperties; +import com.evolute.utils.error.ProjectsEnum; +import com.evolute.utils.error.log4j.DBLogger; +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author dneves + */ +public class AnaliseAcidentesTrabalhoLogger +{ + + private static String EVO_LOGGER_DB = "jdbc:postgresql://www.evolute.pt:5436/evo_logging?logUnclosedConnections=true&loginTimeout=5&socketTimeout=5&tcpKeepAlive=true"; + private static String EVO_LOGGER_USER = "evo_logger"; + private static String EVO_LOGGER_PASSWD = "2DD-rg2hLOG"; + + public static void init() + { + Map< LoggerProperties, String > map = new HashMap< LoggerProperties, String >(); + map.put( LoggerProperties.USERNAME, EVO_LOGGER_USER ); + map.put( LoggerProperties.PASSWORD, EVO_LOGGER_PASSWD ); + map.put( LoggerProperties.URL, EVO_LOGGER_DB ); + map.put( LoggerProperties.PROJECT, ProjectsEnum.ANALISE_ACIDENTES_TRABALHO.toString() ); + map.put( LoggerProperties.PROJECT_NAME, ProjectsEnum.ANALISE_ACIDENTES_TRABALHO.toString() ); + map.put( LoggerProperties.SOFTWARE_VERSION, "1" ); + map.put( LoggerProperties.PROJECT_VERSION, "1" ); + map.put( LoggerProperties.SOFTWARE_NAME, "SIPRP - Analise Acidentes Trabalho" ); + ErrorLogger.initializeLogger( new DBLogger( map ) ); + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/utils/JSFUtils.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/utils/JSFUtils.java new file mode 100644 index 00000000..5ff04781 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/utils/JSFUtils.java @@ -0,0 +1,136 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package utils; + +import analiseacidentestrabalho.SessionBean1; +import java.util.Iterator; +import java.util.Map; +import javax.faces.application.Application; +import javax.faces.context.ExternalContext; +import javax.faces.context.FacesContext; +import javax.servlet.RequestDispatcher; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * + * @author lluis + */ +public class JSFUtils { + + +// public static SessionBean1 getSessionBean(FacesContext fc) +// { +// FacesContext context = fc.getCurrentInstance(); +// SessionBean1 session = (SessionBean1) context.getApplication().getELResolver().getValue(context.getELContext(), null, "SessionBean1"); +// return session; +// } + + // + // isPostBack - JSF 1.1 implementation + // +// public static boolean isPostBack(FacesContext fc) +// { +// Map parameterMap = fc.getExternalContext().getRequestParameterMap(); +// if(parameterMap.size() > 0) +// { +// return true; +// } +// return false; +// } + + public static SessionBean1 getSessionBean(FacesContext fc) + { + FacesContext context = fc.getCurrentInstance(); + //HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(true); + //SessionBean1 session = (SessionBean1) context.getApplication().getELResolver().getValue(context.getELContext(), null, "SessionBean1"); + //SessionBean1 session = (SessionBean1) context.getApplication().; + + final StringBuffer valueBinding = new StringBuffer(); + valueBinding.append('#'); + valueBinding.append('{'); + valueBinding.append("SessionBean1"); + valueBinding.append('}'); + SessionBean1 session = (SessionBean1) fc.getApplication(). + createValueBinding(valueBinding.toString()).getValue(fc); + return session; + } + + public static boolean isPostBack(FacesContext fc) + { + Map parameterMap = fc.getExternalContext().getRequestParameterMap(); + + if(parameterMap.size() > 0) + { + Iterator iter = parameterMap.keySet().iterator(); + while(iter.hasNext()) + { + String par = (String) iter.next(); + } + return true; + } + return false; + } + + // + // isPostBack - JSF 1.2 implementation + // +// public static boolean isPostBack12(FacesContext fc) +// { +// ResponseStateManager rsm = fc.getRenderKit().getResponseStateManager(); +// if(rsm.isPostback(fc)) +// { +// return true; +// } +// return false; +// } + + public static void logout(FacesContext fc, boolean redirect ) throws Exception + { + ExternalContext ectx = fc.getCurrentInstance().getExternalContext(); + Utils.doLogout( ectx, redirect ); + } + + public static void navigateTo(FacesContext fc, String outcome) + { + FacesContext context = fc.getCurrentInstance(); + Application app = context.getApplication(); + app.getNavigationHandler().handleNavigation(context, null, outcome); + } + + public static void redirect(FacesContext context, String url) throws Exception + { + HttpServletResponse response = (HttpServletResponse) context.getCurrentInstance().getExternalContext().getResponse(); + response.sendRedirect(url); + context.responseComplete(); + } + + public static void dispatch(FacesContext context, String url) throws Exception + { + HttpServletResponse response = (HttpServletResponse) context.getCurrentInstance().getExternalContext().getResponse(); + HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest(); + RequestDispatcher rd = request.getRequestDispatcher(url); + rd.forward(request, response); + } + + public static String getRequestParameter(FacesContext fc, String parameter) + { + Map parameters = fc.getCurrentInstance().getExternalContext().getRequestParameterMap(); + return (String) parameters.get(parameter); + } + + public static boolean requestHasParameters(FacesContext fc) + { + int size = fc.getCurrentInstance().getExternalContext().getRequestParameterMap().size(); + if(size > 0) + { + return true; + } + return false; + } + + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/utils/Logos.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/utils/Logos.java new file mode 100644 index 00000000..df33981c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/utils/Logos.java @@ -0,0 +1,57 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package utils; + +import com.evolute.utils.error.ErrorLogger; +import db.providers.AnalisesDataProvider; +import global.Global; +import java.io.File; +import java.io.FileOutputStream; +import java.io.OutputStream; +import javax.faces.context.FacesContext; +import javax.servlet.ServletContext; + +/** + * + * @author lluis + */ +public class Logos { + + public String getLogo(Integer empresaId) + { + return null; + } + + public String getLogo(FacesContext fc, Integer empresaId) + { + try + { + //get image from db : +// AnalisesDataProvider adp = new AnalisesDataProvider(); + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + byte[] logo = adp.getLogoByEmpresa(empresaId); + int len = logo.length; + + ServletContext context = (ServletContext) fc.getExternalContext().getContext(); + File logoFolder = new File(context.getRealPath(Global.LOGOS_FOLDER)); + + String logoFilename = logoFolder + "/logo_empresa" + empresaId.toString() + ".jpg"; + + OutputStream outImej = new FileOutputStream(logoFilename); + outImej.write(logo, 0, len); + System.out.println("LOGO PATH : " + logoFilename); + outImej.close(); + return Global.LOGOS_FOLDER + "/logo_empresa" + empresaId.toString() + ".jpg"; + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + return null; + } + + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/utils/Strings.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/utils/Strings.java new file mode 100644 index 00000000..1fbfc2d0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/utils/Strings.java @@ -0,0 +1,151 @@ +/* + * Strings.java + * + * Created on October 8, 2007, 9:17 AM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package utils; + +/** + * + * @author lluis + */ +public class Strings { + public static String unicodeToHTML( String text ) + { + if( text == null || text.length() < 6 ) + { + return text; + } + + String output = text; + output = output.replace( "\\u0009", " " ); + output = output.replace( "\\u000a", "
" ); + + output = output.replace( "\\u00a0", " " ); + output = output.replace( "\\u00aa", "ª" ); + output = output.replace( "\\u00ba", "º" ); + + output = output.replace( "\\u00c0", "À" ); + output = output.replace( "\\u00c1", "Ã" ); + output = output.replace( "\\u00c2", "Â" ); + output = output.replace( "\\u00c3", "Ã" ); + output = output.replace( "\\u00c7", "Ç" ); + output = output.replace( "\\u00c8", "È" ); + output = output.replace( "\\u00c9", "É" ); + + output = output.replace( "\\u00ca", "Ê" ); + output = output.replace( "\\u00cc", "ÃŒ" ); + output = output.replace( "\\u00cd", "Ã" ); + output = output.replace( "\\u00ce", "ÃŽ" ); + output = output.replace( "\\u00d2", "ò" ); + output = output.replace( "\\u00d3", "ó" ); + output = output.replace( "\\u00d4", "ô" ); + output = output.replace( "\\u00d5", "õ" ); + output = output.replace( "\\u00d9", "Ù" ); + output = output.replace( "\\u00da", "Ú" ); + output = output.replace( "\\u00db", "Û" ); + + output = output.replace( "\\u00e0", "à" ); + output = output.replace( "\\u00e1", "á" ); + output = output.replace( "\\u00e2", "â" ); + output = output.replace( "\\u00e3", "ã" ); + output = output.replace( "\\u00e7", "ç" ); + output = output.replace( "\\u00e8", "è" ); + output = output.replace( "\\u00e9", "é" ); + output = output.replace( "\\u00ea", "ê" ); + output = output.replace( "\\u00ec", "ì" ); + output = output.replace( "\\u00ed", "í" ); + output = output.replace( "\\u00ee", "î" ); + output = output.replace( "\\u00f2", "ò" ); + output = output.replace( "\\u00f3", "ó" ); + output = output.replace( "\\u00f4", "ô" ); + output = output.replace( "\\u00f5", "õ" ); + output = output.replace( "\\u00f9", "ù" ); + output = output.replace( "\\u00fa", "ú" ); + output = output.replace( "\\u00fb", "û" ); + + output = output.replace( "\\u0153", "œ" ); + + output = output.replace( "\\u2013", "-" ); + output = output.replace( "\\u2014", "-" ); + output = output.replace( "\\u2018|\\u2019", "'" ); + output = output.replace( "\\u201c|\\u201d", "\"" ); + + output = output.replace( "\\u2022", "*" ); + output = output.replace( "\\u2026", "..." ); + + return output; + } + + public static String textToUnicode( String text ) + { + String output = text; + output = output.replace( "À", "\\u00c0" ); + output = output.replace( "Ã", "\\u00c1" ); + output = output.replace( "Â", "\\u00c2" ); + output = output.replace( "Ã", "\\u00c3" ); + output = output.replace( "Ç", "\\u00c7" ); + output = output.replace( "È", "\\u00c8" ); + output = output.replace( "É", "\\u00c9" ); + + output = output.replace( "Ê", "\\u00ca" ); + output = output.replace( "ÃŒ", "\\u00cc" ); + output = output.replace( "Ã", "\\u00cd" ); + output = output.replace( "ÃŽ", "\\u00ce" ); + output = output.replace( "ò", "\\u00d2" ); + output = output.replace( "ó", "\\u00d3" ); + output = output.replace( "ô", "\\u00d4" ); + output = output.replace( "õ", "\\u00d5" ); + output = output.replace( "Ù", "\\u00d9" ); + output = output.replace( "Ú", "\\u00da" ); + output = output.replace( "Û", "\\u00db" ); + + output = output.replace( "à", "\\u00e0" ); + output = output.replace( "á", "\\u00e1" ); + output = output.replace( "â", "\\u00e2" ); + output = output.replace( "ã", "\\u00e3" ); + output = output.replace( "ç", "\\u00e7" ); + output = output.replace( "è", "\\u00e8" ); + output = output.replace( "é", "\\u00e9" ); + output = output.replace( "ê", "\\u00ea" ); + output = output.replace( "ì", "\\u00ec" ); + output = output.replace( "í", "\\u00ed" ); + output = output.replace( "î", "\\u00ee" ); + output = output.replace( "ò", "\\u00f2" ); + output = output.replace( "ó", "\\u00f3" ); + output = output.replace( "ô", "\\u00f4" ); + output = output.replace( "õ", "\\u00f5" ); + output = output.replace( "ù", "\\u00f9" ); + output = output.replace( "ú", "\\u00fa" ); + output = output.replace( "û", "\\u00fb" ); + + return output; + } + + public static String RTFToUnicode( String text ) + { + if( text == null || text.length() < 4 ) + { + return text; + } + String output = text; + output = output.replaceAll( "\\'", "\\u00" ); + return output; + } + + public static String unicodeToRTF( String text ) + { + if( text == null || text.length() < 6 ) + { + return text; + } + String output = text; + output = output.replaceAll( "\\\\u00", "\\\\'" ); + return output; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/utils/Utils.java b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/utils/Utils.java new file mode 100644 index 00000000..beb22b16 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/src/java/utils/Utils.java @@ -0,0 +1,508 @@ +/* + * Utils.java + * + * Created on October 12, 2007, 9:39 AM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package utils; + +import beans.Utilizador; +import com.evolute.utils.Singleton; +import com.evolute.utils.error.ErrorLogger; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.HashMap; +import java.util.Map; +import javax.faces.context.ExternalContext; +import javax.servlet.ServletContext; +import javax.servlet.http.HttpSession; + +/** + * + * @author lluis + */ +public class Utils { + + /** Creates a new instance of Utils */ + public Utils() { + } + + public static String unicodeToHTML( String text ) + { + if( text == null || text.length() < 6 ) + { + return text; + } + + String output = text; + output = output.replaceAll( "\\\\u0009", " " ); + output = output.replaceAll( "\\\\u000a", "
" ); + + output = output.replaceAll( "\\\\u00a0", " " ); + output = output.replaceAll( "\\\\u00aa", "ª" ); + output = output.replaceAll( "\\\\u00ba", "º" ); + + output = output.replaceAll( "\\\\u00c0", "À" ); + output = output.replaceAll( "\\\\u00c1", "Ã" ); + output = output.replaceAll( "\\\\u00c2", "Â" ); + output = output.replaceAll( "\\\\u00c3", "Ã" ); + output = output.replaceAll( "\\\\u00c7", "Ç" ); + output = output.replaceAll( "\\\\u00c8", "È" ); + output = output.replaceAll( "\\\\u00c9", "É" ); + output = output.replaceAll( "\\\\u00d3", "Ó" ); + output = output.replaceAll( "\\\\u00d2", "Ã’" ); + + output = output.replaceAll( "\\\\u00ca", "Ê" ); + output = output.replaceAll( "\\\\u00cc", "ÃŒ" ); + output = output.replaceAll( "\\\\u00cd", "Ã" ); + output = output.replaceAll( "\\\\u00ce", "ÃŽ" ); + output = output.replaceAll( "\\\\u00d2", "ò" ); + output = output.replaceAll( "\\\\u00d3", "ó" ); + output = output.replaceAll( "\\\\u00d4", "ô" ); + output = output.replaceAll( "\\\\u00d5", "õ" ); + output = output.replaceAll( "\\\\u00d9", "Ù" ); + output = output.replaceAll( "\\\\u00da", "Ú" ); + output = output.replaceAll( "\\\\u00db", "Û" ); + + output = output.replaceAll( "\\\\u00e0", "à" ); + output = output.replaceAll( "\\\\u00e1", "á" ); + output = output.replaceAll( "\\\\u00e2", "â" ); + output = output.replaceAll( "\\\\u00e3", "ã" ); + output = output.replaceAll( "\\\\u00e7", "ç" ); + output = output.replaceAll( "\\\\u00e8", "è" ); + output = output.replaceAll( "\\\\u00e9", "é" ); + output = output.replaceAll( "\\\\u00ea", "ê" ); + output = output.replaceAll( "\\\\u00ec", "ì" ); + output = output.replaceAll( "\\\\u00ed", "í" ); + output = output.replaceAll( "\\\\u00ee", "î" ); + output = output.replaceAll( "\\\\u00f2", "ò" ); + output = output.replaceAll( "\\\\u00f3", "ó" ); + output = output.replaceAll( "\\\\u00f4", "ô" ); + output = output.replaceAll( "\\\\u00f5", "õ" ); + output = output.replaceAll( "\\\\u00f9", "ù" ); + output = output.replaceAll( "\\\\u00fa", "ú" ); + output = output.replaceAll( "\\\\u00fb", "û" ); + + output = output.replaceAll( "\\\\u0153", "œ" ); + + output = output.replaceAll( "\\\\u2013", "-" ); + output = output.replaceAll( "\\\\u2014", "-" ); + output = output.replaceAll( "\\\\u2018|\\\\u2019", "'" ); + output = output.replaceAll( "\\\\u201c|\\\\u201d", "\"" ); + + output = output.replaceAll( "\\\\u2022", "*" ); + output = output.replaceAll( "\\\\u2026", "..." ); + + return output; + } + + public static String textToUnicode( String text ) + { + String output = text; + + output = output.replaceAll( "À", "\\\\\\\\\\\\\\\\u00c0" ); + output = output.replaceAll( "Ã", "\\\\\\\\\\\\\\\\u00c1" ); + output = output.replaceAll( "Â", "\\\\\\\\\\\\\\\\u00c2" ); + output = output.replaceAll( "Ã", "\\\\\\\\\\\\\\\\u00c3" ); + output = output.replaceAll( "Ç", "\\\\\\\\\\\\\\\\u00c7" ); + output = output.replaceAll( "È", "\\\\\\\\\\\\\\\\u00c8" ); + output = output.replaceAll( "É", "\\\\\\\\\\\\\\\\u00c9" ); + output = output.replaceAll( "Ó", "\\\\\\\\\\\\\\\\u00d3" ); + output = output.replaceAll( "Ã’", "\\\\\\\\\\\\\\\\u00d2" ); + + output = output.replaceAll( "Ê", "\\\\\\\\\\\\\\\\u00ca" ); + output = output.replaceAll( "ÃŒ", "\\\\\\\\\\\\\\\\u00cc" ); + output = output.replaceAll( "Ã", "\\\\\\\\\\\\\\\\u00cd" ); + output = output.replaceAll( "ÃŽ", "\\\\\\\\\\\\\\\\u00ce" ); + output = output.replaceAll( "ò", "\\\\\\\\\\\\\\\\u00d2" ); + output = output.replaceAll( "ó", "\\\\\\\\\\\\\\\\u00d3" ); + output = output.replaceAll( "ô", "\\\\\\\\\\\\\\\\u00d4" ); + output = output.replaceAll( "õ", "\\\\\\\\\\\\\\\\u00d5" ); + output = output.replaceAll( "Ù", "\\\\\\\\\\\\\\\\u00d9" ); + output = output.replaceAll( "Ú", "\\\\\\\\\\\\\\\\u00da" ); + output = output.replaceAll( "Û", "\\\\\\\\\\\\\\\\u00db" ); + + output = output.replaceAll( "à", "\\\\\\\\\\\\\\\\u00e0" ); + output = output.replaceAll( "á", "\\\\\\\\\\\\\\\\u00e1" ); + output = output.replaceAll( "â", "\\\\\\\\\\\\\\\\u00e2" ); + output = output.replaceAll( "ã", "\\\\\\\\\\\\\\\\u00e3" ); + output = output.replaceAll( "ç", "\\\\\\\\\\\\\\\\u00e7" ); + output = output.replaceAll( "è", "\\\\\\\\\\\\\\\\u00e8" ); + output = output.replaceAll( "é", "\\\\\\\\\\\\\\\\u00e9" ); + output = output.replaceAll( "ê", "\\\\\\\\\\\\\\\\u00ea" ); + output = output.replaceAll( "ì", "\\\\\\\\\\\\\\\\u00ec" ); + output = output.replaceAll( "í", "\\\\\\\\\\\\\\\\u00ed" ); + output = output.replaceAll( "î", "\\\\\\\\\\\\\\\\u00ee" ); + output = output.replaceAll( "ò", "\\\\\\\\\\\\\\\\u00f2" ); + output = output.replaceAll( "ó", "\\\\\\\\\\\\\\\\u00f3" ); + output = output.replaceAll( "ô", "\\\\\\\\\\\\\\\\u00f4" ); + output = output.replaceAll( "õ", "\\\\\\\\\\\\\\\\u00f5" ); + output = output.replaceAll( "ù", "\\\\\\\\\\\\\\\\u00f9" ); + output = output.replaceAll( "ú", "\\\\\\\\\\\\\\\\u00fa" ); + output = output.replaceAll( "û", "\\\\\\\\\\\\\\\\u00fb" ); + + return output; + } + + public static String textToHtml( String text ) + { + String output = text; + + output = output.replaceAll( "À", "À" ); + output = output.replaceAll( "Ã", "Á" ); + output = output.replaceAll( "Â", "Â" ); + output = output.replaceAll( "Ã", "Ã" ); + output = output.replaceAll( "Ç", "Ç" ); + output = output.replaceAll( "È", "È" ); + output = output.replaceAll( "É", "É" ); + output = output.replaceAll( "Ó", "Ó" ); + output = output.replaceAll( "Ã’", "Ò" ); + + output = output.replaceAll( "Ê", "Ê" ); + output = output.replaceAll( "ÃŒ", "Ì" ); + output = output.replaceAll( "Ã", "Í" ); + output = output.replaceAll( "ÃŽ", "Î" ); + output = output.replaceAll( "ò", "ò" ); + output = output.replaceAll( "ó", "ó" ); + output = output.replaceAll( "ô", "ô" ); + output = output.replaceAll( "õ", "õ" ); + output = output.replaceAll( "Ù", "Ù" ); + output = output.replaceAll( "Ú", "Ú" ); + output = output.replaceAll( "Û", "Û" ); + + output = output.replaceAll( "à", "à" ); + output = output.replaceAll( "á", "á" ); + output = output.replaceAll( "â", "â" ); + output = output.replaceAll( "ã", "ã" ); + output = output.replaceAll( "ç", "ç" ); + output = output.replaceAll( "è", "è" ); + output = output.replaceAll( "é", "é" ); + output = output.replaceAll( "ê", "ê" ); + output = output.replaceAll( "ì", "ì" ); + output = output.replaceAll( "í", "í" ); + output = output.replaceAll( "î", "î" ); + output = output.replaceAll( "ò", "ò" ); + output = output.replaceAll( "ó", "ó" ); + output = output.replaceAll( "ô", "ô" ); + output = output.replaceAll( "õ", "õ" ); + output = output.replaceAll( "ù", "ù" ); + output = output.replaceAll( "ú", "ú" ); + output = output.replaceAll( "û", "û" ); + + return output; + } + + public static String htmlToText(String text) + { + String output = text; + if (output != null) + { + output = output.replaceAll("À", "À"); + output = output.replaceAll("Á", "Ã"); + output = output.replaceAll("Â", "Â"); + output = output.replaceAll("Ã", "Ã"); + output = output.replaceAll("Ç", "Ç"); + output = output.replaceAll("È", "È"); + output = output.replaceAll("É", "É"); + output = output.replaceAll("Ó", "Ó"); + output = output.replaceAll("Ò", "Ã’"); + + output = output.replaceAll("Ê", "Ê"); + output = output.replaceAll("Ì", "ÃŒ"); + output = output.replaceAll("Í", "Ã"); + output = output.replaceAll("Î", "ÃŽ"); + output = output.replaceAll("ò", "ò"); + output = output.replaceAll("ó", "ó"); + output = output.replaceAll("ô", "ô"); + output = output.replaceAll("õ", "õ"); + output = output.replaceAll("Ù", "Ù"); + output = output.replaceAll("Ú", "Ú"); + output = output.replaceAll("Û", "Û"); + + output = output.replaceAll("à", "à"); + output = output.replaceAll("á", "á"); + output = output.replaceAll("â", "â"); + output = output.replaceAll("ã", "ã"); + output = output.replaceAll("ç", "ç"); + output = output.replaceAll("è", "è"); + output = output.replaceAll("é", "é"); + output = output.replaceAll("ê", "ê"); + output = output.replaceAll("ì", "ì"); + output = output.replaceAll("í", "í"); + output = output.replaceAll("î", "î"); + output = output.replaceAll("ò", "ò"); + output = output.replaceAll("ó", "ó"); + output = output.replaceAll("ô", "ô"); + output = output.replaceAll("õ", "õ"); + output = output.replaceAll("ù", "ù"); + output = output.replaceAll("ú", "ú"); + output = output.replaceAll("û", "û"); + } + return output; + } + + public static String getPageFrom(String referer) + { + String pageFrom = referer.substring(referer.lastIndexOf("/")+1); + return pageFrom; + } + + public static boolean isValidEmail(String email){ + boolean res = true; + System.out.println("IS VALID EMAIL"); + int indexOfAtChar=email.indexOf("@"); + + if(!isValidEmailCharacters(email)) + { + return false; + } + + if(indexOfAtChar > 0) + { + int indexOfDotChar = + email.indexOf(".",indexOfAtChar); + if(indexOfDotChar > 0) + { + res = true; + } + else + { + res = false; + } + } + else{ + res = false; + } + return res; + } + + private static boolean isValidEmailCharacters(String email) + { + if(email.indexOf("à") != -1) + { + return false; + } + else if(email.indexOf("á") != -1) + { + return false; + } + else if(email.indexOf("ã") != -1) + { + return false; + } + else if(email.indexOf("â") != -1) + { + return false; + } + else if(email.indexOf("è") != -1) + { + return false; + } + else if(email.indexOf("é") != -1) + { + return false; + } + else if(email.indexOf("ê") != -1) + { + return false; + } + else if(email.indexOf("ì") != -1) + { + return false; + } + else if(email.indexOf("í") != -1) + { + return false; + } + else if(email.indexOf("ò") != -1) + { + return false; + } + else if(email.indexOf("ó") != -1) + { + return false; + } + else if(email.indexOf("ô") != -1) + { + return false; + } + else if(email.indexOf("õ") != -1) + { + return false; + } + else if(email.indexOf("ù") != -1) + { + return false; + } + else if(email.indexOf("ú") != -1) + { + return false; + } + else if(email.indexOf("û") != -1) + { + return false; + } + else if(email.indexOf("ç") != -1) + { + return false; + } + else if(email.indexOf("À") != -1) + { + return false; + } + else if(email.indexOf("Ã") != -1) + { + return false; + } + else if(email.indexOf("Ã") != -1) + { + return false; + } + else if(email.indexOf("Â") != -1) + { + return false; + } + else if(email.indexOf("È") != -1) + { + return false; + } + else if(email.indexOf("É") != -1) + { + return false; + } + else if(email.indexOf("Ê") != -1) + { + return false; + } + else if(email.indexOf("ÃŒ") != -1) + { + return false; + } + else if(email.indexOf("Ã") != -1) + { + return false; + } + else if(email.indexOf("Ã’") != -1) + { + return false; + } + else if(email.indexOf("Ó") != -1) + { + return false; + } + else if(email.indexOf("Ô") != -1) + { + return false; + } + else if(email.indexOf("Õ") != -1) + { + return false; + } + else if(email.indexOf("Ù") != -1) + { + return false; + } + else if(email.indexOf("Ú") != -1) + { + return false; + } + else if(email.indexOf("Û") != -1) + { + return false; + } + else if(email.indexOf("Ç") != -1) + { + return false; + } + return true; + } + + public static String dateToYYYYMMDD(Date ddate) + { + Calendar cal = new GregorianCalendar(); + cal.setTime(ddate); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd"); + String date_str = dateFormat.format(cal.getTime()); + return date_str; + } + + public static String timeToHHMM(String ttime) throws Exception + { + SimpleDateFormat formatter = new SimpleDateFormat("HH:mm"); + //String s = formatter.format(date); + Date date = (Date)formatter.parse(ttime); + return formatter.format(date); + } + + + public static void doLogin( ExternalContext ec, Utilizador u ) + { + if ( u != null ) + { + Singleton.setInstance( Singleton.USERNAME, u.getLogin() ); + + HttpSession session = ( HttpSession ) ec.getSession( true ); + ServletContext thisContext = session.getServletContext().getContext( "/AnaliseAcidentesTrabalho" ); + + Map< String, Object > mapData = new HashMap< String, Object >(); + mapData.put( "sessionID", session.getId() ); + mapData.put( "userID", u.getId() ); + mapData.put( "session", session ); + + thisContext.setAttribute( session.getId(), mapData ); + } + else + { + ErrorLogger.logException( new Exception( "Utils.doLogin() : Utilizador is null !" ) ); + } + } + + public static void doLogout( ExternalContext ec, boolean redirect ) + { + Singleton.setInstance( Singleton.USERNAME, null ); + + HttpSession session = ( HttpSession ) ec.getSession( true ); + String sessionID = session.getId(); + + ServletContext aatContext = session.getServletContext().getContext( "/AnaliseAcidentesTrabalho" ); + ServletContext paContext = aatContext.getContext( "/PlanosActuacao" ); + + aatContext.removeAttribute( sessionID ); + + Map< String, Object > mapData = ( Map< String, Object > ) paContext.getAttribute( sessionID ); + if ( mapData != null ) + { + HttpSession paSession = ( HttpSession ) mapData.get( "session" ); + paSession.invalidate(); + } + paContext.removeAttribute( sessionID ); + try + { + session.invalidate(); + } + catch ( IllegalStateException e ) + { +// ErrorLogger.logException( e ); + System.out.println( "Session already invalidated." ); + } + + if ( redirect ) + { + try + { + ec.redirect( "Login.jsp" ); + } + catch ( IOException ex ) + { + ErrorLogger.logException( ex ); + } + } + } + +} diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Acesso.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Acesso.jsp new file mode 100644 index 00000000..e2a639ab --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Acesso.jsp @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/AnaliseAcidenteTrabalho.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/AnaliseAcidenteTrabalho.jsp new file mode 100644 index 00000000..63b58d41 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/AnaliseAcidenteTrabalho.jsp @@ -0,0 +1,1490 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + &nbsp; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/ConfirmarDesactivar.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/ConfirmarDesactivar.jsp new file mode 100644 index 00000000..dc952163 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/ConfirmarDesactivar.jsp @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Dummy.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Dummy.jsp new file mode 100644 index 00000000..d8921857 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Dummy.jsp @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/EnviarCorrecao.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/EnviarCorrecao.jsp new file mode 100644 index 00000000..a01067d1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/EnviarCorrecao.jsp @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Erro.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Erro.jsp new file mode 100644 index 00000000..de4505dd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Erro.jsp @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/EstatisticasProcesso.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/EstatisticasProcesso.jsp new file mode 100644 index 00000000..de5e86db --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/EstatisticasProcesso.jsp @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FichaUtilizador.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FichaUtilizador.jsp new file mode 100644 index 00000000..1875c0c6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FichaUtilizador.jsp @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Footer.jspf b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Footer.jspf new file mode 100644 index 00000000..1bf9523a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Footer.jspf @@ -0,0 +1,12 @@ + +
+ + + + + + + + + +
diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormDirGerRh.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormDirGerRh.jsp new file mode 100644 index 00000000..f0374089 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormDirGerRh.jsp @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormDirSiprp.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormDirSiprp.jsp new file mode 100755 index 00000000..6f2c13c3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormDirSiprp.jsp @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormGestor.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormGestor.jsp new file mode 100644 index 00000000..6de105cd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormGestor.jsp @@ -0,0 +1,247 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormHS.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormHS.jsp new file mode 100644 index 00000000..c7624579 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormHS.jsp @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormMedico.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormMedico.jsp new file mode 100644 index 00000000..d5bb4e45 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormMedico.jsp @@ -0,0 +1,263 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormRH.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormRH.jsp new file mode 100644 index 00000000..18894590 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormRH.jsp @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormSeguranca.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormSeguranca.jsp new file mode 100644 index 00000000..12d2db0e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/FormSeguranca.jsp @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/GestaoUtilizadores.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/GestaoUtilizadores.jsp new file mode 100644 index 00000000..25ec00aa --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/GestaoUtilizadores.jsp @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Header.jspf b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Header.jspf new file mode 100644 index 00000000..633668bb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Header.jspf @@ -0,0 +1,30 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/LoadImage.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/LoadImage.jsp new file mode 100644 index 00000000..56ad8634 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/LoadImage.jsp @@ -0,0 +1,42 @@ + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +
+ + +
+
+
+
+
diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Login.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Login.jsp new file mode 100644 index 00000000..b4469c49 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Login.jsp @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + +
+
+
+
+
diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/META-INF/context.xml b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/META-INF/context.xml new file mode 100644 index 00000000..47877812 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/META-INF/context.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/NovoUtilizador.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/NovoUtilizador.jsp new file mode 100644 index 00000000..d7b19f2d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/NovoUtilizador.jsp @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/RecuperarPassword.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/RecuperarPassword.jsp new file mode 100644 index 00000000..639b924b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/RecuperarPassword.jsp @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + +
+
+
+
+
diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Top.jspf b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Top.jspf new file mode 100644 index 00000000..a35f7542 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/Top.jspf @@ -0,0 +1,19 @@ + +
+ + + + + + + + + + + + + + + +
diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/UtilizadorFields.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/UtilizadorFields.jsp new file mode 100644 index 00000000..33783e37 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/UtilizadorFields.jsp @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/ViewAnaliseAcidenteTrabalho.jsp b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/ViewAnaliseAcidenteTrabalho.jsp new file mode 100644 index 00000000..4fab955d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/ViewAnaliseAcidenteTrabalho.jsp @@ -0,0 +1,489 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/WEB-INF/faces-config.xml b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/WEB-INF/faces-config.xml new file mode 100644 index 00000000..a21d03ce --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/WEB-INF/faces-config.xml @@ -0,0 +1,31 @@ + + + + + + + + + + phaselistener.MainPhaseListener + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/WEB-INF/managed-beans.xml b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/WEB-INF/managed-beans.xml new file mode 100644 index 00000000..7d269e69 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/WEB-INF/managed-beans.xml @@ -0,0 +1,145 @@ + + + + + Acesso + analiseacidentestrabalho.Acesso + request + + + SessionBean1 + analiseacidentestrabalho.SessionBean1 + session + + + Login + analiseacidentestrabalho.Login + request + + + ApplicationBean1 + analiseacidentestrabalho.ApplicationBean1 + application + + + RequestBean1 + analiseacidentestrabalho.RequestBean1 + request + + + RecuperarPassword + analiseacidentestrabalho.RecuperarPassword + request + + + Header + analiseacidentestrabalho.Header + request + + + Dummy + analiseacidentestrabalho.Dummy + request + + + Footer + analiseacidentestrabalho.Footer + request + + + FormSeguranca + analiseacidentestrabalho.FormSeguranca + request + + + Erro + analiseacidentestrabalho.Erro + request + + + Top + analiseacidentestrabalho.Top + request + + + LoadImage + analiseacidentestrabalho.LoadImage + request + + + AnaliseAcidenteTrabalho + analiseacidentestrabalho.AnaliseAcidenteTrabalho + request + + + ViewAnaliseAcidenteTrabalho + analiseacidentestrabalho.ViewAnaliseAcidenteTrabalho + request + + + FormRH + analiseacidentestrabalho.FormRH + request + + + FormHS + analiseacidentestrabalho.FormHS + request + + + FichaUtilizador + analiseacidentestrabalho.FichaUtilizador + request + + + FormMedico + analiseacidentestrabalho.FormMedico + request + + + FormDirSiprp + analiseacidentestrabalho.FormDirSiprp + request + + + EnviarCorrecao + analiseacidentestrabalho.EnviarCorrecao + request + + + GestaoUtilizadores + analiseacidentestrabalho.GestaoUtilizadores + request + + + NovoUtilizador + analiseacidentestrabalho.NovoUtilizador + request + + + UtilizadorFields + analiseacidentestrabalho.UtilizadorFields + request + + + FormDirGerRh + analiseacidentestrabalho.FormDirGerRh + request + + + FormGestor + analiseacidentestrabalho.FormGestor + request + + + EstatisticasProcesso + analiseacidentestrabalho.EstatisticasProcesso + request + + + ConfirmarDesactivar + analiseacidentestrabalho.ConfirmarDesactivar + request + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/WEB-INF/navigation.xml b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/WEB-INF/navigation.xml new file mode 100644 index 00000000..f36549d2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/WEB-INF/navigation.xml @@ -0,0 +1,536 @@ + + + + + + /Login.jsp + + recuperar_password + /RecuperarPassword.jsp + + + erro + /Erro.jsp + + + acesso + /Acesso.jsp + + + form_seguranca + /FormSeguranca.jsp + + + form_rh + /FormRH.jsp + + + form_hs + /FormHS.jsp + + + form_medico + /FormMedico.jsp + + + form_dir_ger_rh + /FormDirGerRh.jsp + + + form_dir_siprp + /FormDirSiprp.jsp + + + create_user + /FichaUtilizador.jsp + + + user + /FichaUtilizador.jsp + + + form_gestor + /FormGestor.jsp + + + + + /RecuperarPassword.jsp + + login + /Login.jsp + + + + + /FormSeguranca.jsp + + login + /Login.jsp + + + analise_acidente + /AnaliseAcidenteTrabalho.jsp + + + view_analise + /ViewAnaliseAcidenteTrabalho.jsp + + + user + /FichaUtilizador.jsp + + + + + /FormRH.jsp + + login + /Login.jsp + + + analise_acidente + /AnaliseAcidenteTrabalho.jsp + + + view_analise + /ViewAnaliseAcidenteTrabalho.jsp + + + user + /FichaUtilizador.jsp + + + + + /FormHS.jsp + + login + /Login.jsp + + + analise_acidente + /AnaliseAcidenteTrabalho.jsp + + + view_analise + /ViewAnaliseAcidenteTrabalho.jsp + + + user + /FichaUtilizador.jsp + + + estatisticasProcesso + /EstatisticasProcesso.jsp + + + + + /FormMedico.jsp + + login + /Login.jsp + + + analise_acidente + /AnaliseAcidenteTrabalho.jsp + + + view_analise + /ViewAnaliseAcidenteTrabalho.jsp + + + user + /FichaUtilizador.jsp + + + + + /FormGestor.jsp + + login + /Login.jsp + + + view_analise + /ViewAnaliseAcidenteTrabalho.jsp + + + user + /FichaUtilizador.jsp + + + + + /FormDirGerRh.jsp + + view_analise + /ViewAnaliseAcidenteTrabalho.jsp + + + gestao_utilizadores + /GestaoUtilizadores.jsp + + + user + /FichaUtilizador.jsp + + + login + /Login.jsp + + + + + /FormDirSiprp.jsp + + login + /Login.jsp + + + analise_acidente + /AnaliseAcidenteTrabalho.jsp + + + view_analise + /ViewAnaliseAcidenteTrabalho.jsp + + + user + /FichaUtilizador.jsp + + + gestao_utilizadores + /GestaoUtilizadores.jsp + + + estatisticasProcesso + /EstatisticasProcesso.jsp + + + confirmar_desactivar + /ConfirmarDesactivar.jsp + + + + + /AnaliseAcidenteTrabalho.jsp + + load_image + /LoadImage.jsp + + + form_seguranca + /FormSeguranca.jsp + + + form_rh + /FormRH.jsp + + + form_hs + /FormHS.jsp + + + form_medico + /FormMedico.jsp + + + correcao + /EnviarCorrecao.jsp + + + user + /FichaUtilizador.jsp + + + login + /Login.jsp + + + + + /LoadImage.jsp + + analise_acidente + /AnaliseAcidenteTrabalho.jsp + + + + + /FichaUtilizador.jsp + + form_seguranca + /FormSeguranca.jsp + + + form_rh + /FormRH.jsp + + + form_hs + /FormHS.jsp + + + form_medico + /FormMedico.jsp + + + form_gestor + /FormGestor.jsp + + + form_dir_ger_rh + /FormDirGerRh.jsp + + + form_dir_siprp + /FormDirSiprp.jsp + + + analise_acidente + /AnaliseAcidenteTrabalho.jsp + + + view_analise + /ViewAnaliseAcidenteTrabalho.jsp + + + gestao_utilizadores + /GestaoUtilizadores.jsp + + + novo_utilizador + /NovoUtilizador.jsp + + + login + /Login.jsp + + + + + /ViewAnaliseAcidenteTrabalho.jsp + + login + /Login.jsp + + + user + /FichaUtilizador.jsp + + + form_seguranca + /FormSeguranca.jsp + + + form_rh + /FormRH.jsp + + + form_hs + /FormHS.jsp + + + form_medico + /FormMedico.jsp + + + form_gestor + /FormGestor.jsp + + + form_dir_ger_rh + /FormDirGerRh.jsp + + + form_dir_siprp + /FormDirSiprp.jsp + + + + + /EnviarCorrecao.jsp + + analise_acidente + /AnaliseAcidenteTrabalho.jsp + + + form_hs + /FormHS.jsp + + + login + /Login.jsp + + + + + /GestaoUtilizadores.jsp + + novo_utilizador + /NovoUtilizador.jsp + + + user_fields + /UtilizadorFields.jsp + + + user + /FichaUtilizador.jsp + + + form_dir_ger_rh + /FormDirGerRh.jsp + + + form_dir_siprp + /FormDirSiprp.jsp + + + login + /Login.jsp + + + + + /NovoUtilizador.jsp + + new_user_fields + /UtilizadorFields.jsp + + + gestao_utilizadores + /GestaoUtilizadores.jsp + + + user + /FichaUtilizador.jsp + + + form_dir_ger_rh + /FormDirGerRh.jsp + + + form_dir_siprp + /FormDirSiprp.jsp + + + login + /Login.jsp + + + + + /UtilizadorFields.jsp + + novo_utilizador + /NovoUtilizador.jsp + + + gestao_utilizadores + /GestaoUtilizadores.jsp + + + form_dir_ger_rh + /FormDirGerRh.jsp + + + form_dir_siprp + /FormDirSiprp.jsp + + + login + /Login.jsp + + + + + /Acesso.jsp + + gestor + /FormGestor.jsp + + + form_rh + /FormRH.jsp + + + form_dir_ger_rh + /FormDirGerRh.jsp + + + form_hs + /FormHS.jsp + + + form_seguranca + /FormSeguranca.jsp + + + form_dir_siprp + /FormDirSiprp.jsp + + + form_gestor + /FormGestor.jsp + + + login + /Login.jsp + + + + + + /EstatisticasProcesso.jsp + + user + /FichaUtilizador.jsp + + + gestao_utilizadores + /GestaoUtilizadores.jsp + + + form_seguranca + /FormSeguranca.jsp + + + form_rh + /FormRH.jsp + + + form_hs + /FormHS.jsp + + + form_medico + /FormMedico.jsp + + + form_gestor + /FormGestor.jsp + + + form_dir_ger_rh + /FormDirGerRh.jsp + + + form_dir_siprp + /FormDirSiprp.jsp + + + + + + /ConfirmarDesactivar.jsp + + formDirSiprp + /FormDirSiprp.jsp + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/WEB-INF/web.xml b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/WEB-INF/web.xml new file mode 100644 index 00000000..690747a7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/WEB-INF/web.xml @@ -0,0 +1,128 @@ + + + + javax.faces.STATE_SAVING_METHOD + server + + + javax.faces.CONFIG_FILES + /WEB-INF/navigation.xml,/WEB-INF/managed-beans.xml + + + com.sun.faces.validateXml + true + + + com.sun.faces.verifyObjects + false + + + UploadFilter + com.sun.rave.web.ui.util.UploadFilter + + + The maximum allowed upload size in bytes. If this is set + to a negative value, there is no maximum. The default + value is 1000000. + + maxSize + 1000000 + + + + The size (in bytes) of an uploaded file which, if it is + exceeded, will cause the file to be written directly to + disk instead of stored in memory. Files smaller than or + equal to this size will be stored in memory. The default + value is 4096. + + sizeThreshold + 4096 + + + + UploadFilter + Faces Servlet + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + ExceptionHandlerServlet + com.sun.errorhandler.ExceptionHandler + + errorHost + localhost + + + errorPort + 24444 + + + + ThemeServlet + com.sun.rave.web.ui.theme.ThemeServlet + + + Faces Servlet + /faces/* + + + ExceptionHandlerServlet + /error/ExceptionHandler + + + ThemeServlet + /theme/* + + + faces/Login.jsp + + + javax.servlet.ServletException + /error/ExceptionHandler + + + java.io.IOException + /error/ExceptionHandler + + + javax.faces.FacesException + /error/ExceptionHandler + + + com.sun.rave.web.ui.appbase.ApplicationException + /error/ExceptionHandler + + + + *.jspf + true + + + + + phaselistener.ContextListener + + + phaselistener.SessionListener + + + + + diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/1 b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/1 new file mode 100644 index 00000000..4720ac5e Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/1 differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/Logo_Auchan_novo.jpg b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/Logo_Auchan_novo.jpg new file mode 100644 index 00000000..1b79d4cb Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/Logo_Auchan_novo.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/SIPRP_logo_small.jpg b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/SIPRP_logo_small.jpg new file mode 100644 index 00000000..240f2358 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/SIPRP_logo_small.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/auchan_logo.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/auchan_logo.gif new file mode 100644 index 00000000..8fa06785 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/auchan_logo.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/auchan_logo_mini.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/auchan_logo_mini.gif new file mode 100644 index 00000000..c77c826c Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/auchan_logo_mini.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/black_spacer.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/black_spacer.gif new file mode 100644 index 00000000..d370e341 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/black_spacer.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small.jpg b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small.jpg new file mode 100644 index 00000000..376eee0e Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small1.jpg b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small1.jpg new file mode 100644 index 00000000..f9e50690 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small1.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/logo_evolute_small.png b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/logo_evolute_small.png new file mode 100644 index 00000000..0198da2b Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/logo_evolute_small.png differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/ma1.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/ma1.gif new file mode 100755 index 00000000..6141cfcd Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/ma1.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ca1.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ca1.gif new file mode 100755 index 00000000..76ca9ac0 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ca1.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ca2.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ca2.gif new file mode 100644 index 00000000..97c08970 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ca2.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ca3.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ca3.gif new file mode 100644 index 00000000..07b00dc5 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ca3.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ca4.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ca4.gif new file mode 100755 index 00000000..baf6f2bd Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ca4.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ext1.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ext1.gif new file mode 100644 index 00000000..6278e9de Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ext1.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ext2.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ext2.gif new file mode 100644 index 00000000..d50ab9f5 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ext2.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ext3.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ext3.gif new file mode 100644 index 00000000..cb2a14e3 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ext3.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ext4.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ext4.gif new file mode 100755 index 00000000..fa96b7d5 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ext4.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/fle1.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/fle1.gif new file mode 100755 index 00000000..7ea7b35e Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/fle1.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/fle2.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/fle2.gif new file mode 100644 index 00000000..dbf9cb41 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/fle2.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/fle3.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/fle3.gif new file mode 100644 index 00000000..5406a2be Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/fle3.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/fle4.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/fle4.gif new file mode 100644 index 00000000..7342e330 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/fle4.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma1.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma1.gif new file mode 100755 index 00000000..6141cfcd Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma1.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma10.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma10.gif new file mode 100644 index 00000000..94748d7b Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma10.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma2.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma2.gif new file mode 100644 index 00000000..a1f65bf0 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma2.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma3.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma3.gif new file mode 100644 index 00000000..3ec7862b Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma3.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma4.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma4.gif new file mode 100755 index 00000000..9deb31a7 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma4.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma5.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma5.gif new file mode 100644 index 00000000..c6719c98 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma5.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma6.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma6.gif new file mode 100644 index 00000000..f1b5170b Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma6.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma7.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma7.gif new file mode 100755 index 00000000..98aa5304 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma7.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma8.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma8.gif new file mode 100644 index 00000000..b98a9b2a Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma8.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma9.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma9.gif new file mode 100755 index 00000000..ced4fc27 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/ma9.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/rot1.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/rot1.gif new file mode 100755 index 00000000..938aa4f5 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/rot1.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/rot2.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/rot2.gif new file mode 100755 index 00000000..eb785c9c Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/medico/rot2.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/plus_more.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/plus_more.gif new file mode 100644 index 00000000..f10da648 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/plus_more.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/siprp_logo.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/siprp_logo.gif new file mode 100644 index 00000000..9c64e995 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/siprp_logo.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/siprp_logo_mini.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/siprp_logo_mini.gif new file mode 100644 index 00000000..f24aa23f Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/images/siprp_logo_mini.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/pdfs/Ajuda.pdf b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/pdfs/Ajuda.pdf new file mode 100644 index 00000000..3adf0eee Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/pdfs/Ajuda.pdf differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/plus_more.gif b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/plus_more.gif new file mode 100644 index 00000000..f10da648 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/plus_more.gif differ diff --git a/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/stylesheet.css b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/stylesheet.css new file mode 100644 index 00000000..e8a45dde --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/AnaliseAcidentesTrabalho/web/resources/stylesheet.css @@ -0,0 +1,204 @@ +/* Style rules to make data tables look better */ +body {background-color: #bbd400} +.list-header { + background-color: #eeeeee; + font-size: larger; + font-weight: bold; +} + +.list-paging-header { + background-color: white; +} + +.gridColLeft { + text-align : left; +} + +.gridColCenter { + text-align: center; +} + +.gridColRight { + text-align: right; +} + +.gridColRightBottom { + text-align: right; + vertical-align: bottom; +} + +.gridColLeft5{ + text-align: left; + width: 5%; +} + +.gridColLeft10{ + text-align: left; + width: 10%; +} + +.gridColLeft15{ + text-align: left; + width: 15%; +} + +.gridColLeft20{ + text-align: left; + width: 20%; +} + +.gridColLeft25{ + text-align: left; + width: 25%; +} + +.gridColLeft30{ + text-align: left; + width: 30%; +} + +.gridColLeft50{ + text-align: left; + width: 50%; +} + +.gridColLeft70{ + text-align: left; + width: 70%; +} + +.gridColLeft75{ + text-align: left; + width: 75%; +} + +.gridColLeft85{ + text-align: left; + width: 85%; +} + +.gridColLeft90{ + text-align: left; + width: 90%; +} + +.gridColLeft95{ + text-align: left; + width: 95%; +} + +.gridColRight85{ + text-align: right; + width: 85%; +} + +.gridBlockHeader{ + background-color : #668597; + text-align: left; +} + +.restricoes{ + border-spacing: 0; + padding: 0px; +} + +.assinaturas{ + border-spacing: 0; + padding: 0px; +} +.gridColRestricoes{ + border_bottom: solid 1px #000000; +} + +.gridLayoutTopCols { + vertical-align : top; + width : 50%; + border : solid 1px #000000; + background-color: #f6f4e8; +} + +.gridCellBordered { + border-bottom : solid 1px #000000; +} + +.footer { + bottom: 0; + height: 10%; + position: fixed; + right: 0; + top: 95%; + width: 100% +} + +.centerBlock{ + text-align: center; + left: 0; + right: 0; + margin-left: auto; + margin-right: auto;} + +.labelBold{ + font-weight : bold; +} + +.labelMsg{ + font-weight : bold; + color: #cc0033; + font-size :14px ; +} +.list-row-even { +} + +.list-row-odd { + background-color: #eeeeee; +} + +/* Style rules for message severity levels */ + +.infoMessage { + color: black; +} + +.warnMessage { + color: orange; + font-weight: bold; +} + +.errorMessage { + color: red; + font-weight: bold; +} + +.fatalMessage { + color: red; + font-style: italic; + font-weight: bold; +} + + +.labelTrabalhador { + color: #000000; +} + +.labelTrabalhador:hover { + font-weight: bold; + text-decoration : none; +} + +.labelCSS{ + font-weight : bold; +} + + + +.show{ + display : inline; +} + +.hide{ + display : none ; +} + +.lnkRed{ + color : #990000 ; +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/.classpath b/tags/Site antigo e SIPRPSoft/GestaoSHST/.classpath new file mode 100644 index 00000000..73ab0ad6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/.project b/tags/Site antigo e SIPRPSoft/GestaoSHST/.project new file mode 100644 index 00000000..4d26bbe6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/.project @@ -0,0 +1,29 @@ + + + GestaoSHST + + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.google.gwt.eclipse.core.gwtProjectValidator + + + + + com.google.gdt.eclipse.core.webAppProjectValidator + + + + + + org.eclipse.jdt.core.javanature + com.google.gwt.eclipse.core.gwtNature + com.google.gdt.eclipse.core.webAppNature + + diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/.settings/com.google.gwt.eclipse.core.prefs b/tags/Site antigo e SIPRPSoft/GestaoSHST/.settings/com.google.gwt.eclipse.core.prefs new file mode 100644 index 00000000..310e537d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/.settings/com.google.gwt.eclipse.core.prefs @@ -0,0 +1,3 @@ +#Fri Dec 11 10:46:39 WET 2009 +eclipse.preferences.version=1 +filesCopiedToWebInfLib=gwt-servlet.jar diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/lib/evolute.jar b/tags/Site antigo e SIPRPSoft/GestaoSHST/lib/evolute.jar new file mode 100644 index 00000000..52b2c276 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/lib/evolute.jar differ diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/GestaoSHST.gwt.xml b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/GestaoSHST.gwt.xml new file mode 100644 index 00000000..10faca4b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/GestaoSHST.gwt.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/GestaoSHST.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/GestaoSHST.java new file mode 100644 index 00000000..8cee9e5c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/GestaoSHST.java @@ -0,0 +1,51 @@ +package com.evolute.siprp.client; + +import com.evolute.siprp.client.panels.footer.FooterPanel; +import com.evolute.siprp.client.panels.utils.navigation.NavigationConstants; +import com.evolute.siprp.client.panels.utils.navigation.PageNavigation; +import com.google.gwt.core.client.EntryPoint; +import com.google.gwt.event.logical.shared.ValueChangeEvent; +import com.google.gwt.event.logical.shared.ValueChangeHandler; +import com.google.gwt.user.client.History; +import com.google.gwt.user.client.ui.RootPanel; + + + +public class GestaoSHST implements EntryPoint, ValueChangeHandler< String > +{ + + private String oldEvent = null; + + public void onModuleLoad() + { + PageNavigation.goPage( NavigationConstants.LOGIN_PANEL ); + + RootPanel.get( "footer" ).add( new FooterPanel() ); + + History.addValueChangeHandler( this ); + History.fireCurrentHistoryState(); + } + + @Override + public void onValueChange( ValueChangeEvent< String > newEvent ) + { + if ( oldEvent != null && newEvent.getValue().equals( oldEvent ) ) + { + return ; + } + + oldEvent = newEvent.getValue(); + Integer panelID = null; + try + { + panelID = Integer.parseInt( oldEvent ); + } + catch ( Exception e ) + { + return ; + } + + PageNavigation.goPage( panelID ); + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoPanel.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoPanel.java new file mode 100644 index 00000000..c5bd0fe2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoPanel.java @@ -0,0 +1,109 @@ +package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho; + +import com.evolute.siprp.client.panels.apps.AnchorSair; +import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.actual.ActualPanel; +import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.concluido.ConcluidoPanel; +import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.seguimento.SeguimentoPanel; +import com.evolute.siprp.client.panels.utils.AppConstants; +import com.evolute.siprp.client.panels.utils.navigation.PageNavigation; +import com.evolute.siprp.client.panels.utils.permissoes.AccessConstants; +import com.evolute.siprp.client.panels.utils.permissoes.PermissionsController; +import com.evolute.siprp.client.vo.Utilizador; +import com.google.gwt.core.client.GWT; +import com.google.gwt.event.dom.client.ClickEvent; +import com.google.gwt.uibinder.client.UiBinder; +import com.google.gwt.uibinder.client.UiField; +import com.google.gwt.uibinder.client.UiHandler; +import com.google.gwt.user.client.Window; +import com.google.gwt.user.client.ui.Anchor; +import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.Image; +import com.google.gwt.user.client.ui.InlineLabel; +import com.google.gwt.user.client.ui.Widget; + +public class AnaliseAcidentesTrabalhoPanel extends Composite +{ + + private static AnaliseAcidentesTrabalhoPanelUiBinder uiBinder = GWT.create( AnaliseAcidentesTrabalhoPanelUiBinder.class ); + interface AnaliseAcidentesTrabalhoPanelUiBinder extends UiBinder< Widget, AnaliseAcidentesTrabalhoPanel > { } + + + @UiField protected Image imgSiprp; + @UiField protected Image imgAuchan; + @UiField protected AnchorSair lnkSair; + @UiField protected Anchor lnkPlanosActuacao; + @UiField protected InlineLabel lblUsername; + + @UiField protected Anchor lnkGerirUtilizadores; + @UiField protected Anchor lnkAlterarDados; + @UiField protected Anchor lnkAjuda; + + @UiField protected ActualPanel panelActual; + @UiField protected SeguimentoPanel panelSeguimento; + @UiField protected ConcluidoPanel panelConcluido; + + + private Utilizador userLogged; + private PermissionsController permsController; + + + public AnaliseAcidentesTrabalhoPanel() + { + initWidget( uiBinder.createAndBindUi( this ) ); + permsController = PermissionsController.getController(); + + if ( ! permsController.hasPermissionTo( AccessConstants.VIEW_ACTUAL_PANEL ) ) + { + this.panelActual.setVisible( false ); + } + if ( ! permsController.hasPermissionTo( AccessConstants.VIEW_SEGUIMENTO_PANEL ) ) + { + this.panelSeguimento.setVisible( false ); + } + if ( ! permsController.hasPermissionTo( AccessConstants.VIEW_CONCLUIDO_PANEL ) ) + { + this.panelConcluido.setVisible( false ); + } + + initComponents(); + } + + private void initComponents() + { + userLogged = PageNavigation.getProvider().getUserLogged(); + lblUsername.setText( userLogged.getUsername() ); + + imgSiprp.setTitle( "SIPRP" ); + imgSiprp.setUrl( AppConstants.IMAGES_FOLDER + "SIPRP_logo_small.jpg" ); + imgAuchan.setTitle( "Auchan" ); + imgAuchan.setUrl( AppConstants.IMAGES_FOLDER + "logo_empresa32.jpg" ); + imgAuchan.setHeight( "40" ); + + lnkPlanosActuacao.setText( "planos actua\u00E7\u00E3o>>" ); + lnkGerirUtilizadores.setText( "gerir utilizadores" ); + lnkAlterarDados.setText( "alterar dados utilizador" ); + lnkAjuda.setText( "ajuda" ); + } + + @UiHandler( { "lnkPlanosActuacao", "lnkGerirUtilizadores", "lnkAlterarDados", "lnkAjuda" } ) + protected void onClick( ClickEvent e ) + { + if ( e.getSource().equals( lnkPlanosActuacao ) ) + { + Window.alert( "planos actuacao..." ); + } + else if ( e.getSource().equals( lnkGerirUtilizadores ) ) + { + Window.alert( "gerir utilizadores" ); + } + else if ( e.getSource().equals( lnkAlterarDados ) ) + { + Window.alert( "alterar dados" ); + } + else if ( e.getSource().equals( lnkAjuda ) ) + { + Window.alert( "ajuda" ); + } + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoPanel.ui.xml b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoPanel.ui.xml new file mode 100644 index 00000000..eef8203c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoPanel.ui.xml @@ -0,0 +1,70 @@ + + + + +.headerDiv { + width: 100%; + margin-top: 75px; +} + +.headerTable { + width: 100%; + border-bottom: 1px solid #000000; +} + +.bodyDiv { + margin-top: 10px; + + width: 100%; + border: 1px solid black; + background-color: rgb( 238, 238, 238 ); +} +.verticalSpacer { + margin-top: 20px; +} + +.lblUsername { + margin-right: 30px; +} + + + + +
+ +
+ + + + + + + + +
+ +
+ + + | + | + | +
+
+ + +
+ + + + +
+ +
+
\ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoService.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoService.java new file mode 100644 index 00000000..67ea4531 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoService.java @@ -0,0 +1,16 @@ +package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho; + +import java.util.Vector; + +import com.evolute.siprp.client.vo.ActualTableRow; +import com.evolute.siprp.client.vo.Utilizador; +import com.google.gwt.user.client.rpc.RemoteService; + +public interface AnaliseAcidentesTrabalhoService extends RemoteService +{ + + public Vector< ActualTableRow > getActualTableData( Utilizador userLogged ); + + public Vector< ActualTableRow > getSeguimentoTableData( Utilizador userLogged ); + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoServiceAsync.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoServiceAsync.java new file mode 100644 index 00000000..fb8094d2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoServiceAsync.java @@ -0,0 +1,16 @@ +package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho; + +import java.util.Vector; + +import com.evolute.siprp.client.vo.ActualTableRow; +import com.evolute.siprp.client.vo.Utilizador; +import com.google.gwt.user.client.rpc.AsyncCallback; + +public interface AnaliseAcidentesTrabalhoServiceAsync +{ + + public void getActualTableData( Utilizador userLogged, AsyncCallback< Vector< ActualTableRow > > callback ); + + public void getSeguimentoTableData( Utilizador userLogged, AsyncCallback< Vector< ActualTableRow > > callback ); + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualPanel.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualPanel.java new file mode 100644 index 00000000..318fa53a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualPanel.java @@ -0,0 +1,65 @@ +package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.actual; + +import com.evolute.siprp.client.panels.utils.permissoes.AccessConstants; +import com.evolute.siprp.client.panels.utils.permissoes.PermissionsController; +import com.google.gwt.core.client.GWT; +import com.google.gwt.event.dom.client.ClickEvent; +import com.google.gwt.uibinder.client.UiBinder; +import com.google.gwt.uibinder.client.UiField; +import com.google.gwt.uibinder.client.UiHandler; +import com.google.gwt.user.client.Window; +import com.google.gwt.user.client.ui.Button; +import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.SimplePanel; +import com.google.gwt.user.client.ui.Widget; + +public class ActualPanel extends Composite +{ + + private static ActualPanelUiBinder uiBinder = GWT.create( ActualPanelUiBinder.class ); + interface ActualPanelUiBinder extends UiBinder< Widget, ActualPanel > { } + + private PermissionsController permsController; + + + @UiField protected Button btnNewAnalysis; + @UiField protected ActualTable tableActual; + + + public ActualPanel() + { + permsController = PermissionsController.getController(); + if ( permsController.hasPermissionTo( AccessConstants.VIEW_ACTUAL_PANEL ) ) + { + setupComponents(); + } + else + { + initWidget( new SimplePanel() ); + } + } + + + private void setupComponents() + { + initWidget( uiBinder.createAndBindUi( this ) ); + + btnNewAnalysis.setText( "Criar nova an\u00E1lise de acidentes de trabalho" ); + if ( ! permsController.hasPermissionTo( AccessConstants.VIEW_ACTUAL_PANEL_NOVA_ANALISE_BUTTON ) ) + { + btnNewAnalysis.setVisible( false ); + } + } + + + @UiHandler( { "btnNewAnalysis" } ) + protected void onClick( ClickEvent e ) + { + if ( e.getSource().equals( btnNewAnalysis ) ) + { + Window.alert( "new analysis" ); + } + + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualPanel.ui.xml b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualPanel.ui.xml new file mode 100644 index 00000000..8f9c3b1b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualPanel.ui.xml @@ -0,0 +1,50 @@ + + + + +.bodyDiv { + margin-top: 20px; + + width: 100%; + border: 1px solid black; + background-color: rgb( 238, 238, 238 ); +} + +.divActual { + margin-top: 15px; +} + +.btnNewAnalysis { + width: 80%; + height: 30px; +} + +.actualTable { + width: 816px; + margin-top: 10px; + margin-bottom: 15px; + background-color: #FFFFFF; + border: 1px solid #000000; +} + + + + +
+
Actual
+
+ +
+
+ +
+
Processos com dados pendentes
+ +
+
+ +
+
\ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualTable.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualTable.java new file mode 100644 index 00000000..b91e6b62 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualTable.java @@ -0,0 +1,88 @@ +package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.actual; + +import java.util.Vector; + +import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.AnaliseAcidentesTrabalhoService; +import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.AnaliseAcidentesTrabalhoServiceAsync; +import com.evolute.siprp.client.panels.utils.navigation.PageNavigation; +import com.evolute.siprp.client.vo.ActualTableRow; +import com.google.gwt.core.client.GWT; +import com.google.gwt.i18n.client.DateTimeFormat; +import com.google.gwt.user.client.Window; +import com.google.gwt.user.client.rpc.AsyncCallback; +import com.google.gwt.user.client.rpc.ServiceDefTarget; +import com.google.gwt.user.client.ui.FlexTable; + +public class ActualTable extends FlexTable +{ + private final DateTimeFormat D_F = DateTimeFormat.getFormat( "yyyy-MM-dd" ); + + private AnaliseAcidentesTrabalhoServiceAsync aatService; + + public ActualTable() + { + super(); + + this.aatService = ( AnaliseAcidentesTrabalhoServiceAsync ) GWT.create( AnaliseAcidentesTrabalhoService.class ); + ServiceDefTarget serviceDef = ( ServiceDefTarget ) this.aatService; + serviceDef.setServiceEntryPoint( GWT.getModuleBaseURL() + "aatService" ); + + + this.setText( 0, 0, "Data do acidente" ); + this.setText( 0, 1, "Data da abertura" ); + this.setText( 0, 2, "Nº acidente" ); + this.setText( 0, 3, "POR" ); + this.setText( 0, 4, "Nome do acidentado" ); + this.setText( 0, 5, "Fase" ); + + CellFormatter cellFormatter = this.getCellFormatter(); + cellFormatter.setStyleName( 0, 0, "lblBold" ); + cellFormatter.setStyleName( 0, 1, "lblBold" ); + cellFormatter.setStyleName( 0, 2, "lblBold" ); + cellFormatter.setStyleName( 0, 3, "lblBold" ); + cellFormatter.setStyleName( 0, 4, "lblBold" ); + cellFormatter.setStyleName( 0, 5, "lblBold" ); + + this.setText( 1, 0, "loading ..." ); + this.getFlexCellFormatter().setColSpan( 1, 0, 6 ); + + this.aatService.getActualTableData( PageNavigation.getProvider().getUserLogged(), new AsyncCallback< Vector< ActualTableRow > >() { + @Override + public void onFailure( Throwable caught ) + { + Window.alert( "Oops ! unable to fetch 'Actual' table data." ); + } + + @Override + public void onSuccess( Vector< ActualTableRow > result ) + { + showTableData( result ); + } + }); + } + + private void showTableData( Vector< ActualTableRow > tableRows ) + { + if ( tableRows == null || tableRows.size() == 0 ) + { + this.setText( 1, 0, "No items found." ); + } + else + { + this.getFlexCellFormatter().setColSpan( 1, 0, 0 ); + + for ( int rowNumber = 0, columnNumber = 0; rowNumber < tableRows.size(); rowNumber++, columnNumber = 0 ) + { + ActualTableRow row = tableRows.get( rowNumber ); + + this.setText( (rowNumber+1), columnNumber++, D_F.format( row.getDataAcidente() ) ); + this.setText( (rowNumber+1), columnNumber++, D_F.format( row.getDataAbertura() ) ); + this.setText( (rowNumber+1), columnNumber++, row.getNrAcidente() ); + this.setText( (rowNumber+1), columnNumber++, row.getPOR() ); + this.setText( (rowNumber+1), columnNumber++, row.getNomeAcidentado() ); + this.setText( (rowNumber+1), columnNumber++, String.valueOf( row.getFase() ) ); + } + } + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/concluido/ConcluidoPanel.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/concluido/ConcluidoPanel.java new file mode 100644 index 00000000..bd0e1b13 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/concluido/ConcluidoPanel.java @@ -0,0 +1,38 @@ +package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.concluido; + +import com.evolute.siprp.client.panels.utils.permissoes.AccessConstants; +import com.evolute.siprp.client.panels.utils.permissoes.PermissionsController; +import com.google.gwt.core.client.GWT; +import com.google.gwt.uibinder.client.UiBinder; +import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.SimplePanel; +import com.google.gwt.user.client.ui.Widget; + +public class ConcluidoPanel extends Composite { + + private static ConcluidoPanelUiBinder uiBinder = GWT.create( ConcluidoPanelUiBinder.class ); + interface ConcluidoPanelUiBinder extends UiBinder< Widget, ConcluidoPanel > { } + + private PermissionsController permsController; + + + public ConcluidoPanel() + { + permsController = PermissionsController.getController(); + if ( permsController.hasPermissionTo( AccessConstants.VIEW_CONCLUIDO_PANEL ) ) + { + setupComponents(); + } + else + { + initWidget( new SimplePanel() ); + } + } + + private void setupComponents() + { + initWidget( uiBinder.createAndBindUi( this ) ); + + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/concluido/ConcluidoPanel.ui.xml b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/concluido/ConcluidoPanel.ui.xml new file mode 100644 index 00000000..e0194ce6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/concluido/ConcluidoPanel.ui.xml @@ -0,0 +1,28 @@ + + + + +.bodyDiv { + margin-top: 10px; + + width: 100%; + border: 1px solid black; + background-color: rgb( 238, 238, 238 ); +} + +.divConcluido { + margin-top: 15px; +} + + + + +
+
Conclu\u00EDdos
+ + table +
+ +
+
\ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoPanel.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoPanel.java new file mode 100644 index 00000000..536cf4ae --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoPanel.java @@ -0,0 +1,42 @@ +package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.seguimento; + +import com.evolute.siprp.client.panels.utils.permissoes.AccessConstants; +import com.evolute.siprp.client.panels.utils.permissoes.PermissionsController; +import com.google.gwt.core.client.GWT; +import com.google.gwt.uibinder.client.UiBinder; +import com.google.gwt.uibinder.client.UiField; +import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.SimplePanel; +import com.google.gwt.user.client.ui.Widget; + +public class SeguimentoPanel extends Composite { + + private static SeguimentoPanelUiBinder uiBinder = GWT.create( SeguimentoPanelUiBinder.class ); + interface SeguimentoPanelUiBinder extends UiBinder< Widget, SeguimentoPanel > { } + + private PermissionsController permsController; + + @UiField protected SeguimentoTable tableSeguimento; + + + public SeguimentoPanel() + { + permsController = PermissionsController.getController(); + if ( permsController.hasPermissionTo( AccessConstants.VIEW_SEGUIMENTO_PANEL ) ) + { + setupComponents(); + } + else + { + initWidget( new SimplePanel() ); + } + } + + private void setupComponents() + { + initWidget( uiBinder.createAndBindUi( this ) ); + + + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoPanel.ui.xml b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoPanel.ui.xml new file mode 100644 index 00000000..69a7ffdf --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoPanel.ui.xml @@ -0,0 +1,39 @@ + + + + +.bodyDiv { + margin-top: 20px; + + width: 100%; + border: 1px solid black; + background-color: rgb( 238, 238, 238 ); +} + +.divSeguimento { + margin-top: 15px; +} + +.seguimentoTable { + width: 816px; + margin-top: 10px; + margin-bottom: 15px; +} + + + + +
+
Em seguimento
+
+ +
+ +
+
+ +
+
\ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoTable.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoTable.java new file mode 100644 index 00000000..7627d845 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoTable.java @@ -0,0 +1,88 @@ +package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.seguimento; + +import java.util.Vector; + +import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.AnaliseAcidentesTrabalhoService; +import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.AnaliseAcidentesTrabalhoServiceAsync; +import com.evolute.siprp.client.panels.utils.navigation.PageNavigation; +import com.evolute.siprp.client.vo.ActualTableRow; +import com.google.gwt.core.client.GWT; +import com.google.gwt.i18n.client.DateTimeFormat; +import com.google.gwt.user.client.Window; +import com.google.gwt.user.client.rpc.AsyncCallback; +import com.google.gwt.user.client.rpc.ServiceDefTarget; +import com.google.gwt.user.client.ui.FlexTable; + +public class SeguimentoTable extends FlexTable +{ + private final DateTimeFormat D_F = DateTimeFormat.getFormat( "yyyy-MM-dd" ); + + private AnaliseAcidentesTrabalhoServiceAsync aatService; + + public SeguimentoTable() + { + super(); + + this.aatService = ( AnaliseAcidentesTrabalhoServiceAsync ) GWT.create( AnaliseAcidentesTrabalhoService.class ); + ServiceDefTarget serviceDef = ( ServiceDefTarget ) this.aatService; + serviceDef.setServiceEntryPoint( GWT.getModuleBaseURL() + "aatService" ); + + this.setText( 0, 0, "Data do acidente" ); + this.setText( 0, 1, "Data da abertura" ); + this.setText( 0, 2, "Nº acidente" ); + this.setText( 0, 3, "POR" ); + this.setText( 0, 4, "Nome do acidentado" ); + this.setText( 0, 5, "Fase" ); + + CellFormatter cellFormatter = this.getCellFormatter(); + cellFormatter.setStyleName( 0, 0, "lblBold" ); + cellFormatter.setStyleName( 0, 1, "lblBold" ); + cellFormatter.setStyleName( 0, 2, "lblBold" ); + cellFormatter.setStyleName( 0, 3, "lblBold" ); + cellFormatter.setStyleName( 0, 4, "lblBold" ); + cellFormatter.setStyleName( 0, 5, "lblBold" ); + + this.setText( 1, 0, "loading ..." ); + this.getFlexCellFormatter().setColSpan( 1, 0, 6 ); + + this.aatService.getSeguimentoTableData( PageNavigation.getProvider().getUserLogged(), new AsyncCallback< Vector< ActualTableRow > >() { + @Override + public void onFailure( Throwable caught ) + { + Window.alert( "Oops ! unable to fetch 'Actual' table data." ); + } + + @Override + public void onSuccess( Vector< ActualTableRow > result ) + { + showTableData( result ); + } + }); + } + + + private void showTableData( Vector< ActualTableRow > tableRows ) + { + if ( tableRows == null || tableRows.size() == 0 ) + { + this.setText( 1, 0, "No items found." ); + } + else + { + this.getFlexCellFormatter().setColSpan( 1, 0, 0 ); + + for ( int rowNumber = 0, columnNumber = 0; rowNumber < tableRows.size(); rowNumber++, columnNumber = 0 ) + { + ActualTableRow row = tableRows.get( rowNumber ); + + this.setText( (rowNumber+1), columnNumber++, D_F.format( row.getDataAcidente() ) ); + this.setText( (rowNumber+1), columnNumber++, D_F.format( row.getDataAbertura() ) ); + this.setText( (rowNumber+1), columnNumber++, row.getNrAcidente() ); + this.setText( (rowNumber+1), columnNumber++, row.getPOR() ); + this.setText( (rowNumber+1), columnNumber++, row.getNomeAcidentado() ); + this.setText( (rowNumber+1), columnNumber++, String.valueOf( row.getFase() ) ); + } + } + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnchorSair.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnchorSair.java new file mode 100644 index 00000000..46afd9f4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnchorSair.java @@ -0,0 +1,28 @@ +package com.evolute.siprp.client.panels.apps; + +import com.evolute.siprp.client.panels.utils.navigation.NavigationConstants; +import com.evolute.siprp.client.panels.utils.navigation.PageNavigation; +import com.google.gwt.event.dom.client.ClickEvent; +import com.google.gwt.event.dom.client.ClickHandler; +import com.google.gwt.user.client.ui.Anchor; + +public class AnchorSair extends Anchor implements ClickHandler +{ + + public AnchorSair() + { + super(); + + this.setText( "sair>>" ); + this.addClickHandler( this ); + } + + @Override + public void onClick( ClickEvent event ) + { + PageNavigation.getProvider().setUserLogged( null ); + PageNavigation.getProvider().clearCache(); + PageNavigation.goPage( NavigationConstants.LOGIN_PANEL ); + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/MainPanel.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/MainPanel.java new file mode 100644 index 00000000..7bd28577 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/MainPanel.java @@ -0,0 +1,69 @@ +package com.evolute.siprp.client.panels.apps; + +import com.evolute.siprp.client.panels.utils.AppConstants; +import com.evolute.siprp.client.panels.utils.navigation.NavigationConstants; +import com.evolute.siprp.client.panels.utils.navigation.PageNavigation; +import com.evolute.siprp.client.vo.Utilizador; +import com.google.gwt.core.client.GWT; +import com.google.gwt.event.dom.client.ClickEvent; +import com.google.gwt.uibinder.client.UiBinder; +import com.google.gwt.uibinder.client.UiField; +import com.google.gwt.uibinder.client.UiHandler; +import com.google.gwt.user.client.Window; +import com.google.gwt.user.client.ui.Anchor; +import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.Image; +import com.google.gwt.user.client.ui.InlineLabel; +import com.google.gwt.user.client.ui.Widget; + +public class MainPanel extends Composite +{ + + private static MainPanelUiBinder uiBinder = GWT.create( MainPanelUiBinder.class ); + interface MainPanelUiBinder extends UiBinder< Widget, MainPanel > { } + + @UiField protected InlineLabel lblUsername; + @UiField protected InlineLabel lblName; + @UiField protected AnchorSair lnkSair; + @UiField protected Anchor lnkAnaliseAcidentesTrabalho; + @UiField protected Anchor lnkPlanosActuacao; + @UiField protected Image imgSiprp; + @UiField protected Image imgAuchan; + + private Utilizador userLogged; + + public MainPanel() + { + initWidget( uiBinder.createAndBindUi( this ) ); + + userLogged = PageNavigation.getProvider().getUserLogged(); + + lblUsername.setText( userLogged.getUsername() ); + + imgSiprp.setTitle( "SIPRP" ); + imgSiprp.setUrl( AppConstants.IMAGES_FOLDER + "SIPRP_logo_small.jpg" ); + imgAuchan.setTitle( "Auchan" ); + imgAuchan.setUrl( AppConstants.IMAGES_FOLDER + "logo_empresa32.jpg" ); + imgAuchan.setHeight( "40" ); + + lblName.setText( userLogged.getNome() ); + lnkAnaliseAcidentesTrabalho.setText( "An\u00E1lise de Acidentes de Trabalho" ); + lnkPlanosActuacao.setText( "Planos de Actua\u00E7\u00E3o" ); + } + + + @UiHandler( { "lnkAnaliseAcidentesTrabalho", "lnkPlanosActuacao" } ) + protected void onClick( ClickEvent e ) + { + if ( e.getSource().equals( lnkAnaliseAcidentesTrabalho ) ) + { + PageNavigation.goPage( NavigationConstants.ANALISE_ACIDENTES_TRABALHO_PANEL ); + } + else if ( e.getSource().equals( lnkPlanosActuacao ) ) + { + //TODO: + Window.alert( "TODO" ); + } + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/MainPanel.ui.xml b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/MainPanel.ui.xml new file mode 100644 index 00000000..244330b8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/apps/MainPanel.ui.xml @@ -0,0 +1,71 @@ + + + + +.headerDiv { + width: 100%; + text-align: right; + margin-top: 75px; +} + +.bodyDiv { + margin-top: 75px; + + width: 100%; + border: 1px solid black; + background-color: rgb( 238, 238, 238 ); +} + +.logosDiv { + margin-top: 10px; +} + +.welcomeDiv { + margin-bottom: 50px; +} + +.linksDiv { + margin-top: 50px; + margin-bottom: 30px; +} + +.lblUsername { + margin-right: 30px; +} + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ Bem vindo(a) +
+ + aceder a + +
+ + | + +
+ +
+ +
+ +
+
\ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/footer/FooterPanel.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/footer/FooterPanel.java new file mode 100644 index 00000000..1efff397 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/footer/FooterPanel.java @@ -0,0 +1,35 @@ +package com.evolute.siprp.client.panels.footer; + +import com.evolute.siprp.client.panels.utils.AppConstants; +import com.google.gwt.core.client.GWT; +import com.google.gwt.event.dom.client.ClickEvent; +import com.google.gwt.uibinder.client.UiBinder; +import com.google.gwt.uibinder.client.UiField; +import com.google.gwt.uibinder.client.UiHandler; +import com.google.gwt.user.client.Window; +import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.Image; +import com.google.gwt.user.client.ui.Widget; + +public class FooterPanel extends Composite { + + private static FooterPanelUiBinder uiBinder = GWT.create( FooterPanelUiBinder.class ); + interface FooterPanelUiBinder extends UiBinder< Widget, FooterPanel > { } + + @UiField protected Image image; + + public FooterPanel() + { + initWidget( uiBinder.createAndBindUi( this ) ); + image.setUrl( AppConstants.IMAGES_FOLDER + "logo_evolute_small.png" ); + image.setTitle( "Evolute" ); + } + + + @UiHandler( "image" ) + protected void onClick( ClickEvent e ) + { + Window.Location.assign( "http://www.evolute.pt" ); + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/footer/FooterPanel.ui.xml b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/footer/FooterPanel.ui.xml new file mode 100644 index 00000000..2d623252 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/footer/FooterPanel.ui.xml @@ -0,0 +1,20 @@ + + + + .footer { + margin-top: 50px; + text-align: center; + } + .borderBottom { + border-bottom: 1px solid #FFFFFF; + } + + + +
+ Software desenvolvido por © 2009 +
+ +
+
\ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginPanel.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginPanel.java new file mode 100644 index 00000000..49933ca3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginPanel.java @@ -0,0 +1,123 @@ +package com.evolute.siprp.client.panels.index.login; + +import com.evolute.siprp.client.panels.utils.dialog.CDialogBox; +import com.evolute.siprp.client.panels.utils.navigation.NavigationConstants; +import com.evolute.siprp.client.panels.utils.navigation.PageNavigation; +import com.evolute.siprp.client.vo.Utilizador; +import com.google.gwt.core.client.GWT; +import com.google.gwt.event.dom.client.ClickEvent; +import com.google.gwt.event.dom.client.KeyCodes; +import com.google.gwt.event.dom.client.KeyUpEvent; +import com.google.gwt.uibinder.client.UiBinder; +import com.google.gwt.uibinder.client.UiField; +import com.google.gwt.uibinder.client.UiHandler; +import com.google.gwt.user.client.Window; +import com.google.gwt.user.client.rpc.AsyncCallback; +import com.google.gwt.user.client.rpc.ServiceDefTarget; +import com.google.gwt.user.client.ui.Anchor; +import com.google.gwt.user.client.ui.Button; +import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.PasswordTextBox; +import com.google.gwt.user.client.ui.TextBox; +import com.google.gwt.user.client.ui.Widget; + +public class LoginPanel extends Composite +{ + + private static LoginPanelUiBinder uiBinder = GWT.create( LoginPanelUiBinder.class ); + interface LoginPanelUiBinder extends UiBinder< Widget, LoginPanel > { } + + @UiField protected TextBox txtUsername; + @UiField protected PasswordTextBox txtPassword; + @UiField protected Anchor lnkRecoverPwd; + @UiField protected Button btnLogin; + + private LoginServiceAsync loginService; + + + public LoginPanel() + { + initWidget( uiBinder.createAndBindUi( this ) ); + + this.loginService = ( LoginServiceAsync ) GWT.create( LoginService.class ); + ServiceDefTarget serviceDef = ( ServiceDefTarget ) this.loginService; + serviceDef.setServiceEntryPoint( GWT.getModuleBaseURL() + "loginService" ); + + lnkRecoverPwd.setText( "Recuperar palavra-chave" ); + btnLogin.setText( "Entrar" ); + } + + @UiHandler( {"btnLogin", "lnkRecoverPwd"} ) + protected void onClick( ClickEvent e ) + { + if ( e.getSource().equals( btnLogin ) ) + { + doLogin(); + } + else if ( e.getSource().equals( lnkRecoverPwd ) ) + { + gotoRecoverPwd(); + } + } + + @UiHandler( {"txtPassword", "txtUsername"} ) + protected void onKeyUp( KeyUpEvent e ) + { + if ( e.getNativeKeyCode() == KeyCodes.KEY_ENTER ) + { + doLogin(); + } + } + + private void doLogin() + { + String userName = txtUsername.getText().trim(); + String passwd = txtPassword.getText().trim(); + + if ( ! userName.equals( "" ) ) + { + if ( ! passwd.equals( "" ) ) + { + loginService.doLogin( txtUsername.getText(), txtPassword.getText(), new AsyncCallback< Utilizador >() { + @Override + public void onFailure( Throwable caught ) + { + Window.alert( "Oops ! Unable to perform login." ); + } + + @Override + public void onSuccess( Utilizador result ) + { + if ( result == null ) + { + CDialogBox box = new CDialogBox( "Dados inv\u00E1lidos", new String[] { "Utilizador e/ou palavra-chave incorrectos." } ); + box.center(); + } + else + { + PageNavigation.getProvider().setUserLogged( result ); + PageNavigation.goPage( NavigationConstants.APP_MAIN_PANEL ); + } + } + }); + } + else + { + CDialogBox box = new CDialogBox( "Erro ...", new String[] { "Tem de introduzir uma palavra-chave." } ); + box.center(); + } + } + else + { + CDialogBox box = new CDialogBox( "Erro ...", new String[] { "Tem de introduzir um nome de utilizador." } ); + box.center(); + } + } + + + private void gotoRecoverPwd() + { + PageNavigation.goPage( NavigationConstants.RECOVER_PWD_PANEL ); + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginPanel.ui.xml b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginPanel.ui.xml new file mode 100644 index 00000000..a55a0fbb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginPanel.ui.xml @@ -0,0 +1,34 @@ + + + + + +.loginBox { + height: 34px; +} + + + + + +
+ + + + + + + + + + + + + +
Utilizador:
Palavra-chave:
+
+ +
+
\ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginService.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginService.java new file mode 100644 index 00000000..22dc10a0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginService.java @@ -0,0 +1,9 @@ +package com.evolute.siprp.client.panels.index.login; + +import com.evolute.siprp.client.vo.Utilizador; +import com.google.gwt.user.client.rpc.RemoteService; + +public interface LoginService extends RemoteService +{ + public Utilizador doLogin( String username, String password ); +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginServiceAsync.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginServiceAsync.java new file mode 100644 index 00000000..25458646 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginServiceAsync.java @@ -0,0 +1,9 @@ +package com.evolute.siprp.client.panels.index.login; + +import com.evolute.siprp.client.vo.Utilizador; +import com.google.gwt.user.client.rpc.AsyncCallback; + +public interface LoginServiceAsync +{ + public void doLogin( String username, String password, AsyncCallback< Utilizador > callback ); +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverPwdPanel.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverPwdPanel.java new file mode 100644 index 00000000..f9553154 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverPwdPanel.java @@ -0,0 +1,72 @@ +package com.evolute.siprp.client.panels.index.recover_pwd; + +import com.evolute.siprp.client.panels.utils.navigation.NavigationConstants; +import com.evolute.siprp.client.panels.utils.navigation.PageNavigation; +import com.google.gwt.core.client.GWT; +import com.google.gwt.event.dom.client.ClickEvent; +import com.google.gwt.uibinder.client.UiBinder; +import com.google.gwt.uibinder.client.UiField; +import com.google.gwt.uibinder.client.UiHandler; +import com.google.gwt.user.client.Window; +import com.google.gwt.user.client.rpc.AsyncCallback; +import com.google.gwt.user.client.rpc.ServiceDefTarget; +import com.google.gwt.user.client.ui.Button; +import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.TextBox; +import com.google.gwt.user.client.ui.Widget; + +public class RecoverPwdPanel extends Composite +{ + + private static RecoverPwdPanelUiBinder uiBinder = GWT.create( RecoverPwdPanelUiBinder.class ); + interface RecoverPwdPanelUiBinder extends UiBinder< Widget, RecoverPwdPanel > { } + + private RecoverServiceAsync recoverService; + + @UiField protected Button btnOK; + @UiField protected Button btnCancel; + @UiField protected TextBox txtUsername; + @UiField protected TextBox txtEmail; + + + public RecoverPwdPanel() + { + initWidget( uiBinder.createAndBindUi( this ) ); + + this.recoverService = ( RecoverServiceAsync ) GWT.create( RecoverService.class ); + ServiceDefTarget serviceDef = ( ServiceDefTarget ) this.recoverService; + serviceDef.setServiceEntryPoint( GWT.getModuleBaseURL() + "recoverService" ); + + btnOK.setText( "OK" ); + btnCancel.setText( "Cancelar" ); + } + + @UiHandler( {"btnOK", "btnCancel"} ) + protected void onClick( ClickEvent e ) + { + if ( e.getSource().equals( btnOK ) ) + { + String userName = txtUsername.getText().trim(); + String eMail = txtEmail.getText().trim(); + + this.recoverService.recoverPWD( userName, eMail, new AsyncCallback< String >() { + @Override + public void onFailure( Throwable caught ) + { + Window.alert( "Oops !" ); + } + + @Override + public void onSuccess( String result ) + { + Window.alert( result ); + } + }); + } + else if ( e.getSource().equals( btnCancel ) ) + { + PageNavigation.goPage( NavigationConstants.LOGIN_PANEL ); + } + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverPwdPanel.ui.xml b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverPwdPanel.ui.xml new file mode 100644 index 00000000..4346be9d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverPwdPanel.ui.xml @@ -0,0 +1,34 @@ + + + + + + + + + +
+ + + + + + + + + + + + + + + +
Preencha os seguintes dados pessoais
Utilizador:
E-mail:
+ + +
+
+ +
+
\ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverService.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverService.java new file mode 100644 index 00000000..c82136b4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverService.java @@ -0,0 +1,8 @@ +package com.evolute.siprp.client.panels.index.recover_pwd; + +import com.google.gwt.user.client.rpc.RemoteService; + +public interface RecoverService extends RemoteService +{ + public String recoverPWD( String username, String email ); +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverServiceAsync.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverServiceAsync.java new file mode 100644 index 00000000..30a8e897 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverServiceAsync.java @@ -0,0 +1,8 @@ +package com.evolute.siprp.client.panels.index.recover_pwd; + +import com.google.gwt.user.client.rpc.AsyncCallback; + +public interface RecoverServiceAsync +{ + public void recoverPWD( String username, String email, AsyncCallback< String > callback ); +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/AppConstants.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/AppConstants.java new file mode 100644 index 00000000..fd3f40d7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/AppConstants.java @@ -0,0 +1,24 @@ +package com.evolute.siprp.client.panels.utils; + +public interface AppConstants +{ + + public final String IMAGES_FOLDER = "gestaoshst/images/"; + + public final String MAIN_DIV = "main"; + + + public final static int ESTADO_SEG = 1; + public final static int ESTADO_RH1 = 2; + public final static int ESTADO_HS = 3; + public final static int ESTADO_RH2 = 4; + //public final static int ESTADO_MEDICINA = 5; + public final static int ESTADO_CONSOLIDACAO = 5; + //public final static int ESTADO_ASSINATURAS = 7; + public final static int ESTADO_ASSINATURA_SEG = 6; + public final static int ESTADO_ASSINATURA_RH = 7; + //public final static int ESTADO_IMPRESSAO = 8; + public final static int ESTADO_FECHAR = 8; + public final static int ESTADO_CONCLUIDO = 9; + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/CDialogBox.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/CDialogBox.java new file mode 100644 index 00000000..0e392fbd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/CDialogBox.java @@ -0,0 +1,55 @@ +package com.evolute.siprp.client.panels.utils.dialog; + +import com.google.gwt.core.client.GWT; +import com.google.gwt.event.dom.client.ClickEvent; +import com.google.gwt.uibinder.client.UiBinder; +import com.google.gwt.uibinder.client.UiFactory; +import com.google.gwt.uibinder.client.UiField; +import com.google.gwt.uibinder.client.UiHandler; +import com.google.gwt.user.client.ui.Button; +import com.google.gwt.user.client.ui.DialogBox; +import com.google.gwt.user.client.ui.Widget; + +public class CDialogBox extends DialogBox +{ + + private static CDialogBoxUiBinder uiBinder = GWT.create( CDialogBoxUiBinder.class ); + interface CDialogBoxUiBinder extends UiBinder< Widget, CDialogBox > { } + + @UiField Button btnClose; + @UiField ErrorMsgs msgs; + + private String[] errorMsgs; + + public CDialogBox( String[] errorMsg ) + { + this( "Erro ...", errorMsg ); + } + + public CDialogBox( String title, String[] errorMsg ) + { + this.errorMsgs = errorMsg; + setWidget( uiBinder.createAndBindUi( this ) ); + + this.setText( title ); + btnClose.setText( "Fechar" ); + + this.setAnimationEnabled( true ); + this.setGlassEnabled( true ); + + this.setAutoHideEnabled( true ); + btnClose.setFocus( true ); + } + + @UiFactory ErrorMsgs makeErrorMsgs() + { + return new ErrorMsgs( errorMsgs ); + } + + @UiHandler( "btnClose" ) + void onClick( ClickEvent e ) + { + this.hide(); + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/CDialogBox.ui.xml b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/CDialogBox.ui.xml new file mode 100644 index 00000000..7e99279e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/CDialogBox.ui.xml @@ -0,0 +1,28 @@ + + + + + .lblError { + text-align: center; + margin-top: 30px; + margin-bottom: 30px; + } + + .btnClose { + float: right; + } + + + +
+ +
+
+ +
+ +
+
\ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/ErrorMsgs.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/ErrorMsgs.java new file mode 100644 index 00000000..cb49a82d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/ErrorMsgs.java @@ -0,0 +1,29 @@ +package com.evolute.siprp.client.panels.utils.dialog; + +import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.HTML; +import com.google.gwt.user.client.ui.HasHorizontalAlignment; +import com.google.gwt.user.client.ui.VerticalPanel; + +public class ErrorMsgs extends Composite +{ + private VerticalPanel panel; + private HTML[] msgElems; + + public ErrorMsgs( String[] msgs ) + { + super(); + + this.panel = new VerticalPanel(); + this.msgElems = new HTML[ msgs.length ]; + for ( int i = 0; i < msgs.length; i++ ) + { + this.msgElems[ i ] = new HTML( msgs[ i ] ); + this.panel.add( this.msgElems[ i ] ); + this.panel.setCellHorizontalAlignment( this.msgElems[ i ], HasHorizontalAlignment.ALIGN_LEFT ); + } + + this.initWidget( this.panel ); + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/navigation/NavigationConstants.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/navigation/NavigationConstants.java new file mode 100644 index 00000000..574d9248 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/navigation/NavigationConstants.java @@ -0,0 +1,11 @@ +package com.evolute.siprp.client.panels.utils.navigation; + +public interface NavigationConstants +{ + + public final int LOGIN_PANEL = 1; + public final int RECOVER_PWD_PANEL = 2; + public final int APP_MAIN_PANEL = 3; + public final int ANALISE_ACIDENTES_TRABALHO_PANEL = 4; + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/navigation/PageNavigation.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/navigation/PageNavigation.java new file mode 100644 index 00000000..27e18750 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/navigation/PageNavigation.java @@ -0,0 +1,164 @@ +package com.evolute.siprp.client.panels.utils.navigation; + +import java.util.HashMap; +import java.util.Map; + +import com.evolute.siprp.client.panels.apps.MainPanel; +import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.AnaliseAcidentesTrabalhoPanel; +import com.evolute.siprp.client.panels.index.login.LoginPanel; +import com.evolute.siprp.client.panels.index.recover_pwd.RecoverPwdPanel; +import com.evolute.siprp.client.panels.utils.AppConstants; +import com.evolute.siprp.client.vo.Utilizador; +import com.google.gwt.user.client.History; +import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.RootPanel; + +public class PageNavigation +{ + private static PageNavigation instance = null; + + private RootPanel mainPanel; + private String containerID; + + private Map< Integer, Object > panelsCache; + + private Utilizador userLogged = null; + + + private PageNavigation() + { + this.containerID = AppConstants.MAIN_DIV; + + mainPanel = RootPanel.get( this.containerID ); + panelsCache = new HashMap< Integer, Object >(); + } + + + public static PageNavigation getProvider() + { + if ( instance == null ) + { + instance = new PageNavigation(); + } + return instance; + } + + + public static void goPage( Integer pageID ) + { + PageNavigation.getProvider().gotoPage( pageID ); + } + + + /** + * usado quando se faz logout ... + * manter login panel e recover se existir ... + */ + public void clearCache() + { + Map< Integer, Object > newCache = new HashMap< Integer, Object >(); + + if ( panelsCache.containsKey( NavigationConstants.LOGIN_PANEL ) ) + { + newCache.put( NavigationConstants.LOGIN_PANEL, panelsCache.get( NavigationConstants.LOGIN_PANEL ) ); + } +// if ( panelsCache.containsKey( NavigationConstants.RECOVER_PWD_PANEL ) ) +// { +// newCache.put( NavigationConstants.RECOVER_PWD_PANEL, panelsCache.get( NavigationConstants.RECOVER_PWD_PANEL ) ); +// } + + panelsCache = newCache; + } + + + public void gotoPage( Composite newWindow ) + { + if ( newWindow != null ) + { + mainPanel.clear(); + mainPanel.add( newWindow ); + } + } + + + public void gotoPage( Integer pageID ) + { + switch ( pageID.intValue() ) + { + case NavigationConstants.LOGIN_PANEL: + { + if ( ! panelsCache.containsKey( NavigationConstants.LOGIN_PANEL ) ) + { + panelsCache.put( NavigationConstants.LOGIN_PANEL, new LoginPanel() ); + } + gotoPage( ( LoginPanel ) panelsCache.get( NavigationConstants.LOGIN_PANEL ) ); + History.newItem( String.valueOf( NavigationConstants.LOGIN_PANEL ) ); + break; + } + case NavigationConstants.RECOVER_PWD_PANEL: + { + if ( ! panelsCache.containsKey( NavigationConstants.RECOVER_PWD_PANEL ) ) + { + panelsCache.put( NavigationConstants.RECOVER_PWD_PANEL, new RecoverPwdPanel() ); + } + gotoPage( ( RecoverPwdPanel ) panelsCache.get( NavigationConstants.RECOVER_PWD_PANEL ) ); + History.newItem( String.valueOf( NavigationConstants.RECOVER_PWD_PANEL ) ); + break; + } + case NavigationConstants.APP_MAIN_PANEL: + { + if ( ! isLoggedIn() ) + { + gotoPage( NavigationConstants.LOGIN_PANEL ); + break; + } + + if ( ! panelsCache.containsKey( NavigationConstants.APP_MAIN_PANEL ) ) + { + panelsCache.put( NavigationConstants.APP_MAIN_PANEL, new MainPanel() ); + } + gotoPage( ( MainPanel ) panelsCache.get( NavigationConstants.APP_MAIN_PANEL) ); + History.newItem( String.valueOf( NavigationConstants.APP_MAIN_PANEL ) ); + break; + } + case NavigationConstants.ANALISE_ACIDENTES_TRABALHO_PANEL: + { + if ( ! isLoggedIn() ) + { + gotoPage( NavigationConstants.LOGIN_PANEL ); + break; + } + + if ( ! panelsCache.containsKey( NavigationConstants.ANALISE_ACIDENTES_TRABALHO_PANEL ) ) + { + panelsCache.put( NavigationConstants.ANALISE_ACIDENTES_TRABALHO_PANEL, new AnaliseAcidentesTrabalhoPanel() ); + } + gotoPage( ( AnaliseAcidentesTrabalhoPanel ) panelsCache.get( NavigationConstants.ANALISE_ACIDENTES_TRABALHO_PANEL ) ); + History.newItem( String.valueOf( NavigationConstants.ANALISE_ACIDENTES_TRABALHO_PANEL ) ); + break; + } + default: + { + break; + } + } + } + + + //TODO: find a better place for this stuff ... + public boolean isLoggedIn() + { + return getUserLogged() != null; + } + + public Utilizador getUserLogged() + { + return this.userLogged; + } + + public void setUserLogged( Utilizador user ) + { + this.userLogged = user; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/AccessConstants.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/AccessConstants.java new file mode 100644 index 00000000..b7f37ed2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/AccessConstants.java @@ -0,0 +1,12 @@ +package com.evolute.siprp.client.panels.utils.permissoes; + +public interface AccessConstants +{ + + public static final int VIEW_ACTUAL_PANEL = 1; + public static final int VIEW_ACTUAL_PANEL_NOVA_ANALISE_BUTTON = 2; + + public static final int VIEW_SEGUIMENTO_PANEL = 3; + + public static final int VIEW_CONCLUIDO_PANEL = 4; +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/PermissionsController.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/PermissionsController.java new file mode 100644 index 00000000..0a564494 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/PermissionsController.java @@ -0,0 +1,76 @@ +package com.evolute.siprp.client.panels.utils.permissoes; + +import com.evolute.siprp.client.panels.utils.navigation.PageNavigation; +import com.evolute.siprp.client.vo.Utilizador; + +public class PermissionsController +{ + private static PermissionsController instance; + + private Utilizador userLogged = null; + private int userType; + + private PermissionsController() + { + + } + + public static PermissionsController getController() + { + if ( instance == null ) + { + instance = new PermissionsController(); + } + return instance; + } + + + public boolean hasPermissionTo( Integer accessConstant ) + { + userLogged = PageNavigation.getProvider().getUserLogged(); + userType = userLogged.getTipo_utilizador().intValue(); + + Boolean canAccess = false; + + switch ( accessConstant.intValue() ) + { + case AccessConstants.VIEW_ACTUAL_PANEL: + { + + if ( userType == RolesConstants.TIPO_SEGURANCA + || userType == RolesConstants.TIPO_RECURSOS_HUMANOS + || userType == RolesConstants.TIPO_HIGIENE_SEGURANCA ) + { + canAccess = true; + } + break; + } + case AccessConstants.VIEW_ACTUAL_PANEL_NOVA_ANALISE_BUTTON: + { + if ( userType == RolesConstants.TIPO_SEGURANCA ) + { + canAccess = true; + } + + break; + } + case AccessConstants.VIEW_SEGUIMENTO_PANEL: + { + canAccess = true; + break; + } + case AccessConstants.VIEW_CONCLUIDO_PANEL: + { + canAccess = true; + break; + } + default: + { + break; + } + } + + return canAccess; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/RolesConstants.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/RolesConstants.java new file mode 100644 index 00000000..fecf5386 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/RolesConstants.java @@ -0,0 +1,29 @@ +package com.evolute.siprp.client.panels.utils.permissoes; + +public interface RolesConstants +{ + /* + 1 - "Segurança" + 2 - "Recursos Humanos" + 3 - "Higiene e Segurança" + 5 - "Médico" + 6 - "Gestão" + 7 - "Direcção-Geral RH" + 8 - "Director Siprp" + 9 - "Director de Loja" + 10 - "Director Nacional de Segurança" + */ + + //campo 'tipo' em 'tipos_utilizadores' + + public static final Integer TIPO_SEGURANCA = 1; + public static final Integer TIPO_RECURSOS_HUMANOS = 2; + public static final Integer TIPO_HIGIENE_SEGURANCA = 3; + public static final Integer TIPO_MEDICO = 5; + public static final Integer TIPO_GESTOR = 6; + public static final Integer TIPO_DIRECTOR_GERAL_RECURSOS_HUMANOS = 7; + public static final Integer TIPO_DIRECTOR_SIPRP = 8; + public static final Integer TIPO_DIRECTOR_LOJA = 9; + public static final Integer TIPO_DIRECTOR_NACIONAL_SEGURANCA = 10; + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/vo/ActualTableRow.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/vo/ActualTableRow.java new file mode 100644 index 00000000..220da872 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/vo/ActualTableRow.java @@ -0,0 +1,90 @@ +package com.evolute.siprp.client.vo; + +import java.io.Serializable; +import java.util.Date; + +public class ActualTableRow implements Serializable +{ + private static final long serialVersionUID = -6271564752485792179L; + + private Integer id; + private Date dataAcidente; + private Date dataAbertura; + private String nrAcidente; + private String POR; + private String nomeAcidentado; + private Integer estado; + private String fase; + + + public ActualTableRow() + { + + } + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Date getDataAcidente() { + return dataAcidente; + } + + public void setDataAcidente(Date dataAcidente) { + this.dataAcidente = dataAcidente; + } + + public Date getDataAbertura() { + return dataAbertura; + } + + public void setDataAbertura(Date dataAbertura) { + this.dataAbertura = dataAbertura; + } + + public String getNrAcidente() { + return nrAcidente; + } + + public void setNrAcidente(String nrAcidente) { + this.nrAcidente = nrAcidente; + } + + public String getPOR() { + return POR; + } + + public void setPOR(String por) { + POR = por; + } + + public String getNomeAcidentado() { + return nomeAcidentado; + } + + public void setNomeAcidentado(String nomeAcidentado) { + this.nomeAcidentado = nomeAcidentado; + } + + public Integer getEstado() { + return estado; + } + + public void setEstado(Integer estado) { + this.estado = estado; + } + + public String getFase() { + return fase; + } + + public void setFase(String fase) { + this.fase = fase; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/vo/Utilizador.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/vo/Utilizador.java new file mode 100644 index 00000000..a4e9282b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/client/vo/Utilizador.java @@ -0,0 +1,99 @@ +package com.evolute.siprp.client.vo; + +import java.io.Serializable; +import java.util.Date; + +public class Utilizador implements Serializable +{ + private static final long serialVersionUID = -5152657979121031157L; + + private Integer userID = null; + private String username = null; + private String nome = null; + private String email = null; + + private Integer tipo_utilizador = null; + private Boolean primeiro_login = null; + private Date data_password = null; + + private Integer estabelecimento_id = null; + private Boolean responsavel_loja = null; + + public Utilizador() + { + + } + + public Integer getUserID() { + return userID; + } + + public void setUserID(Integer userID) { + this.userID = userID; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getNome() { + return nome; + } + + public void setNome(String nome) { + this.nome = nome; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public Integer getTipo_utilizador() { + return tipo_utilizador; + } + + public void setTipo_utilizador(Integer tipo_utilizador) { + this.tipo_utilizador = tipo_utilizador; + } + + public Boolean getPrimeiro_login() { + return primeiro_login; + } + + public void setPrimeiro_login(Boolean primeiro_login) { + this.primeiro_login = primeiro_login; + } + + public Date getData_password() { + return data_password; + } + + public void setData_password(Date data_password) { + this.data_password = data_password; + } + + public Boolean getResponsavel_loja() { + return responsavel_loja; + } + + public void setResponsavel_loja(Boolean responsavel_loja) { + this.responsavel_loja = responsavel_loja; + } + + public Integer getEstabelecimento_id() { + return estabelecimento_id; + } + + public void setEstabelecimento_id(Integer estabelecimento_id) { + this.estabelecimento_id = estabelecimento_id; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/public/GestaoSHST.css b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/public/GestaoSHST.css new file mode 100644 index 00000000..5838e564 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/public/GestaoSHST.css @@ -0,0 +1,89 @@ +/** Add css rules here for your application. */ + +body { + color: #000; + background-color: #BBD400; + margin: 0px; +} + +body, th, td, p, div, span, input, button, select, textarea, form, b, strong, i, u, h1, h2, h3, h4, h5, h6, dl, dd, dt, ul, li, ol, option, optgroup, a { + font-family: sans-serif; + font-size: 12px; +} + +a, a:visited { + color: #035899; + text-decoration: none; +} + +a:hover { + color: #035899; + text-decoration: underline; + cursor: pointer; +} + +.alignCenterText { + text-align: center; +} + +.alignCenter { + margin-left: auto; + margin-right: auto; +} +.alignLeft { + float: left; +} +.alignRight { + float: right; +} + +.font12 { + font-size: 12px; +} +.font14 { + font-size: 14px; +} +.font16 { + font-size: 16px; +} +.font18 { + font-size: 18px; +} + +.indexTable { + border: 1px solid #000000; + width: 432px; + padding: 5px; +} + +.lblBold { + font-weight: bold; +} + +.inputBox { + width: 220px; + height: 24px; +} + +.inputBoxRec { + width: 432px; + height: 24px; +} + +.button { + width: 120px; + height: 24px; + cursor: pointer; +} + +.indexDiv { + width: 100%; + margin-top: 300px; +} + +.mainDiv { + width: 80%; + margin-left: auto; + margin-right: auto; +} + diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/public/images/SIPRP_logo_small.jpg b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/public/images/SIPRP_logo_small.jpg new file mode 100644 index 00000000..240f2358 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/public/images/SIPRP_logo_small.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/public/images/logo_empresa32.jpg b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/public/images/logo_empresa32.jpg new file mode 100644 index 00000000..2c5be6df Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/public/images/logo_empresa32.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/public/images/logo_evolute_small.png b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/public/images/logo_evolute_small.png new file mode 100644 index 00000000..0198da2b Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/public/images/logo_evolute_small.png differ diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/InitDB.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/InitDB.java new file mode 100644 index 00000000..e2d32803 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/InitDB.java @@ -0,0 +1,46 @@ +package com.evolute.siprp.server.db; + +import com.evolute.utils.Singleton; +import com.evolute.utils.db.DBManager; +import com.evolute.utils.db.JDBCManager; +import com.evolute.utils.db.keyretrievers.PostgresqlAutoKeyRetriever; +import com.evolute.utils.jdbc.DBStatementExecuter; +import com.evolute.utils.jdbc.StatementExecuterFactory; +import com.evolute.utils.jdo.JDOProvider; +import com.evolute.utils.sql.Insert; +import com.evolute.utils.sql.SQLQuery; +import com.evolute.utils.strings.UnicodeChecker; + + +public class InitDB +{ + private static DBManager manager; + private static JDOProvider jdoProvider; + + private static String dbUsername = "postgres"; + private static String dbPassword = "Typein"; + private static String URL = "jdbc:postgresql://storage:5432/siprp_20091203"; + + public static void init() throws Exception + { + if ( manager == null && jdoProvider == null ) + { + System.out.println( "Initializing db manager ..." ); + + DBManager manager = new JDBCManager( URL, dbUsername, dbPassword, 100, 80, 80, new SQLQuery[]{} ); + Singleton.setInstance( Singleton.DEFAULT_DBMANAGER, manager ); + Insert.setDefaultKeyRetriever( PostgresqlAutoKeyRetriever.RETRIEVER ); + StatementExecuterFactory.initialize( new DBStatementExecuter( manager.getSharedExecuter( InitDB.class ) ) ); + UnicodeChecker.setUseDoubleSlash( true ); + + initJDOConnection( dbUsername, dbPassword ); + } + } + + private static void initJDOConnection( String username, String password ) + { + jdoProvider = JDOProviderFactory.createInstance( URL, username, password ); + Singleton.setInstance( Singleton.DEFAULT_JDO_PROVIDER, jdoProvider ); + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/JDOProviderFactory.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/JDOProviderFactory.java new file mode 100644 index 00000000..7f983f06 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/JDOProviderFactory.java @@ -0,0 +1,65 @@ +package com.evolute.siprp.server.db; + +import java.util.Date; +import java.util.Properties; + +import com.evolute.utils.jdo.JDOProvider; + +/** + * + * @author jneto + */ +public abstract class JDOProviderFactory +{ + public static JDOProvider createInstance(String url, String user, String password) + { + Date d = new Date(); + System.out.println("INIT: " + d); + + Properties jpoxProps; + jpoxProps = new Properties(); + jpoxProps.setProperty("javax.jdo.PersistenceManagerFactoryClass", "org.datanucleus.jdo.JDOPersistenceManagerFactory"); + jpoxProps.setProperty("javax.jdo.option.ConnectionDriverName", "org.postgresql.Driver"); + jpoxProps.setProperty("datanucleus.identifier.fullyQualifiedNames", "false"); + jpoxProps.setProperty("datanucleus.identifier.case", "PreserveCase"); + jpoxProps.setProperty("javax.jdo.option.ConnectionURL", url ); + jpoxProps.setProperty("javax.jdo.option.ConnectionUserName", user); + jpoxProps.setProperty("javax.jdo.option.ConnectionPassword", password); + jpoxProps.setProperty("javax.jdo.option.IgnoreCache", "false"); + jpoxProps.setProperty("javax.jdo.option.NontransactionalRead", "true"); + jpoxProps.setProperty("javax.jdo.option.RetainValues", "true"); + jpoxProps.setProperty("datanucleus.autoCreateTables", "false"); + jpoxProps.setProperty("datanucleus.autoCreateSchema", "false"); + jpoxProps.setProperty("datanucleus.autoCreateConstraints", "false"); + jpoxProps.setProperty("datanucleus.autoCreateColumns", "false"); + jpoxProps.setProperty("datanucleus.validateTables", "false"); + jpoxProps.setProperty("datanucleus.validateColumns", "false"); + jpoxProps.setProperty("datanucleus.validateConstraints", "false"); + jpoxProps.setProperty("datanucleus.rdbms.CheckExistTablesOrViews", "false"); + jpoxProps.setProperty("datanucleus.rdbms.initializeColumnInfo", "None"); +// jpoxProps.setProperty("datanucleus.fixedDatastore", "true"); + jpoxProps.setProperty("datanucleus.identifier.defaultSchemaName", "public"); + jpoxProps.setProperty("datanucleus.autoStartMechanismMode", "Ignored"); + jpoxProps.setProperty("datanucleus.autoStartMechanism", "None"); + jpoxProps.setProperty("datanucleus.poid.transactionAttribute", "UsePM"); + jpoxProps.setProperty("datanucleus.connectionPoolingType", "C3P0"); + jpoxProps.setProperty("datanucleus.connectionPool.maxPoolSize", "5"); + jpoxProps.setProperty("datanucleus.connectionPool.minPoolSize", "1"); + jpoxProps.setProperty("datanucleus.connectionPool.initialPoolSize", "1"); + jpoxProps.setProperty("datanucleus.catalogName", "siprp"); + + // System.setProperty( "datanucleus.schemaName", "public" ); + // PersistenceManagerFactory pmf = + // JDOHelper.getPersistenceManagerFactory( jpoxProps ); + // // pmf.setOptimistic( true ); + // System.out.print( "Loading PM: " + new Date() ); + // // ( ( PersistenceManagerFactoryImpl )pmf ).setTransactionIsolation( + // Connection.TRANSACTION_READ_UNCOMMITTED ); + // // Retrieve a PersistenceManager from the PersistenceManagerFactory. + // PersistenceManager pm = pmf.getPersistenceManager(); + // JDOObject.setPersistentManager( pm ); + // System.out.println( "PM done " + new Date() ); + JDOProvider defaultProvider = new JDOProvider( jpoxProps ); + return defaultProvider; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Acidentados.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Acidentados.java new file mode 100644 index 00000000..0b104fe6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Acidentados.java @@ -0,0 +1,507 @@ +/* +* Acidentados.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class Acidentados implements JDOInnerObject +{ + private Integer id; + private String nome; + private java.util.Date data_nascimento; + private String bilhete_identidade; + private String morada; + private String cod_postal; + private String localidade; + private String contacto_telefonico; + private java.util.Date data_admissao; + private String funcao; + private Integer trabalhador_id; + private String turno; + private String numero_mecanografico; + private String nome_superior_hierarquico; + private String email_superior_hierarquico; + private String estabelecimento_origem; + private java.util.Date data_email_superior_hierarquico; + + public Acidentados() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == AcidentadosDataAuto.ID ) + { + return id; + } + else if( fieldName == AcidentadosDataAuto.NOME ) + { + return nome; + } + else if( fieldName == AcidentadosDataAuto.DATA_NASCIMENTO ) + { + return data_nascimento; + } + else if( fieldName == AcidentadosDataAuto.BILHETE_IDENTIDADE ) + { + return bilhete_identidade; + } + else if( fieldName == AcidentadosDataAuto.MORADA ) + { + return morada; + } + else if( fieldName == AcidentadosDataAuto.COD_POSTAL ) + { + return cod_postal; + } + else if( fieldName == AcidentadosDataAuto.LOCALIDADE ) + { + return localidade; + } + else if( fieldName == AcidentadosDataAuto.CONTACTO_TELEFONICO ) + { + return contacto_telefonico; + } + else if( fieldName == AcidentadosDataAuto.DATA_ADMISSAO ) + { + return data_admissao; + } + else if( fieldName == AcidentadosDataAuto.FUNCAO ) + { + return funcao; + } + else if( fieldName == AcidentadosDataAuto.TRABALHADOR_ID ) + { + return trabalhador_id; + } + else if( fieldName == AcidentadosDataAuto.TURNO ) + { + return turno; + } + else if( fieldName == AcidentadosDataAuto.NUMERO_MECANOGRAFICO ) + { + return numero_mecanografico; + } + else if( fieldName == AcidentadosDataAuto.NOME_SUPERIOR_HIERARQUICO ) + { + return nome_superior_hierarquico; + } + else if( fieldName == AcidentadosDataAuto.EMAIL_SUPERIOR_HIERARQUICO ) + { + return email_superior_hierarquico; + } + else if( fieldName == AcidentadosDataAuto.ESTABELECIMENTO_ORIGEM ) + { + return estabelecimento_origem; + } + else if( fieldName == AcidentadosDataAuto.DATA_EMAIL_SUPERIOR_HIERARQUICO ) + { + return data_email_superior_hierarquico; + } + else if( fieldName.equals( AcidentadosDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( AcidentadosDataAuto.NOME ) ) + { + return nome; + } + else if( fieldName.equals( AcidentadosDataAuto.DATA_NASCIMENTO ) ) + { + return data_nascimento; + } + else if( fieldName.equals( AcidentadosDataAuto.BILHETE_IDENTIDADE ) ) + { + return bilhete_identidade; + } + else if( fieldName.equals( AcidentadosDataAuto.MORADA ) ) + { + return morada; + } + else if( fieldName.equals( AcidentadosDataAuto.COD_POSTAL ) ) + { + return cod_postal; + } + else if( fieldName.equals( AcidentadosDataAuto.LOCALIDADE ) ) + { + return localidade; + } + else if( fieldName.equals( AcidentadosDataAuto.CONTACTO_TELEFONICO ) ) + { + return contacto_telefonico; + } + else if( fieldName.equals( AcidentadosDataAuto.DATA_ADMISSAO ) ) + { + return data_admissao; + } + else if( fieldName.equals( AcidentadosDataAuto.FUNCAO ) ) + { + return funcao; + } + else if( fieldName.equals( AcidentadosDataAuto.TRABALHADOR_ID ) ) + { + return trabalhador_id; + } + else if( fieldName.equals( AcidentadosDataAuto.TURNO ) ) + { + return turno; + } + else if( fieldName.equals( AcidentadosDataAuto.NUMERO_MECANOGRAFICO ) ) + { + return numero_mecanografico; + } + else if( fieldName.equals( AcidentadosDataAuto.NOME_SUPERIOR_HIERARQUICO ) ) + { + return nome_superior_hierarquico; + } + else if( fieldName.equals( AcidentadosDataAuto.EMAIL_SUPERIOR_HIERARQUICO ) ) + { + return email_superior_hierarquico; + } + else if( fieldName.equals( AcidentadosDataAuto.ESTABELECIMENTO_ORIGEM ) ) + { + return estabelecimento_origem; + } + else if( fieldName.equals( AcidentadosDataAuto.DATA_EMAIL_SUPERIOR_HIERARQUICO ) ) + { + return data_email_superior_hierarquico; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == AcidentadosDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == AcidentadosDataAuto.NOME ) + { + nome = ( String ) value; + } + else if( fieldName == AcidentadosDataAuto.DATA_NASCIMENTO ) + { + data_nascimento = ( java.util.Date ) value; + } + else if( fieldName == AcidentadosDataAuto.BILHETE_IDENTIDADE ) + { + bilhete_identidade = ( String ) value; + } + else if( fieldName == AcidentadosDataAuto.MORADA ) + { + morada = ( String ) value; + } + else if( fieldName == AcidentadosDataAuto.COD_POSTAL ) + { + cod_postal = ( String ) value; + } + else if( fieldName == AcidentadosDataAuto.LOCALIDADE ) + { + localidade = ( String ) value; + } + else if( fieldName == AcidentadosDataAuto.CONTACTO_TELEFONICO ) + { + contacto_telefonico = ( String ) value; + } + else if( fieldName == AcidentadosDataAuto.DATA_ADMISSAO ) + { + data_admissao = ( java.util.Date ) value; + } + else if( fieldName == AcidentadosDataAuto.FUNCAO ) + { + funcao = ( String ) value; + } + else if( fieldName == AcidentadosDataAuto.TRABALHADOR_ID ) + { + trabalhador_id = ( Integer ) value; + } + else if( fieldName == AcidentadosDataAuto.TURNO ) + { + turno = ( String ) value; + } + else if( fieldName == AcidentadosDataAuto.NUMERO_MECANOGRAFICO ) + { + numero_mecanografico = ( String ) value; + } + else if( fieldName == AcidentadosDataAuto.NOME_SUPERIOR_HIERARQUICO ) + { + nome_superior_hierarquico = ( String ) value; + } + else if( fieldName == AcidentadosDataAuto.EMAIL_SUPERIOR_HIERARQUICO ) + { + email_superior_hierarquico = ( String ) value; + } + else if( fieldName == AcidentadosDataAuto.ESTABELECIMENTO_ORIGEM ) + { + estabelecimento_origem = ( String ) value; + } + else if( fieldName == AcidentadosDataAuto.DATA_EMAIL_SUPERIOR_HIERARQUICO ) + { + data_email_superior_hierarquico = ( java.util.Date ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.NOME ) ) + { + nome = ( String ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.DATA_NASCIMENTO ) ) + { + data_nascimento = ( java.util.Date ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.BILHETE_IDENTIDADE ) ) + { + bilhete_identidade = ( String ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.MORADA ) ) + { + morada = ( String ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.COD_POSTAL ) ) + { + cod_postal = ( String ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.LOCALIDADE ) ) + { + localidade = ( String ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.CONTACTO_TELEFONICO ) ) + { + contacto_telefonico = ( String ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.DATA_ADMISSAO ) ) + { + data_admissao = ( java.util.Date ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.FUNCAO ) ) + { + funcao = ( String ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.TRABALHADOR_ID ) ) + { + trabalhador_id = ( Integer ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.TURNO ) ) + { + turno = ( String ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.NUMERO_MECANOGRAFICO ) ) + { + numero_mecanografico = ( String ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.NOME_SUPERIOR_HIERARQUICO ) ) + { + nome_superior_hierarquico = ( String ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.EMAIL_SUPERIOR_HIERARQUICO ) ) + { + email_superior_hierarquico = ( String ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.ESTABELECIMENTO_ORIGEM ) ) + { + estabelecimento_origem = ( String ) value; + } + else if( fieldName.equals( AcidentadosDataAuto.DATA_EMAIL_SUPERIOR_HIERARQUICO ) ) + { + data_email_superior_hierarquico = ( java.util.Date ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getNome() + { + return nome; + } + + public void setNome(String nomeValue ) + { + this.nome = nomeValue; + } + + public java.util.Date getData_nascimento() + { + return data_nascimento; + } + + public void setData_nascimento(java.util.Date data_nascimentoValue ) + { + this.data_nascimento = data_nascimentoValue; + } + + public String getBilhete_identidade() + { + return bilhete_identidade; + } + + public void setBilhete_identidade(String bilhete_identidadeValue ) + { + this.bilhete_identidade = bilhete_identidadeValue; + } + + public String getMorada() + { + return morada; + } + + public void setMorada(String moradaValue ) + { + this.morada = moradaValue; + } + + public String getCod_postal() + { + return cod_postal; + } + + public void setCod_postal(String cod_postalValue ) + { + this.cod_postal = cod_postalValue; + } + + public String getLocalidade() + { + return localidade; + } + + public void setLocalidade(String localidadeValue ) + { + this.localidade = localidadeValue; + } + + public String getContacto_telefonico() + { + return contacto_telefonico; + } + + public void setContacto_telefonico(String contacto_telefonicoValue ) + { + this.contacto_telefonico = contacto_telefonicoValue; + } + + public java.util.Date getData_admissao() + { + return data_admissao; + } + + public void setData_admissao(java.util.Date data_admissaoValue ) + { + this.data_admissao = data_admissaoValue; + } + + public String getFuncao() + { + return funcao; + } + + public void setFuncao(String funcaoValue ) + { + this.funcao = funcaoValue; + } + + public Integer getTrabalhador_id() + { + return trabalhador_id; + } + + public void setTrabalhador_id(Integer trabalhador_idValue ) + { + this.trabalhador_id = trabalhador_idValue; + } + + public String getTurno() + { + return turno; + } + + public void setTurno(String turnoValue ) + { + this.turno = turnoValue; + } + + public String getNumero_mecanografico() + { + return numero_mecanografico; + } + + public void setNumero_mecanografico(String numero_mecanograficoValue ) + { + this.numero_mecanografico = numero_mecanograficoValue; + } + + public String getNome_superior_hierarquico() + { + return nome_superior_hierarquico; + } + + public void setNome_superior_hierarquico(String nome_superior_hierarquicoValue ) + { + this.nome_superior_hierarquico = nome_superior_hierarquicoValue; + } + + public String getEmail_superior_hierarquico() + { + return email_superior_hierarquico; + } + + public void setEmail_superior_hierarquico(String email_superior_hierarquicoValue ) + { + this.email_superior_hierarquico = email_superior_hierarquicoValue; + } + + public String getEstabelecimento_origem() + { + return estabelecimento_origem; + } + + public void setEstabelecimento_origem(String estabelecimento_origemValue ) + { + this.estabelecimento_origem = estabelecimento_origemValue; + } + + public java.util.Date getData_email_superior_hierarquico() + { + return data_email_superior_hierarquico; + } + + public void setData_email_superior_hierarquico(java.util.Date data_email_superior_hierarquicoValue ) + { + this.data_email_superior_hierarquico = data_email_superior_hierarquicoValue; + } + + public Class getOuterClass() + { + return AcidentadosDataAuto.class; + } + + public AcidentadosDataAuto getOuterClassInstance() + { + AcidentadosDataAuto outerObj = new AcidentadosDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AcidentadosData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AcidentadosData.java new file mode 100644 index 00000000..1e0d1d88 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AcidentadosData.java @@ -0,0 +1,18 @@ +/* +* AcidentadosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class AcidentadosData extends com.evolute.siprp.server.db.data.siprp.AcidentadosDataAuto +{ + + public AcidentadosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AcidentadosDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AcidentadosDataAuto.java new file mode 100644 index 00000000..fc195305 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AcidentadosDataAuto.java @@ -0,0 +1,283 @@ +/* +* AcidentadosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class AcidentadosDataAuto extends JDOObject +{ + + public static final String TABLENAME = "acidentados"; + + public static final String ID = "id"; + public static final String ID_FULL = "acidentados.id"; + public static final String NOME = "nome"; + public static final String NOME_FULL = "acidentados.nome"; + public static final String DATA_NASCIMENTO = "data_nascimento"; + public static final String DATA_NASCIMENTO_FULL = "acidentados.data_nascimento"; + public static final String BILHETE_IDENTIDADE = "bilhete_identidade"; + public static final String BILHETE_IDENTIDADE_FULL = "acidentados.bilhete_identidade"; + public static final String MORADA = "morada"; + public static final String MORADA_FULL = "acidentados.morada"; + public static final String COD_POSTAL = "cod_postal"; + public static final String COD_POSTAL_FULL = "acidentados.cod_postal"; + public static final String LOCALIDADE = "localidade"; + public static final String LOCALIDADE_FULL = "acidentados.localidade"; + public static final String CONTACTO_TELEFONICO = "contacto_telefonico"; + public static final String CONTACTO_TELEFONICO_FULL = "acidentados.contacto_telefonico"; + public static final String DATA_ADMISSAO = "data_admissao"; + public static final String DATA_ADMISSAO_FULL = "acidentados.data_admissao"; + public static final String FUNCAO = "funcao"; + public static final String FUNCAO_FULL = "acidentados.funcao"; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "acidentados.trabalhador_id"; + public static final String TURNO = "turno"; + public static final String TURNO_FULL = "acidentados.turno"; + public static final String NUMERO_MECANOGRAFICO = "numero_mecanografico"; + public static final String NUMERO_MECANOGRAFICO_FULL = "acidentados.numero_mecanografico"; + public static final String NOME_SUPERIOR_HIERARQUICO = "nome_superior_hierarquico"; + public static final String NOME_SUPERIOR_HIERARQUICO_FULL = "acidentados.nome_superior_hierarquico"; + public static final String EMAIL_SUPERIOR_HIERARQUICO = "email_superior_hierarquico"; + public static final String EMAIL_SUPERIOR_HIERARQUICO_FULL = "acidentados.email_superior_hierarquico"; + public static final String ESTABELECIMENTO_ORIGEM = "estabelecimento_origem"; + public static final String ESTABELECIMENTO_ORIGEM_FULL = "acidentados.estabelecimento_origem"; + public static final String DATA_EMAIL_SUPERIOR_HIERARQUICO = "data_email_superior_hierarquico"; + public static final String DATA_EMAIL_SUPERIOR_HIERARQUICO_FULL = "acidentados.data_email_superior_hierarquico"; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, DATA_NASCIMENTO, BILHETE_IDENTIDADE, MORADA, COD_POSTAL, LOCALIDADE, + CONTACTO_TELEFONICO, DATA_ADMISSAO, FUNCAO, TRABALHADOR_ID, TURNO, + NUMERO_MECANOGRAFICO, NOME_SUPERIOR_HIERARQUICO, + EMAIL_SUPERIOR_HIERARQUICO, ESTABELECIMENTO_ORIGEM, + DATA_EMAIL_SUPERIOR_HIERARQUICO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, NOME, DATA_NASCIMENTO, BILHETE_IDENTIDADE, MORADA, COD_POSTAL, LOCALIDADE, + CONTACTO_TELEFONICO, DATA_ADMISSAO, FUNCAO, TRABALHADOR_ID, TURNO, + NUMERO_MECANOGRAFICO, NOME_SUPERIOR_HIERARQUICO, + EMAIL_SUPERIOR_HIERARQUICO, ESTABELECIMENTO_ORIGEM, + DATA_EMAIL_SUPERIOR_HIERARQUICO, }; + + private Map dataHash; + + public AcidentadosDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getNome() + { + return (String) get(NOME); + } + + public void setNome(String nomeValue ) + { + this.set(NOME, nomeValue ); + } + + public java.util.Date getData_nascimento() + { + return (java.util.Date) get(DATA_NASCIMENTO); + } + + public void setData_nascimento(java.util.Date data_nascimentoValue ) + { + this.set(DATA_NASCIMENTO, data_nascimentoValue ); + } + + public String getBilhete_identidade() + { + return (String) get(BILHETE_IDENTIDADE); + } + + public void setBilhete_identidade(String bilhete_identidadeValue ) + { + this.set(BILHETE_IDENTIDADE, bilhete_identidadeValue ); + } + + public String getMorada() + { + return (String) get(MORADA); + } + + public void setMorada(String moradaValue ) + { + this.set(MORADA, moradaValue ); + } + + public String getCod_postal() + { + return (String) get(COD_POSTAL); + } + + public void setCod_postal(String cod_postalValue ) + { + this.set(COD_POSTAL, cod_postalValue ); + } + + public String getLocalidade() + { + return (String) get(LOCALIDADE); + } + + public void setLocalidade(String localidadeValue ) + { + this.set(LOCALIDADE, localidadeValue ); + } + + public String getContacto_telefonico() + { + return (String) get(CONTACTO_TELEFONICO); + } + + public void setContacto_telefonico(String contacto_telefonicoValue ) + { + this.set(CONTACTO_TELEFONICO, contacto_telefonicoValue ); + } + + public java.util.Date getData_admissao() + { + return (java.util.Date) get(DATA_ADMISSAO); + } + + public void setData_admissao(java.util.Date data_admissaoValue ) + { + this.set(DATA_ADMISSAO, data_admissaoValue ); + } + + public String getFuncao() + { + return (String) get(FUNCAO); + } + + public void setFuncao(String funcaoValue ) + { + this.set(FUNCAO, funcaoValue ); + } + + public Integer getTrabalhador_id() + { + return (Integer) get(TRABALHADOR_ID); + } + + public void setTrabalhador_id(Integer trabalhador_idValue ) + { + this.set(TRABALHADOR_ID, trabalhador_idValue ); + } + + public String getTurno() + { + return (String) get(TURNO); + } + + public void setTurno(String turnoValue ) + { + this.set(TURNO, turnoValue ); + } + + public String getNumero_mecanografico() + { + return (String) get(NUMERO_MECANOGRAFICO); + } + + public void setNumero_mecanografico(String numero_mecanograficoValue ) + { + this.set(NUMERO_MECANOGRAFICO, numero_mecanograficoValue ); + } + + public String getNome_superior_hierarquico() + { + return (String) get(NOME_SUPERIOR_HIERARQUICO); + } + + public void setNome_superior_hierarquico(String nome_superior_hierarquicoValue ) + { + this.set(NOME_SUPERIOR_HIERARQUICO, nome_superior_hierarquicoValue ); + } + + public String getEmail_superior_hierarquico() + { + return (String) get(EMAIL_SUPERIOR_HIERARQUICO); + } + + public void setEmail_superior_hierarquico(String email_superior_hierarquicoValue ) + { + this.set(EMAIL_SUPERIOR_HIERARQUICO, email_superior_hierarquicoValue ); + } + + public String getEstabelecimento_origem() + { + return (String) get(ESTABELECIMENTO_ORIGEM); + } + + public void setEstabelecimento_origem(String estabelecimento_origemValue ) + { + this.set(ESTABELECIMENTO_ORIGEM, estabelecimento_origemValue ); + } + + public java.util.Date getData_email_superior_hierarquico() + { + return (java.util.Date) get(DATA_EMAIL_SUPERIOR_HIERARQUICO); + } + + public void setData_email_superior_hierarquico(java.util.Date data_email_superior_hierarquicoValue ) + { + this.set(DATA_EMAIL_SUPERIOR_HIERARQUICO, data_email_superior_hierarquicoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Acidentados.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Actualizacao.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Actualizacao.java new file mode 100644 index 00000000..9fd919c0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Actualizacao.java @@ -0,0 +1,44 @@ +/* +* Actualizacao.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class Actualizacao implements JDOInnerObject +{ + + public Actualizacao() + { + } + + public Object getField( String fieldName ) + { + return null; + } + + public void setField( String fieldName, Object value ) + { + } + + public Class getOuterClass() + { + return ActualizacaoDataAuto.class; + } + + public ActualizacaoDataAuto getOuterClassInstance() + { + ActualizacaoDataAuto outerObj = new ActualizacaoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Object getJDOPrimaryKey() + { + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ActualizacaoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ActualizacaoData.java new file mode 100644 index 00000000..2cad0c37 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ActualizacaoData.java @@ -0,0 +1,18 @@ +/* +* ActualizacaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class ActualizacaoData extends com.evolute.siprp.server.db.data.siprp.ActualizacaoDataAuto +{ + + public ActualizacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ActualizacaoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ActualizacaoDataAuto.java new file mode 100644 index 00000000..acabffc2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ActualizacaoDataAuto.java @@ -0,0 +1,67 @@ +/* +* ActualizacaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class ActualizacaoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "actualizacao"; + + + public static final String FIELD_NAMES[] = new String[]{ + }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + }; + + private Map dataHash; + + public ActualizacaoDataAuto() + { + dataHash = new HashMap(); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Actualizacao.class; + } + + public Object getJDOPrimaryKey() + { + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentes.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentes.java new file mode 100644 index 00000000..f04bb8e8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentes.java @@ -0,0 +1,2775 @@ +/* +* AnalisesAcidentes.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class AnalisesAcidentes implements JDOInnerObject +{ + private Integer id; + private java.util.Date data_acidente; + private Integer acidentado_id; + private Integer estado; + private Integer estabelecimento_id; + private Integer horas_turno; + private String local_trabalho; + private String tarefa; + private String substancias; + private String condicoes; + private String testemunhas; + private String descricao; + private String conclusoes; + private String accoes; + private java.sql.Time hora_acidente; + private String formacao_shst; + private String formacao_shst_nao_porque; + private String outros_acidentes_com_colaborador; + private Integer nr_acidentes_com_colaborador; + private Integer nr_relatorio_acidente_colaborador1; + private Integer nr_relatorio_acidente_colaborador2; + private Integer nr_relatorio_acidente_colaborador3; + private Integer nr_relatorio_acidente_colaborador4; + private String acidentes_outros_colaboradores; + private Integer nr_acidentes_outros_colaboradores; + private Integer nr_relatorio_acidente_outros_colaboradores1; + private Integer nr_relatorio_acidente_outros_colaboradores2; + private Integer nr_relatorio_acidente_outros_colaboradores3; + private Integer nr_relatorio_acidente_outros_colaboradores4; + private String lesao_cabeca; + private String lesao_pescoco; + private String lesao_tronco; + private String lesao_membro_sup_dir; + private String lesao_membro_sup_esq; + private String lesao_membro_inf_dir; + private String lesao_membro_inf_esq; + private String especif1; + private String especif2; + private String especif3; + private String especif4; + private String tipo_incapacidade; + private Integer coef_incapacidade; + private java.util.Date data_aval_incapacidade; + private java.util.Date data_rev_incapacidade; + private java.util.Date periodo_incapacidade_de; + private java.util.Date periodo_incapacidade_a; + private String img_flexao; + private String img_ext1; + private String img_ext2; + private String img_cab2; + private String img_cab3; + private String img_ma2; + private String img_ma3; + private String img_ma5; + private String img_ma6; + private String img_ma8; + private String img_ma10; + private Integer restricao_carga; + private String restricao_motricidade; + private String restricao_conducao; + private String restricao_vibracoes; + private String restricao_outras; + private String med_observ; + private String tipo_lesao; + private String img_rot1; + private String img_rot2; + private String img_cab1; + private String img_cab4; + private String img_ma1; + private String img_ma4; + private String img_ma7; + private String img_ma9; + private Integer empresa_id; + private Integer medico_id; + private Integer tecnico_saude_id; + private String analise_nr; + private Integer estado_assinatura; + private String ass_resp_seg; + private String ass_resp_rh; + private java.util.Date data_consolidacao; + private java.util.Date data_assinatura_seg; + private java.util.Date data_assinatura_rh; + private String ass_consolidacao; + private String nome_resp_seg; + private String nome_resp_rh; + private Integer causas; + private Integer estado_antes_correcao; + private String observacoes_correcao; + private String correcao; + private String ass_superior; + private String nome_superior; + private java.util.Date data_assinatura_superior; + private String averiguador; + private String averiguacao_posterior; + private String averiguacao_obs; + private java.util.Date data_inicio_processo; + private String nome_resp_consolidacao; + private Integer seccao_id; + private Integer departamento_id; + private Integer rh_fase4; + private String apagada; + + public AnalisesAcidentes() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == AnalisesAcidentesDataAuto.ID ) + { + return id; + } + else if( fieldName == AnalisesAcidentesDataAuto.DATA_ACIDENTE ) + { + return data_acidente; + } + else if( fieldName == AnalisesAcidentesDataAuto.ACIDENTADO_ID ) + { + return acidentado_id; + } + else if( fieldName == AnalisesAcidentesDataAuto.ESTADO ) + { + return estado; + } + else if( fieldName == AnalisesAcidentesDataAuto.ESTABELECIMENTO_ID ) + { + return estabelecimento_id; + } + else if( fieldName == AnalisesAcidentesDataAuto.HORAS_TURNO ) + { + return horas_turno; + } + else if( fieldName == AnalisesAcidentesDataAuto.LOCAL_TRABALHO ) + { + return local_trabalho; + } + else if( fieldName == AnalisesAcidentesDataAuto.TAREFA ) + { + return tarefa; + } + else if( fieldName == AnalisesAcidentesDataAuto.SUBSTANCIAS ) + { + return substancias; + } + else if( fieldName == AnalisesAcidentesDataAuto.CONDICOES ) + { + return condicoes; + } + else if( fieldName == AnalisesAcidentesDataAuto.TESTEMUNHAS ) + { + return testemunhas; + } + else if( fieldName == AnalisesAcidentesDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == AnalisesAcidentesDataAuto.CONCLUSOES ) + { + return conclusoes; + } + else if( fieldName == AnalisesAcidentesDataAuto.ACCOES ) + { + return accoes; + } + else if( fieldName == AnalisesAcidentesDataAuto.HORA_ACIDENTE ) + { + return hora_acidente; + } + else if( fieldName == AnalisesAcidentesDataAuto.FORMACAO_SHST ) + { + return formacao_shst; + } + else if( fieldName == AnalisesAcidentesDataAuto.FORMACAO_SHST_NAO_PORQUE ) + { + return formacao_shst_nao_porque; + } + else if( fieldName == AnalisesAcidentesDataAuto.OUTROS_ACIDENTES_COM_COLABORADOR ) + { + return outros_acidentes_com_colaborador; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_ACIDENTES_COM_COLABORADOR ) + { + return nr_acidentes_com_colaborador; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR1 ) + { + return nr_relatorio_acidente_colaborador1; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR2 ) + { + return nr_relatorio_acidente_colaborador2; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR3 ) + { + return nr_relatorio_acidente_colaborador3; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR4 ) + { + return nr_relatorio_acidente_colaborador4; + } + else if( fieldName == AnalisesAcidentesDataAuto.ACIDENTES_OUTROS_COLABORADORES ) + { + return acidentes_outros_colaboradores; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_ACIDENTES_OUTROS_COLABORADORES ) + { + return nr_acidentes_outros_colaboradores; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1 ) + { + return nr_relatorio_acidente_outros_colaboradores1; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2 ) + { + return nr_relatorio_acidente_outros_colaboradores2; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3 ) + { + return nr_relatorio_acidente_outros_colaboradores3; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4 ) + { + return nr_relatorio_acidente_outros_colaboradores4; + } + else if( fieldName == AnalisesAcidentesDataAuto.LESAO_CABECA ) + { + return lesao_cabeca; + } + else if( fieldName == AnalisesAcidentesDataAuto.LESAO_PESCOCO ) + { + return lesao_pescoco; + } + else if( fieldName == AnalisesAcidentesDataAuto.LESAO_TRONCO ) + { + return lesao_tronco; + } + else if( fieldName == AnalisesAcidentesDataAuto.LESAO_MEMBRO_SUP_DIR ) + { + return lesao_membro_sup_dir; + } + else if( fieldName == AnalisesAcidentesDataAuto.LESAO_MEMBRO_SUP_ESQ ) + { + return lesao_membro_sup_esq; + } + else if( fieldName == AnalisesAcidentesDataAuto.LESAO_MEMBRO_INF_DIR ) + { + return lesao_membro_inf_dir; + } + else if( fieldName == AnalisesAcidentesDataAuto.LESAO_MEMBRO_INF_ESQ ) + { + return lesao_membro_inf_esq; + } + else if( fieldName == AnalisesAcidentesDataAuto.ESPECIF1 ) + { + return especif1; + } + else if( fieldName == AnalisesAcidentesDataAuto.ESPECIF2 ) + { + return especif2; + } + else if( fieldName == AnalisesAcidentesDataAuto.ESPECIF3 ) + { + return especif3; + } + else if( fieldName == AnalisesAcidentesDataAuto.ESPECIF4 ) + { + return especif4; + } + else if( fieldName == AnalisesAcidentesDataAuto.TIPO_INCAPACIDADE ) + { + return tipo_incapacidade; + } + else if( fieldName == AnalisesAcidentesDataAuto.COEF_INCAPACIDADE ) + { + return coef_incapacidade; + } + else if( fieldName == AnalisesAcidentesDataAuto.DATA_AVAL_INCAPACIDADE ) + { + return data_aval_incapacidade; + } + else if( fieldName == AnalisesAcidentesDataAuto.DATA_REV_INCAPACIDADE ) + { + return data_rev_incapacidade; + } + else if( fieldName == AnalisesAcidentesDataAuto.PERIODO_INCAPACIDADE_DE ) + { + return periodo_incapacidade_de; + } + else if( fieldName == AnalisesAcidentesDataAuto.PERIODO_INCAPACIDADE_A ) + { + return periodo_incapacidade_a; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_FLEXAO ) + { + return img_flexao; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_EXT1 ) + { + return img_ext1; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_EXT2 ) + { + return img_ext2; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_CAB2 ) + { + return img_cab2; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_CAB3 ) + { + return img_cab3; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA2 ) + { + return img_ma2; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA3 ) + { + return img_ma3; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA5 ) + { + return img_ma5; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA6 ) + { + return img_ma6; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA8 ) + { + return img_ma8; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA10 ) + { + return img_ma10; + } + else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_CARGA ) + { + return restricao_carga; + } + else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_MOTRICIDADE ) + { + return restricao_motricidade; + } + else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_CONDUCAO ) + { + return restricao_conducao; + } + else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_VIBRACOES ) + { + return restricao_vibracoes; + } + else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_OUTRAS ) + { + return restricao_outras; + } + else if( fieldName == AnalisesAcidentesDataAuto.MED_OBSERV ) + { + return med_observ; + } + else if( fieldName == AnalisesAcidentesDataAuto.TIPO_LESAO ) + { + return tipo_lesao; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_ROT1 ) + { + return img_rot1; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_ROT2 ) + { + return img_rot2; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_CAB1 ) + { + return img_cab1; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_CAB4 ) + { + return img_cab4; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA1 ) + { + return img_ma1; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA4 ) + { + return img_ma4; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA7 ) + { + return img_ma7; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA9 ) + { + return img_ma9; + } + else if( fieldName == AnalisesAcidentesDataAuto.EMPRESA_ID ) + { + return empresa_id; + } + else if( fieldName == AnalisesAcidentesDataAuto.MEDICO_ID ) + { + return medico_id; + } + else if( fieldName == AnalisesAcidentesDataAuto.TECNICO_SAUDE_ID ) + { + return tecnico_saude_id; + } + else if( fieldName == AnalisesAcidentesDataAuto.ANALISE_NR ) + { + return analise_nr; + } + else if( fieldName == AnalisesAcidentesDataAuto.ESTADO_ASSINATURA ) + { + return estado_assinatura; + } + else if( fieldName == AnalisesAcidentesDataAuto.ASS_RESP_SEG ) + { + return ass_resp_seg; + } + else if( fieldName == AnalisesAcidentesDataAuto.ASS_RESP_RH ) + { + return ass_resp_rh; + } + else if( fieldName == AnalisesAcidentesDataAuto.DATA_CONSOLIDACAO ) + { + return data_consolidacao; + } + else if( fieldName == AnalisesAcidentesDataAuto.DATA_ASSINATURA_SEG ) + { + return data_assinatura_seg; + } + else if( fieldName == AnalisesAcidentesDataAuto.DATA_ASSINATURA_RH ) + { + return data_assinatura_rh; + } + else if( fieldName == AnalisesAcidentesDataAuto.ASS_CONSOLIDACAO ) + { + return ass_consolidacao; + } + else if( fieldName == AnalisesAcidentesDataAuto.NOME_RESP_SEG ) + { + return nome_resp_seg; + } + else if( fieldName == AnalisesAcidentesDataAuto.NOME_RESP_RH ) + { + return nome_resp_rh; + } + else if( fieldName == AnalisesAcidentesDataAuto.CAUSAS ) + { + return causas; + } + else if( fieldName == AnalisesAcidentesDataAuto.ESTADO_ANTES_CORRECAO ) + { + return estado_antes_correcao; + } + else if( fieldName == AnalisesAcidentesDataAuto.OBSERVACOES_CORRECAO ) + { + return observacoes_correcao; + } + else if( fieldName == AnalisesAcidentesDataAuto.CORRECAO ) + { + return correcao; + } + else if( fieldName == AnalisesAcidentesDataAuto.ASS_SUPERIOR ) + { + return ass_superior; + } + else if( fieldName == AnalisesAcidentesDataAuto.NOME_SUPERIOR ) + { + return nome_superior; + } + else if( fieldName == AnalisesAcidentesDataAuto.DATA_ASSINATURA_SUPERIOR ) + { + return data_assinatura_superior; + } + else if( fieldName == AnalisesAcidentesDataAuto.AVERIGUADOR ) + { + return averiguador; + } + else if( fieldName == AnalisesAcidentesDataAuto.AVERIGUACAO_POSTERIOR ) + { + return averiguacao_posterior; + } + else if( fieldName == AnalisesAcidentesDataAuto.AVERIGUACAO_OBS ) + { + return averiguacao_obs; + } + else if( fieldName == AnalisesAcidentesDataAuto.DATA_INICIO_PROCESSO ) + { + return data_inicio_processo; + } + else if( fieldName == AnalisesAcidentesDataAuto.NOME_RESP_CONSOLIDACAO ) + { + return nome_resp_consolidacao; + } + else if( fieldName == AnalisesAcidentesDataAuto.SECCAO_ID ) + { + return seccao_id; + } + else if( fieldName == AnalisesAcidentesDataAuto.DEPARTAMENTO_ID ) + { + return departamento_id; + } + else if( fieldName == AnalisesAcidentesDataAuto.RH_FASE4 ) + { + return rh_fase4; + } + else if( fieldName == AnalisesAcidentesDataAuto.APAGADA ) + { + return apagada; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_ACIDENTE ) ) + { + return data_acidente; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ACIDENTADO_ID ) ) + { + return acidentado_id; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ESTADO ) ) + { + return estado; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ESTABELECIMENTO_ID ) ) + { + return estabelecimento_id; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.HORAS_TURNO ) ) + { + return horas_turno; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.LOCAL_TRABALHO ) ) + { + return local_trabalho; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.TAREFA ) ) + { + return tarefa; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.SUBSTANCIAS ) ) + { + return substancias; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.CONDICOES ) ) + { + return condicoes; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.TESTEMUNHAS ) ) + { + return testemunhas; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.CONCLUSOES ) ) + { + return conclusoes; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ACCOES ) ) + { + return accoes; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.HORA_ACIDENTE ) ) + { + return hora_acidente; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.FORMACAO_SHST ) ) + { + return formacao_shst; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.FORMACAO_SHST_NAO_PORQUE ) ) + { + return formacao_shst_nao_porque; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.OUTROS_ACIDENTES_COM_COLABORADOR ) ) + { + return outros_acidentes_com_colaborador; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_ACIDENTES_COM_COLABORADOR ) ) + { + return nr_acidentes_com_colaborador; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR1 ) ) + { + return nr_relatorio_acidente_colaborador1; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR2 ) ) + { + return nr_relatorio_acidente_colaborador2; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR3 ) ) + { + return nr_relatorio_acidente_colaborador3; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR4 ) ) + { + return nr_relatorio_acidente_colaborador4; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ACIDENTES_OUTROS_COLABORADORES ) ) + { + return acidentes_outros_colaboradores; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_ACIDENTES_OUTROS_COLABORADORES ) ) + { + return nr_acidentes_outros_colaboradores; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1 ) ) + { + return nr_relatorio_acidente_outros_colaboradores1; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2 ) ) + { + return nr_relatorio_acidente_outros_colaboradores2; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3 ) ) + { + return nr_relatorio_acidente_outros_colaboradores3; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4 ) ) + { + return nr_relatorio_acidente_outros_colaboradores4; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_CABECA ) ) + { + return lesao_cabeca; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_PESCOCO ) ) + { + return lesao_pescoco; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_TRONCO ) ) + { + return lesao_tronco; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_MEMBRO_SUP_DIR ) ) + { + return lesao_membro_sup_dir; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_MEMBRO_SUP_ESQ ) ) + { + return lesao_membro_sup_esq; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_MEMBRO_INF_DIR ) ) + { + return lesao_membro_inf_dir; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_MEMBRO_INF_ESQ ) ) + { + return lesao_membro_inf_esq; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ESPECIF1 ) ) + { + return especif1; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ESPECIF2 ) ) + { + return especif2; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ESPECIF3 ) ) + { + return especif3; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ESPECIF4 ) ) + { + return especif4; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.TIPO_INCAPACIDADE ) ) + { + return tipo_incapacidade; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.COEF_INCAPACIDADE ) ) + { + return coef_incapacidade; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_AVAL_INCAPACIDADE ) ) + { + return data_aval_incapacidade; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_REV_INCAPACIDADE ) ) + { + return data_rev_incapacidade; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.PERIODO_INCAPACIDADE_DE ) ) + { + return periodo_incapacidade_de; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.PERIODO_INCAPACIDADE_A ) ) + { + return periodo_incapacidade_a; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_FLEXAO ) ) + { + return img_flexao; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_EXT1 ) ) + { + return img_ext1; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_EXT2 ) ) + { + return img_ext2; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_CAB2 ) ) + { + return img_cab2; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_CAB3 ) ) + { + return img_cab3; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA2 ) ) + { + return img_ma2; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA3 ) ) + { + return img_ma3; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA5 ) ) + { + return img_ma5; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA6 ) ) + { + return img_ma6; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA8 ) ) + { + return img_ma8; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA10 ) ) + { + return img_ma10; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_CARGA ) ) + { + return restricao_carga; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_MOTRICIDADE ) ) + { + return restricao_motricidade; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_CONDUCAO ) ) + { + return restricao_conducao; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_VIBRACOES ) ) + { + return restricao_vibracoes; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_OUTRAS ) ) + { + return restricao_outras; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.MED_OBSERV ) ) + { + return med_observ; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.TIPO_LESAO ) ) + { + return tipo_lesao; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_ROT1 ) ) + { + return img_rot1; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_ROT2 ) ) + { + return img_rot2; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_CAB1 ) ) + { + return img_cab1; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_CAB4 ) ) + { + return img_cab4; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA1 ) ) + { + return img_ma1; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA4 ) ) + { + return img_ma4; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA7 ) ) + { + return img_ma7; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA9 ) ) + { + return img_ma9; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.EMPRESA_ID ) ) + { + return empresa_id; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.MEDICO_ID ) ) + { + return medico_id; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.TECNICO_SAUDE_ID ) ) + { + return tecnico_saude_id; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ANALISE_NR ) ) + { + return analise_nr; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ESTADO_ASSINATURA ) ) + { + return estado_assinatura; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ASS_RESP_SEG ) ) + { + return ass_resp_seg; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ASS_RESP_RH ) ) + { + return ass_resp_rh; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_CONSOLIDACAO ) ) + { + return data_consolidacao; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_ASSINATURA_SEG ) ) + { + return data_assinatura_seg; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_ASSINATURA_RH ) ) + { + return data_assinatura_rh; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ASS_CONSOLIDACAO ) ) + { + return ass_consolidacao; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NOME_RESP_SEG ) ) + { + return nome_resp_seg; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NOME_RESP_RH ) ) + { + return nome_resp_rh; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.CAUSAS ) ) + { + return causas; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ESTADO_ANTES_CORRECAO ) ) + { + return estado_antes_correcao; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.OBSERVACOES_CORRECAO ) ) + { + return observacoes_correcao; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.CORRECAO ) ) + { + return correcao; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ASS_SUPERIOR ) ) + { + return ass_superior; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NOME_SUPERIOR ) ) + { + return nome_superior; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_ASSINATURA_SUPERIOR ) ) + { + return data_assinatura_superior; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.AVERIGUADOR ) ) + { + return averiguador; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.AVERIGUACAO_POSTERIOR ) ) + { + return averiguacao_posterior; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.AVERIGUACAO_OBS ) ) + { + return averiguacao_obs; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_INICIO_PROCESSO ) ) + { + return data_inicio_processo; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NOME_RESP_CONSOLIDACAO ) ) + { + return nome_resp_consolidacao; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.SECCAO_ID ) ) + { + return seccao_id; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DEPARTAMENTO_ID ) ) + { + return departamento_id; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.RH_FASE4 ) ) + { + return rh_fase4; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.APAGADA ) ) + { + return apagada; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == AnalisesAcidentesDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.DATA_ACIDENTE ) + { + data_acidente = ( java.util.Date ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.ACIDENTADO_ID ) + { + acidentado_id = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.ESTADO ) + { + estado = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.ESTABELECIMENTO_ID ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.HORAS_TURNO ) + { + horas_turno = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.LOCAL_TRABALHO ) + { + local_trabalho = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.TAREFA ) + { + tarefa = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.SUBSTANCIAS ) + { + substancias = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.CONDICOES ) + { + condicoes = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.TESTEMUNHAS ) + { + testemunhas = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.CONCLUSOES ) + { + conclusoes = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.ACCOES ) + { + accoes = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.HORA_ACIDENTE ) + { + hora_acidente = ( java.sql.Time ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.FORMACAO_SHST ) + { + formacao_shst = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.FORMACAO_SHST_NAO_PORQUE ) + { + formacao_shst_nao_porque = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.OUTROS_ACIDENTES_COM_COLABORADOR ) + { + outros_acidentes_com_colaborador = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_ACIDENTES_COM_COLABORADOR ) + { + nr_acidentes_com_colaborador = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR1 ) + { + nr_relatorio_acidente_colaborador1 = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR2 ) + { + nr_relatorio_acidente_colaborador2 = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR3 ) + { + nr_relatorio_acidente_colaborador3 = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR4 ) + { + nr_relatorio_acidente_colaborador4 = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.ACIDENTES_OUTROS_COLABORADORES ) + { + acidentes_outros_colaboradores = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_ACIDENTES_OUTROS_COLABORADORES ) + { + nr_acidentes_outros_colaboradores = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1 ) + { + nr_relatorio_acidente_outros_colaboradores1 = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2 ) + { + nr_relatorio_acidente_outros_colaboradores2 = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3 ) + { + nr_relatorio_acidente_outros_colaboradores3 = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4 ) + { + nr_relatorio_acidente_outros_colaboradores4 = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.LESAO_CABECA ) + { + lesao_cabeca = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.LESAO_PESCOCO ) + { + lesao_pescoco = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.LESAO_TRONCO ) + { + lesao_tronco = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.LESAO_MEMBRO_SUP_DIR ) + { + lesao_membro_sup_dir = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.LESAO_MEMBRO_SUP_ESQ ) + { + lesao_membro_sup_esq = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.LESAO_MEMBRO_INF_DIR ) + { + lesao_membro_inf_dir = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.LESAO_MEMBRO_INF_ESQ ) + { + lesao_membro_inf_esq = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.ESPECIF1 ) + { + especif1 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.ESPECIF2 ) + { + especif2 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.ESPECIF3 ) + { + especif3 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.ESPECIF4 ) + { + especif4 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.TIPO_INCAPACIDADE ) + { + tipo_incapacidade = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.COEF_INCAPACIDADE ) + { + coef_incapacidade = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.DATA_AVAL_INCAPACIDADE ) + { + data_aval_incapacidade = ( java.util.Date ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.DATA_REV_INCAPACIDADE ) + { + data_rev_incapacidade = ( java.util.Date ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.PERIODO_INCAPACIDADE_DE ) + { + periodo_incapacidade_de = ( java.util.Date ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.PERIODO_INCAPACIDADE_A ) + { + periodo_incapacidade_a = ( java.util.Date ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_FLEXAO ) + { + img_flexao = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_EXT1 ) + { + img_ext1 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_EXT2 ) + { + img_ext2 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_CAB2 ) + { + img_cab2 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_CAB3 ) + { + img_cab3 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA2 ) + { + img_ma2 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA3 ) + { + img_ma3 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA5 ) + { + img_ma5 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA6 ) + { + img_ma6 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA8 ) + { + img_ma8 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA10 ) + { + img_ma10 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_CARGA ) + { + restricao_carga = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_MOTRICIDADE ) + { + restricao_motricidade = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_CONDUCAO ) + { + restricao_conducao = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_VIBRACOES ) + { + restricao_vibracoes = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_OUTRAS ) + { + restricao_outras = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.MED_OBSERV ) + { + med_observ = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.TIPO_LESAO ) + { + tipo_lesao = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_ROT1 ) + { + img_rot1 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_ROT2 ) + { + img_rot2 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_CAB1 ) + { + img_cab1 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_CAB4 ) + { + img_cab4 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA1 ) + { + img_ma1 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA4 ) + { + img_ma4 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA7 ) + { + img_ma7 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA9 ) + { + img_ma9 = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.EMPRESA_ID ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.MEDICO_ID ) + { + medico_id = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.TECNICO_SAUDE_ID ) + { + tecnico_saude_id = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.ANALISE_NR ) + { + analise_nr = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.ESTADO_ASSINATURA ) + { + estado_assinatura = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.ASS_RESP_SEG ) + { + ass_resp_seg = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.ASS_RESP_RH ) + { + ass_resp_rh = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.DATA_CONSOLIDACAO ) + { + data_consolidacao = ( java.util.Date ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.DATA_ASSINATURA_SEG ) + { + data_assinatura_seg = ( java.util.Date ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.DATA_ASSINATURA_RH ) + { + data_assinatura_rh = ( java.util.Date ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.ASS_CONSOLIDACAO ) + { + ass_consolidacao = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.NOME_RESP_SEG ) + { + nome_resp_seg = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.NOME_RESP_RH ) + { + nome_resp_rh = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.CAUSAS ) + { + causas = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.ESTADO_ANTES_CORRECAO ) + { + estado_antes_correcao = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.OBSERVACOES_CORRECAO ) + { + observacoes_correcao = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.CORRECAO ) + { + correcao = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.ASS_SUPERIOR ) + { + ass_superior = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.NOME_SUPERIOR ) + { + nome_superior = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.DATA_ASSINATURA_SUPERIOR ) + { + data_assinatura_superior = ( java.util.Date ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.AVERIGUADOR ) + { + averiguador = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.AVERIGUACAO_POSTERIOR ) + { + averiguacao_posterior = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.AVERIGUACAO_OBS ) + { + averiguacao_obs = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.DATA_INICIO_PROCESSO ) + { + data_inicio_processo = ( java.util.Date ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.NOME_RESP_CONSOLIDACAO ) + { + nome_resp_consolidacao = ( String ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.SECCAO_ID ) + { + seccao_id = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.DEPARTAMENTO_ID ) + { + departamento_id = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.RH_FASE4 ) + { + rh_fase4 = ( Integer ) value; + } + else if( fieldName == AnalisesAcidentesDataAuto.APAGADA ) + { + apagada = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_ACIDENTE ) ) + { + data_acidente = ( java.util.Date ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ACIDENTADO_ID ) ) + { + acidentado_id = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ESTADO ) ) + { + estado = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ESTABELECIMENTO_ID ) ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.HORAS_TURNO ) ) + { + horas_turno = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.LOCAL_TRABALHO ) ) + { + local_trabalho = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.TAREFA ) ) + { + tarefa = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.SUBSTANCIAS ) ) + { + substancias = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.CONDICOES ) ) + { + condicoes = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.TESTEMUNHAS ) ) + { + testemunhas = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.CONCLUSOES ) ) + { + conclusoes = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ACCOES ) ) + { + accoes = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.HORA_ACIDENTE ) ) + { + hora_acidente = ( java.sql.Time ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.FORMACAO_SHST ) ) + { + formacao_shst = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.FORMACAO_SHST_NAO_PORQUE ) ) + { + formacao_shst_nao_porque = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.OUTROS_ACIDENTES_COM_COLABORADOR ) ) + { + outros_acidentes_com_colaborador = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_ACIDENTES_COM_COLABORADOR ) ) + { + nr_acidentes_com_colaborador = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR1 ) ) + { + nr_relatorio_acidente_colaborador1 = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR2 ) ) + { + nr_relatorio_acidente_colaborador2 = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR3 ) ) + { + nr_relatorio_acidente_colaborador3 = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR4 ) ) + { + nr_relatorio_acidente_colaborador4 = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ACIDENTES_OUTROS_COLABORADORES ) ) + { + acidentes_outros_colaboradores = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_ACIDENTES_OUTROS_COLABORADORES ) ) + { + nr_acidentes_outros_colaboradores = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1 ) ) + { + nr_relatorio_acidente_outros_colaboradores1 = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2 ) ) + { + nr_relatorio_acidente_outros_colaboradores2 = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3 ) ) + { + nr_relatorio_acidente_outros_colaboradores3 = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4 ) ) + { + nr_relatorio_acidente_outros_colaboradores4 = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_CABECA ) ) + { + lesao_cabeca = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_PESCOCO ) ) + { + lesao_pescoco = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_TRONCO ) ) + { + lesao_tronco = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_MEMBRO_SUP_DIR ) ) + { + lesao_membro_sup_dir = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_MEMBRO_SUP_ESQ ) ) + { + lesao_membro_sup_esq = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_MEMBRO_INF_DIR ) ) + { + lesao_membro_inf_dir = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_MEMBRO_INF_ESQ ) ) + { + lesao_membro_inf_esq = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ESPECIF1 ) ) + { + especif1 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ESPECIF2 ) ) + { + especif2 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ESPECIF3 ) ) + { + especif3 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ESPECIF4 ) ) + { + especif4 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.TIPO_INCAPACIDADE ) ) + { + tipo_incapacidade = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.COEF_INCAPACIDADE ) ) + { + coef_incapacidade = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_AVAL_INCAPACIDADE ) ) + { + data_aval_incapacidade = ( java.util.Date ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_REV_INCAPACIDADE ) ) + { + data_rev_incapacidade = ( java.util.Date ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.PERIODO_INCAPACIDADE_DE ) ) + { + periodo_incapacidade_de = ( java.util.Date ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.PERIODO_INCAPACIDADE_A ) ) + { + periodo_incapacidade_a = ( java.util.Date ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_FLEXAO ) ) + { + img_flexao = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_EXT1 ) ) + { + img_ext1 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_EXT2 ) ) + { + img_ext2 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_CAB2 ) ) + { + img_cab2 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_CAB3 ) ) + { + img_cab3 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA2 ) ) + { + img_ma2 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA3 ) ) + { + img_ma3 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA5 ) ) + { + img_ma5 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA6 ) ) + { + img_ma6 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA8 ) ) + { + img_ma8 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA10 ) ) + { + img_ma10 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_CARGA ) ) + { + restricao_carga = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_MOTRICIDADE ) ) + { + restricao_motricidade = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_CONDUCAO ) ) + { + restricao_conducao = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_VIBRACOES ) ) + { + restricao_vibracoes = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_OUTRAS ) ) + { + restricao_outras = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.MED_OBSERV ) ) + { + med_observ = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.TIPO_LESAO ) ) + { + tipo_lesao = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_ROT1 ) ) + { + img_rot1 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_ROT2 ) ) + { + img_rot2 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_CAB1 ) ) + { + img_cab1 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_CAB4 ) ) + { + img_cab4 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA1 ) ) + { + img_ma1 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA4 ) ) + { + img_ma4 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA7 ) ) + { + img_ma7 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA9 ) ) + { + img_ma9 = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.EMPRESA_ID ) ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.MEDICO_ID ) ) + { + medico_id = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.TECNICO_SAUDE_ID ) ) + { + tecnico_saude_id = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ANALISE_NR ) ) + { + analise_nr = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ESTADO_ASSINATURA ) ) + { + estado_assinatura = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ASS_RESP_SEG ) ) + { + ass_resp_seg = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ASS_RESP_RH ) ) + { + ass_resp_rh = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_CONSOLIDACAO ) ) + { + data_consolidacao = ( java.util.Date ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_ASSINATURA_SEG ) ) + { + data_assinatura_seg = ( java.util.Date ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_ASSINATURA_RH ) ) + { + data_assinatura_rh = ( java.util.Date ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ASS_CONSOLIDACAO ) ) + { + ass_consolidacao = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NOME_RESP_SEG ) ) + { + nome_resp_seg = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NOME_RESP_RH ) ) + { + nome_resp_rh = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.CAUSAS ) ) + { + causas = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ESTADO_ANTES_CORRECAO ) ) + { + estado_antes_correcao = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.OBSERVACOES_CORRECAO ) ) + { + observacoes_correcao = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.CORRECAO ) ) + { + correcao = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.ASS_SUPERIOR ) ) + { + ass_superior = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NOME_SUPERIOR ) ) + { + nome_superior = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_ASSINATURA_SUPERIOR ) ) + { + data_assinatura_superior = ( java.util.Date ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.AVERIGUADOR ) ) + { + averiguador = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.AVERIGUACAO_POSTERIOR ) ) + { + averiguacao_posterior = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.AVERIGUACAO_OBS ) ) + { + averiguacao_obs = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_INICIO_PROCESSO ) ) + { + data_inicio_processo = ( java.util.Date ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.NOME_RESP_CONSOLIDACAO ) ) + { + nome_resp_consolidacao = ( String ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.SECCAO_ID ) ) + { + seccao_id = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.DEPARTAMENTO_ID ) ) + { + departamento_id = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.RH_FASE4 ) ) + { + rh_fase4 = ( Integer ) value; + } + else if( fieldName.equals( AnalisesAcidentesDataAuto.APAGADA ) ) + { + apagada = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public java.util.Date getData_acidente() + { + return data_acidente; + } + + public void setData_acidente(java.util.Date data_acidenteValue ) + { + this.data_acidente = data_acidenteValue; + } + + public Integer getAcidentado_id() + { + return acidentado_id; + } + + public void setAcidentado_id(Integer acidentado_idValue ) + { + this.acidentado_id = acidentado_idValue; + } + + public Integer getEstado() + { + return estado; + } + + public void setEstado(Integer estadoValue ) + { + this.estado = estadoValue; + } + + public Integer getEstabelecimento_id() + { + return estabelecimento_id; + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + this.estabelecimento_id = estabelecimento_idValue; + } + + public Integer getHoras_turno() + { + return horas_turno; + } + + public void setHoras_turno(Integer horas_turnoValue ) + { + this.horas_turno = horas_turnoValue; + } + + public String getLocal_trabalho() + { + return local_trabalho; + } + + public void setLocal_trabalho(String local_trabalhoValue ) + { + this.local_trabalho = local_trabalhoValue; + } + + public String getTarefa() + { + return tarefa; + } + + public void setTarefa(String tarefaValue ) + { + this.tarefa = tarefaValue; + } + + public String getSubstancias() + { + return substancias; + } + + public void setSubstancias(String substanciasValue ) + { + this.substancias = substanciasValue; + } + + public String getCondicoes() + { + return condicoes; + } + + public void setCondicoes(String condicoesValue ) + { + this.condicoes = condicoesValue; + } + + public String getTestemunhas() + { + return testemunhas; + } + + public void setTestemunhas(String testemunhasValue ) + { + this.testemunhas = testemunhasValue; + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public String getConclusoes() + { + return conclusoes; + } + + public void setConclusoes(String conclusoesValue ) + { + this.conclusoes = conclusoesValue; + } + + public String getAccoes() + { + return accoes; + } + + public void setAccoes(String accoesValue ) + { + this.accoes = accoesValue; + } + + public java.sql.Time getHora_acidente() + { + return hora_acidente; + } + + public void setHora_acidente(java.sql.Time hora_acidenteValue ) + { + this.hora_acidente = hora_acidenteValue; + } + + public String getFormacao_shst() + { + return formacao_shst; + } + + public void setFormacao_shst(String formacao_shstValue ) + { + this.formacao_shst = formacao_shstValue; + } + + public String getFormacao_shst_nao_porque() + { + return formacao_shst_nao_porque; + } + + public void setFormacao_shst_nao_porque(String formacao_shst_nao_porqueValue ) + { + this.formacao_shst_nao_porque = formacao_shst_nao_porqueValue; + } + + public String getOutros_acidentes_com_colaborador() + { + return outros_acidentes_com_colaborador; + } + + public void setOutros_acidentes_com_colaborador(String outros_acidentes_com_colaboradorValue ) + { + this.outros_acidentes_com_colaborador = outros_acidentes_com_colaboradorValue; + } + + public Integer getNr_acidentes_com_colaborador() + { + return nr_acidentes_com_colaborador; + } + + public void setNr_acidentes_com_colaborador(Integer nr_acidentes_com_colaboradorValue ) + { + this.nr_acidentes_com_colaborador = nr_acidentes_com_colaboradorValue; + } + + public Integer getNr_relatorio_acidente_colaborador1() + { + return nr_relatorio_acidente_colaborador1; + } + + public void setNr_relatorio_acidente_colaborador1(Integer nr_relatorio_acidente_colaborador1Value ) + { + this.nr_relatorio_acidente_colaborador1 = nr_relatorio_acidente_colaborador1Value; + } + + public Integer getNr_relatorio_acidente_colaborador2() + { + return nr_relatorio_acidente_colaborador2; + } + + public void setNr_relatorio_acidente_colaborador2(Integer nr_relatorio_acidente_colaborador2Value ) + { + this.nr_relatorio_acidente_colaborador2 = nr_relatorio_acidente_colaborador2Value; + } + + public Integer getNr_relatorio_acidente_colaborador3() + { + return nr_relatorio_acidente_colaborador3; + } + + public void setNr_relatorio_acidente_colaborador3(Integer nr_relatorio_acidente_colaborador3Value ) + { + this.nr_relatorio_acidente_colaborador3 = nr_relatorio_acidente_colaborador3Value; + } + + public Integer getNr_relatorio_acidente_colaborador4() + { + return nr_relatorio_acidente_colaborador4; + } + + public void setNr_relatorio_acidente_colaborador4(Integer nr_relatorio_acidente_colaborador4Value ) + { + this.nr_relatorio_acidente_colaborador4 = nr_relatorio_acidente_colaborador4Value; + } + + public String getAcidentes_outros_colaboradores() + { + return acidentes_outros_colaboradores; + } + + public void setAcidentes_outros_colaboradores(String acidentes_outros_colaboradoresValue ) + { + this.acidentes_outros_colaboradores = acidentes_outros_colaboradoresValue; + } + + public Integer getNr_acidentes_outros_colaboradores() + { + return nr_acidentes_outros_colaboradores; + } + + public void setNr_acidentes_outros_colaboradores(Integer nr_acidentes_outros_colaboradoresValue ) + { + this.nr_acidentes_outros_colaboradores = nr_acidentes_outros_colaboradoresValue; + } + + public Integer getNr_relatorio_acidente_outros_colaboradores1() + { + return nr_relatorio_acidente_outros_colaboradores1; + } + + public void setNr_relatorio_acidente_outros_colaboradores1(Integer nr_relatorio_acidente_outros_colaboradores1Value ) + { + this.nr_relatorio_acidente_outros_colaboradores1 = nr_relatorio_acidente_outros_colaboradores1Value; + } + + public Integer getNr_relatorio_acidente_outros_colaboradores2() + { + return nr_relatorio_acidente_outros_colaboradores2; + } + + public void setNr_relatorio_acidente_outros_colaboradores2(Integer nr_relatorio_acidente_outros_colaboradores2Value ) + { + this.nr_relatorio_acidente_outros_colaboradores2 = nr_relatorio_acidente_outros_colaboradores2Value; + } + + public Integer getNr_relatorio_acidente_outros_colaboradores3() + { + return nr_relatorio_acidente_outros_colaboradores3; + } + + public void setNr_relatorio_acidente_outros_colaboradores3(Integer nr_relatorio_acidente_outros_colaboradores3Value ) + { + this.nr_relatorio_acidente_outros_colaboradores3 = nr_relatorio_acidente_outros_colaboradores3Value; + } + + public Integer getNr_relatorio_acidente_outros_colaboradores4() + { + return nr_relatorio_acidente_outros_colaboradores4; + } + + public void setNr_relatorio_acidente_outros_colaboradores4(Integer nr_relatorio_acidente_outros_colaboradores4Value ) + { + this.nr_relatorio_acidente_outros_colaboradores4 = nr_relatorio_acidente_outros_colaboradores4Value; + } + + public String getLesao_cabeca() + { + return lesao_cabeca; + } + + public void setLesao_cabeca(String lesao_cabecaValue ) + { + this.lesao_cabeca = lesao_cabecaValue; + } + + public String getLesao_pescoco() + { + return lesao_pescoco; + } + + public void setLesao_pescoco(String lesao_pescocoValue ) + { + this.lesao_pescoco = lesao_pescocoValue; + } + + public String getLesao_tronco() + { + return lesao_tronco; + } + + public void setLesao_tronco(String lesao_troncoValue ) + { + this.lesao_tronco = lesao_troncoValue; + } + + public String getLesao_membro_sup_dir() + { + return lesao_membro_sup_dir; + } + + public void setLesao_membro_sup_dir(String lesao_membro_sup_dirValue ) + { + this.lesao_membro_sup_dir = lesao_membro_sup_dirValue; + } + + public String getLesao_membro_sup_esq() + { + return lesao_membro_sup_esq; + } + + public void setLesao_membro_sup_esq(String lesao_membro_sup_esqValue ) + { + this.lesao_membro_sup_esq = lesao_membro_sup_esqValue; + } + + public String getLesao_membro_inf_dir() + { + return lesao_membro_inf_dir; + } + + public void setLesao_membro_inf_dir(String lesao_membro_inf_dirValue ) + { + this.lesao_membro_inf_dir = lesao_membro_inf_dirValue; + } + + public String getLesao_membro_inf_esq() + { + return lesao_membro_inf_esq; + } + + public void setLesao_membro_inf_esq(String lesao_membro_inf_esqValue ) + { + this.lesao_membro_inf_esq = lesao_membro_inf_esqValue; + } + + public String getEspecif1() + { + return especif1; + } + + public void setEspecif1(String especif1Value ) + { + this.especif1 = especif1Value; + } + + public String getEspecif2() + { + return especif2; + } + + public void setEspecif2(String especif2Value ) + { + this.especif2 = especif2Value; + } + + public String getEspecif3() + { + return especif3; + } + + public void setEspecif3(String especif3Value ) + { + this.especif3 = especif3Value; + } + + public String getEspecif4() + { + return especif4; + } + + public void setEspecif4(String especif4Value ) + { + this.especif4 = especif4Value; + } + + public String getTipo_incapacidade() + { + return tipo_incapacidade; + } + + public void setTipo_incapacidade(String tipo_incapacidadeValue ) + { + this.tipo_incapacidade = tipo_incapacidadeValue; + } + + public Integer getCoef_incapacidade() + { + return coef_incapacidade; + } + + public void setCoef_incapacidade(Integer coef_incapacidadeValue ) + { + this.coef_incapacidade = coef_incapacidadeValue; + } + + public java.util.Date getData_aval_incapacidade() + { + return data_aval_incapacidade; + } + + public void setData_aval_incapacidade(java.util.Date data_aval_incapacidadeValue ) + { + this.data_aval_incapacidade = data_aval_incapacidadeValue; + } + + public java.util.Date getData_rev_incapacidade() + { + return data_rev_incapacidade; + } + + public void setData_rev_incapacidade(java.util.Date data_rev_incapacidadeValue ) + { + this.data_rev_incapacidade = data_rev_incapacidadeValue; + } + + public java.util.Date getPeriodo_incapacidade_de() + { + return periodo_incapacidade_de; + } + + public void setPeriodo_incapacidade_de(java.util.Date periodo_incapacidade_deValue ) + { + this.periodo_incapacidade_de = periodo_incapacidade_deValue; + } + + public java.util.Date getPeriodo_incapacidade_a() + { + return periodo_incapacidade_a; + } + + public void setPeriodo_incapacidade_a(java.util.Date periodo_incapacidade_aValue ) + { + this.periodo_incapacidade_a = periodo_incapacidade_aValue; + } + + public String getImg_flexao() + { + return img_flexao; + } + + public void setImg_flexao(String img_flexaoValue ) + { + this.img_flexao = img_flexaoValue; + } + + public String getImg_ext1() + { + return img_ext1; + } + + public void setImg_ext1(String img_ext1Value ) + { + this.img_ext1 = img_ext1Value; + } + + public String getImg_ext2() + { + return img_ext2; + } + + public void setImg_ext2(String img_ext2Value ) + { + this.img_ext2 = img_ext2Value; + } + + public String getImg_cab2() + { + return img_cab2; + } + + public void setImg_cab2(String img_cab2Value ) + { + this.img_cab2 = img_cab2Value; + } + + public String getImg_cab3() + { + return img_cab3; + } + + public void setImg_cab3(String img_cab3Value ) + { + this.img_cab3 = img_cab3Value; + } + + public String getImg_ma2() + { + return img_ma2; + } + + public void setImg_ma2(String img_ma2Value ) + { + this.img_ma2 = img_ma2Value; + } + + public String getImg_ma3() + { + return img_ma3; + } + + public void setImg_ma3(String img_ma3Value ) + { + this.img_ma3 = img_ma3Value; + } + + public String getImg_ma5() + { + return img_ma5; + } + + public void setImg_ma5(String img_ma5Value ) + { + this.img_ma5 = img_ma5Value; + } + + public String getImg_ma6() + { + return img_ma6; + } + + public void setImg_ma6(String img_ma6Value ) + { + this.img_ma6 = img_ma6Value; + } + + public String getImg_ma8() + { + return img_ma8; + } + + public void setImg_ma8(String img_ma8Value ) + { + this.img_ma8 = img_ma8Value; + } + + public String getImg_ma10() + { + return img_ma10; + } + + public void setImg_ma10(String img_ma10Value ) + { + this.img_ma10 = img_ma10Value; + } + + public Integer getRestricao_carga() + { + return restricao_carga; + } + + public void setRestricao_carga(Integer restricao_cargaValue ) + { + this.restricao_carga = restricao_cargaValue; + } + + public String getRestricao_motricidade() + { + return restricao_motricidade; + } + + public void setRestricao_motricidade(String restricao_motricidadeValue ) + { + this.restricao_motricidade = restricao_motricidadeValue; + } + + public String getRestricao_conducao() + { + return restricao_conducao; + } + + public void setRestricao_conducao(String restricao_conducaoValue ) + { + this.restricao_conducao = restricao_conducaoValue; + } + + public String getRestricao_vibracoes() + { + return restricao_vibracoes; + } + + public void setRestricao_vibracoes(String restricao_vibracoesValue ) + { + this.restricao_vibracoes = restricao_vibracoesValue; + } + + public String getRestricao_outras() + { + return restricao_outras; + } + + public void setRestricao_outras(String restricao_outrasValue ) + { + this.restricao_outras = restricao_outrasValue; + } + + public String getMed_observ() + { + return med_observ; + } + + public void setMed_observ(String med_observValue ) + { + this.med_observ = med_observValue; + } + + public String getTipo_lesao() + { + return tipo_lesao; + } + + public void setTipo_lesao(String tipo_lesaoValue ) + { + this.tipo_lesao = tipo_lesaoValue; + } + + public String getImg_rot1() + { + return img_rot1; + } + + public void setImg_rot1(String img_rot1Value ) + { + this.img_rot1 = img_rot1Value; + } + + public String getImg_rot2() + { + return img_rot2; + } + + public void setImg_rot2(String img_rot2Value ) + { + this.img_rot2 = img_rot2Value; + } + + public String getImg_cab1() + { + return img_cab1; + } + + public void setImg_cab1(String img_cab1Value ) + { + this.img_cab1 = img_cab1Value; + } + + public String getImg_cab4() + { + return img_cab4; + } + + public void setImg_cab4(String img_cab4Value ) + { + this.img_cab4 = img_cab4Value; + } + + public String getImg_ma1() + { + return img_ma1; + } + + public void setImg_ma1(String img_ma1Value ) + { + this.img_ma1 = img_ma1Value; + } + + public String getImg_ma4() + { + return img_ma4; + } + + public void setImg_ma4(String img_ma4Value ) + { + this.img_ma4 = img_ma4Value; + } + + public String getImg_ma7() + { + return img_ma7; + } + + public void setImg_ma7(String img_ma7Value ) + { + this.img_ma7 = img_ma7Value; + } + + public String getImg_ma9() + { + return img_ma9; + } + + public void setImg_ma9(String img_ma9Value ) + { + this.img_ma9 = img_ma9Value; + } + + public Integer getEmpresa_id() + { + return empresa_id; + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + this.empresa_id = empresa_idValue; + } + + public Integer getMedico_id() + { + return medico_id; + } + + public void setMedico_id(Integer medico_idValue ) + { + this.medico_id = medico_idValue; + } + + public Integer getTecnico_saude_id() + { + return tecnico_saude_id; + } + + public void setTecnico_saude_id(Integer tecnico_saude_idValue ) + { + this.tecnico_saude_id = tecnico_saude_idValue; + } + + public String getAnalise_nr() + { + return analise_nr; + } + + public void setAnalise_nr(String analise_nrValue ) + { + this.analise_nr = analise_nrValue; + } + + public Integer getEstado_assinatura() + { + return estado_assinatura; + } + + public void setEstado_assinatura(Integer estado_assinaturaValue ) + { + this.estado_assinatura = estado_assinaturaValue; + } + + public String getAss_resp_seg() + { + return ass_resp_seg; + } + + public void setAss_resp_seg(String ass_resp_segValue ) + { + this.ass_resp_seg = ass_resp_segValue; + } + + public String getAss_resp_rh() + { + return ass_resp_rh; + } + + public void setAss_resp_rh(String ass_resp_rhValue ) + { + this.ass_resp_rh = ass_resp_rhValue; + } + + public java.util.Date getData_consolidacao() + { + return data_consolidacao; + } + + public void setData_consolidacao(java.util.Date data_consolidacaoValue ) + { + this.data_consolidacao = data_consolidacaoValue; + } + + public java.util.Date getData_assinatura_seg() + { + return data_assinatura_seg; + } + + public void setData_assinatura_seg(java.util.Date data_assinatura_segValue ) + { + this.data_assinatura_seg = data_assinatura_segValue; + } + + public java.util.Date getData_assinatura_rh() + { + return data_assinatura_rh; + } + + public void setData_assinatura_rh(java.util.Date data_assinatura_rhValue ) + { + this.data_assinatura_rh = data_assinatura_rhValue; + } + + public String getAss_consolidacao() + { + return ass_consolidacao; + } + + public void setAss_consolidacao(String ass_consolidacaoValue ) + { + this.ass_consolidacao = ass_consolidacaoValue; + } + + public String getNome_resp_seg() + { + return nome_resp_seg; + } + + public void setNome_resp_seg(String nome_resp_segValue ) + { + this.nome_resp_seg = nome_resp_segValue; + } + + public String getNome_resp_rh() + { + return nome_resp_rh; + } + + public void setNome_resp_rh(String nome_resp_rhValue ) + { + this.nome_resp_rh = nome_resp_rhValue; + } + + public Integer getCausas() + { + return causas; + } + + public void setCausas(Integer causasValue ) + { + this.causas = causasValue; + } + + public Integer getEstado_antes_correcao() + { + return estado_antes_correcao; + } + + public void setEstado_antes_correcao(Integer estado_antes_correcaoValue ) + { + this.estado_antes_correcao = estado_antes_correcaoValue; + } + + public String getObservacoes_correcao() + { + return observacoes_correcao; + } + + public void setObservacoes_correcao(String observacoes_correcaoValue ) + { + this.observacoes_correcao = observacoes_correcaoValue; + } + + public String getCorrecao() + { + return correcao; + } + + public void setCorrecao(String correcaoValue ) + { + this.correcao = correcaoValue; + } + + public String getAss_superior() + { + return ass_superior; + } + + public void setAss_superior(String ass_superiorValue ) + { + this.ass_superior = ass_superiorValue; + } + + public String getNome_superior() + { + return nome_superior; + } + + public void setNome_superior(String nome_superiorValue ) + { + this.nome_superior = nome_superiorValue; + } + + public java.util.Date getData_assinatura_superior() + { + return data_assinatura_superior; + } + + public void setData_assinatura_superior(java.util.Date data_assinatura_superiorValue ) + { + this.data_assinatura_superior = data_assinatura_superiorValue; + } + + public String getAveriguador() + { + return averiguador; + } + + public void setAveriguador(String averiguadorValue ) + { + this.averiguador = averiguadorValue; + } + + public String getAveriguacao_posterior() + { + return averiguacao_posterior; + } + + public void setAveriguacao_posterior(String averiguacao_posteriorValue ) + { + this.averiguacao_posterior = averiguacao_posteriorValue; + } + + public String getAveriguacao_obs() + { + return averiguacao_obs; + } + + public void setAveriguacao_obs(String averiguacao_obsValue ) + { + this.averiguacao_obs = averiguacao_obsValue; + } + + public java.util.Date getData_inicio_processo() + { + return data_inicio_processo; + } + + public void setData_inicio_processo(java.util.Date data_inicio_processoValue ) + { + this.data_inicio_processo = data_inicio_processoValue; + } + + public String getNome_resp_consolidacao() + { + return nome_resp_consolidacao; + } + + public void setNome_resp_consolidacao(String nome_resp_consolidacaoValue ) + { + this.nome_resp_consolidacao = nome_resp_consolidacaoValue; + } + + public Integer getSeccao_id() + { + return seccao_id; + } + + public void setSeccao_id(Integer seccao_idValue ) + { + this.seccao_id = seccao_idValue; + } + + public Integer getDepartamento_id() + { + return departamento_id; + } + + public void setDepartamento_id(Integer departamento_idValue ) + { + this.departamento_id = departamento_idValue; + } + + public Integer getRh_fase4() + { + return rh_fase4; + } + + public void setRh_fase4(Integer rh_fase4Value ) + { + this.rh_fase4 = rh_fase4Value; + } + + public String getApagada() + { + return apagada; + } + + public void setApagada(String apagadaValue ) + { + this.apagada = apagadaValue; + } + + public Class getOuterClass() + { + return AnalisesAcidentesDataAuto.class; + } + + public AnalisesAcidentesDataAuto getOuterClassInstance() + { + AnalisesAcidentesDataAuto outerObj = new AnalisesAcidentesDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentesData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentesData.java new file mode 100644 index 00000000..71728d0d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentesData.java @@ -0,0 +1,18 @@ +/* +* AnalisesAcidentesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class AnalisesAcidentesData extends com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesDataAuto +{ + + public AnalisesAcidentesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentesDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentesDataAuto.java new file mode 100644 index 00000000..adc55a22 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentesDataAuto.java @@ -0,0 +1,1393 @@ +/* +* AnalisesAcidentesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class AnalisesAcidentesDataAuto extends JDOObject +{ + + public static final String TABLENAME = "analises_acidentes"; + + public static final String ID = "id"; + public static final String ID_FULL = "analises_acidentes.id"; + public static final String DATA_ACIDENTE = "data_acidente"; + public static final String DATA_ACIDENTE_FULL = "analises_acidentes.data_acidente"; + public static final String ACIDENTADO_ID = "acidentado_id"; + public static final String ACIDENTADO_ID_FULL = "analises_acidentes.acidentado_id"; + public static final String TO_ACIDENTADO_ID = "to acidentado_id"; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "analises_acidentes.estado"; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "analises_acidentes.estabelecimento_id"; + public static final String HORAS_TURNO = "horas_turno"; + public static final String HORAS_TURNO_FULL = "analises_acidentes.horas_turno"; + public static final String LOCAL_TRABALHO = "local_trabalho"; + public static final String LOCAL_TRABALHO_FULL = "analises_acidentes.local_trabalho"; + public static final String TAREFA = "tarefa"; + public static final String TAREFA_FULL = "analises_acidentes.tarefa"; + public static final String SUBSTANCIAS = "substancias"; + public static final String SUBSTANCIAS_FULL = "analises_acidentes.substancias"; + public static final String CONDICOES = "condicoes"; + public static final String CONDICOES_FULL = "analises_acidentes.condicoes"; + public static final String TESTEMUNHAS = "testemunhas"; + public static final String TESTEMUNHAS_FULL = "analises_acidentes.testemunhas"; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "analises_acidentes.descricao"; + public static final String CONCLUSOES = "conclusoes"; + public static final String CONCLUSOES_FULL = "analises_acidentes.conclusoes"; + public static final String ACCOES = "accoes"; + public static final String ACCOES_FULL = "analises_acidentes.accoes"; + public static final String HORA_ACIDENTE = "hora_acidente"; + public static final String HORA_ACIDENTE_FULL = "analises_acidentes.hora_acidente"; + public static final String FORMACAO_SHST = "formacao_shst"; + public static final String FORMACAO_SHST_FULL = "analises_acidentes.formacao_shst"; + public static final String FORMACAO_SHST_NAO_PORQUE = "formacao_shst_nao_porque"; + public static final String FORMACAO_SHST_NAO_PORQUE_FULL = "analises_acidentes.formacao_shst_nao_porque"; + public static final String OUTROS_ACIDENTES_COM_COLABORADOR = "outros_acidentes_com_colaborador"; + public static final String OUTROS_ACIDENTES_COM_COLABORADOR_FULL = "analises_acidentes.outros_acidentes_com_colaborador"; + public static final String NR_ACIDENTES_COM_COLABORADOR = "nr_acidentes_com_colaborador"; + public static final String NR_ACIDENTES_COM_COLABORADOR_FULL = "analises_acidentes.nr_acidentes_com_colaborador"; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR1 = "nr_relatorio_acidente_colaborador1"; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR1_FULL = "analises_acidentes.nr_relatorio_acidente_colaborador1"; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR2 = "nr_relatorio_acidente_colaborador2"; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR2_FULL = "analises_acidentes.nr_relatorio_acidente_colaborador2"; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR3 = "nr_relatorio_acidente_colaborador3"; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR3_FULL = "analises_acidentes.nr_relatorio_acidente_colaborador3"; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR4 = "nr_relatorio_acidente_colaborador4"; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR4_FULL = "analises_acidentes.nr_relatorio_acidente_colaborador4"; + public static final String ACIDENTES_OUTROS_COLABORADORES = "acidentes_outros_colaboradores"; + public static final String ACIDENTES_OUTROS_COLABORADORES_FULL = "analises_acidentes.acidentes_outros_colaboradores"; + public static final String NR_ACIDENTES_OUTROS_COLABORADORES = "nr_acidentes_outros_colaboradores"; + public static final String NR_ACIDENTES_OUTROS_COLABORADORES_FULL = "analises_acidentes.nr_acidentes_outros_colaboradores"; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1 = "nr_relatorio_acidente_outros_colaboradores1"; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_FULL = "analises_acidentes.nr_relatorio_acidente_outros_colaboradores1"; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2 = "nr_relatorio_acidente_outros_colaboradores2"; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_FULL = "analises_acidentes.nr_relatorio_acidente_outros_colaboradores2"; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3 = "nr_relatorio_acidente_outros_colaboradores3"; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_FULL = "analises_acidentes.nr_relatorio_acidente_outros_colaboradores3"; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4 = "nr_relatorio_acidente_outros_colaboradores4"; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_FULL = "analises_acidentes.nr_relatorio_acidente_outros_colaboradores4"; + public static final String LESAO_CABECA = "lesao_cabeca"; + public static final String LESAO_CABECA_FULL = "analises_acidentes.lesao_cabeca"; + public static final String LESAO_PESCOCO = "lesao_pescoco"; + public static final String LESAO_PESCOCO_FULL = "analises_acidentes.lesao_pescoco"; + public static final String LESAO_TRONCO = "lesao_tronco"; + public static final String LESAO_TRONCO_FULL = "analises_acidentes.lesao_tronco"; + public static final String LESAO_MEMBRO_SUP_DIR = "lesao_membro_sup_dir"; + public static final String LESAO_MEMBRO_SUP_DIR_FULL = "analises_acidentes.lesao_membro_sup_dir"; + public static final String LESAO_MEMBRO_SUP_ESQ = "lesao_membro_sup_esq"; + public static final String LESAO_MEMBRO_SUP_ESQ_FULL = "analises_acidentes.lesao_membro_sup_esq"; + public static final String LESAO_MEMBRO_INF_DIR = "lesao_membro_inf_dir"; + public static final String LESAO_MEMBRO_INF_DIR_FULL = "analises_acidentes.lesao_membro_inf_dir"; + public static final String LESAO_MEMBRO_INF_ESQ = "lesao_membro_inf_esq"; + public static final String LESAO_MEMBRO_INF_ESQ_FULL = "analises_acidentes.lesao_membro_inf_esq"; + public static final String ESPECIF1 = "especif1"; + public static final String ESPECIF1_FULL = "analises_acidentes.especif1"; + public static final String ESPECIF2 = "especif2"; + public static final String ESPECIF2_FULL = "analises_acidentes.especif2"; + public static final String ESPECIF3 = "especif3"; + public static final String ESPECIF3_FULL = "analises_acidentes.especif3"; + public static final String ESPECIF4 = "especif4"; + public static final String ESPECIF4_FULL = "analises_acidentes.especif4"; + public static final String TIPO_INCAPACIDADE = "tipo_incapacidade"; + public static final String TIPO_INCAPACIDADE_FULL = "analises_acidentes.tipo_incapacidade"; + public static final String COEF_INCAPACIDADE = "coef_incapacidade"; + public static final String COEF_INCAPACIDADE_FULL = "analises_acidentes.coef_incapacidade"; + public static final String DATA_AVAL_INCAPACIDADE = "data_aval_incapacidade"; + public static final String DATA_AVAL_INCAPACIDADE_FULL = "analises_acidentes.data_aval_incapacidade"; + public static final String DATA_REV_INCAPACIDADE = "data_rev_incapacidade"; + public static final String DATA_REV_INCAPACIDADE_FULL = "analises_acidentes.data_rev_incapacidade"; + public static final String PERIODO_INCAPACIDADE_DE = "periodo_incapacidade_de"; + public static final String PERIODO_INCAPACIDADE_DE_FULL = "analises_acidentes.periodo_incapacidade_de"; + public static final String PERIODO_INCAPACIDADE_A = "periodo_incapacidade_a"; + public static final String PERIODO_INCAPACIDADE_A_FULL = "analises_acidentes.periodo_incapacidade_a"; + public static final String IMG_FLEXAO = "img_flexao"; + public static final String IMG_FLEXAO_FULL = "analises_acidentes.img_flexao"; + public static final String IMG_EXT1 = "img_ext1"; + public static final String IMG_EXT1_FULL = "analises_acidentes.img_ext1"; + public static final String IMG_EXT2 = "img_ext2"; + public static final String IMG_EXT2_FULL = "analises_acidentes.img_ext2"; + public static final String IMG_CAB2 = "img_cab2"; + public static final String IMG_CAB2_FULL = "analises_acidentes.img_cab2"; + public static final String IMG_CAB3 = "img_cab3"; + public static final String IMG_CAB3_FULL = "analises_acidentes.img_cab3"; + public static final String IMG_MA2 = "img_ma2"; + public static final String IMG_MA2_FULL = "analises_acidentes.img_ma2"; + public static final String IMG_MA3 = "img_ma3"; + public static final String IMG_MA3_FULL = "analises_acidentes.img_ma3"; + public static final String IMG_MA5 = "img_ma5"; + public static final String IMG_MA5_FULL = "analises_acidentes.img_ma5"; + public static final String IMG_MA6 = "img_ma6"; + public static final String IMG_MA6_FULL = "analises_acidentes.img_ma6"; + public static final String IMG_MA8 = "img_ma8"; + public static final String IMG_MA8_FULL = "analises_acidentes.img_ma8"; + public static final String IMG_MA10 = "img_ma10"; + public static final String IMG_MA10_FULL = "analises_acidentes.img_ma10"; + public static final String RESTRICAO_CARGA = "restricao_carga"; + public static final String RESTRICAO_CARGA_FULL = "analises_acidentes.restricao_carga"; + public static final String RESTRICAO_MOTRICIDADE = "restricao_motricidade"; + public static final String RESTRICAO_MOTRICIDADE_FULL = "analises_acidentes.restricao_motricidade"; + public static final String RESTRICAO_CONDUCAO = "restricao_conducao"; + public static final String RESTRICAO_CONDUCAO_FULL = "analises_acidentes.restricao_conducao"; + public static final String RESTRICAO_VIBRACOES = "restricao_vibracoes"; + public static final String RESTRICAO_VIBRACOES_FULL = "analises_acidentes.restricao_vibracoes"; + public static final String RESTRICAO_OUTRAS = "restricao_outras"; + public static final String RESTRICAO_OUTRAS_FULL = "analises_acidentes.restricao_outras"; + public static final String MED_OBSERV = "med_observ"; + public static final String MED_OBSERV_FULL = "analises_acidentes.med_observ"; + public static final String TIPO_LESAO = "tipo_lesao"; + public static final String TIPO_LESAO_FULL = "analises_acidentes.tipo_lesao"; + public static final String IMG_ROT1 = "img_rot1"; + public static final String IMG_ROT1_FULL = "analises_acidentes.img_rot1"; + public static final String IMG_ROT2 = "img_rot2"; + public static final String IMG_ROT2_FULL = "analises_acidentes.img_rot2"; + public static final String IMG_CAB1 = "img_cab1"; + public static final String IMG_CAB1_FULL = "analises_acidentes.img_cab1"; + public static final String IMG_CAB4 = "img_cab4"; + public static final String IMG_CAB4_FULL = "analises_acidentes.img_cab4"; + public static final String IMG_MA1 = "img_ma1"; + public static final String IMG_MA1_FULL = "analises_acidentes.img_ma1"; + public static final String IMG_MA4 = "img_ma4"; + public static final String IMG_MA4_FULL = "analises_acidentes.img_ma4"; + public static final String IMG_MA7 = "img_ma7"; + public static final String IMG_MA7_FULL = "analises_acidentes.img_ma7"; + public static final String IMG_MA9 = "img_ma9"; + public static final String IMG_MA9_FULL = "analises_acidentes.img_ma9"; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "analises_acidentes.empresa_id"; + public static final String MEDICO_ID = "medico_id"; + public static final String MEDICO_ID_FULL = "analises_acidentes.medico_id"; + public static final String TECNICO_SAUDE_ID = "tecnico_saude_id"; + public static final String TECNICO_SAUDE_ID_FULL = "analises_acidentes.tecnico_saude_id"; + public static final String ANALISE_NR = "analise_nr"; + public static final String ANALISE_NR_FULL = "analises_acidentes.analise_nr"; + public static final String ESTADO_ASSINATURA = "estado_assinatura"; + public static final String ESTADO_ASSINATURA_FULL = "analises_acidentes.estado_assinatura"; + public static final String ASS_RESP_SEG = "ass_resp_seg"; + public static final String ASS_RESP_SEG_FULL = "analises_acidentes.ass_resp_seg"; + public static final String ASS_RESP_RH = "ass_resp_rh"; + public static final String ASS_RESP_RH_FULL = "analises_acidentes.ass_resp_rh"; + public static final String DATA_CONSOLIDACAO = "data_consolidacao"; + public static final String DATA_CONSOLIDACAO_FULL = "analises_acidentes.data_consolidacao"; + public static final String DATA_ASSINATURA_SEG = "data_assinatura_seg"; + public static final String DATA_ASSINATURA_SEG_FULL = "analises_acidentes.data_assinatura_seg"; + public static final String DATA_ASSINATURA_RH = "data_assinatura_rh"; + public static final String DATA_ASSINATURA_RH_FULL = "analises_acidentes.data_assinatura_rh"; + public static final String ASS_CONSOLIDACAO = "ass_consolidacao"; + public static final String ASS_CONSOLIDACAO_FULL = "analises_acidentes.ass_consolidacao"; + public static final String NOME_RESP_SEG = "nome_resp_seg"; + public static final String NOME_RESP_SEG_FULL = "analises_acidentes.nome_resp_seg"; + public static final String NOME_RESP_RH = "nome_resp_rh"; + public static final String NOME_RESP_RH_FULL = "analises_acidentes.nome_resp_rh"; + public static final String CAUSAS = "causas"; + public static final String CAUSAS_FULL = "analises_acidentes.causas"; + public static final String ESTADO_ANTES_CORRECAO = "estado_antes_correcao"; + public static final String ESTADO_ANTES_CORRECAO_FULL = "analises_acidentes.estado_antes_correcao"; + public static final String OBSERVACOES_CORRECAO = "observacoes_correcao"; + public static final String OBSERVACOES_CORRECAO_FULL = "analises_acidentes.observacoes_correcao"; + public static final String CORRECAO = "correcao"; + public static final String CORRECAO_FULL = "analises_acidentes.correcao"; + public static final String ASS_SUPERIOR = "ass_superior"; + public static final String ASS_SUPERIOR_FULL = "analises_acidentes.ass_superior"; + public static final String NOME_SUPERIOR = "nome_superior"; + public static final String NOME_SUPERIOR_FULL = "analises_acidentes.nome_superior"; + public static final String DATA_ASSINATURA_SUPERIOR = "data_assinatura_superior"; + public static final String DATA_ASSINATURA_SUPERIOR_FULL = "analises_acidentes.data_assinatura_superior"; + public static final String AVERIGUADOR = "averiguador"; + public static final String AVERIGUADOR_FULL = "analises_acidentes.averiguador"; + public static final String AVERIGUACAO_POSTERIOR = "averiguacao_posterior"; + public static final String AVERIGUACAO_POSTERIOR_FULL = "analises_acidentes.averiguacao_posterior"; + public static final String AVERIGUACAO_OBS = "averiguacao_obs"; + public static final String AVERIGUACAO_OBS_FULL = "analises_acidentes.averiguacao_obs"; + public static final String DATA_INICIO_PROCESSO = "data_inicio_processo"; + public static final String DATA_INICIO_PROCESSO_FULL = "analises_acidentes.data_inicio_processo"; + public static final String NOME_RESP_CONSOLIDACAO = "nome_resp_consolidacao"; + public static final String NOME_RESP_CONSOLIDACAO_FULL = "analises_acidentes.nome_resp_consolidacao"; + public static final String SECCAO_ID = "seccao_id"; + public static final String SECCAO_ID_FULL = "analises_acidentes.seccao_id"; + public static final String DEPARTAMENTO_ID = "departamento_id"; + public static final String DEPARTAMENTO_ID_FULL = "analises_acidentes.departamento_id"; + public static final String RH_FASE4 = "rh_fase4"; + public static final String RH_FASE4_FULL = "analises_acidentes.rh_fase4"; + public static final String APAGADA = "apagada"; + public static final String APAGADA_FULL = "analises_acidentes.apagada"; + + public static final String FIELD_NAMES[] = new String[]{ + DATA_ACIDENTE, ACIDENTADO_ID, TO_ACIDENTADO_ID, ESTADO, ESTABELECIMENTO_ID, + HORAS_TURNO, LOCAL_TRABALHO, TAREFA, SUBSTANCIAS, CONDICOES, TESTEMUNHAS, + DESCRICAO, CONCLUSOES, ACCOES, HORA_ACIDENTE, FORMACAO_SHST, + FORMACAO_SHST_NAO_PORQUE, OUTROS_ACIDENTES_COM_COLABORADOR, + NR_ACIDENTES_COM_COLABORADOR, NR_RELATORIO_ACIDENTE_COLABORADOR1, + NR_RELATORIO_ACIDENTE_COLABORADOR2, NR_RELATORIO_ACIDENTE_COLABORADOR3, + NR_RELATORIO_ACIDENTE_COLABORADOR4, ACIDENTES_OUTROS_COLABORADORES, + NR_ACIDENTES_OUTROS_COLABORADORES, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, LESAO_CABECA, LESAO_PESCOCO, + LESAO_TRONCO, LESAO_MEMBRO_SUP_DIR, LESAO_MEMBRO_SUP_ESQ, + LESAO_MEMBRO_INF_DIR, LESAO_MEMBRO_INF_ESQ, ESPECIF1, ESPECIF2, ESPECIF3, + ESPECIF4, TIPO_INCAPACIDADE, COEF_INCAPACIDADE, DATA_AVAL_INCAPACIDADE, + DATA_REV_INCAPACIDADE, PERIODO_INCAPACIDADE_DE, PERIODO_INCAPACIDADE_A, + IMG_FLEXAO, IMG_EXT1, IMG_EXT2, IMG_CAB2, IMG_CAB3, IMG_MA2, IMG_MA3, IMG_MA5, IMG_MA6, + IMG_MA8, IMG_MA10, RESTRICAO_CARGA, RESTRICAO_MOTRICIDADE, RESTRICAO_CONDUCAO, + RESTRICAO_VIBRACOES, RESTRICAO_OUTRAS, MED_OBSERV, TIPO_LESAO, IMG_ROT1, + IMG_ROT2, IMG_CAB1, IMG_CAB4, IMG_MA1, IMG_MA4, IMG_MA7, IMG_MA9, EMPRESA_ID, + MEDICO_ID, TECNICO_SAUDE_ID, ANALISE_NR, ESTADO_ASSINATURA, ASS_RESP_SEG, + ASS_RESP_RH, DATA_CONSOLIDACAO, DATA_ASSINATURA_SEG, DATA_ASSINATURA_RH, + ASS_CONSOLIDACAO, NOME_RESP_SEG, NOME_RESP_RH, CAUSAS, ESTADO_ANTES_CORRECAO, + OBSERVACOES_CORRECAO, CORRECAO, ASS_SUPERIOR, NOME_SUPERIOR, + DATA_ASSINATURA_SUPERIOR, AVERIGUADOR, AVERIGUACAO_POSTERIOR, + AVERIGUACAO_OBS, DATA_INICIO_PROCESSO, NOME_RESP_CONSOLIDACAO, SECCAO_ID, + DEPARTAMENTO_ID, RH_FASE4, APAGADA, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DATA_ACIDENTE, ACIDENTADO_ID, ESTADO, ESTABELECIMENTO_ID, HORAS_TURNO, + LOCAL_TRABALHO, TAREFA, SUBSTANCIAS, CONDICOES, TESTEMUNHAS, DESCRICAO, CONCLUSOES, + ACCOES, HORA_ACIDENTE, FORMACAO_SHST, FORMACAO_SHST_NAO_PORQUE, + OUTROS_ACIDENTES_COM_COLABORADOR, NR_ACIDENTES_COM_COLABORADOR, + NR_RELATORIO_ACIDENTE_COLABORADOR1, NR_RELATORIO_ACIDENTE_COLABORADOR2, + NR_RELATORIO_ACIDENTE_COLABORADOR3, NR_RELATORIO_ACIDENTE_COLABORADOR4, + ACIDENTES_OUTROS_COLABORADORES, NR_ACIDENTES_OUTROS_COLABORADORES, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, LESAO_CABECA, LESAO_PESCOCO, + LESAO_TRONCO, LESAO_MEMBRO_SUP_DIR, LESAO_MEMBRO_SUP_ESQ, + LESAO_MEMBRO_INF_DIR, LESAO_MEMBRO_INF_ESQ, ESPECIF1, ESPECIF2, ESPECIF3, + ESPECIF4, TIPO_INCAPACIDADE, COEF_INCAPACIDADE, DATA_AVAL_INCAPACIDADE, + DATA_REV_INCAPACIDADE, PERIODO_INCAPACIDADE_DE, PERIODO_INCAPACIDADE_A, + IMG_FLEXAO, IMG_EXT1, IMG_EXT2, IMG_CAB2, IMG_CAB3, IMG_MA2, IMG_MA3, IMG_MA5, IMG_MA6, + IMG_MA8, IMG_MA10, RESTRICAO_CARGA, RESTRICAO_MOTRICIDADE, RESTRICAO_CONDUCAO, + RESTRICAO_VIBRACOES, RESTRICAO_OUTRAS, MED_OBSERV, TIPO_LESAO, IMG_ROT1, + IMG_ROT2, IMG_CAB1, IMG_CAB4, IMG_MA1, IMG_MA4, IMG_MA7, IMG_MA9, EMPRESA_ID, + MEDICO_ID, TECNICO_SAUDE_ID, ANALISE_NR, ESTADO_ASSINATURA, ASS_RESP_SEG, + ASS_RESP_RH, DATA_CONSOLIDACAO, DATA_ASSINATURA_SEG, DATA_ASSINATURA_RH, + ASS_CONSOLIDACAO, NOME_RESP_SEG, NOME_RESP_RH, CAUSAS, ESTADO_ANTES_CORRECAO, + OBSERVACOES_CORRECAO, CORRECAO, ASS_SUPERIOR, NOME_SUPERIOR, + DATA_ASSINATURA_SUPERIOR, AVERIGUADOR, AVERIGUACAO_POSTERIOR, + AVERIGUACAO_OBS, DATA_INICIO_PROCESSO, NOME_RESP_CONSOLIDACAO, SECCAO_ID, + DEPARTAMENTO_ID, RH_FASE4, APAGADA, }; + + private Map dataHash; + + public AnalisesAcidentesDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public java.util.Date getData_acidente() + { + return (java.util.Date) get(DATA_ACIDENTE); + } + + public void setData_acidente(java.util.Date data_acidenteValue ) + { + this.set(DATA_ACIDENTE, data_acidenteValue ); + } + + public Integer getAcidentado_id() + { + return (Integer) dataHash.get(ACIDENTADO_ID); + } + + public void setAcidentado_id(Integer acidentado_idValue ) + { + dataHash.put(TO_ACIDENTADO_ID, null); + dataHash.put(ACIDENTADO_ID, acidentado_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp.AcidentadosData toAcidentado_id() + throws Exception + { + if( dataHash.get(TO_ACIDENTADO_ID) == null && getAcidentado_id() != null ) + { + dataHash.put(TO_ACIDENTADO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.AcidentadosData.class, new Object[]{ getAcidentado_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.AcidentadosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp.AcidentadosData) dataHash.get(TO_ACIDENTADO_ID); + } + + public void setToAcidentado_id(com.evolute.siprp.server.db.data.siprp.AcidentadosData acidentado_idObject ) + { + if( acidentado_idObject == null ) + { + dataHash.put(ACIDENTADO_ID, null); + } + else + { + dataHash.put(ACIDENTADO_ID, acidentado_idObject.get( com.evolute.siprp.server.db.data.siprp.AcidentadosData.ID )); + } + dataHash.put(TO_ACIDENTADO_ID, acidentado_idObject); + } + + public Integer getEstado() + { + return (Integer) get(ESTADO); + } + + public void setEstado(Integer estadoValue ) + { + this.set(ESTADO, estadoValue ); + } + + public Integer getEstabelecimento_id() + { + return (Integer) get(ESTABELECIMENTO_ID); + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + this.set(ESTABELECIMENTO_ID, estabelecimento_idValue ); + } + + public Integer getHoras_turno() + { + return (Integer) get(HORAS_TURNO); + } + + public void setHoras_turno(Integer horas_turnoValue ) + { + this.set(HORAS_TURNO, horas_turnoValue ); + } + + public String getLocal_trabalho() + { + return (String) get(LOCAL_TRABALHO); + } + + public void setLocal_trabalho(String local_trabalhoValue ) + { + this.set(LOCAL_TRABALHO, local_trabalhoValue ); + } + + public String getTarefa() + { + return (String) get(TAREFA); + } + + public void setTarefa(String tarefaValue ) + { + this.set(TAREFA, tarefaValue ); + } + + public String getSubstancias() + { + return (String) get(SUBSTANCIAS); + } + + public void setSubstancias(String substanciasValue ) + { + this.set(SUBSTANCIAS, substanciasValue ); + } + + public String getCondicoes() + { + return (String) get(CONDICOES); + } + + public void setCondicoes(String condicoesValue ) + { + this.set(CONDICOES, condicoesValue ); + } + + public String getTestemunhas() + { + return (String) get(TESTEMUNHAS); + } + + public void setTestemunhas(String testemunhasValue ) + { + this.set(TESTEMUNHAS, testemunhasValue ); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public String getConclusoes() + { + return (String) get(CONCLUSOES); + } + + public void setConclusoes(String conclusoesValue ) + { + this.set(CONCLUSOES, conclusoesValue ); + } + + public String getAccoes() + { + return (String) get(ACCOES); + } + + public void setAccoes(String accoesValue ) + { + this.set(ACCOES, accoesValue ); + } + + public java.sql.Time getHora_acidente() + { + return (java.sql.Time) get(HORA_ACIDENTE); + } + + public void setHora_acidente(java.sql.Time hora_acidenteValue ) + { + this.set(HORA_ACIDENTE, hora_acidenteValue ); + } + + public String getFormacao_shst() + { + return (String) get(FORMACAO_SHST); + } + + public void setFormacao_shst(String formacao_shstValue ) + { + this.set(FORMACAO_SHST, formacao_shstValue ); + } + + public String getFormacao_shst_nao_porque() + { + return (String) get(FORMACAO_SHST_NAO_PORQUE); + } + + public void setFormacao_shst_nao_porque(String formacao_shst_nao_porqueValue ) + { + this.set(FORMACAO_SHST_NAO_PORQUE, formacao_shst_nao_porqueValue ); + } + + public String getOutros_acidentes_com_colaborador() + { + return (String) get(OUTROS_ACIDENTES_COM_COLABORADOR); + } + + public void setOutros_acidentes_com_colaborador(String outros_acidentes_com_colaboradorValue ) + { + this.set(OUTROS_ACIDENTES_COM_COLABORADOR, outros_acidentes_com_colaboradorValue ); + } + + public Integer getNr_acidentes_com_colaborador() + { + return (Integer) get(NR_ACIDENTES_COM_COLABORADOR); + } + + public void setNr_acidentes_com_colaborador(Integer nr_acidentes_com_colaboradorValue ) + { + this.set(NR_ACIDENTES_COM_COLABORADOR, nr_acidentes_com_colaboradorValue ); + } + + public Integer getNr_relatorio_acidente_colaborador1() + { + return (Integer) get(NR_RELATORIO_ACIDENTE_COLABORADOR1); + } + + public void setNr_relatorio_acidente_colaborador1(Integer nr_relatorio_acidente_colaborador1Value ) + { + this.set(NR_RELATORIO_ACIDENTE_COLABORADOR1, nr_relatorio_acidente_colaborador1Value ); + } + + public Integer getNr_relatorio_acidente_colaborador2() + { + return (Integer) get(NR_RELATORIO_ACIDENTE_COLABORADOR2); + } + + public void setNr_relatorio_acidente_colaborador2(Integer nr_relatorio_acidente_colaborador2Value ) + { + this.set(NR_RELATORIO_ACIDENTE_COLABORADOR2, nr_relatorio_acidente_colaborador2Value ); + } + + public Integer getNr_relatorio_acidente_colaborador3() + { + return (Integer) get(NR_RELATORIO_ACIDENTE_COLABORADOR3); + } + + public void setNr_relatorio_acidente_colaborador3(Integer nr_relatorio_acidente_colaborador3Value ) + { + this.set(NR_RELATORIO_ACIDENTE_COLABORADOR3, nr_relatorio_acidente_colaborador3Value ); + } + + public Integer getNr_relatorio_acidente_colaborador4() + { + return (Integer) get(NR_RELATORIO_ACIDENTE_COLABORADOR4); + } + + public void setNr_relatorio_acidente_colaborador4(Integer nr_relatorio_acidente_colaborador4Value ) + { + this.set(NR_RELATORIO_ACIDENTE_COLABORADOR4, nr_relatorio_acidente_colaborador4Value ); + } + + public String getAcidentes_outros_colaboradores() + { + return (String) get(ACIDENTES_OUTROS_COLABORADORES); + } + + public void setAcidentes_outros_colaboradores(String acidentes_outros_colaboradoresValue ) + { + this.set(ACIDENTES_OUTROS_COLABORADORES, acidentes_outros_colaboradoresValue ); + } + + public Integer getNr_acidentes_outros_colaboradores() + { + return (Integer) get(NR_ACIDENTES_OUTROS_COLABORADORES); + } + + public void setNr_acidentes_outros_colaboradores(Integer nr_acidentes_outros_colaboradoresValue ) + { + this.set(NR_ACIDENTES_OUTROS_COLABORADORES, nr_acidentes_outros_colaboradoresValue ); + } + + public Integer getNr_relatorio_acidente_outros_colaboradores1() + { + return (Integer) get(NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1); + } + + public void setNr_relatorio_acidente_outros_colaboradores1(Integer nr_relatorio_acidente_outros_colaboradores1Value ) + { + this.set(NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, nr_relatorio_acidente_outros_colaboradores1Value ); + } + + public Integer getNr_relatorio_acidente_outros_colaboradores2() + { + return (Integer) get(NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2); + } + + public void setNr_relatorio_acidente_outros_colaboradores2(Integer nr_relatorio_acidente_outros_colaboradores2Value ) + { + this.set(NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, nr_relatorio_acidente_outros_colaboradores2Value ); + } + + public Integer getNr_relatorio_acidente_outros_colaboradores3() + { + return (Integer) get(NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3); + } + + public void setNr_relatorio_acidente_outros_colaboradores3(Integer nr_relatorio_acidente_outros_colaboradores3Value ) + { + this.set(NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, nr_relatorio_acidente_outros_colaboradores3Value ); + } + + public Integer getNr_relatorio_acidente_outros_colaboradores4() + { + return (Integer) get(NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4); + } + + public void setNr_relatorio_acidente_outros_colaboradores4(Integer nr_relatorio_acidente_outros_colaboradores4Value ) + { + this.set(NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, nr_relatorio_acidente_outros_colaboradores4Value ); + } + + public String getLesao_cabeca() + { + return (String) get(LESAO_CABECA); + } + + public void setLesao_cabeca(String lesao_cabecaValue ) + { + this.set(LESAO_CABECA, lesao_cabecaValue ); + } + + public String getLesao_pescoco() + { + return (String) get(LESAO_PESCOCO); + } + + public void setLesao_pescoco(String lesao_pescocoValue ) + { + this.set(LESAO_PESCOCO, lesao_pescocoValue ); + } + + public String getLesao_tronco() + { + return (String) get(LESAO_TRONCO); + } + + public void setLesao_tronco(String lesao_troncoValue ) + { + this.set(LESAO_TRONCO, lesao_troncoValue ); + } + + public String getLesao_membro_sup_dir() + { + return (String) get(LESAO_MEMBRO_SUP_DIR); + } + + public void setLesao_membro_sup_dir(String lesao_membro_sup_dirValue ) + { + this.set(LESAO_MEMBRO_SUP_DIR, lesao_membro_sup_dirValue ); + } + + public String getLesao_membro_sup_esq() + { + return (String) get(LESAO_MEMBRO_SUP_ESQ); + } + + public void setLesao_membro_sup_esq(String lesao_membro_sup_esqValue ) + { + this.set(LESAO_MEMBRO_SUP_ESQ, lesao_membro_sup_esqValue ); + } + + public String getLesao_membro_inf_dir() + { + return (String) get(LESAO_MEMBRO_INF_DIR); + } + + public void setLesao_membro_inf_dir(String lesao_membro_inf_dirValue ) + { + this.set(LESAO_MEMBRO_INF_DIR, lesao_membro_inf_dirValue ); + } + + public String getLesao_membro_inf_esq() + { + return (String) get(LESAO_MEMBRO_INF_ESQ); + } + + public void setLesao_membro_inf_esq(String lesao_membro_inf_esqValue ) + { + this.set(LESAO_MEMBRO_INF_ESQ, lesao_membro_inf_esqValue ); + } + + public String getEspecif1() + { + return (String) get(ESPECIF1); + } + + public void setEspecif1(String especif1Value ) + { + this.set(ESPECIF1, especif1Value ); + } + + public String getEspecif2() + { + return (String) get(ESPECIF2); + } + + public void setEspecif2(String especif2Value ) + { + this.set(ESPECIF2, especif2Value ); + } + + public String getEspecif3() + { + return (String) get(ESPECIF3); + } + + public void setEspecif3(String especif3Value ) + { + this.set(ESPECIF3, especif3Value ); + } + + public String getEspecif4() + { + return (String) get(ESPECIF4); + } + + public void setEspecif4(String especif4Value ) + { + this.set(ESPECIF4, especif4Value ); + } + + public String getTipo_incapacidade() + { + return (String) get(TIPO_INCAPACIDADE); + } + + public void setTipo_incapacidade(String tipo_incapacidadeValue ) + { + this.set(TIPO_INCAPACIDADE, tipo_incapacidadeValue ); + } + + public Integer getCoef_incapacidade() + { + return (Integer) get(COEF_INCAPACIDADE); + } + + public void setCoef_incapacidade(Integer coef_incapacidadeValue ) + { + this.set(COEF_INCAPACIDADE, coef_incapacidadeValue ); + } + + public java.util.Date getData_aval_incapacidade() + { + return (java.util.Date) get(DATA_AVAL_INCAPACIDADE); + } + + public void setData_aval_incapacidade(java.util.Date data_aval_incapacidadeValue ) + { + this.set(DATA_AVAL_INCAPACIDADE, data_aval_incapacidadeValue ); + } + + public java.util.Date getData_rev_incapacidade() + { + return (java.util.Date) get(DATA_REV_INCAPACIDADE); + } + + public void setData_rev_incapacidade(java.util.Date data_rev_incapacidadeValue ) + { + this.set(DATA_REV_INCAPACIDADE, data_rev_incapacidadeValue ); + } + + public java.util.Date getPeriodo_incapacidade_de() + { + return (java.util.Date) get(PERIODO_INCAPACIDADE_DE); + } + + public void setPeriodo_incapacidade_de(java.util.Date periodo_incapacidade_deValue ) + { + this.set(PERIODO_INCAPACIDADE_DE, periodo_incapacidade_deValue ); + } + + public java.util.Date getPeriodo_incapacidade_a() + { + return (java.util.Date) get(PERIODO_INCAPACIDADE_A); + } + + public void setPeriodo_incapacidade_a(java.util.Date periodo_incapacidade_aValue ) + { + this.set(PERIODO_INCAPACIDADE_A, periodo_incapacidade_aValue ); + } + + public String getImg_flexao() + { + return (String) get(IMG_FLEXAO); + } + + public void setImg_flexao(String img_flexaoValue ) + { + this.set(IMG_FLEXAO, img_flexaoValue ); + } + + public String getImg_ext1() + { + return (String) get(IMG_EXT1); + } + + public void setImg_ext1(String img_ext1Value ) + { + this.set(IMG_EXT1, img_ext1Value ); + } + + public String getImg_ext2() + { + return (String) get(IMG_EXT2); + } + + public void setImg_ext2(String img_ext2Value ) + { + this.set(IMG_EXT2, img_ext2Value ); + } + + public String getImg_cab2() + { + return (String) get(IMG_CAB2); + } + + public void setImg_cab2(String img_cab2Value ) + { + this.set(IMG_CAB2, img_cab2Value ); + } + + public String getImg_cab3() + { + return (String) get(IMG_CAB3); + } + + public void setImg_cab3(String img_cab3Value ) + { + this.set(IMG_CAB3, img_cab3Value ); + } + + public String getImg_ma2() + { + return (String) get(IMG_MA2); + } + + public void setImg_ma2(String img_ma2Value ) + { + this.set(IMG_MA2, img_ma2Value ); + } + + public String getImg_ma3() + { + return (String) get(IMG_MA3); + } + + public void setImg_ma3(String img_ma3Value ) + { + this.set(IMG_MA3, img_ma3Value ); + } + + public String getImg_ma5() + { + return (String) get(IMG_MA5); + } + + public void setImg_ma5(String img_ma5Value ) + { + this.set(IMG_MA5, img_ma5Value ); + } + + public String getImg_ma6() + { + return (String) get(IMG_MA6); + } + + public void setImg_ma6(String img_ma6Value ) + { + this.set(IMG_MA6, img_ma6Value ); + } + + public String getImg_ma8() + { + return (String) get(IMG_MA8); + } + + public void setImg_ma8(String img_ma8Value ) + { + this.set(IMG_MA8, img_ma8Value ); + } + + public String getImg_ma10() + { + return (String) get(IMG_MA10); + } + + public void setImg_ma10(String img_ma10Value ) + { + this.set(IMG_MA10, img_ma10Value ); + } + + public Integer getRestricao_carga() + { + return (Integer) get(RESTRICAO_CARGA); + } + + public void setRestricao_carga(Integer restricao_cargaValue ) + { + this.set(RESTRICAO_CARGA, restricao_cargaValue ); + } + + public String getRestricao_motricidade() + { + return (String) get(RESTRICAO_MOTRICIDADE); + } + + public void setRestricao_motricidade(String restricao_motricidadeValue ) + { + this.set(RESTRICAO_MOTRICIDADE, restricao_motricidadeValue ); + } + + public String getRestricao_conducao() + { + return (String) get(RESTRICAO_CONDUCAO); + } + + public void setRestricao_conducao(String restricao_conducaoValue ) + { + this.set(RESTRICAO_CONDUCAO, restricao_conducaoValue ); + } + + public String getRestricao_vibracoes() + { + return (String) get(RESTRICAO_VIBRACOES); + } + + public void setRestricao_vibracoes(String restricao_vibracoesValue ) + { + this.set(RESTRICAO_VIBRACOES, restricao_vibracoesValue ); + } + + public String getRestricao_outras() + { + return (String) get(RESTRICAO_OUTRAS); + } + + public void setRestricao_outras(String restricao_outrasValue ) + { + this.set(RESTRICAO_OUTRAS, restricao_outrasValue ); + } + + public String getMed_observ() + { + return (String) get(MED_OBSERV); + } + + public void setMed_observ(String med_observValue ) + { + this.set(MED_OBSERV, med_observValue ); + } + + public String getTipo_lesao() + { + return (String) get(TIPO_LESAO); + } + + public void setTipo_lesao(String tipo_lesaoValue ) + { + this.set(TIPO_LESAO, tipo_lesaoValue ); + } + + public String getImg_rot1() + { + return (String) get(IMG_ROT1); + } + + public void setImg_rot1(String img_rot1Value ) + { + this.set(IMG_ROT1, img_rot1Value ); + } + + public String getImg_rot2() + { + return (String) get(IMG_ROT2); + } + + public void setImg_rot2(String img_rot2Value ) + { + this.set(IMG_ROT2, img_rot2Value ); + } + + public String getImg_cab1() + { + return (String) get(IMG_CAB1); + } + + public void setImg_cab1(String img_cab1Value ) + { + this.set(IMG_CAB1, img_cab1Value ); + } + + public String getImg_cab4() + { + return (String) get(IMG_CAB4); + } + + public void setImg_cab4(String img_cab4Value ) + { + this.set(IMG_CAB4, img_cab4Value ); + } + + public String getImg_ma1() + { + return (String) get(IMG_MA1); + } + + public void setImg_ma1(String img_ma1Value ) + { + this.set(IMG_MA1, img_ma1Value ); + } + + public String getImg_ma4() + { + return (String) get(IMG_MA4); + } + + public void setImg_ma4(String img_ma4Value ) + { + this.set(IMG_MA4, img_ma4Value ); + } + + public String getImg_ma7() + { + return (String) get(IMG_MA7); + } + + public void setImg_ma7(String img_ma7Value ) + { + this.set(IMG_MA7, img_ma7Value ); + } + + public String getImg_ma9() + { + return (String) get(IMG_MA9); + } + + public void setImg_ma9(String img_ma9Value ) + { + this.set(IMG_MA9, img_ma9Value ); + } + + public Integer getEmpresa_id() + { + return (Integer) get(EMPRESA_ID); + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + this.set(EMPRESA_ID, empresa_idValue ); + } + + public Integer getMedico_id() + { + return (Integer) get(MEDICO_ID); + } + + public void setMedico_id(Integer medico_idValue ) + { + this.set(MEDICO_ID, medico_idValue ); + } + + public Integer getTecnico_saude_id() + { + return (Integer) get(TECNICO_SAUDE_ID); + } + + public void setTecnico_saude_id(Integer tecnico_saude_idValue ) + { + this.set(TECNICO_SAUDE_ID, tecnico_saude_idValue ); + } + + public String getAnalise_nr() + { + return (String) get(ANALISE_NR); + } + + public void setAnalise_nr(String analise_nrValue ) + { + this.set(ANALISE_NR, analise_nrValue ); + } + + public Integer getEstado_assinatura() + { + return (Integer) get(ESTADO_ASSINATURA); + } + + public void setEstado_assinatura(Integer estado_assinaturaValue ) + { + this.set(ESTADO_ASSINATURA, estado_assinaturaValue ); + } + + public String getAss_resp_seg() + { + return (String) get(ASS_RESP_SEG); + } + + public void setAss_resp_seg(String ass_resp_segValue ) + { + this.set(ASS_RESP_SEG, ass_resp_segValue ); + } + + public String getAss_resp_rh() + { + return (String) get(ASS_RESP_RH); + } + + public void setAss_resp_rh(String ass_resp_rhValue ) + { + this.set(ASS_RESP_RH, ass_resp_rhValue ); + } + + public java.util.Date getData_consolidacao() + { + return (java.util.Date) get(DATA_CONSOLIDACAO); + } + + public void setData_consolidacao(java.util.Date data_consolidacaoValue ) + { + this.set(DATA_CONSOLIDACAO, data_consolidacaoValue ); + } + + public java.util.Date getData_assinatura_seg() + { + return (java.util.Date) get(DATA_ASSINATURA_SEG); + } + + public void setData_assinatura_seg(java.util.Date data_assinatura_segValue ) + { + this.set(DATA_ASSINATURA_SEG, data_assinatura_segValue ); + } + + public java.util.Date getData_assinatura_rh() + { + return (java.util.Date) get(DATA_ASSINATURA_RH); + } + + public void setData_assinatura_rh(java.util.Date data_assinatura_rhValue ) + { + this.set(DATA_ASSINATURA_RH, data_assinatura_rhValue ); + } + + public String getAss_consolidacao() + { + return (String) get(ASS_CONSOLIDACAO); + } + + public void setAss_consolidacao(String ass_consolidacaoValue ) + { + this.set(ASS_CONSOLIDACAO, ass_consolidacaoValue ); + } + + public String getNome_resp_seg() + { + return (String) get(NOME_RESP_SEG); + } + + public void setNome_resp_seg(String nome_resp_segValue ) + { + this.set(NOME_RESP_SEG, nome_resp_segValue ); + } + + public String getNome_resp_rh() + { + return (String) get(NOME_RESP_RH); + } + + public void setNome_resp_rh(String nome_resp_rhValue ) + { + this.set(NOME_RESP_RH, nome_resp_rhValue ); + } + + public Integer getCausas() + { + return (Integer) get(CAUSAS); + } + + public void setCausas(Integer causasValue ) + { + this.set(CAUSAS, causasValue ); + } + + public Integer getEstado_antes_correcao() + { + return (Integer) get(ESTADO_ANTES_CORRECAO); + } + + public void setEstado_antes_correcao(Integer estado_antes_correcaoValue ) + { + this.set(ESTADO_ANTES_CORRECAO, estado_antes_correcaoValue ); + } + + public String getObservacoes_correcao() + { + return (String) get(OBSERVACOES_CORRECAO); + } + + public void setObservacoes_correcao(String observacoes_correcaoValue ) + { + this.set(OBSERVACOES_CORRECAO, observacoes_correcaoValue ); + } + + public String getCorrecao() + { + return (String) get(CORRECAO); + } + + public void setCorrecao(String correcaoValue ) + { + this.set(CORRECAO, correcaoValue ); + } + + public String getAss_superior() + { + return (String) get(ASS_SUPERIOR); + } + + public void setAss_superior(String ass_superiorValue ) + { + this.set(ASS_SUPERIOR, ass_superiorValue ); + } + + public String getNome_superior() + { + return (String) get(NOME_SUPERIOR); + } + + public void setNome_superior(String nome_superiorValue ) + { + this.set(NOME_SUPERIOR, nome_superiorValue ); + } + + public java.util.Date getData_assinatura_superior() + { + return (java.util.Date) get(DATA_ASSINATURA_SUPERIOR); + } + + public void setData_assinatura_superior(java.util.Date data_assinatura_superiorValue ) + { + this.set(DATA_ASSINATURA_SUPERIOR, data_assinatura_superiorValue ); + } + + public String getAveriguador() + { + return (String) get(AVERIGUADOR); + } + + public void setAveriguador(String averiguadorValue ) + { + this.set(AVERIGUADOR, averiguadorValue ); + } + + public String getAveriguacao_posterior() + { + return (String) get(AVERIGUACAO_POSTERIOR); + } + + public void setAveriguacao_posterior(String averiguacao_posteriorValue ) + { + this.set(AVERIGUACAO_POSTERIOR, averiguacao_posteriorValue ); + } + + public String getAveriguacao_obs() + { + return (String) get(AVERIGUACAO_OBS); + } + + public void setAveriguacao_obs(String averiguacao_obsValue ) + { + this.set(AVERIGUACAO_OBS, averiguacao_obsValue ); + } + + public java.util.Date getData_inicio_processo() + { + return (java.util.Date) get(DATA_INICIO_PROCESSO); + } + + public void setData_inicio_processo(java.util.Date data_inicio_processoValue ) + { + this.set(DATA_INICIO_PROCESSO, data_inicio_processoValue ); + } + + public String getNome_resp_consolidacao() + { + return (String) get(NOME_RESP_CONSOLIDACAO); + } + + public void setNome_resp_consolidacao(String nome_resp_consolidacaoValue ) + { + this.set(NOME_RESP_CONSOLIDACAO, nome_resp_consolidacaoValue ); + } + + public Integer getSeccao_id() + { + return (Integer) get(SECCAO_ID); + } + + public void setSeccao_id(Integer seccao_idValue ) + { + this.set(SECCAO_ID, seccao_idValue ); + } + + public Integer getDepartamento_id() + { + return (Integer) get(DEPARTAMENTO_ID); + } + + public void setDepartamento_id(Integer departamento_idValue ) + { + this.set(DEPARTAMENTO_ID, departamento_idValue ); + } + + public Integer getRh_fase4() + { + return (Integer) get(RH_FASE4); + } + + public void setRh_fase4(Integer rh_fase4Value ) + { + this.set(RH_FASE4, rh_fase4Value ); + } + + public String getApagada() + { + return (String) get(APAGADA); + } + + public void setApagada(String apagadaValue ) + { + this.set(APAGADA, apagadaValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_ACIDENTADO_ID.equals( fieldName ) ) + { + value = toAcidentado_id(); + } + else if( ACIDENTADO_ID.equals( fieldName ) ) + { + value = getAcidentado_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_ACIDENTADO_ID.equals( fieldName ) ) + { + setToAcidentado_id( (com.evolute.siprp.server.db.data.siprp.AcidentadosData) value ); + } + else if( ACIDENTADO_ID.equals( fieldName ) ) + { + setAcidentado_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_ACIDENTADO_ID) != null ) + { + toAcidentado_id().save(); + dataHash.put(ACIDENTADO_ID, toAcidentado_id().get( com.evolute.siprp.server.db.data.siprp.AcidentadosData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return AnalisesAcidentes.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Causas.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Causas.java new file mode 100644 index 00000000..6dbbc1c5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Causas.java @@ -0,0 +1,129 @@ +/* +* Causas.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class Causas implements JDOInnerObject +{ + private Integer id; + private String causa; + private String activa; + + public Causas() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == CausasDataAuto.ID ) + { + return id; + } + else if( fieldName == CausasDataAuto.CAUSA ) + { + return causa; + } + else if( fieldName == CausasDataAuto.ACTIVA ) + { + return activa; + } + else if( fieldName.equals( CausasDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( CausasDataAuto.CAUSA ) ) + { + return causa; + } + else if( fieldName.equals( CausasDataAuto.ACTIVA ) ) + { + return activa; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == CausasDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == CausasDataAuto.CAUSA ) + { + causa = ( String ) value; + } + else if( fieldName == CausasDataAuto.ACTIVA ) + { + activa = ( String ) value; + } + else if( fieldName.equals( CausasDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( CausasDataAuto.CAUSA ) ) + { + causa = ( String ) value; + } + else if( fieldName.equals( CausasDataAuto.ACTIVA ) ) + { + activa = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getCausa() + { + return causa; + } + + public void setCausa(String causaValue ) + { + this.causa = causaValue; + } + + public String getActiva() + { + return activa; + } + + public void setActiva(String activaValue ) + { + this.activa = activaValue; + } + + public Class getOuterClass() + { + return CausasDataAuto.class; + } + + public CausasDataAuto getOuterClassInstance() + { + CausasDataAuto outerObj = new CausasDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/CausasData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/CausasData.java new file mode 100644 index 00000000..c6bb0d37 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/CausasData.java @@ -0,0 +1,18 @@ +/* +* CausasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class CausasData extends com.evolute.siprp.server.db.data.siprp.CausasDataAuto +{ + + public CausasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/CausasDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/CausasDataAuto.java new file mode 100644 index 00000000..7b8a0cf0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/CausasDataAuto.java @@ -0,0 +1,107 @@ +/* +* CausasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class CausasDataAuto extends JDOObject +{ + + public static final String TABLENAME = "causas"; + + public static final String ID = "id"; + public static final String ID_FULL = "causas.id"; + public static final String CAUSA = "causa"; + public static final String CAUSA_FULL = "causas.causa"; + public static final String ACTIVA = "activa"; + public static final String ACTIVA_FULL = "causas.activa"; + + public static final String FIELD_NAMES[] = new String[]{ + CAUSA, ACTIVA, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, CAUSA, ACTIVA, }; + + private Map dataHash; + + public CausasDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getCausa() + { + return (String) get(CAUSA); + } + + public void setCausa(String causaValue ) + { + this.set(CAUSA, causaValue ); + } + + public String getActiva() + { + return (String) get(ACTIVA); + } + + public void setActiva(String activaValue ) + { + this.set(ACTIVA, activaValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Causas.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Controle.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Controle.java new file mode 100644 index 00000000..94c1be14 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Controle.java @@ -0,0 +1,129 @@ +/* +* Controle.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class Controle implements JDOInnerObject +{ + private Integer id; + private Integer analise_year; + private Integer last_analise_nr; + + public Controle() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == ControleDataAuto.ID ) + { + return id; + } + else if( fieldName == ControleDataAuto.ANALISE_YEAR ) + { + return analise_year; + } + else if( fieldName == ControleDataAuto.LAST_ANALISE_NR ) + { + return last_analise_nr; + } + else if( fieldName.equals( ControleDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( ControleDataAuto.ANALISE_YEAR ) ) + { + return analise_year; + } + else if( fieldName.equals( ControleDataAuto.LAST_ANALISE_NR ) ) + { + return last_analise_nr; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == ControleDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == ControleDataAuto.ANALISE_YEAR ) + { + analise_year = ( Integer ) value; + } + else if( fieldName == ControleDataAuto.LAST_ANALISE_NR ) + { + last_analise_nr = ( Integer ) value; + } + else if( fieldName.equals( ControleDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( ControleDataAuto.ANALISE_YEAR ) ) + { + analise_year = ( Integer ) value; + } + else if( fieldName.equals( ControleDataAuto.LAST_ANALISE_NR ) ) + { + last_analise_nr = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getAnalise_year() + { + return analise_year; + } + + public void setAnalise_year(Integer analise_yearValue ) + { + this.analise_year = analise_yearValue; + } + + public Integer getLast_analise_nr() + { + return last_analise_nr; + } + + public void setLast_analise_nr(Integer last_analise_nrValue ) + { + this.last_analise_nr = last_analise_nrValue; + } + + public Class getOuterClass() + { + return ControleDataAuto.class; + } + + public ControleDataAuto getOuterClassInstance() + { + ControleDataAuto outerObj = new ControleDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ControleData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ControleData.java new file mode 100644 index 00000000..9ebfa3e7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ControleData.java @@ -0,0 +1,18 @@ +/* +* ControleDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class ControleData extends com.evolute.siprp.server.db.data.siprp.ControleDataAuto +{ + + public ControleData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ControleDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ControleDataAuto.java new file mode 100644 index 00000000..187cc4df --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ControleDataAuto.java @@ -0,0 +1,107 @@ +/* +* ControleDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class ControleDataAuto extends JDOObject +{ + + public static final String TABLENAME = "controle"; + + public static final String ID = "id"; + public static final String ID_FULL = "controle.id"; + public static final String ANALISE_YEAR = "analise_year"; + public static final String ANALISE_YEAR_FULL = "controle.analise_year"; + public static final String LAST_ANALISE_NR = "last_analise_nr"; + public static final String LAST_ANALISE_NR_FULL = "controle.last_analise_nr"; + + public static final String FIELD_NAMES[] = new String[]{ + ANALISE_YEAR, LAST_ANALISE_NR, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, ANALISE_YEAR, LAST_ANALISE_NR, }; + + private Map dataHash; + + public ControleDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getAnalise_year() + { + return (Integer) get(ANALISE_YEAR); + } + + public void setAnalise_year(Integer analise_yearValue ) + { + this.set(ANALISE_YEAR, analise_yearValue ); + } + + public Integer getLast_analise_nr() + { + return (Integer) get(LAST_ANALISE_NR); + } + + public void setLast_analise_nr(Integer last_analise_nrValue ) + { + this.set(LAST_ANALISE_NR, last_analise_nrValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Controle.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Departamentos.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Departamentos.java new file mode 100644 index 00000000..4236cfb6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Departamentos.java @@ -0,0 +1,129 @@ +/* +* Departamentos.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class Departamentos implements JDOInnerObject +{ + private Integer id; + private String descricao; + private String activo; + + public Departamentos() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == DepartamentosDataAuto.ID ) + { + return id; + } + else if( fieldName == DepartamentosDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == DepartamentosDataAuto.ACTIVO ) + { + return activo; + } + else if( fieldName.equals( DepartamentosDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( DepartamentosDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( DepartamentosDataAuto.ACTIVO ) ) + { + return activo; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == DepartamentosDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == DepartamentosDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == DepartamentosDataAuto.ACTIVO ) + { + activo = ( String ) value; + } + else if( fieldName.equals( DepartamentosDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( DepartamentosDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( DepartamentosDataAuto.ACTIVO ) ) + { + activo = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public String getActivo() + { + return activo; + } + + public void setActivo(String activoValue ) + { + this.activo = activoValue; + } + + public Class getOuterClass() + { + return DepartamentosDataAuto.class; + } + + public DepartamentosDataAuto getOuterClassInstance() + { + DepartamentosDataAuto outerObj = new DepartamentosDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/DepartamentosData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/DepartamentosData.java new file mode 100644 index 00000000..33da6c5c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/DepartamentosData.java @@ -0,0 +1,18 @@ +/* +* DepartamentosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class DepartamentosData extends com.evolute.siprp.server.db.data.siprp.DepartamentosDataAuto +{ + + public DepartamentosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/DepartamentosDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/DepartamentosDataAuto.java new file mode 100644 index 00000000..5dc9787e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/DepartamentosDataAuto.java @@ -0,0 +1,107 @@ +/* +* DepartamentosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class DepartamentosDataAuto extends JDOObject +{ + + public static final String TABLENAME = "departamentos"; + + public static final String ID = "id"; + public static final String ID_FULL = "departamentos.id"; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "departamentos.descricao"; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "departamentos.activo"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, ACTIVO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, ACTIVO, }; + + private Map dataHash; + + public DepartamentosDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public String getActivo() + { + return (String) get(ACTIVO); + } + + public void setActivo(String activoValue ) + { + this.set(ACTIVO, activoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Departamentos.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Errors.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Errors.java new file mode 100644 index 00000000..2dc748da --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Errors.java @@ -0,0 +1,183 @@ +/* +* Errors.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class Errors implements JDOInnerObject +{ + private Integer id; + private java.sql.Timestamp date; + private String type; + private String environment; + private String description; + + public Errors() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == ErrorsDataAuto.ID ) + { + return id; + } + else if( fieldName == ErrorsDataAuto.DATE ) + { + return date; + } + else if( fieldName == ErrorsDataAuto.TYPE ) + { + return type; + } + else if( fieldName == ErrorsDataAuto.ENVIRONMENT ) + { + return environment; + } + else if( fieldName == ErrorsDataAuto.DESCRIPTION ) + { + return description; + } + else if( fieldName.equals( ErrorsDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( ErrorsDataAuto.DATE ) ) + { + return date; + } + else if( fieldName.equals( ErrorsDataAuto.TYPE ) ) + { + return type; + } + else if( fieldName.equals( ErrorsDataAuto.ENVIRONMENT ) ) + { + return environment; + } + else if( fieldName.equals( ErrorsDataAuto.DESCRIPTION ) ) + { + return description; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == ErrorsDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == ErrorsDataAuto.DATE ) + { + date = ( java.sql.Timestamp ) value; + } + else if( fieldName == ErrorsDataAuto.TYPE ) + { + type = ( String ) value; + } + else if( fieldName == ErrorsDataAuto.ENVIRONMENT ) + { + environment = ( String ) value; + } + else if( fieldName == ErrorsDataAuto.DESCRIPTION ) + { + description = ( String ) value; + } + else if( fieldName.equals( ErrorsDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( ErrorsDataAuto.DATE ) ) + { + date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( ErrorsDataAuto.TYPE ) ) + { + type = ( String ) value; + } + else if( fieldName.equals( ErrorsDataAuto.ENVIRONMENT ) ) + { + environment = ( String ) value; + } + else if( fieldName.equals( ErrorsDataAuto.DESCRIPTION ) ) + { + description = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public java.sql.Timestamp getDate() + { + return date; + } + + public void setDate(java.sql.Timestamp dateValue ) + { + this.date = dateValue; + } + + public String getType() + { + return type; + } + + public void setType(String typeValue ) + { + this.type = typeValue; + } + + public String getEnvironment() + { + return environment; + } + + public void setEnvironment(String environmentValue ) + { + this.environment = environmentValue; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String descriptionValue ) + { + this.description = descriptionValue; + } + + public Class getOuterClass() + { + return ErrorsDataAuto.class; + } + + public ErrorsDataAuto getOuterClassInstance() + { + ErrorsDataAuto outerObj = new ErrorsDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ErrorsData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ErrorsData.java new file mode 100644 index 00000000..647327f4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ErrorsData.java @@ -0,0 +1,18 @@ +/* +* ErrorsDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class ErrorsData extends com.evolute.siprp.server.db.data.siprp.ErrorsDataAuto +{ + + public ErrorsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ErrorsDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ErrorsDataAuto.java new file mode 100644 index 00000000..384d009d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ErrorsDataAuto.java @@ -0,0 +1,131 @@ +/* +* ErrorsDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class ErrorsDataAuto extends JDOObject +{ + + public static final String TABLENAME = "errors"; + + public static final String ID = "id"; + public static final String ID_FULL = "errors.id"; + public static final String DATE = "date"; + public static final String DATE_FULL = "errors.date"; + public static final String TYPE = "type"; + public static final String TYPE_FULL = "errors.type"; + public static final String ENVIRONMENT = "environment"; + public static final String ENVIRONMENT_FULL = "errors.environment"; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "errors.description"; + + public static final String FIELD_NAMES[] = new String[]{ + DATE, TYPE, ENVIRONMENT, DESCRIPTION, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DATE, TYPE, ENVIRONMENT, DESCRIPTION, }; + + private Map dataHash; + + public ErrorsDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public java.sql.Timestamp getDate() + { + return (java.sql.Timestamp) get(DATE); + } + + public void setDate(java.sql.Timestamp dateValue ) + { + this.set(DATE, dateValue ); + } + + public String getType() + { + return (String) get(TYPE); + } + + public void setType(String typeValue ) + { + this.set(TYPE, typeValue ); + } + + public String getEnvironment() + { + return (String) get(ENVIRONMENT); + } + + public void setEnvironment(String environmentValue ) + { + this.set(ENVIRONMENT, environmentValue ); + } + + public String getDescription() + { + return (String) get(DESCRIPTION); + } + + public void setDescription(String descriptionValue ) + { + this.set(DESCRIPTION, descriptionValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Errors.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Medidas.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Medidas.java new file mode 100644 index 00000000..484f6468 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Medidas.java @@ -0,0 +1,129 @@ +/* +* Medidas.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class Medidas implements JDOInnerObject +{ + private Integer id; + private Integer analise_id; + private String medida; + + public Medidas() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == MedidasDataAuto.ID ) + { + return id; + } + else if( fieldName == MedidasDataAuto.ANALISE_ID ) + { + return analise_id; + } + else if( fieldName == MedidasDataAuto.MEDIDA ) + { + return medida; + } + else if( fieldName.equals( MedidasDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( MedidasDataAuto.ANALISE_ID ) ) + { + return analise_id; + } + else if( fieldName.equals( MedidasDataAuto.MEDIDA ) ) + { + return medida; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == MedidasDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == MedidasDataAuto.ANALISE_ID ) + { + analise_id = ( Integer ) value; + } + else if( fieldName == MedidasDataAuto.MEDIDA ) + { + medida = ( String ) value; + } + else if( fieldName.equals( MedidasDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( MedidasDataAuto.ANALISE_ID ) ) + { + analise_id = ( Integer ) value; + } + else if( fieldName.equals( MedidasDataAuto.MEDIDA ) ) + { + medida = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getAnalise_id() + { + return analise_id; + } + + public void setAnalise_id(Integer analise_idValue ) + { + this.analise_id = analise_idValue; + } + + public String getMedida() + { + return medida; + } + + public void setMedida(String medidaValue ) + { + this.medida = medidaValue; + } + + public Class getOuterClass() + { + return MedidasDataAuto.class; + } + + public MedidasDataAuto getOuterClassInstance() + { + MedidasDataAuto outerObj = new MedidasDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/MedidasData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/MedidasData.java new file mode 100644 index 00000000..b1070ead --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/MedidasData.java @@ -0,0 +1,18 @@ +/* +* MedidasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class MedidasData extends com.evolute.siprp.server.db.data.siprp.MedidasDataAuto +{ + + public MedidasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/MedidasDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/MedidasDataAuto.java new file mode 100644 index 00000000..af9681da --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/MedidasDataAuto.java @@ -0,0 +1,166 @@ +/* +* MedidasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class MedidasDataAuto extends JDOObject +{ + + public static final String TABLENAME = "medidas"; + + public static final String ID = "id"; + public static final String ID_FULL = "medidas.id"; + public static final String ANALISE_ID = "analise_id"; + public static final String ANALISE_ID_FULL = "medidas.analise_id"; + public static final String TO_ANALISE_ID = "to analise_id"; + public static final String MEDIDA = "medida"; + public static final String MEDIDA_FULL = "medidas.medida"; + + public static final String FIELD_NAMES[] = new String[]{ + ANALISE_ID, TO_ANALISE_ID, MEDIDA, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, ANALISE_ID, MEDIDA, }; + + private Map dataHash; + + public MedidasDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getAnalise_id() + { + return (Integer) dataHash.get(ANALISE_ID); + } + + public void setAnalise_id(Integer analise_idValue ) + { + dataHash.put(TO_ANALISE_ID, null); + dataHash.put(ANALISE_ID, analise_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData toAnalise_id() + throws Exception + { + if( dataHash.get(TO_ANALISE_ID) == null && getAnalise_id() != null ) + { + dataHash.put(TO_ANALISE_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData.class, new Object[]{ getAnalise_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData) dataHash.get(TO_ANALISE_ID); + } + + public void setToAnalise_id(com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData analise_idObject ) + { + if( analise_idObject == null ) + { + dataHash.put(ANALISE_ID, null); + } + else + { + dataHash.put(ANALISE_ID, analise_idObject.get( com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData.ID )); + } + dataHash.put(TO_ANALISE_ID, analise_idObject); + } + + public String getMedida() + { + return (String) get(MEDIDA); + } + + public void setMedida(String medidaValue ) + { + this.set(MEDIDA, medidaValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_ANALISE_ID.equals( fieldName ) ) + { + value = toAnalise_id(); + } + else if( ANALISE_ID.equals( fieldName ) ) + { + value = getAnalise_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_ANALISE_ID.equals( fieldName ) ) + { + setToAnalise_id( (com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData) value ); + } + else if( ANALISE_ID.equals( fieldName ) ) + { + setAnalise_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_ANALISE_ID) != null ) + { + toAnalise_id().save(); + dataHash.put(ANALISE_ID, toAnalise_id().get( com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Medidas.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticias.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticias.java new file mode 100644 index 00000000..021af86a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticias.java @@ -0,0 +1,183 @@ +/* +* NotNoticias.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class NotNoticias implements JDOInnerObject +{ + private Integer id; + private java.util.Date data; + private java.sql.Timestamp stamp; + private String utilizador; + private String noticia; + + public NotNoticias() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == NotNoticiasDataAuto.ID ) + { + return id; + } + else if( fieldName == NotNoticiasDataAuto.DATA ) + { + return data; + } + else if( fieldName == NotNoticiasDataAuto.STAMP ) + { + return stamp; + } + else if( fieldName == NotNoticiasDataAuto.UTILIZADOR ) + { + return utilizador; + } + else if( fieldName == NotNoticiasDataAuto.NOTICIA ) + { + return noticia; + } + else if( fieldName.equals( NotNoticiasDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( NotNoticiasDataAuto.DATA ) ) + { + return data; + } + else if( fieldName.equals( NotNoticiasDataAuto.STAMP ) ) + { + return stamp; + } + else if( fieldName.equals( NotNoticiasDataAuto.UTILIZADOR ) ) + { + return utilizador; + } + else if( fieldName.equals( NotNoticiasDataAuto.NOTICIA ) ) + { + return noticia; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == NotNoticiasDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == NotNoticiasDataAuto.DATA ) + { + data = ( java.util.Date ) value; + } + else if( fieldName == NotNoticiasDataAuto.STAMP ) + { + stamp = ( java.sql.Timestamp ) value; + } + else if( fieldName == NotNoticiasDataAuto.UTILIZADOR ) + { + utilizador = ( String ) value; + } + else if( fieldName == NotNoticiasDataAuto.NOTICIA ) + { + noticia = ( String ) value; + } + else if( fieldName.equals( NotNoticiasDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( NotNoticiasDataAuto.DATA ) ) + { + data = ( java.util.Date ) value; + } + else if( fieldName.equals( NotNoticiasDataAuto.STAMP ) ) + { + stamp = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( NotNoticiasDataAuto.UTILIZADOR ) ) + { + utilizador = ( String ) value; + } + else if( fieldName.equals( NotNoticiasDataAuto.NOTICIA ) ) + { + noticia = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public java.util.Date getData() + { + return data; + } + + public void setData(java.util.Date dataValue ) + { + this.data = dataValue; + } + + public java.sql.Timestamp getStamp() + { + return stamp; + } + + public void setStamp(java.sql.Timestamp stampValue ) + { + this.stamp = stampValue; + } + + public String getUtilizador() + { + return utilizador; + } + + public void setUtilizador(String utilizadorValue ) + { + this.utilizador = utilizadorValue; + } + + public String getNoticia() + { + return noticia; + } + + public void setNoticia(String noticiaValue ) + { + this.noticia = noticiaValue; + } + + public Class getOuterClass() + { + return NotNoticiasDataAuto.class; + } + + public NotNoticiasDataAuto getOuterClassInstance() + { + NotNoticiasDataAuto outerObj = new NotNoticiasDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticiasData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticiasData.java new file mode 100644 index 00000000..42d07f7c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticiasData.java @@ -0,0 +1,18 @@ +/* +* NotNoticiasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class NotNoticiasData extends com.evolute.siprp.server.db.data.siprp.NotNoticiasDataAuto +{ + + public NotNoticiasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticiasDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticiasDataAuto.java new file mode 100644 index 00000000..9ff5a4a3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticiasDataAuto.java @@ -0,0 +1,131 @@ +/* +* NotNoticiasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class NotNoticiasDataAuto extends JDOObject +{ + + public static final String TABLENAME = "not_noticias"; + + public static final String ID = "id"; + public static final String ID_FULL = "not_noticias.id"; + public static final String DATA = "data"; + public static final String DATA_FULL = "not_noticias.data"; + public static final String STAMP = "stamp"; + public static final String STAMP_FULL = "not_noticias.stamp"; + public static final String UTILIZADOR = "utilizador"; + public static final String UTILIZADOR_FULL = "not_noticias.utilizador"; + public static final String NOTICIA = "noticia"; + public static final String NOTICIA_FULL = "not_noticias.noticia"; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, STAMP, UTILIZADOR, NOTICIA, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DATA, STAMP, UTILIZADOR, NOTICIA, }; + + private Map dataHash; + + public NotNoticiasDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public java.util.Date getData() + { + return (java.util.Date) get(DATA); + } + + public void setData(java.util.Date dataValue ) + { + this.set(DATA, dataValue ); + } + + public java.sql.Timestamp getStamp() + { + return (java.sql.Timestamp) get(STAMP); + } + + public void setStamp(java.sql.Timestamp stampValue ) + { + this.set(STAMP, stampValue ); + } + + public String getUtilizador() + { + return (String) get(UTILIZADOR); + } + + public void setUtilizador(String utilizadorValue ) + { + this.set(UTILIZADOR, utilizadorValue ); + } + + public String getNoticia() + { + return (String) get(NOTICIA); + } + + public void setNoticia(String noticiaValue ) + { + this.set(NOTICIA, noticiaValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return NotNoticias.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Permissoes.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Permissoes.java new file mode 100644 index 00000000..c7fe43d0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Permissoes.java @@ -0,0 +1,129 @@ +/* +* Permissoes.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class Permissoes implements JDOInnerObject +{ + private Integer id; + private Integer user_id; + private Integer codigo_permissao; + + public Permissoes() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == PermissoesDataAuto.ID ) + { + return id; + } + else if( fieldName == PermissoesDataAuto.USER_ID ) + { + return user_id; + } + else if( fieldName == PermissoesDataAuto.CODIGO_PERMISSAO ) + { + return codigo_permissao; + } + else if( fieldName.equals( PermissoesDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( PermissoesDataAuto.USER_ID ) ) + { + return user_id; + } + else if( fieldName.equals( PermissoesDataAuto.CODIGO_PERMISSAO ) ) + { + return codigo_permissao; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == PermissoesDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == PermissoesDataAuto.USER_ID ) + { + user_id = ( Integer ) value; + } + else if( fieldName == PermissoesDataAuto.CODIGO_PERMISSAO ) + { + codigo_permissao = ( Integer ) value; + } + else if( fieldName.equals( PermissoesDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( PermissoesDataAuto.USER_ID ) ) + { + user_id = ( Integer ) value; + } + else if( fieldName.equals( PermissoesDataAuto.CODIGO_PERMISSAO ) ) + { + codigo_permissao = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getUser_id() + { + return user_id; + } + + public void setUser_id(Integer user_idValue ) + { + this.user_id = user_idValue; + } + + public Integer getCodigo_permissao() + { + return codigo_permissao; + } + + public void setCodigo_permissao(Integer codigo_permissaoValue ) + { + this.codigo_permissao = codigo_permissaoValue; + } + + public Class getOuterClass() + { + return PermissoesDataAuto.class; + } + + public PermissoesDataAuto getOuterClassInstance() + { + PermissoesDataAuto outerObj = new PermissoesDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PermissoesData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PermissoesData.java new file mode 100644 index 00000000..dcf3524d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PermissoesData.java @@ -0,0 +1,18 @@ +/* +* PermissoesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class PermissoesData extends com.evolute.siprp.server.db.data.siprp.PermissoesDataAuto +{ + + public PermissoesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PermissoesDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PermissoesDataAuto.java new file mode 100644 index 00000000..df826391 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PermissoesDataAuto.java @@ -0,0 +1,166 @@ +/* +* PermissoesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class PermissoesDataAuto extends JDOObject +{ + + public static final String TABLENAME = "permissoes"; + + public static final String ID = "id"; + public static final String ID_FULL = "permissoes.id"; + public static final String USER_ID = "user_id"; + public static final String USER_ID_FULL = "permissoes.user_id"; + public static final String TO_USER_ID = "to user_id"; + public static final String CODIGO_PERMISSAO = "codigo_permissao"; + public static final String CODIGO_PERMISSAO_FULL = "permissoes.codigo_permissao"; + + public static final String FIELD_NAMES[] = new String[]{ + USER_ID, TO_USER_ID, CODIGO_PERMISSAO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, USER_ID, CODIGO_PERMISSAO, }; + + private Map dataHash; + + public PermissoesDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getUser_id() + { + return (Integer) dataHash.get(USER_ID); + } + + public void setUser_id(Integer user_idValue ) + { + dataHash.put(TO_USER_ID, null); + dataHash.put(USER_ID, user_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp.UtilizadoresData toUser_id() + throws Exception + { + if( dataHash.get(TO_USER_ID) == null && getUser_id() != null ) + { + dataHash.put(TO_USER_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.UtilizadoresData.class, new Object[]{ getUser_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp.UtilizadoresData) dataHash.get(TO_USER_ID); + } + + public void setToUser_id(com.evolute.siprp.server.db.data.siprp.UtilizadoresData user_idObject ) + { + if( user_idObject == null ) + { + dataHash.put(USER_ID, null); + } + else + { + dataHash.put(USER_ID, user_idObject.get( com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID )); + } + dataHash.put(TO_USER_ID, user_idObject); + } + + public Integer getCodigo_permissao() + { + return (Integer) get(CODIGO_PERMISSAO); + } + + public void setCodigo_permissao(Integer codigo_permissaoValue ) + { + this.set(CODIGO_PERMISSAO, codigo_permissaoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( USER_ID.equals( fieldName ) ) + { + value = getUser_id(); + } + else if( TO_USER_ID.equals( fieldName ) ) + { + value = toUser_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( USER_ID.equals( fieldName ) ) + { + setUser_id( (Integer) value ); + } + else if( TO_USER_ID.equals( fieldName ) ) + { + setToUser_id( (com.evolute.siprp.server.db.data.siprp.UtilizadoresData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_USER_ID) != null ) + { + toUser_id().save(); + dataHash.put(USER_ID, toUser_id().get( com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Permissoes.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreas.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreas.java new file mode 100644 index 00000000..21a05fd7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreas.java @@ -0,0 +1,156 @@ +/* +* PlanoAreas.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class PlanoAreas implements JDOInnerObject +{ + private String descricao; + private Integer plano_id; + private Integer id; + private Integer area_id; + + public PlanoAreas() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == PlanoAreasDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == PlanoAreasDataAuto.PLANO_ID ) + { + return plano_id; + } + else if( fieldName == PlanoAreasDataAuto.ID ) + { + return id; + } + else if( fieldName == PlanoAreasDataAuto.AREA_ID ) + { + return area_id; + } + else if( fieldName.equals( PlanoAreasDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( PlanoAreasDataAuto.PLANO_ID ) ) + { + return plano_id; + } + else if( fieldName.equals( PlanoAreasDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( PlanoAreasDataAuto.AREA_ID ) ) + { + return area_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == PlanoAreasDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == PlanoAreasDataAuto.PLANO_ID ) + { + plano_id = ( Integer ) value; + } + else if( fieldName == PlanoAreasDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == PlanoAreasDataAuto.AREA_ID ) + { + area_id = ( Integer ) value; + } + else if( fieldName.equals( PlanoAreasDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( PlanoAreasDataAuto.PLANO_ID ) ) + { + plano_id = ( Integer ) value; + } + else if( fieldName.equals( PlanoAreasDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( PlanoAreasDataAuto.AREA_ID ) ) + { + area_id = ( Integer ) value; + } + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public Integer getPlano_id() + { + return plano_id; + } + + public void setPlano_id(Integer plano_idValue ) + { + this.plano_id = plano_idValue; + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getArea_id() + { + return area_id; + } + + public void setArea_id(Integer area_idValue ) + { + this.area_id = area_idValue; + } + + public Class getOuterClass() + { + return PlanoAreasDataAuto.class; + } + + public PlanoAreasDataAuto getOuterClassInstance() + { + PlanoAreasDataAuto outerObj = new PlanoAreasDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreasData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreasData.java new file mode 100644 index 00000000..e91830bb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreasData.java @@ -0,0 +1,18 @@ +/* +* PlanoAreasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class PlanoAreasData extends com.evolute.siprp.server.db.data.siprp.PlanoAreasDataAuto +{ + + public PlanoAreasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreasDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreasDataAuto.java new file mode 100644 index 00000000..a9b1b6fd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreasDataAuto.java @@ -0,0 +1,178 @@ +/* +* PlanoAreasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class PlanoAreasDataAuto extends JDOObject +{ + + public static final String TABLENAME = "plano_areas"; + + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "plano_areas.descricao"; + public static final String PLANO_ID = "plano_id"; + public static final String PLANO_ID_FULL = "plano_areas.plano_id"; + public static final String TO_PLANO_ID = "to plano_id"; + public static final String ID = "id"; + public static final String ID_FULL = "plano_areas.id"; + public static final String AREA_ID = "area_id"; + public static final String AREA_ID_FULL = "plano_areas.area_id"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, PLANO_ID, TO_PLANO_ID, AREA_ID, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + DESCRICAO, PLANO_ID, ID, AREA_ID, }; + + private Map dataHash; + + public PlanoAreasDataAuto() + { + dataHash = new HashMap(); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public Integer getPlano_id() + { + return (Integer) dataHash.get(PLANO_ID); + } + + public void setPlano_id(Integer plano_idValue ) + { + dataHash.put(TO_PLANO_ID, null); + dataHash.put(PLANO_ID, plano_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp.PlanosActuacaoData toPlano_id() + throws Exception + { + if( dataHash.get(TO_PLANO_ID) == null && getPlano_id() != null ) + { + dataHash.put(TO_PLANO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.PlanosActuacaoData.class, new Object[]{ getPlano_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.PlanosActuacaoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp.PlanosActuacaoData) dataHash.get(TO_PLANO_ID); + } + + public void setToPlano_id(com.evolute.siprp.server.db.data.siprp.PlanosActuacaoData plano_idObject ) + { + if( plano_idObject == null ) + { + dataHash.put(PLANO_ID, null); + } + else + { + dataHash.put(PLANO_ID, plano_idObject.get( com.evolute.siprp.server.db.data.siprp.PlanosActuacaoData.ID )); + } + dataHash.put(TO_PLANO_ID, plano_idObject); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getArea_id() + { + return (Integer) get(AREA_ID); + } + + public void setArea_id(Integer area_idValue ) + { + this.set(AREA_ID, area_idValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_PLANO_ID.equals( fieldName ) ) + { + value = toPlano_id(); + } + else if( PLANO_ID.equals( fieldName ) ) + { + value = getPlano_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_PLANO_ID.equals( fieldName ) ) + { + setToPlano_id( (com.evolute.siprp.server.db.data.siprp.PlanosActuacaoData) value ); + } + else if( PLANO_ID.equals( fieldName ) ) + { + setPlano_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_PLANO_ID) != null ) + { + toPlano_id().save(); + dataHash.put(PLANO_ID, toPlano_id().get( com.evolute.siprp.server.db.data.siprp.PlanosActuacaoData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return PlanoAreas.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidas.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidas.java new file mode 100644 index 00000000..0aec8ae8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidas.java @@ -0,0 +1,156 @@ +/* +* PlanoMedidas.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class PlanoMedidas implements JDOInnerObject +{ + private String descricao; + private Integer risco_id; + private Integer id; + private Integer medida_id; + + public PlanoMedidas() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == PlanoMedidasDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == PlanoMedidasDataAuto.RISCO_ID ) + { + return risco_id; + } + else if( fieldName == PlanoMedidasDataAuto.ID ) + { + return id; + } + else if( fieldName == PlanoMedidasDataAuto.MEDIDA_ID ) + { + return medida_id; + } + else if( fieldName.equals( PlanoMedidasDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( PlanoMedidasDataAuto.RISCO_ID ) ) + { + return risco_id; + } + else if( fieldName.equals( PlanoMedidasDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( PlanoMedidasDataAuto.MEDIDA_ID ) ) + { + return medida_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == PlanoMedidasDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == PlanoMedidasDataAuto.RISCO_ID ) + { + risco_id = ( Integer ) value; + } + else if( fieldName == PlanoMedidasDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == PlanoMedidasDataAuto.MEDIDA_ID ) + { + medida_id = ( Integer ) value; + } + else if( fieldName.equals( PlanoMedidasDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( PlanoMedidasDataAuto.RISCO_ID ) ) + { + risco_id = ( Integer ) value; + } + else if( fieldName.equals( PlanoMedidasDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( PlanoMedidasDataAuto.MEDIDA_ID ) ) + { + medida_id = ( Integer ) value; + } + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public Integer getRisco_id() + { + return risco_id; + } + + public void setRisco_id(Integer risco_idValue ) + { + this.risco_id = risco_idValue; + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getMedida_id() + { + return medida_id; + } + + public void setMedida_id(Integer medida_idValue ) + { + this.medida_id = medida_idValue; + } + + public Class getOuterClass() + { + return PlanoMedidasDataAuto.class; + } + + public PlanoMedidasDataAuto getOuterClassInstance() + { + PlanoMedidasDataAuto outerObj = new PlanoMedidasDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidasData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidasData.java new file mode 100644 index 00000000..6bf63707 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidasData.java @@ -0,0 +1,18 @@ +/* +* PlanoMedidasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class PlanoMedidasData extends com.evolute.siprp.server.db.data.siprp.PlanoMedidasDataAuto +{ + + public PlanoMedidasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidasDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidasDataAuto.java new file mode 100644 index 00000000..774b51cc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidasDataAuto.java @@ -0,0 +1,178 @@ +/* +* PlanoMedidasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class PlanoMedidasDataAuto extends JDOObject +{ + + public static final String TABLENAME = "plano_medidas"; + + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "plano_medidas.descricao"; + public static final String RISCO_ID = "risco_id"; + public static final String RISCO_ID_FULL = "plano_medidas.risco_id"; + public static final String TO_RISCO_ID = "to risco_id"; + public static final String ID = "id"; + public static final String ID_FULL = "plano_medidas.id"; + public static final String MEDIDA_ID = "medida_id"; + public static final String MEDIDA_ID_FULL = "plano_medidas.medida_id"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, RISCO_ID, TO_RISCO_ID, MEDIDA_ID, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + DESCRICAO, RISCO_ID, ID, MEDIDA_ID, }; + + private Map dataHash; + + public PlanoMedidasDataAuto() + { + dataHash = new HashMap(); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public Integer getRisco_id() + { + return (Integer) dataHash.get(RISCO_ID); + } + + public void setRisco_id(Integer risco_idValue ) + { + dataHash.put(TO_RISCO_ID, null); + dataHash.put(RISCO_ID, risco_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp.PlanoRiscosData toRisco_id() + throws Exception + { + if( dataHash.get(TO_RISCO_ID) == null && getRisco_id() != null ) + { + dataHash.put(TO_RISCO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.PlanoRiscosData.class, new Object[]{ getRisco_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.PlanoRiscosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp.PlanoRiscosData) dataHash.get(TO_RISCO_ID); + } + + public void setToRisco_id(com.evolute.siprp.server.db.data.siprp.PlanoRiscosData risco_idObject ) + { + if( risco_idObject == null ) + { + dataHash.put(RISCO_ID, null); + } + else + { + dataHash.put(RISCO_ID, risco_idObject.get( com.evolute.siprp.server.db.data.siprp.PlanoRiscosData.ID )); + } + dataHash.put(TO_RISCO_ID, risco_idObject); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getMedida_id() + { + return (Integer) get(MEDIDA_ID); + } + + public void setMedida_id(Integer medida_idValue ) + { + this.set(MEDIDA_ID, medida_idValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_RISCO_ID.equals( fieldName ) ) + { + value = toRisco_id(); + } + else if( RISCO_ID.equals( fieldName ) ) + { + value = getRisco_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_RISCO_ID.equals( fieldName ) ) + { + setToRisco_id( (com.evolute.siprp.server.db.data.siprp.PlanoRiscosData) value ); + } + else if( RISCO_ID.equals( fieldName ) ) + { + setRisco_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_RISCO_ID) != null ) + { + toRisco_id().save(); + dataHash.put(RISCO_ID, toRisco_id().get( com.evolute.siprp.server.db.data.siprp.PlanoRiscosData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return PlanoMedidas.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalho.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalho.java new file mode 100644 index 00000000..9c99caf3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalho.java @@ -0,0 +1,156 @@ +/* +* PlanoPostosTrabalho.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class PlanoPostosTrabalho implements JDOInnerObject +{ + private String descricao; + private Integer medida_id; + private Integer id; + private Integer posto_id; + + public PlanoPostosTrabalho() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == PlanoPostosTrabalhoDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == PlanoPostosTrabalhoDataAuto.MEDIDA_ID ) + { + return medida_id; + } + else if( fieldName == PlanoPostosTrabalhoDataAuto.ID ) + { + return id; + } + else if( fieldName == PlanoPostosTrabalhoDataAuto.POSTO_ID ) + { + return posto_id; + } + else if( fieldName.equals( PlanoPostosTrabalhoDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( PlanoPostosTrabalhoDataAuto.MEDIDA_ID ) ) + { + return medida_id; + } + else if( fieldName.equals( PlanoPostosTrabalhoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( PlanoPostosTrabalhoDataAuto.POSTO_ID ) ) + { + return posto_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == PlanoPostosTrabalhoDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == PlanoPostosTrabalhoDataAuto.MEDIDA_ID ) + { + medida_id = ( Integer ) value; + } + else if( fieldName == PlanoPostosTrabalhoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == PlanoPostosTrabalhoDataAuto.POSTO_ID ) + { + posto_id = ( Integer ) value; + } + else if( fieldName.equals( PlanoPostosTrabalhoDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( PlanoPostosTrabalhoDataAuto.MEDIDA_ID ) ) + { + medida_id = ( Integer ) value; + } + else if( fieldName.equals( PlanoPostosTrabalhoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( PlanoPostosTrabalhoDataAuto.POSTO_ID ) ) + { + posto_id = ( Integer ) value; + } + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public Integer getMedida_id() + { + return medida_id; + } + + public void setMedida_id(Integer medida_idValue ) + { + this.medida_id = medida_idValue; + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getPosto_id() + { + return posto_id; + } + + public void setPosto_id(Integer posto_idValue ) + { + this.posto_id = posto_idValue; + } + + public Class getOuterClass() + { + return PlanoPostosTrabalhoDataAuto.class; + } + + public PlanoPostosTrabalhoDataAuto getOuterClassInstance() + { + PlanoPostosTrabalhoDataAuto outerObj = new PlanoPostosTrabalhoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalhoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalhoData.java new file mode 100644 index 00000000..1106ee73 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalhoData.java @@ -0,0 +1,18 @@ +/* +* PlanoPostosTrabalhoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class PlanoPostosTrabalhoData extends com.evolute.siprp.server.db.data.siprp.PlanoPostosTrabalhoDataAuto +{ + + public PlanoPostosTrabalhoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalhoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalhoDataAuto.java new file mode 100644 index 00000000..e4ca4469 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalhoDataAuto.java @@ -0,0 +1,178 @@ +/* +* PlanoPostosTrabalhoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class PlanoPostosTrabalhoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "plano_postos_trabalho"; + + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "plano_postos_trabalho.descricao"; + public static final String MEDIDA_ID = "medida_id"; + public static final String MEDIDA_ID_FULL = "plano_postos_trabalho.medida_id"; + public static final String TO_MEDIDA_ID = "to medida_id"; + public static final String ID = "id"; + public static final String ID_FULL = "plano_postos_trabalho.id"; + public static final String POSTO_ID = "posto_id"; + public static final String POSTO_ID_FULL = "plano_postos_trabalho.posto_id"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, MEDIDA_ID, TO_MEDIDA_ID, POSTO_ID, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + DESCRICAO, MEDIDA_ID, ID, POSTO_ID, }; + + private Map dataHash; + + public PlanoPostosTrabalhoDataAuto() + { + dataHash = new HashMap(); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public Integer getMedida_id() + { + return (Integer) dataHash.get(MEDIDA_ID); + } + + public void setMedida_id(Integer medida_idValue ) + { + dataHash.put(TO_MEDIDA_ID, null); + dataHash.put(MEDIDA_ID, medida_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp.PlanoMedidasData toMedida_id() + throws Exception + { + if( dataHash.get(TO_MEDIDA_ID) == null && getMedida_id() != null ) + { + dataHash.put(TO_MEDIDA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.PlanoMedidasData.class, new Object[]{ getMedida_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.PlanoMedidasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp.PlanoMedidasData) dataHash.get(TO_MEDIDA_ID); + } + + public void setToMedida_id(com.evolute.siprp.server.db.data.siprp.PlanoMedidasData medida_idObject ) + { + if( medida_idObject == null ) + { + dataHash.put(MEDIDA_ID, null); + } + else + { + dataHash.put(MEDIDA_ID, medida_idObject.get( com.evolute.siprp.server.db.data.siprp.PlanoMedidasData.ID )); + } + dataHash.put(TO_MEDIDA_ID, medida_idObject); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getPosto_id() + { + return (Integer) get(POSTO_ID); + } + + public void setPosto_id(Integer posto_idValue ) + { + this.set(POSTO_ID, posto_idValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( MEDIDA_ID.equals( fieldName ) ) + { + value = getMedida_id(); + } + else if( TO_MEDIDA_ID.equals( fieldName ) ) + { + value = toMedida_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( MEDIDA_ID.equals( fieldName ) ) + { + setMedida_id( (Integer) value ); + } + else if( TO_MEDIDA_ID.equals( fieldName ) ) + { + setToMedida_id( (com.evolute.siprp.server.db.data.siprp.PlanoMedidasData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_MEDIDA_ID) != null ) + { + toMedida_id().save(); + dataHash.put(MEDIDA_ID, toMedida_id().get( com.evolute.siprp.server.db.data.siprp.PlanoMedidasData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return PlanoPostosTrabalho.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscos.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscos.java new file mode 100644 index 00000000..61804920 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscos.java @@ -0,0 +1,426 @@ +/* +* PlanoRiscos.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class PlanoRiscos implements JDOInnerObject +{ + private String descricao; + private String activo; + private Integer area_id; + private Integer id; + private Integer valor; + private String responsavel_execucao; + private String recursos_necessarios; + private java.util.Date data_inicio; + private java.util.Date data_fim; + private String parecer_dl; + private String parecer_dns; + private String verificacao_siprp; + private Integer risco_id; + private String por; + + public PlanoRiscos() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == PlanoRiscosDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == PlanoRiscosDataAuto.ACTIVO ) + { + return activo; + } + else if( fieldName == PlanoRiscosDataAuto.AREA_ID ) + { + return area_id; + } + else if( fieldName == PlanoRiscosDataAuto.ID ) + { + return id; + } + else if( fieldName == PlanoRiscosDataAuto.VALOR ) + { + return valor; + } + else if( fieldName == PlanoRiscosDataAuto.RESPONSAVEL_EXECUCAO ) + { + return responsavel_execucao; + } + else if( fieldName == PlanoRiscosDataAuto.RECURSOS_NECESSARIOS ) + { + return recursos_necessarios; + } + else if( fieldName == PlanoRiscosDataAuto.DATA_INICIO ) + { + return data_inicio; + } + else if( fieldName == PlanoRiscosDataAuto.DATA_FIM ) + { + return data_fim; + } + else if( fieldName == PlanoRiscosDataAuto.PARECER_DL ) + { + return parecer_dl; + } + else if( fieldName == PlanoRiscosDataAuto.PARECER_DNS ) + { + return parecer_dns; + } + else if( fieldName == PlanoRiscosDataAuto.VERIFICACAO_SIPRP ) + { + return verificacao_siprp; + } + else if( fieldName == PlanoRiscosDataAuto.RISCO_ID ) + { + return risco_id; + } + else if( fieldName == PlanoRiscosDataAuto.POR ) + { + return por; + } + else if( fieldName.equals( PlanoRiscosDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( PlanoRiscosDataAuto.ACTIVO ) ) + { + return activo; + } + else if( fieldName.equals( PlanoRiscosDataAuto.AREA_ID ) ) + { + return area_id; + } + else if( fieldName.equals( PlanoRiscosDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( PlanoRiscosDataAuto.VALOR ) ) + { + return valor; + } + else if( fieldName.equals( PlanoRiscosDataAuto.RESPONSAVEL_EXECUCAO ) ) + { + return responsavel_execucao; + } + else if( fieldName.equals( PlanoRiscosDataAuto.RECURSOS_NECESSARIOS ) ) + { + return recursos_necessarios; + } + else if( fieldName.equals( PlanoRiscosDataAuto.DATA_INICIO ) ) + { + return data_inicio; + } + else if( fieldName.equals( PlanoRiscosDataAuto.DATA_FIM ) ) + { + return data_fim; + } + else if( fieldName.equals( PlanoRiscosDataAuto.PARECER_DL ) ) + { + return parecer_dl; + } + else if( fieldName.equals( PlanoRiscosDataAuto.PARECER_DNS ) ) + { + return parecer_dns; + } + else if( fieldName.equals( PlanoRiscosDataAuto.VERIFICACAO_SIPRP ) ) + { + return verificacao_siprp; + } + else if( fieldName.equals( PlanoRiscosDataAuto.RISCO_ID ) ) + { + return risco_id; + } + else if( fieldName.equals( PlanoRiscosDataAuto.POR ) ) + { + return por; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == PlanoRiscosDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == PlanoRiscosDataAuto.ACTIVO ) + { + activo = ( String ) value; + } + else if( fieldName == PlanoRiscosDataAuto.AREA_ID ) + { + area_id = ( Integer ) value; + } + else if( fieldName == PlanoRiscosDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == PlanoRiscosDataAuto.VALOR ) + { + valor = ( Integer ) value; + } + else if( fieldName == PlanoRiscosDataAuto.RESPONSAVEL_EXECUCAO ) + { + responsavel_execucao = ( String ) value; + } + else if( fieldName == PlanoRiscosDataAuto.RECURSOS_NECESSARIOS ) + { + recursos_necessarios = ( String ) value; + } + else if( fieldName == PlanoRiscosDataAuto.DATA_INICIO ) + { + data_inicio = ( java.util.Date ) value; + } + else if( fieldName == PlanoRiscosDataAuto.DATA_FIM ) + { + data_fim = ( java.util.Date ) value; + } + else if( fieldName == PlanoRiscosDataAuto.PARECER_DL ) + { + parecer_dl = ( String ) value; + } + else if( fieldName == PlanoRiscosDataAuto.PARECER_DNS ) + { + parecer_dns = ( String ) value; + } + else if( fieldName == PlanoRiscosDataAuto.VERIFICACAO_SIPRP ) + { + verificacao_siprp = ( String ) value; + } + else if( fieldName == PlanoRiscosDataAuto.RISCO_ID ) + { + risco_id = ( Integer ) value; + } + else if( fieldName == PlanoRiscosDataAuto.POR ) + { + por = ( String ) value; + } + else if( fieldName.equals( PlanoRiscosDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( PlanoRiscosDataAuto.ACTIVO ) ) + { + activo = ( String ) value; + } + else if( fieldName.equals( PlanoRiscosDataAuto.AREA_ID ) ) + { + area_id = ( Integer ) value; + } + else if( fieldName.equals( PlanoRiscosDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( PlanoRiscosDataAuto.VALOR ) ) + { + valor = ( Integer ) value; + } + else if( fieldName.equals( PlanoRiscosDataAuto.RESPONSAVEL_EXECUCAO ) ) + { + responsavel_execucao = ( String ) value; + } + else if( fieldName.equals( PlanoRiscosDataAuto.RECURSOS_NECESSARIOS ) ) + { + recursos_necessarios = ( String ) value; + } + else if( fieldName.equals( PlanoRiscosDataAuto.DATA_INICIO ) ) + { + data_inicio = ( java.util.Date ) value; + } + else if( fieldName.equals( PlanoRiscosDataAuto.DATA_FIM ) ) + { + data_fim = ( java.util.Date ) value; + } + else if( fieldName.equals( PlanoRiscosDataAuto.PARECER_DL ) ) + { + parecer_dl = ( String ) value; + } + else if( fieldName.equals( PlanoRiscosDataAuto.PARECER_DNS ) ) + { + parecer_dns = ( String ) value; + } + else if( fieldName.equals( PlanoRiscosDataAuto.VERIFICACAO_SIPRP ) ) + { + verificacao_siprp = ( String ) value; + } + else if( fieldName.equals( PlanoRiscosDataAuto.RISCO_ID ) ) + { + risco_id = ( Integer ) value; + } + else if( fieldName.equals( PlanoRiscosDataAuto.POR ) ) + { + por = ( String ) value; + } + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public String getActivo() + { + return activo; + } + + public void setActivo(String activoValue ) + { + this.activo = activoValue; + } + + public Integer getArea_id() + { + return area_id; + } + + public void setArea_id(Integer area_idValue ) + { + this.area_id = area_idValue; + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getValor() + { + return valor; + } + + public void setValor(Integer valorValue ) + { + this.valor = valorValue; + } + + public String getResponsavel_execucao() + { + return responsavel_execucao; + } + + public void setResponsavel_execucao(String responsavel_execucaoValue ) + { + this.responsavel_execucao = responsavel_execucaoValue; + } + + public String getRecursos_necessarios() + { + return recursos_necessarios; + } + + public void setRecursos_necessarios(String recursos_necessariosValue ) + { + this.recursos_necessarios = recursos_necessariosValue; + } + + public java.util.Date getData_inicio() + { + return data_inicio; + } + + public void setData_inicio(java.util.Date data_inicioValue ) + { + this.data_inicio = data_inicioValue; + } + + public java.util.Date getData_fim() + { + return data_fim; + } + + public void setData_fim(java.util.Date data_fimValue ) + { + this.data_fim = data_fimValue; + } + + public String getParecer_dl() + { + return parecer_dl; + } + + public void setParecer_dl(String parecer_dlValue ) + { + this.parecer_dl = parecer_dlValue; + } + + public String getParecer_dns() + { + return parecer_dns; + } + + public void setParecer_dns(String parecer_dnsValue ) + { + this.parecer_dns = parecer_dnsValue; + } + + public String getVerificacao_siprp() + { + return verificacao_siprp; + } + + public void setVerificacao_siprp(String verificacao_siprpValue ) + { + this.verificacao_siprp = verificacao_siprpValue; + } + + public Integer getRisco_id() + { + return risco_id; + } + + public void setRisco_id(Integer risco_idValue ) + { + this.risco_id = risco_idValue; + } + + public String getPor() + { + return por; + } + + public void setPor(String porValue ) + { + this.por = porValue; + } + + public Class getOuterClass() + { + return PlanoRiscosDataAuto.class; + } + + public PlanoRiscosDataAuto getOuterClassInstance() + { + PlanoRiscosDataAuto outerObj = new PlanoRiscosDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscosData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscosData.java new file mode 100644 index 00000000..a493cf37 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscosData.java @@ -0,0 +1,18 @@ +/* +* PlanoRiscosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class PlanoRiscosData extends com.evolute.siprp.server.db.data.siprp.PlanoRiscosDataAuto +{ + + public PlanoRiscosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscosDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscosDataAuto.java new file mode 100644 index 00000000..46b649ef --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscosDataAuto.java @@ -0,0 +1,301 @@ +/* +* PlanoRiscosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class PlanoRiscosDataAuto extends JDOObject +{ + + public static final String TABLENAME = "plano_riscos"; + + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "plano_riscos.descricao"; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "plano_riscos.activo"; + public static final String AREA_ID = "area_id"; + public static final String AREA_ID_FULL = "plano_riscos.area_id"; + public static final String TO_AREA_ID = "to area_id"; + public static final String ID = "id"; + public static final String ID_FULL = "plano_riscos.id"; + public static final String VALOR = "valor"; + public static final String VALOR_FULL = "plano_riscos.valor"; + public static final String RESPONSAVEL_EXECUCAO = "responsavel_execucao"; + public static final String RESPONSAVEL_EXECUCAO_FULL = "plano_riscos.responsavel_execucao"; + public static final String RECURSOS_NECESSARIOS = "recursos_necessarios"; + public static final String RECURSOS_NECESSARIOS_FULL = "plano_riscos.recursos_necessarios"; + public static final String DATA_INICIO = "data_inicio"; + public static final String DATA_INICIO_FULL = "plano_riscos.data_inicio"; + public static final String DATA_FIM = "data_fim"; + public static final String DATA_FIM_FULL = "plano_riscos.data_fim"; + public static final String PARECER_DL = "parecer_dl"; + public static final String PARECER_DL_FULL = "plano_riscos.parecer_dl"; + public static final String PARECER_DNS = "parecer_dns"; + public static final String PARECER_DNS_FULL = "plano_riscos.parecer_dns"; + public static final String VERIFICACAO_SIPRP = "verificacao_siprp"; + public static final String VERIFICACAO_SIPRP_FULL = "plano_riscos.verificacao_siprp"; + public static final String RISCO_ID = "risco_id"; + public static final String RISCO_ID_FULL = "plano_riscos.risco_id"; + public static final String POR = "por"; + public static final String POR_FULL = "plano_riscos.por"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, ACTIVO, AREA_ID, TO_AREA_ID, VALOR, RESPONSAVEL_EXECUCAO, + RECURSOS_NECESSARIOS, DATA_INICIO, DATA_FIM, PARECER_DL, PARECER_DNS, + VERIFICACAO_SIPRP, RISCO_ID, POR, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + DESCRICAO, ACTIVO, AREA_ID, ID, VALOR, RESPONSAVEL_EXECUCAO, RECURSOS_NECESSARIOS, + DATA_INICIO, DATA_FIM, PARECER_DL, PARECER_DNS, VERIFICACAO_SIPRP, RISCO_ID, POR, }; + + private Map dataHash; + + public PlanoRiscosDataAuto() + { + dataHash = new HashMap(); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public String getActivo() + { + return (String) get(ACTIVO); + } + + public void setActivo(String activoValue ) + { + this.set(ACTIVO, activoValue ); + } + + public Integer getArea_id() + { + return (Integer) dataHash.get(AREA_ID); + } + + public void setArea_id(Integer area_idValue ) + { + dataHash.put(TO_AREA_ID, null); + dataHash.put(AREA_ID, area_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp.PlanoAreasData toArea_id() + throws Exception + { + if( dataHash.get(TO_AREA_ID) == null && getArea_id() != null ) + { + dataHash.put(TO_AREA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.PlanoAreasData.class, new Object[]{ getArea_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.PlanoAreasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp.PlanoAreasData) dataHash.get(TO_AREA_ID); + } + + public void setToArea_id(com.evolute.siprp.server.db.data.siprp.PlanoAreasData area_idObject ) + { + if( area_idObject == null ) + { + dataHash.put(AREA_ID, null); + } + else + { + dataHash.put(AREA_ID, area_idObject.get( com.evolute.siprp.server.db.data.siprp.PlanoAreasData.ID )); + } + dataHash.put(TO_AREA_ID, area_idObject); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getValor() + { + return (Integer) get(VALOR); + } + + public void setValor(Integer valorValue ) + { + this.set(VALOR, valorValue ); + } + + public String getResponsavel_execucao() + { + return (String) get(RESPONSAVEL_EXECUCAO); + } + + public void setResponsavel_execucao(String responsavel_execucaoValue ) + { + this.set(RESPONSAVEL_EXECUCAO, responsavel_execucaoValue ); + } + + public String getRecursos_necessarios() + { + return (String) get(RECURSOS_NECESSARIOS); + } + + public void setRecursos_necessarios(String recursos_necessariosValue ) + { + this.set(RECURSOS_NECESSARIOS, recursos_necessariosValue ); + } + + public java.util.Date getData_inicio() + { + return (java.util.Date) get(DATA_INICIO); + } + + public void setData_inicio(java.util.Date data_inicioValue ) + { + this.set(DATA_INICIO, data_inicioValue ); + } + + public java.util.Date getData_fim() + { + return (java.util.Date) get(DATA_FIM); + } + + public void setData_fim(java.util.Date data_fimValue ) + { + this.set(DATA_FIM, data_fimValue ); + } + + public String getParecer_dl() + { + return (String) get(PARECER_DL); + } + + public void setParecer_dl(String parecer_dlValue ) + { + this.set(PARECER_DL, parecer_dlValue ); + } + + public String getParecer_dns() + { + return (String) get(PARECER_DNS); + } + + public void setParecer_dns(String parecer_dnsValue ) + { + this.set(PARECER_DNS, parecer_dnsValue ); + } + + public String getVerificacao_siprp() + { + return (String) get(VERIFICACAO_SIPRP); + } + + public void setVerificacao_siprp(String verificacao_siprpValue ) + { + this.set(VERIFICACAO_SIPRP, verificacao_siprpValue ); + } + + public Integer getRisco_id() + { + return (Integer) get(RISCO_ID); + } + + public void setRisco_id(Integer risco_idValue ) + { + this.set(RISCO_ID, risco_idValue ); + } + + public String getPor() + { + return (String) get(POR); + } + + public void setPor(String porValue ) + { + this.set(POR, porValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_AREA_ID.equals( fieldName ) ) + { + value = toArea_id(); + } + else if( AREA_ID.equals( fieldName ) ) + { + value = getArea_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_AREA_ID.equals( fieldName ) ) + { + setToArea_id( (com.evolute.siprp.server.db.data.siprp.PlanoAreasData) value ); + } + else if( AREA_ID.equals( fieldName ) ) + { + setArea_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_AREA_ID) != null ) + { + toArea_id().save(); + dataHash.put(AREA_ID, toArea_id().get( com.evolute.siprp.server.db.data.siprp.PlanoAreasData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return PlanoRiscos.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacao.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacao.java new file mode 100644 index 00000000..6b486673 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacao.java @@ -0,0 +1,804 @@ +/* +* PlanosActuacao.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class PlanosActuacao implements JDOInnerObject +{ + private Integer estabelecimento_id; + private Integer fase; + private java.util.Date data_visita; + private String nome_estabelecimento; + private Boolean validacao_director_loja; + private Boolean validacao_dns; + private Boolean validacao_hs; + private String parecer_dns; + private String obs_correcao; + private java.util.Date data_validacao_dir_loja; + private Integer user_dir_loja; + private java.util.Date data_validacao_dns; + private Integer user_dns; + private java.util.Date data_validacao_hs; + private Integer user_hs; + private Integer fase_antes_correcao; + private String correcao; + private String observacoes_dl; + private String observacoes_dns; + private String verificacao_siprp; + private java.util.Date data_controlo; + private java.util.Date data_email_controlo; + private Integer empresa_id; + private String nome_empresa; + private Integer tecnico_hs_id; + private String tecnico_hs_nome; + private Integer id; + private java.util.Date data_relatorio; + + public PlanosActuacao() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == PlanosActuacaoDataAuto.ESTABELECIMENTO_ID ) + { + return estabelecimento_id; + } + else if( fieldName == PlanosActuacaoDataAuto.FASE ) + { + return fase; + } + else if( fieldName == PlanosActuacaoDataAuto.DATA_VISITA ) + { + return data_visita; + } + else if( fieldName == PlanosActuacaoDataAuto.NOME_ESTABELECIMENTO ) + { + return nome_estabelecimento; + } + else if( fieldName == PlanosActuacaoDataAuto.VALIDACAO_DIRECTOR_LOJA ) + { + return validacao_director_loja; + } + else if( fieldName == PlanosActuacaoDataAuto.VALIDACAO_DNS ) + { + return validacao_dns; + } + else if( fieldName == PlanosActuacaoDataAuto.VALIDACAO_HS ) + { + return validacao_hs; + } + else if( fieldName == PlanosActuacaoDataAuto.PARECER_DNS ) + { + return parecer_dns; + } + else if( fieldName == PlanosActuacaoDataAuto.OBS_CORRECAO ) + { + return obs_correcao; + } + else if( fieldName == PlanosActuacaoDataAuto.DATA_VALIDACAO_DIR_LOJA ) + { + return data_validacao_dir_loja; + } + else if( fieldName == PlanosActuacaoDataAuto.USER_DIR_LOJA ) + { + return user_dir_loja; + } + else if( fieldName == PlanosActuacaoDataAuto.DATA_VALIDACAO_DNS ) + { + return data_validacao_dns; + } + else if( fieldName == PlanosActuacaoDataAuto.USER_DNS ) + { + return user_dns; + } + else if( fieldName == PlanosActuacaoDataAuto.DATA_VALIDACAO_HS ) + { + return data_validacao_hs; + } + else if( fieldName == PlanosActuacaoDataAuto.USER_HS ) + { + return user_hs; + } + else if( fieldName == PlanosActuacaoDataAuto.FASE_ANTES_CORRECAO ) + { + return fase_antes_correcao; + } + else if( fieldName == PlanosActuacaoDataAuto.CORRECAO ) + { + return correcao; + } + else if( fieldName == PlanosActuacaoDataAuto.OBSERVACOES_DL ) + { + return observacoes_dl; + } + else if( fieldName == PlanosActuacaoDataAuto.OBSERVACOES_DNS ) + { + return observacoes_dns; + } + else if( fieldName == PlanosActuacaoDataAuto.VERIFICACAO_SIPRP ) + { + return verificacao_siprp; + } + else if( fieldName == PlanosActuacaoDataAuto.DATA_CONTROLO ) + { + return data_controlo; + } + else if( fieldName == PlanosActuacaoDataAuto.DATA_EMAIL_CONTROLO ) + { + return data_email_controlo; + } + else if( fieldName == PlanosActuacaoDataAuto.EMPRESA_ID ) + { + return empresa_id; + } + else if( fieldName == PlanosActuacaoDataAuto.NOME_EMPRESA ) + { + return nome_empresa; + } + else if( fieldName == PlanosActuacaoDataAuto.TECNICO_HS_ID ) + { + return tecnico_hs_id; + } + else if( fieldName == PlanosActuacaoDataAuto.TECNICO_HS_NOME ) + { + return tecnico_hs_nome; + } + else if( fieldName == PlanosActuacaoDataAuto.ID ) + { + return id; + } + else if( fieldName == PlanosActuacaoDataAuto.DATA_RELATORIO ) + { + return data_relatorio; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.ESTABELECIMENTO_ID ) ) + { + return estabelecimento_id; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.FASE ) ) + { + return fase; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_VISITA ) ) + { + return data_visita; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.NOME_ESTABELECIMENTO ) ) + { + return nome_estabelecimento; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.VALIDACAO_DIRECTOR_LOJA ) ) + { + return validacao_director_loja; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.VALIDACAO_DNS ) ) + { + return validacao_dns; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.VALIDACAO_HS ) ) + { + return validacao_hs; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.PARECER_DNS ) ) + { + return parecer_dns; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.OBS_CORRECAO ) ) + { + return obs_correcao; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_VALIDACAO_DIR_LOJA ) ) + { + return data_validacao_dir_loja; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.USER_DIR_LOJA ) ) + { + return user_dir_loja; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_VALIDACAO_DNS ) ) + { + return data_validacao_dns; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.USER_DNS ) ) + { + return user_dns; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_VALIDACAO_HS ) ) + { + return data_validacao_hs; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.USER_HS ) ) + { + return user_hs; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.FASE_ANTES_CORRECAO ) ) + { + return fase_antes_correcao; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.CORRECAO ) ) + { + return correcao; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.OBSERVACOES_DL ) ) + { + return observacoes_dl; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.OBSERVACOES_DNS ) ) + { + return observacoes_dns; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.VERIFICACAO_SIPRP ) ) + { + return verificacao_siprp; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_CONTROLO ) ) + { + return data_controlo; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_EMAIL_CONTROLO ) ) + { + return data_email_controlo; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.EMPRESA_ID ) ) + { + return empresa_id; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.NOME_EMPRESA ) ) + { + return nome_empresa; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.TECNICO_HS_ID ) ) + { + return tecnico_hs_id; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.TECNICO_HS_NOME ) ) + { + return tecnico_hs_nome; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_RELATORIO ) ) + { + return data_relatorio; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == PlanosActuacaoDataAuto.ESTABELECIMENTO_ID ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.FASE ) + { + fase = ( Integer ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.DATA_VISITA ) + { + data_visita = ( java.util.Date ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.NOME_ESTABELECIMENTO ) + { + nome_estabelecimento = ( String ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.VALIDACAO_DIRECTOR_LOJA ) + { + validacao_director_loja = ( Boolean ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.VALIDACAO_DNS ) + { + validacao_dns = ( Boolean ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.VALIDACAO_HS ) + { + validacao_hs = ( Boolean ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.PARECER_DNS ) + { + parecer_dns = ( String ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.OBS_CORRECAO ) + { + obs_correcao = ( String ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.DATA_VALIDACAO_DIR_LOJA ) + { + data_validacao_dir_loja = ( java.util.Date ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.USER_DIR_LOJA ) + { + user_dir_loja = ( Integer ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.DATA_VALIDACAO_DNS ) + { + data_validacao_dns = ( java.util.Date ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.USER_DNS ) + { + user_dns = ( Integer ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.DATA_VALIDACAO_HS ) + { + data_validacao_hs = ( java.util.Date ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.USER_HS ) + { + user_hs = ( Integer ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.FASE_ANTES_CORRECAO ) + { + fase_antes_correcao = ( Integer ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.CORRECAO ) + { + correcao = ( String ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.OBSERVACOES_DL ) + { + observacoes_dl = ( String ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.OBSERVACOES_DNS ) + { + observacoes_dns = ( String ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.VERIFICACAO_SIPRP ) + { + verificacao_siprp = ( String ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.DATA_CONTROLO ) + { + data_controlo = ( java.util.Date ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.DATA_EMAIL_CONTROLO ) + { + data_email_controlo = ( java.util.Date ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.EMPRESA_ID ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.NOME_EMPRESA ) + { + nome_empresa = ( String ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.TECNICO_HS_ID ) + { + tecnico_hs_id = ( Integer ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.TECNICO_HS_NOME ) + { + tecnico_hs_nome = ( String ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == PlanosActuacaoDataAuto.DATA_RELATORIO ) + { + data_relatorio = ( java.util.Date ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.ESTABELECIMENTO_ID ) ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.FASE ) ) + { + fase = ( Integer ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_VISITA ) ) + { + data_visita = ( java.util.Date ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.NOME_ESTABELECIMENTO ) ) + { + nome_estabelecimento = ( String ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.VALIDACAO_DIRECTOR_LOJA ) ) + { + validacao_director_loja = ( Boolean ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.VALIDACAO_DNS ) ) + { + validacao_dns = ( Boolean ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.VALIDACAO_HS ) ) + { + validacao_hs = ( Boolean ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.PARECER_DNS ) ) + { + parecer_dns = ( String ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.OBS_CORRECAO ) ) + { + obs_correcao = ( String ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_VALIDACAO_DIR_LOJA ) ) + { + data_validacao_dir_loja = ( java.util.Date ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.USER_DIR_LOJA ) ) + { + user_dir_loja = ( Integer ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_VALIDACAO_DNS ) ) + { + data_validacao_dns = ( java.util.Date ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.USER_DNS ) ) + { + user_dns = ( Integer ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_VALIDACAO_HS ) ) + { + data_validacao_hs = ( java.util.Date ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.USER_HS ) ) + { + user_hs = ( Integer ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.FASE_ANTES_CORRECAO ) ) + { + fase_antes_correcao = ( Integer ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.CORRECAO ) ) + { + correcao = ( String ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.OBSERVACOES_DL ) ) + { + observacoes_dl = ( String ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.OBSERVACOES_DNS ) ) + { + observacoes_dns = ( String ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.VERIFICACAO_SIPRP ) ) + { + verificacao_siprp = ( String ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_CONTROLO ) ) + { + data_controlo = ( java.util.Date ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_EMAIL_CONTROLO ) ) + { + data_email_controlo = ( java.util.Date ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.EMPRESA_ID ) ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.NOME_EMPRESA ) ) + { + nome_empresa = ( String ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.TECNICO_HS_ID ) ) + { + tecnico_hs_id = ( Integer ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.TECNICO_HS_NOME ) ) + { + tecnico_hs_nome = ( String ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_RELATORIO ) ) + { + data_relatorio = ( java.util.Date ) value; + } + } + + public Integer getEstabelecimento_id() + { + return estabelecimento_id; + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + this.estabelecimento_id = estabelecimento_idValue; + } + + public Integer getFase() + { + return fase; + } + + public void setFase(Integer faseValue ) + { + this.fase = faseValue; + } + + public java.util.Date getData_visita() + { + return data_visita; + } + + public void setData_visita(java.util.Date data_visitaValue ) + { + this.data_visita = data_visitaValue; + } + + public String getNome_estabelecimento() + { + return nome_estabelecimento; + } + + public void setNome_estabelecimento(String nome_estabelecimentoValue ) + { + this.nome_estabelecimento = nome_estabelecimentoValue; + } + + public Boolean getValidacao_director_loja() + { + return validacao_director_loja; + } + + public void setValidacao_director_loja(Boolean validacao_director_lojaValue ) + { + this.validacao_director_loja = validacao_director_lojaValue; + } + + public Boolean getValidacao_dns() + { + return validacao_dns; + } + + public void setValidacao_dns(Boolean validacao_dnsValue ) + { + this.validacao_dns = validacao_dnsValue; + } + + public Boolean getValidacao_hs() + { + return validacao_hs; + } + + public void setValidacao_hs(Boolean validacao_hsValue ) + { + this.validacao_hs = validacao_hsValue; + } + + public String getParecer_dns() + { + return parecer_dns; + } + + public void setParecer_dns(String parecer_dnsValue ) + { + this.parecer_dns = parecer_dnsValue; + } + + public String getObs_correcao() + { + return obs_correcao; + } + + public void setObs_correcao(String obs_correcaoValue ) + { + this.obs_correcao = obs_correcaoValue; + } + + public java.util.Date getData_validacao_dir_loja() + { + return data_validacao_dir_loja; + } + + public void setData_validacao_dir_loja(java.util.Date data_validacao_dir_lojaValue ) + { + this.data_validacao_dir_loja = data_validacao_dir_lojaValue; + } + + public Integer getUser_dir_loja() + { + return user_dir_loja; + } + + public void setUser_dir_loja(Integer user_dir_lojaValue ) + { + this.user_dir_loja = user_dir_lojaValue; + } + + public java.util.Date getData_validacao_dns() + { + return data_validacao_dns; + } + + public void setData_validacao_dns(java.util.Date data_validacao_dnsValue ) + { + this.data_validacao_dns = data_validacao_dnsValue; + } + + public Integer getUser_dns() + { + return user_dns; + } + + public void setUser_dns(Integer user_dnsValue ) + { + this.user_dns = user_dnsValue; + } + + public java.util.Date getData_validacao_hs() + { + return data_validacao_hs; + } + + public void setData_validacao_hs(java.util.Date data_validacao_hsValue ) + { + this.data_validacao_hs = data_validacao_hsValue; + } + + public Integer getUser_hs() + { + return user_hs; + } + + public void setUser_hs(Integer user_hsValue ) + { + this.user_hs = user_hsValue; + } + + public Integer getFase_antes_correcao() + { + return fase_antes_correcao; + } + + public void setFase_antes_correcao(Integer fase_antes_correcaoValue ) + { + this.fase_antes_correcao = fase_antes_correcaoValue; + } + + public String getCorrecao() + { + return correcao; + } + + public void setCorrecao(String correcaoValue ) + { + this.correcao = correcaoValue; + } + + public String getObservacoes_dl() + { + return observacoes_dl; + } + + public void setObservacoes_dl(String observacoes_dlValue ) + { + this.observacoes_dl = observacoes_dlValue; + } + + public String getObservacoes_dns() + { + return observacoes_dns; + } + + public void setObservacoes_dns(String observacoes_dnsValue ) + { + this.observacoes_dns = observacoes_dnsValue; + } + + public String getVerificacao_siprp() + { + return verificacao_siprp; + } + + public void setVerificacao_siprp(String verificacao_siprpValue ) + { + this.verificacao_siprp = verificacao_siprpValue; + } + + public java.util.Date getData_controlo() + { + return data_controlo; + } + + public void setData_controlo(java.util.Date data_controloValue ) + { + this.data_controlo = data_controloValue; + } + + public java.util.Date getData_email_controlo() + { + return data_email_controlo; + } + + public void setData_email_controlo(java.util.Date data_email_controloValue ) + { + this.data_email_controlo = data_email_controloValue; + } + + public Integer getEmpresa_id() + { + return empresa_id; + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + this.empresa_id = empresa_idValue; + } + + public String getNome_empresa() + { + return nome_empresa; + } + + public void setNome_empresa(String nome_empresaValue ) + { + this.nome_empresa = nome_empresaValue; + } + + public Integer getTecnico_hs_id() + { + return tecnico_hs_id; + } + + public void setTecnico_hs_id(Integer tecnico_hs_idValue ) + { + this.tecnico_hs_id = tecnico_hs_idValue; + } + + public String getTecnico_hs_nome() + { + return tecnico_hs_nome; + } + + public void setTecnico_hs_nome(String tecnico_hs_nomeValue ) + { + this.tecnico_hs_nome = tecnico_hs_nomeValue; + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public java.util.Date getData_relatorio() + { + return data_relatorio; + } + + public void setData_relatorio(java.util.Date data_relatorioValue ) + { + this.data_relatorio = data_relatorioValue; + } + + public Class getOuterClass() + { + return PlanosActuacaoDataAuto.class; + } + + public PlanosActuacaoDataAuto getOuterClassInstance() + { + PlanosActuacaoDataAuto outerObj = new PlanosActuacaoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacaoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacaoData.java new file mode 100644 index 00000000..35ba9508 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacaoData.java @@ -0,0 +1,18 @@ +/* +* PlanosActuacaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class PlanosActuacaoData extends com.evolute.siprp.server.db.data.siprp.PlanosActuacaoDataAuto +{ + + public PlanosActuacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacaoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacaoDataAuto.java new file mode 100644 index 00000000..7414beec --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacaoDataAuto.java @@ -0,0 +1,572 @@ +/* +* PlanosActuacaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class PlanosActuacaoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "planos_actuacao"; + + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "planos_actuacao.estabelecimento_id"; + public static final String FASE = "fase"; + public static final String FASE_FULL = "planos_actuacao.fase"; + public static final String DATA_VISITA = "data_visita"; + public static final String DATA_VISITA_FULL = "planos_actuacao.data_visita"; + public static final String NOME_ESTABELECIMENTO = "nome_estabelecimento"; + public static final String NOME_ESTABELECIMENTO_FULL = "planos_actuacao.nome_estabelecimento"; + public static final String VALIDACAO_DIRECTOR_LOJA = "validacao_director_loja"; + public static final String VALIDACAO_DIRECTOR_LOJA_FULL = "planos_actuacao.validacao_director_loja"; + public static final String VALIDACAO_DNS = "validacao_dns"; + public static final String VALIDACAO_DNS_FULL = "planos_actuacao.validacao_dns"; + public static final String VALIDACAO_HS = "validacao_hs"; + public static final String VALIDACAO_HS_FULL = "planos_actuacao.validacao_hs"; + public static final String PARECER_DNS = "parecer_dns"; + public static final String PARECER_DNS_FULL = "planos_actuacao.parecer_dns"; + public static final String OBS_CORRECAO = "obs_correcao"; + public static final String OBS_CORRECAO_FULL = "planos_actuacao.obs_correcao"; + public static final String DATA_VALIDACAO_DIR_LOJA = "data_validacao_dir_loja"; + public static final String DATA_VALIDACAO_DIR_LOJA_FULL = "planos_actuacao.data_validacao_dir_loja"; + public static final String USER_DIR_LOJA = "user_dir_loja"; + public static final String USER_DIR_LOJA_FULL = "planos_actuacao.user_dir_loja"; + public static final String TO_USER_DIR_LOJA = "to user_dir_loja"; + public static final String DATA_VALIDACAO_DNS = "data_validacao_dns"; + public static final String DATA_VALIDACAO_DNS_FULL = "planos_actuacao.data_validacao_dns"; + public static final String USER_DNS = "user_dns"; + public static final String USER_DNS_FULL = "planos_actuacao.user_dns"; + public static final String TO_USER_DNS = "to user_dns"; + public static final String DATA_VALIDACAO_HS = "data_validacao_hs"; + public static final String DATA_VALIDACAO_HS_FULL = "planos_actuacao.data_validacao_hs"; + public static final String USER_HS = "user_hs"; + public static final String USER_HS_FULL = "planos_actuacao.user_hs"; + public static final String TO_USER_HS = "to user_hs"; + public static final String FASE_ANTES_CORRECAO = "fase_antes_correcao"; + public static final String FASE_ANTES_CORRECAO_FULL = "planos_actuacao.fase_antes_correcao"; + public static final String CORRECAO = "correcao"; + public static final String CORRECAO_FULL = "planos_actuacao.correcao"; + public static final String OBSERVACOES_DL = "observacoes_dl"; + public static final String OBSERVACOES_DL_FULL = "planos_actuacao.observacoes_dl"; + public static final String OBSERVACOES_DNS = "observacoes_dns"; + public static final String OBSERVACOES_DNS_FULL = "planos_actuacao.observacoes_dns"; + public static final String VERIFICACAO_SIPRP = "verificacao_siprp"; + public static final String VERIFICACAO_SIPRP_FULL = "planos_actuacao.verificacao_siprp"; + public static final String DATA_CONTROLO = "data_controlo"; + public static final String DATA_CONTROLO_FULL = "planos_actuacao.data_controlo"; + public static final String DATA_EMAIL_CONTROLO = "data_email_controlo"; + public static final String DATA_EMAIL_CONTROLO_FULL = "planos_actuacao.data_email_controlo"; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "planos_actuacao.empresa_id"; + public static final String NOME_EMPRESA = "nome_empresa"; + public static final String NOME_EMPRESA_FULL = "planos_actuacao.nome_empresa"; + public static final String TECNICO_HS_ID = "tecnico_hs_id"; + public static final String TECNICO_HS_ID_FULL = "planos_actuacao.tecnico_hs_id"; + public static final String TECNICO_HS_NOME = "tecnico_hs_nome"; + public static final String TECNICO_HS_NOME_FULL = "planos_actuacao.tecnico_hs_nome"; + public static final String ID = "id"; + public static final String ID_FULL = "planos_actuacao.id"; + public static final String DATA_RELATORIO = "data_relatorio"; + public static final String DATA_RELATORIO_FULL = "planos_actuacao.data_relatorio"; + + public static final String FIELD_NAMES[] = new String[]{ + ESTABELECIMENTO_ID, FASE, DATA_VISITA, NOME_ESTABELECIMENTO, + VALIDACAO_DIRECTOR_LOJA, VALIDACAO_DNS, VALIDACAO_HS, PARECER_DNS, + OBS_CORRECAO, DATA_VALIDACAO_DIR_LOJA, USER_DIR_LOJA, TO_USER_DIR_LOJA, + DATA_VALIDACAO_DNS, USER_DNS, TO_USER_DNS, DATA_VALIDACAO_HS, USER_HS, + TO_USER_HS, FASE_ANTES_CORRECAO, CORRECAO, OBSERVACOES_DL, OBSERVACOES_DNS, + VERIFICACAO_SIPRP, DATA_CONTROLO, DATA_EMAIL_CONTROLO, EMPRESA_ID, + NOME_EMPRESA, TECNICO_HS_ID, TECNICO_HS_NOME, DATA_RELATORIO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ESTABELECIMENTO_ID, FASE, DATA_VISITA, NOME_ESTABELECIMENTO, + VALIDACAO_DIRECTOR_LOJA, VALIDACAO_DNS, VALIDACAO_HS, PARECER_DNS, + OBS_CORRECAO, DATA_VALIDACAO_DIR_LOJA, USER_DIR_LOJA, DATA_VALIDACAO_DNS, + USER_DNS, DATA_VALIDACAO_HS, USER_HS, FASE_ANTES_CORRECAO, CORRECAO, + OBSERVACOES_DL, OBSERVACOES_DNS, VERIFICACAO_SIPRP, DATA_CONTROLO, + DATA_EMAIL_CONTROLO, EMPRESA_ID, NOME_EMPRESA, TECNICO_HS_ID, TECNICO_HS_NOME, + ID, DATA_RELATORIO, }; + + private Map dataHash; + + public PlanosActuacaoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getEstabelecimento_id() + { + return (Integer) get(ESTABELECIMENTO_ID); + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + this.set(ESTABELECIMENTO_ID, estabelecimento_idValue ); + } + + public Integer getFase() + { + return (Integer) get(FASE); + } + + public void setFase(Integer faseValue ) + { + this.set(FASE, faseValue ); + } + + public java.util.Date getData_visita() + { + return (java.util.Date) get(DATA_VISITA); + } + + public void setData_visita(java.util.Date data_visitaValue ) + { + this.set(DATA_VISITA, data_visitaValue ); + } + + public String getNome_estabelecimento() + { + return (String) get(NOME_ESTABELECIMENTO); + } + + public void setNome_estabelecimento(String nome_estabelecimentoValue ) + { + this.set(NOME_ESTABELECIMENTO, nome_estabelecimentoValue ); + } + + public Boolean getValidacao_director_loja() + { + return (Boolean) get(VALIDACAO_DIRECTOR_LOJA); + } + + public void setValidacao_director_loja(Boolean validacao_director_lojaValue ) + { + this.set(VALIDACAO_DIRECTOR_LOJA, validacao_director_lojaValue ); + } + + public Boolean getValidacao_dns() + { + return (Boolean) get(VALIDACAO_DNS); + } + + public void setValidacao_dns(Boolean validacao_dnsValue ) + { + this.set(VALIDACAO_DNS, validacao_dnsValue ); + } + + public Boolean getValidacao_hs() + { + return (Boolean) get(VALIDACAO_HS); + } + + public void setValidacao_hs(Boolean validacao_hsValue ) + { + this.set(VALIDACAO_HS, validacao_hsValue ); + } + + public String getParecer_dns() + { + return (String) get(PARECER_DNS); + } + + public void setParecer_dns(String parecer_dnsValue ) + { + this.set(PARECER_DNS, parecer_dnsValue ); + } + + public String getObs_correcao() + { + return (String) get(OBS_CORRECAO); + } + + public void setObs_correcao(String obs_correcaoValue ) + { + this.set(OBS_CORRECAO, obs_correcaoValue ); + } + + public java.util.Date getData_validacao_dir_loja() + { + return (java.util.Date) get(DATA_VALIDACAO_DIR_LOJA); + } + + public void setData_validacao_dir_loja(java.util.Date data_validacao_dir_lojaValue ) + { + this.set(DATA_VALIDACAO_DIR_LOJA, data_validacao_dir_lojaValue ); + } + + public Integer getUser_dir_loja() + { + return (Integer) dataHash.get(USER_DIR_LOJA); + } + + public void setUser_dir_loja(Integer user_dir_lojaValue ) + { + dataHash.put(TO_USER_DIR_LOJA, null); + dataHash.put(USER_DIR_LOJA, user_dir_lojaValue ); + } + + public com.evolute.siprp.server.db.data.siprp.UtilizadoresData toUser_dir_loja() + throws Exception + { + if( dataHash.get(TO_USER_DIR_LOJA) == null && getUser_dir_loja() != null ) + { + dataHash.put(TO_USER_DIR_LOJA, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.UtilizadoresData.class, new Object[]{ getUser_dir_loja() }, new String[]{ com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp.UtilizadoresData) dataHash.get(TO_USER_DIR_LOJA); + } + + public void setToUser_dir_loja(com.evolute.siprp.server.db.data.siprp.UtilizadoresData user_dir_lojaObject ) + { + if( user_dir_lojaObject == null ) + { + dataHash.put(USER_DIR_LOJA, null); + } + else + { + dataHash.put(USER_DIR_LOJA, user_dir_lojaObject.get( com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID )); + } + dataHash.put(TO_USER_DIR_LOJA, user_dir_lojaObject); + } + + public java.util.Date getData_validacao_dns() + { + return (java.util.Date) get(DATA_VALIDACAO_DNS); + } + + public void setData_validacao_dns(java.util.Date data_validacao_dnsValue ) + { + this.set(DATA_VALIDACAO_DNS, data_validacao_dnsValue ); + } + + public Integer getUser_dns() + { + return (Integer) dataHash.get(USER_DNS); + } + + public void setUser_dns(Integer user_dnsValue ) + { + dataHash.put(TO_USER_DNS, null); + dataHash.put(USER_DNS, user_dnsValue ); + } + + public com.evolute.siprp.server.db.data.siprp.UtilizadoresData toUser_dns() + throws Exception + { + if( dataHash.get(TO_USER_DNS) == null && getUser_dns() != null ) + { + dataHash.put(TO_USER_DNS, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.UtilizadoresData.class, new Object[]{ getUser_dns() }, new String[]{ com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp.UtilizadoresData) dataHash.get(TO_USER_DNS); + } + + public void setToUser_dns(com.evolute.siprp.server.db.data.siprp.UtilizadoresData user_dnsObject ) + { + if( user_dnsObject == null ) + { + dataHash.put(USER_DNS, null); + } + else + { + dataHash.put(USER_DNS, user_dnsObject.get( com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID )); + } + dataHash.put(TO_USER_DNS, user_dnsObject); + } + + public java.util.Date getData_validacao_hs() + { + return (java.util.Date) get(DATA_VALIDACAO_HS); + } + + public void setData_validacao_hs(java.util.Date data_validacao_hsValue ) + { + this.set(DATA_VALIDACAO_HS, data_validacao_hsValue ); + } + + public Integer getUser_hs() + { + return (Integer) dataHash.get(USER_HS); + } + + public void setUser_hs(Integer user_hsValue ) + { + dataHash.put(TO_USER_HS, null); + dataHash.put(USER_HS, user_hsValue ); + } + + public com.evolute.siprp.server.db.data.siprp.UtilizadoresData toUser_hs() + throws Exception + { + if( dataHash.get(TO_USER_HS) == null && getUser_hs() != null ) + { + dataHash.put(TO_USER_HS, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.UtilizadoresData.class, new Object[]{ getUser_hs() }, new String[]{ com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp.UtilizadoresData) dataHash.get(TO_USER_HS); + } + + public void setToUser_hs(com.evolute.siprp.server.db.data.siprp.UtilizadoresData user_hsObject ) + { + if( user_hsObject == null ) + { + dataHash.put(USER_HS, null); + } + else + { + dataHash.put(USER_HS, user_hsObject.get( com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID )); + } + dataHash.put(TO_USER_HS, user_hsObject); + } + + public Integer getFase_antes_correcao() + { + return (Integer) get(FASE_ANTES_CORRECAO); + } + + public void setFase_antes_correcao(Integer fase_antes_correcaoValue ) + { + this.set(FASE_ANTES_CORRECAO, fase_antes_correcaoValue ); + } + + public String getCorrecao() + { + return (String) get(CORRECAO); + } + + public void setCorrecao(String correcaoValue ) + { + this.set(CORRECAO, correcaoValue ); + } + + public String getObservacoes_dl() + { + return (String) get(OBSERVACOES_DL); + } + + public void setObservacoes_dl(String observacoes_dlValue ) + { + this.set(OBSERVACOES_DL, observacoes_dlValue ); + } + + public String getObservacoes_dns() + { + return (String) get(OBSERVACOES_DNS); + } + + public void setObservacoes_dns(String observacoes_dnsValue ) + { + this.set(OBSERVACOES_DNS, observacoes_dnsValue ); + } + + public String getVerificacao_siprp() + { + return (String) get(VERIFICACAO_SIPRP); + } + + public void setVerificacao_siprp(String verificacao_siprpValue ) + { + this.set(VERIFICACAO_SIPRP, verificacao_siprpValue ); + } + + public java.util.Date getData_controlo() + { + return (java.util.Date) get(DATA_CONTROLO); + } + + public void setData_controlo(java.util.Date data_controloValue ) + { + this.set(DATA_CONTROLO, data_controloValue ); + } + + public java.util.Date getData_email_controlo() + { + return (java.util.Date) get(DATA_EMAIL_CONTROLO); + } + + public void setData_email_controlo(java.util.Date data_email_controloValue ) + { + this.set(DATA_EMAIL_CONTROLO, data_email_controloValue ); + } + + public Integer getEmpresa_id() + { + return (Integer) get(EMPRESA_ID); + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + this.set(EMPRESA_ID, empresa_idValue ); + } + + public String getNome_empresa() + { + return (String) get(NOME_EMPRESA); + } + + public void setNome_empresa(String nome_empresaValue ) + { + this.set(NOME_EMPRESA, nome_empresaValue ); + } + + public Integer getTecnico_hs_id() + { + return (Integer) get(TECNICO_HS_ID); + } + + public void setTecnico_hs_id(Integer tecnico_hs_idValue ) + { + this.set(TECNICO_HS_ID, tecnico_hs_idValue ); + } + + public String getTecnico_hs_nome() + { + return (String) get(TECNICO_HS_NOME); + } + + public void setTecnico_hs_nome(String tecnico_hs_nomeValue ) + { + this.set(TECNICO_HS_NOME, tecnico_hs_nomeValue ); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public java.util.Date getData_relatorio() + { + return (java.util.Date) get(DATA_RELATORIO); + } + + public void setData_relatorio(java.util.Date data_relatorioValue ) + { + this.set(DATA_RELATORIO, data_relatorioValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_USER_DIR_LOJA.equals( fieldName ) ) + { + value = toUser_dir_loja(); + } + else if( TO_USER_DNS.equals( fieldName ) ) + { + value = toUser_dns(); + } + else if( USER_DIR_LOJA.equals( fieldName ) ) + { + value = getUser_dir_loja(); + } + else if( TO_USER_HS.equals( fieldName ) ) + { + value = toUser_hs(); + } + else if( USER_HS.equals( fieldName ) ) + { + value = getUser_hs(); + } + else if( USER_DNS.equals( fieldName ) ) + { + value = getUser_dns(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_USER_DIR_LOJA.equals( fieldName ) ) + { + setToUser_dir_loja( (com.evolute.siprp.server.db.data.siprp.UtilizadoresData) value ); + } + else if( TO_USER_DNS.equals( fieldName ) ) + { + setToUser_dns( (com.evolute.siprp.server.db.data.siprp.UtilizadoresData) value ); + } + else if( USER_DIR_LOJA.equals( fieldName ) ) + { + setUser_dir_loja( (Integer) value ); + } + else if( TO_USER_HS.equals( fieldName ) ) + { + setToUser_hs( (com.evolute.siprp.server.db.data.siprp.UtilizadoresData) value ); + } + else if( USER_HS.equals( fieldName ) ) + { + setUser_hs( (Integer) value ); + } + else if( USER_DNS.equals( fieldName ) ) + { + setUser_dns( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_USER_DIR_LOJA) != null ) + { + toUser_dir_loja().save(); + dataHash.put(USER_DIR_LOJA, toUser_dir_loja().get( com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID )); + } + + if( dataHash.get(TO_USER_DNS) != null ) + { + toUser_dns().save(); + dataHash.put(USER_DNS, toUser_dns().get( com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID )); + } + + if( dataHash.get(TO_USER_HS) != null ) + { + toUser_hs().save(); + dataHash.put(USER_HS, toUser_hs().get( com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return PlanosActuacao.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Properties.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Properties.java new file mode 100644 index 00000000..b326f079 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Properties.java @@ -0,0 +1,44 @@ +/* +* Properties.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class Properties implements JDOInnerObject +{ + + public Properties() + { + } + + public Object getField( String fieldName ) + { + return null; + } + + public void setField( String fieldName, Object value ) + { + } + + public Class getOuterClass() + { + return PropertiesDataAuto.class; + } + + public PropertiesDataAuto getOuterClassInstance() + { + PropertiesDataAuto outerObj = new PropertiesDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Object getJDOPrimaryKey() + { + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PropertiesData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PropertiesData.java new file mode 100644 index 00000000..343f70d0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PropertiesData.java @@ -0,0 +1,18 @@ +/* +* PropertiesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class PropertiesData extends com.evolute.siprp.server.db.data.siprp.PropertiesDataAuto +{ + + public PropertiesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PropertiesDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PropertiesDataAuto.java new file mode 100644 index 00000000..c0d1d9b3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PropertiesDataAuto.java @@ -0,0 +1,67 @@ +/* +* PropertiesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class PropertiesDataAuto extends JDOObject +{ + + public static final String TABLENAME = "properties"; + + + public static final String FIELD_NAMES[] = new String[]{ + }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + }; + + private Map dataHash; + + public PropertiesDataAuto() + { + dataHash = new HashMap(); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Properties.class; + } + + public Object getJDOPrimaryKey() + { + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Recomendacoes.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Recomendacoes.java new file mode 100644 index 00000000..5c3636d7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Recomendacoes.java @@ -0,0 +1,129 @@ +/* +* Recomendacoes.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class Recomendacoes implements JDOInnerObject +{ + private Integer id; + private Integer analise_id; + private String recomendacao; + + public Recomendacoes() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == RecomendacoesDataAuto.ID ) + { + return id; + } + else if( fieldName == RecomendacoesDataAuto.ANALISE_ID ) + { + return analise_id; + } + else if( fieldName == RecomendacoesDataAuto.RECOMENDACAO ) + { + return recomendacao; + } + else if( fieldName.equals( RecomendacoesDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( RecomendacoesDataAuto.ANALISE_ID ) ) + { + return analise_id; + } + else if( fieldName.equals( RecomendacoesDataAuto.RECOMENDACAO ) ) + { + return recomendacao; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == RecomendacoesDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == RecomendacoesDataAuto.ANALISE_ID ) + { + analise_id = ( Integer ) value; + } + else if( fieldName == RecomendacoesDataAuto.RECOMENDACAO ) + { + recomendacao = ( String ) value; + } + else if( fieldName.equals( RecomendacoesDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( RecomendacoesDataAuto.ANALISE_ID ) ) + { + analise_id = ( Integer ) value; + } + else if( fieldName.equals( RecomendacoesDataAuto.RECOMENDACAO ) ) + { + recomendacao = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getAnalise_id() + { + return analise_id; + } + + public void setAnalise_id(Integer analise_idValue ) + { + this.analise_id = analise_idValue; + } + + public String getRecomendacao() + { + return recomendacao; + } + + public void setRecomendacao(String recomendacaoValue ) + { + this.recomendacao = recomendacaoValue; + } + + public Class getOuterClass() + { + return RecomendacoesDataAuto.class; + } + + public RecomendacoesDataAuto getOuterClassInstance() + { + RecomendacoesDataAuto outerObj = new RecomendacoesDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RecomendacoesData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RecomendacoesData.java new file mode 100644 index 00000000..d76a5106 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RecomendacoesData.java @@ -0,0 +1,18 @@ +/* +* RecomendacoesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class RecomendacoesData extends com.evolute.siprp.server.db.data.siprp.RecomendacoesDataAuto +{ + + public RecomendacoesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RecomendacoesDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RecomendacoesDataAuto.java new file mode 100644 index 00000000..5fda16ca --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RecomendacoesDataAuto.java @@ -0,0 +1,166 @@ +/* +* RecomendacoesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class RecomendacoesDataAuto extends JDOObject +{ + + public static final String TABLENAME = "recomendacoes"; + + public static final String ID = "id"; + public static final String ID_FULL = "recomendacoes.id"; + public static final String ANALISE_ID = "analise_id"; + public static final String ANALISE_ID_FULL = "recomendacoes.analise_id"; + public static final String TO_ANALISE_ID = "to analise_id"; + public static final String RECOMENDACAO = "recomendacao"; + public static final String RECOMENDACAO_FULL = "recomendacoes.recomendacao"; + + public static final String FIELD_NAMES[] = new String[]{ + ANALISE_ID, TO_ANALISE_ID, RECOMENDACAO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, ANALISE_ID, RECOMENDACAO, }; + + private Map dataHash; + + public RecomendacoesDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getAnalise_id() + { + return (Integer) dataHash.get(ANALISE_ID); + } + + public void setAnalise_id(Integer analise_idValue ) + { + dataHash.put(TO_ANALISE_ID, null); + dataHash.put(ANALISE_ID, analise_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData toAnalise_id() + throws Exception + { + if( dataHash.get(TO_ANALISE_ID) == null && getAnalise_id() != null ) + { + dataHash.put(TO_ANALISE_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData.class, new Object[]{ getAnalise_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData) dataHash.get(TO_ANALISE_ID); + } + + public void setToAnalise_id(com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData analise_idObject ) + { + if( analise_idObject == null ) + { + dataHash.put(ANALISE_ID, null); + } + else + { + dataHash.put(ANALISE_ID, analise_idObject.get( com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData.ID )); + } + dataHash.put(TO_ANALISE_ID, analise_idObject); + } + + public String getRecomendacao() + { + return (String) get(RECOMENDACAO); + } + + public void setRecomendacao(String recomendacaoValue ) + { + this.set(RECOMENDACAO, recomendacaoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_ANALISE_ID.equals( fieldName ) ) + { + value = toAnalise_id(); + } + else if( ANALISE_ID.equals( fieldName ) ) + { + value = getAnalise_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_ANALISE_ID.equals( fieldName ) ) + { + setToAnalise_id( (com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData) value ); + } + else if( ANALISE_ID.equals( fieldName ) ) + { + setAnalise_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_ANALISE_ID) != null ) + { + toAnalise_id().save(); + dataHash.put(ANALISE_ID, toAnalise_id().get( com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Recomendacoes.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Roles.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Roles.java new file mode 100644 index 00000000..d3247678 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Roles.java @@ -0,0 +1,44 @@ +/* +* Roles.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class Roles implements JDOInnerObject +{ + + public Roles() + { + } + + public Object getField( String fieldName ) + { + return null; + } + + public void setField( String fieldName, Object value ) + { + } + + public Class getOuterClass() + { + return RolesDataAuto.class; + } + + public RolesDataAuto getOuterClassInstance() + { + RolesDataAuto outerObj = new RolesDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Object getJDOPrimaryKey() + { + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RolesData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RolesData.java new file mode 100644 index 00000000..91b99f67 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RolesData.java @@ -0,0 +1,18 @@ +/* +* RolesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class RolesData extends com.evolute.siprp.server.db.data.siprp.RolesDataAuto +{ + + public RolesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RolesDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RolesDataAuto.java new file mode 100644 index 00000000..628ecb46 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RolesDataAuto.java @@ -0,0 +1,67 @@ +/* +* RolesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class RolesDataAuto extends JDOObject +{ + + public static final String TABLENAME = "roles"; + + + public static final String FIELD_NAMES[] = new String[]{ + }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + }; + + private Map dataHash; + + public RolesDataAuto() + { + dataHash = new HashMap(); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Roles.class; + } + + public Object getJDOPrimaryKey() + { + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Seccoes.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Seccoes.java new file mode 100644 index 00000000..17ef6967 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Seccoes.java @@ -0,0 +1,156 @@ +/* +* Seccoes.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class Seccoes implements JDOInnerObject +{ + private Integer id; + private String descricao; + private Integer departamento_id; + private String activo; + + public Seccoes() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == SeccoesDataAuto.ID ) + { + return id; + } + else if( fieldName == SeccoesDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == SeccoesDataAuto.DEPARTAMENTO_ID ) + { + return departamento_id; + } + else if( fieldName == SeccoesDataAuto.ACTIVO ) + { + return activo; + } + else if( fieldName.equals( SeccoesDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( SeccoesDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( SeccoesDataAuto.DEPARTAMENTO_ID ) ) + { + return departamento_id; + } + else if( fieldName.equals( SeccoesDataAuto.ACTIVO ) ) + { + return activo; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == SeccoesDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == SeccoesDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == SeccoesDataAuto.DEPARTAMENTO_ID ) + { + departamento_id = ( Integer ) value; + } + else if( fieldName == SeccoesDataAuto.ACTIVO ) + { + activo = ( String ) value; + } + else if( fieldName.equals( SeccoesDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( SeccoesDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( SeccoesDataAuto.DEPARTAMENTO_ID ) ) + { + departamento_id = ( Integer ) value; + } + else if( fieldName.equals( SeccoesDataAuto.ACTIVO ) ) + { + activo = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public Integer getDepartamento_id() + { + return departamento_id; + } + + public void setDepartamento_id(Integer departamento_idValue ) + { + this.departamento_id = departamento_idValue; + } + + public String getActivo() + { + return activo; + } + + public void setActivo(String activoValue ) + { + this.activo = activoValue; + } + + public Class getOuterClass() + { + return SeccoesDataAuto.class; + } + + public SeccoesDataAuto getOuterClassInstance() + { + SeccoesDataAuto outerObj = new SeccoesDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/SeccoesData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/SeccoesData.java new file mode 100644 index 00000000..25b3d70a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/SeccoesData.java @@ -0,0 +1,18 @@ +/* +* SeccoesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class SeccoesData extends com.evolute.siprp.server.db.data.siprp.SeccoesDataAuto +{ + + public SeccoesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/SeccoesDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/SeccoesDataAuto.java new file mode 100644 index 00000000..7851d429 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/SeccoesDataAuto.java @@ -0,0 +1,178 @@ +/* +* SeccoesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class SeccoesDataAuto extends JDOObject +{ + + public static final String TABLENAME = "seccoes"; + + public static final String ID = "id"; + public static final String ID_FULL = "seccoes.id"; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "seccoes.descricao"; + public static final String DEPARTAMENTO_ID = "departamento_id"; + public static final String DEPARTAMENTO_ID_FULL = "seccoes.departamento_id"; + public static final String TO_DEPARTAMENTO_ID = "to departamento_id"; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "seccoes.activo"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, DEPARTAMENTO_ID, TO_DEPARTAMENTO_ID, ACTIVO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, DEPARTAMENTO_ID, ACTIVO, }; + + private Map dataHash; + + public SeccoesDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public Integer getDepartamento_id() + { + return (Integer) dataHash.get(DEPARTAMENTO_ID); + } + + public void setDepartamento_id(Integer departamento_idValue ) + { + dataHash.put(TO_DEPARTAMENTO_ID, null); + dataHash.put(DEPARTAMENTO_ID, departamento_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp.DepartamentosData toDepartamento_id() + throws Exception + { + if( dataHash.get(TO_DEPARTAMENTO_ID) == null && getDepartamento_id() != null ) + { + dataHash.put(TO_DEPARTAMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.DepartamentosData.class, new Object[]{ getDepartamento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.DepartamentosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp.DepartamentosData) dataHash.get(TO_DEPARTAMENTO_ID); + } + + public void setToDepartamento_id(com.evolute.siprp.server.db.data.siprp.DepartamentosData departamento_idObject ) + { + if( departamento_idObject == null ) + { + dataHash.put(DEPARTAMENTO_ID, null); + } + else + { + dataHash.put(DEPARTAMENTO_ID, departamento_idObject.get( com.evolute.siprp.server.db.data.siprp.DepartamentosData.ID )); + } + dataHash.put(TO_DEPARTAMENTO_ID, departamento_idObject); + } + + public String getActivo() + { + return (String) get(ACTIVO); + } + + public void setActivo(String activoValue ) + { + this.set(ACTIVO, activoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( DEPARTAMENTO_ID.equals( fieldName ) ) + { + value = getDepartamento_id(); + } + else if( TO_DEPARTAMENTO_ID.equals( fieldName ) ) + { + value = toDepartamento_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( DEPARTAMENTO_ID.equals( fieldName ) ) + { + setDepartamento_id( (Integer) value ); + } + else if( TO_DEPARTAMENTO_ID.equals( fieldName ) ) + { + setToDepartamento_id( (com.evolute.siprp.server.db.data.siprp.DepartamentosData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_DEPARTAMENTO_ID) != null ) + { + toDepartamento_id().save(); + dataHash.put(DEPARTAMENTO_ID, toDepartamento_id().get( com.evolute.siprp.server.db.data.siprp.DepartamentosData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Seccoes.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadores.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadores.java new file mode 100644 index 00000000..d3ea0d91 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadores.java @@ -0,0 +1,183 @@ +/* +* TiposUtilizadores.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class TiposUtilizadores implements JDOInnerObject +{ + private Integer id; + private Integer tipo; + private String descricao; + private String activo; + private Integer ordem; + + public TiposUtilizadores() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == TiposUtilizadoresDataAuto.ID ) + { + return id; + } + else if( fieldName == TiposUtilizadoresDataAuto.TIPO ) + { + return tipo; + } + else if( fieldName == TiposUtilizadoresDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == TiposUtilizadoresDataAuto.ACTIVO ) + { + return activo; + } + else if( fieldName == TiposUtilizadoresDataAuto.ORDEM ) + { + return ordem; + } + else if( fieldName.equals( TiposUtilizadoresDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( TiposUtilizadoresDataAuto.TIPO ) ) + { + return tipo; + } + else if( fieldName.equals( TiposUtilizadoresDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( TiposUtilizadoresDataAuto.ACTIVO ) ) + { + return activo; + } + else if( fieldName.equals( TiposUtilizadoresDataAuto.ORDEM ) ) + { + return ordem; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == TiposUtilizadoresDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == TiposUtilizadoresDataAuto.TIPO ) + { + tipo = ( Integer ) value; + } + else if( fieldName == TiposUtilizadoresDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == TiposUtilizadoresDataAuto.ACTIVO ) + { + activo = ( String ) value; + } + else if( fieldName == TiposUtilizadoresDataAuto.ORDEM ) + { + ordem = ( Integer ) value; + } + else if( fieldName.equals( TiposUtilizadoresDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( TiposUtilizadoresDataAuto.TIPO ) ) + { + tipo = ( Integer ) value; + } + else if( fieldName.equals( TiposUtilizadoresDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( TiposUtilizadoresDataAuto.ACTIVO ) ) + { + activo = ( String ) value; + } + else if( fieldName.equals( TiposUtilizadoresDataAuto.ORDEM ) ) + { + ordem = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getTipo() + { + return tipo; + } + + public void setTipo(Integer tipoValue ) + { + this.tipo = tipoValue; + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public String getActivo() + { + return activo; + } + + public void setActivo(String activoValue ) + { + this.activo = activoValue; + } + + public Integer getOrdem() + { + return ordem; + } + + public void setOrdem(Integer ordemValue ) + { + this.ordem = ordemValue; + } + + public Class getOuterClass() + { + return TiposUtilizadoresDataAuto.class; + } + + public TiposUtilizadoresDataAuto getOuterClassInstance() + { + TiposUtilizadoresDataAuto outerObj = new TiposUtilizadoresDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadoresData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadoresData.java new file mode 100644 index 00000000..6dbc7c71 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadoresData.java @@ -0,0 +1,18 @@ +/* +* TiposUtilizadoresDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class TiposUtilizadoresData extends com.evolute.siprp.server.db.data.siprp.TiposUtilizadoresDataAuto +{ + + public TiposUtilizadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadoresDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadoresDataAuto.java new file mode 100644 index 00000000..ea29dd56 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadoresDataAuto.java @@ -0,0 +1,131 @@ +/* +* TiposUtilizadoresDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class TiposUtilizadoresDataAuto extends JDOObject +{ + + public static final String TABLENAME = "tipos_utilizadores"; + + public static final String ID = "id"; + public static final String ID_FULL = "tipos_utilizadores.id"; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "tipos_utilizadores.tipo"; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "tipos_utilizadores.descricao"; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "tipos_utilizadores.activo"; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "tipos_utilizadores.ordem"; + + public static final String FIELD_NAMES[] = new String[]{ + TIPO, DESCRICAO, ACTIVO, ORDEM, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, TIPO, DESCRICAO, ACTIVO, ORDEM, }; + + private Map dataHash; + + public TiposUtilizadoresDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getTipo() + { + return (Integer) get(TIPO); + } + + public void setTipo(Integer tipoValue ) + { + this.set(TIPO, tipoValue ); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public String getActivo() + { + return (String) get(ACTIVO); + } + + public void setActivo(String activoValue ) + { + this.set(ACTIVO, activoValue ); + } + + public Integer getOrdem() + { + return (Integer) get(ORDEM); + } + + public void setOrdem(Integer ordemValue ) + { + this.set(ORDEM, ordemValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return TiposUtilizadores.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Users.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Users.java new file mode 100644 index 00000000..52b1e5a5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Users.java @@ -0,0 +1,44 @@ +/* +* Users.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class Users implements JDOInnerObject +{ + + public Users() + { + } + + public Object getField( String fieldName ) + { + return null; + } + + public void setField( String fieldName, Object value ) + { + } + + public Class getOuterClass() + { + return UsersDataAuto.class; + } + + public UsersDataAuto getOuterClassInstance() + { + UsersDataAuto outerObj = new UsersDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Object getJDOPrimaryKey() + { + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UsersData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UsersData.java new file mode 100644 index 00000000..d95fd824 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UsersData.java @@ -0,0 +1,18 @@ +/* +* UsersDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class UsersData extends com.evolute.siprp.server.db.data.siprp.UsersDataAuto +{ + + public UsersData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UsersDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UsersDataAuto.java new file mode 100644 index 00000000..bb8e7a32 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UsersDataAuto.java @@ -0,0 +1,67 @@ +/* +* UsersDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class UsersDataAuto extends JDOObject +{ + + public static final String TABLENAME = "users"; + + + public static final String FIELD_NAMES[] = new String[]{ + }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + }; + + private Map dataHash; + + public UsersDataAuto() + { + dataHash = new HashMap(); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Users.class; + } + + public Object getJDOPrimaryKey() + { + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Utilizadores.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Utilizadores.java new file mode 100644 index 00000000..b253ed11 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Utilizadores.java @@ -0,0 +1,588 @@ +/* +* Utilizadores.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; + +public final class Utilizadores implements JDOInnerObject +{ + private Integer id; + private String login; + private String password; + private String email; + private Integer empresa_id; + private Integer estabelecimento_id; + private String administrador; + private Integer medico_id; + private Integer tipo; + private String numero_cedula; + private String cap; + private String nome; + private Integer funcionario_hst_id; + private String activo; + private String responsavel_loja; + private String numero_mecanografico; + private String gestor_geral; + private String primeiro_login; + private String apagado; + private java.util.Date data_password; + + public Utilizadores() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == UtilizadoresDataAuto.ID ) + { + return id; + } + else if( fieldName == UtilizadoresDataAuto.LOGIN ) + { + return login; + } + else if( fieldName == UtilizadoresDataAuto.PASSWORD ) + { + return password; + } + else if( fieldName == UtilizadoresDataAuto.EMAIL ) + { + return email; + } + else if( fieldName == UtilizadoresDataAuto.EMPRESA_ID ) + { + return empresa_id; + } + else if( fieldName == UtilizadoresDataAuto.ESTABELECIMENTO_ID ) + { + return estabelecimento_id; + } + else if( fieldName == UtilizadoresDataAuto.ADMINISTRADOR ) + { + return administrador; + } + else if( fieldName == UtilizadoresDataAuto.MEDICO_ID ) + { + return medico_id; + } + else if( fieldName == UtilizadoresDataAuto.TIPO ) + { + return tipo; + } + else if( fieldName == UtilizadoresDataAuto.NUMERO_CEDULA ) + { + return numero_cedula; + } + else if( fieldName == UtilizadoresDataAuto.CAP ) + { + return cap; + } + else if( fieldName == UtilizadoresDataAuto.NOME ) + { + return nome; + } + else if( fieldName == UtilizadoresDataAuto.FUNCIONARIO_HST_ID ) + { + return funcionario_hst_id; + } + else if( fieldName == UtilizadoresDataAuto.ACTIVO ) + { + return activo; + } + else if( fieldName == UtilizadoresDataAuto.RESPONSAVEL_LOJA ) + { + return responsavel_loja; + } + else if( fieldName == UtilizadoresDataAuto.NUMERO_MECANOGRAFICO ) + { + return numero_mecanografico; + } + else if( fieldName == UtilizadoresDataAuto.GESTOR_GERAL ) + { + return gestor_geral; + } + else if( fieldName == UtilizadoresDataAuto.PRIMEIRO_LOGIN ) + { + return primeiro_login; + } + else if( fieldName == UtilizadoresDataAuto.APAGADO ) + { + return apagado; + } + else if( fieldName == UtilizadoresDataAuto.DATA_PASSWORD ) + { + return data_password; + } + else if( fieldName.equals( UtilizadoresDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( UtilizadoresDataAuto.LOGIN ) ) + { + return login; + } + else if( fieldName.equals( UtilizadoresDataAuto.PASSWORD ) ) + { + return password; + } + else if( fieldName.equals( UtilizadoresDataAuto.EMAIL ) ) + { + return email; + } + else if( fieldName.equals( UtilizadoresDataAuto.EMPRESA_ID ) ) + { + return empresa_id; + } + else if( fieldName.equals( UtilizadoresDataAuto.ESTABELECIMENTO_ID ) ) + { + return estabelecimento_id; + } + else if( fieldName.equals( UtilizadoresDataAuto.ADMINISTRADOR ) ) + { + return administrador; + } + else if( fieldName.equals( UtilizadoresDataAuto.MEDICO_ID ) ) + { + return medico_id; + } + else if( fieldName.equals( UtilizadoresDataAuto.TIPO ) ) + { + return tipo; + } + else if( fieldName.equals( UtilizadoresDataAuto.NUMERO_CEDULA ) ) + { + return numero_cedula; + } + else if( fieldName.equals( UtilizadoresDataAuto.CAP ) ) + { + return cap; + } + else if( fieldName.equals( UtilizadoresDataAuto.NOME ) ) + { + return nome; + } + else if( fieldName.equals( UtilizadoresDataAuto.FUNCIONARIO_HST_ID ) ) + { + return funcionario_hst_id; + } + else if( fieldName.equals( UtilizadoresDataAuto.ACTIVO ) ) + { + return activo; + } + else if( fieldName.equals( UtilizadoresDataAuto.RESPONSAVEL_LOJA ) ) + { + return responsavel_loja; + } + else if( fieldName.equals( UtilizadoresDataAuto.NUMERO_MECANOGRAFICO ) ) + { + return numero_mecanografico; + } + else if( fieldName.equals( UtilizadoresDataAuto.GESTOR_GERAL ) ) + { + return gestor_geral; + } + else if( fieldName.equals( UtilizadoresDataAuto.PRIMEIRO_LOGIN ) ) + { + return primeiro_login; + } + else if( fieldName.equals( UtilizadoresDataAuto.APAGADO ) ) + { + return apagado; + } + else if( fieldName.equals( UtilizadoresDataAuto.DATA_PASSWORD ) ) + { + return data_password; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == UtilizadoresDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == UtilizadoresDataAuto.LOGIN ) + { + login = ( String ) value; + } + else if( fieldName == UtilizadoresDataAuto.PASSWORD ) + { + password = ( String ) value; + } + else if( fieldName == UtilizadoresDataAuto.EMAIL ) + { + email = ( String ) value; + } + else if( fieldName == UtilizadoresDataAuto.EMPRESA_ID ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName == UtilizadoresDataAuto.ESTABELECIMENTO_ID ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName == UtilizadoresDataAuto.ADMINISTRADOR ) + { + administrador = ( String ) value; + } + else if( fieldName == UtilizadoresDataAuto.MEDICO_ID ) + { + medico_id = ( Integer ) value; + } + else if( fieldName == UtilizadoresDataAuto.TIPO ) + { + tipo = ( Integer ) value; + } + else if( fieldName == UtilizadoresDataAuto.NUMERO_CEDULA ) + { + numero_cedula = ( String ) value; + } + else if( fieldName == UtilizadoresDataAuto.CAP ) + { + cap = ( String ) value; + } + else if( fieldName == UtilizadoresDataAuto.NOME ) + { + nome = ( String ) value; + } + else if( fieldName == UtilizadoresDataAuto.FUNCIONARIO_HST_ID ) + { + funcionario_hst_id = ( Integer ) value; + } + else if( fieldName == UtilizadoresDataAuto.ACTIVO ) + { + activo = ( String ) value; + } + else if( fieldName == UtilizadoresDataAuto.RESPONSAVEL_LOJA ) + { + responsavel_loja = ( String ) value; + } + else if( fieldName == UtilizadoresDataAuto.NUMERO_MECANOGRAFICO ) + { + numero_mecanografico = ( String ) value; + } + else if( fieldName == UtilizadoresDataAuto.GESTOR_GERAL ) + { + gestor_geral = ( String ) value; + } + else if( fieldName == UtilizadoresDataAuto.PRIMEIRO_LOGIN ) + { + primeiro_login = ( String ) value; + } + else if( fieldName == UtilizadoresDataAuto.APAGADO ) + { + apagado = ( String ) value; + } + else if( fieldName == UtilizadoresDataAuto.DATA_PASSWORD ) + { + data_password = ( java.util.Date ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.LOGIN ) ) + { + login = ( String ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.PASSWORD ) ) + { + password = ( String ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.EMAIL ) ) + { + email = ( String ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.EMPRESA_ID ) ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.ESTABELECIMENTO_ID ) ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.ADMINISTRADOR ) ) + { + administrador = ( String ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.MEDICO_ID ) ) + { + medico_id = ( Integer ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.TIPO ) ) + { + tipo = ( Integer ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.NUMERO_CEDULA ) ) + { + numero_cedula = ( String ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.CAP ) ) + { + cap = ( String ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.NOME ) ) + { + nome = ( String ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.FUNCIONARIO_HST_ID ) ) + { + funcionario_hst_id = ( Integer ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.ACTIVO ) ) + { + activo = ( String ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.RESPONSAVEL_LOJA ) ) + { + responsavel_loja = ( String ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.NUMERO_MECANOGRAFICO ) ) + { + numero_mecanografico = ( String ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.GESTOR_GERAL ) ) + { + gestor_geral = ( String ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.PRIMEIRO_LOGIN ) ) + { + primeiro_login = ( String ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.APAGADO ) ) + { + apagado = ( String ) value; + } + else if( fieldName.equals( UtilizadoresDataAuto.DATA_PASSWORD ) ) + { + data_password = ( java.util.Date ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getLogin() + { + return login; + } + + public void setLogin(String loginValue ) + { + this.login = loginValue; + } + + public String getPassword() + { + return password; + } + + public void setPassword(String passwordValue ) + { + this.password = passwordValue; + } + + public String getEmail() + { + return email; + } + + public void setEmail(String emailValue ) + { + this.email = emailValue; + } + + public Integer getEmpresa_id() + { + return empresa_id; + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + this.empresa_id = empresa_idValue; + } + + public Integer getEstabelecimento_id() + { + return estabelecimento_id; + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + this.estabelecimento_id = estabelecimento_idValue; + } + + public String getAdministrador() + { + return administrador; + } + + public void setAdministrador(String administradorValue ) + { + this.administrador = administradorValue; + } + + public Integer getMedico_id() + { + return medico_id; + } + + public void setMedico_id(Integer medico_idValue ) + { + this.medico_id = medico_idValue; + } + + public Integer getTipo() + { + return tipo; + } + + public void setTipo(Integer tipoValue ) + { + this.tipo = tipoValue; + } + + public String getNumero_cedula() + { + return numero_cedula; + } + + public void setNumero_cedula(String numero_cedulaValue ) + { + this.numero_cedula = numero_cedulaValue; + } + + public String getCap() + { + return cap; + } + + public void setCap(String capValue ) + { + this.cap = capValue; + } + + public String getNome() + { + return nome; + } + + public void setNome(String nomeValue ) + { + this.nome = nomeValue; + } + + public Integer getFuncionario_hst_id() + { + return funcionario_hst_id; + } + + public void setFuncionario_hst_id(Integer funcionario_hst_idValue ) + { + this.funcionario_hst_id = funcionario_hst_idValue; + } + + public String getActivo() + { + return activo; + } + + public void setActivo(String activoValue ) + { + this.activo = activoValue; + } + + public String getResponsavel_loja() + { + return responsavel_loja; + } + + public void setResponsavel_loja(String responsavel_lojaValue ) + { + this.responsavel_loja = responsavel_lojaValue; + } + + public String getNumero_mecanografico() + { + return numero_mecanografico; + } + + public void setNumero_mecanografico(String numero_mecanograficoValue ) + { + this.numero_mecanografico = numero_mecanograficoValue; + } + + public String getGestor_geral() + { + return gestor_geral; + } + + public void setGestor_geral(String gestor_geralValue ) + { + this.gestor_geral = gestor_geralValue; + } + + public String getPrimeiro_login() + { + return primeiro_login; + } + + public void setPrimeiro_login(String primeiro_loginValue ) + { + this.primeiro_login = primeiro_loginValue; + } + + public String getApagado() + { + return apagado; + } + + public void setApagado(String apagadoValue ) + { + this.apagado = apagadoValue; + } + + public java.util.Date getData_password() + { + return data_password; + } + + public void setData_password(java.util.Date data_passwordValue ) + { + this.data_password = data_passwordValue; + } + + public Class getOuterClass() + { + return UtilizadoresDataAuto.class; + } + + public UtilizadoresDataAuto getOuterClassInstance() + { + UtilizadoresDataAuto outerObj = new UtilizadoresDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UtilizadoresData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UtilizadoresData.java new file mode 100644 index 00000000..4057941e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UtilizadoresData.java @@ -0,0 +1,18 @@ +/* +* UtilizadoresDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp; + + +public final class UtilizadoresData extends com.evolute.siprp.server.db.data.siprp.UtilizadoresDataAuto +{ + + public UtilizadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UtilizadoresDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UtilizadoresDataAuto.java new file mode 100644 index 00000000..5700401c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UtilizadoresDataAuto.java @@ -0,0 +1,315 @@ +/* +* UtilizadoresDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class UtilizadoresDataAuto extends JDOObject +{ + + public static final String TABLENAME = "utilizadores"; + + public static final String ID = "id"; + public static final String ID_FULL = "utilizadores.id"; + public static final String LOGIN = "login"; + public static final String LOGIN_FULL = "utilizadores.login"; + public static final String PASSWORD = "password"; + public static final String PASSWORD_FULL = "utilizadores.password"; + public static final String EMAIL = "email"; + public static final String EMAIL_FULL = "utilizadores.email"; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "utilizadores.empresa_id"; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "utilizadores.estabelecimento_id"; + public static final String ADMINISTRADOR = "administrador"; + public static final String ADMINISTRADOR_FULL = "utilizadores.administrador"; + public static final String MEDICO_ID = "medico_id"; + public static final String MEDICO_ID_FULL = "utilizadores.medico_id"; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "utilizadores.tipo"; + public static final String NUMERO_CEDULA = "numero_cedula"; + public static final String NUMERO_CEDULA_FULL = "utilizadores.numero_cedula"; + public static final String CAP = "cap"; + public static final String CAP_FULL = "utilizadores.cap"; + public static final String NOME = "nome"; + public static final String NOME_FULL = "utilizadores.nome"; + public static final String FUNCIONARIO_HST_ID = "funcionario_hst_id"; + public static final String FUNCIONARIO_HST_ID_FULL = "utilizadores.funcionario_hst_id"; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "utilizadores.activo"; + public static final String RESPONSAVEL_LOJA = "responsavel_loja"; + public static final String RESPONSAVEL_LOJA_FULL = "utilizadores.responsavel_loja"; + public static final String NUMERO_MECANOGRAFICO = "numero_mecanografico"; + public static final String NUMERO_MECANOGRAFICO_FULL = "utilizadores.numero_mecanografico"; + public static final String GESTOR_GERAL = "gestor_geral"; + public static final String GESTOR_GERAL_FULL = "utilizadores.gestor_geral"; + public static final String PRIMEIRO_LOGIN = "primeiro_login"; + public static final String PRIMEIRO_LOGIN_FULL = "utilizadores.primeiro_login"; + public static final String APAGADO = "apagado"; + public static final String APAGADO_FULL = "utilizadores.apagado"; + public static final String DATA_PASSWORD = "data_password"; + public static final String DATA_PASSWORD_FULL = "utilizadores.data_password"; + + public static final String FIELD_NAMES[] = new String[]{ + LOGIN, PASSWORD, EMAIL, EMPRESA_ID, ESTABELECIMENTO_ID, ADMINISTRADOR, MEDICO_ID, + TIPO, NUMERO_CEDULA, CAP, NOME, FUNCIONARIO_HST_ID, ACTIVO, RESPONSAVEL_LOJA, + NUMERO_MECANOGRAFICO, GESTOR_GERAL, PRIMEIRO_LOGIN, APAGADO, DATA_PASSWORD, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, LOGIN, PASSWORD, EMAIL, EMPRESA_ID, ESTABELECIMENTO_ID, ADMINISTRADOR, MEDICO_ID, + TIPO, NUMERO_CEDULA, CAP, NOME, FUNCIONARIO_HST_ID, ACTIVO, RESPONSAVEL_LOJA, + NUMERO_MECANOGRAFICO, GESTOR_GERAL, PRIMEIRO_LOGIN, APAGADO, DATA_PASSWORD, }; + + private Map dataHash; + + public UtilizadoresDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getLogin() + { + return (String) get(LOGIN); + } + + public void setLogin(String loginValue ) + { + this.set(LOGIN, loginValue ); + } + + public String getPassword() + { + return (String) get(PASSWORD); + } + + public void setPassword(String passwordValue ) + { + this.set(PASSWORD, passwordValue ); + } + + public String getEmail() + { + return (String) get(EMAIL); + } + + public void setEmail(String emailValue ) + { + this.set(EMAIL, emailValue ); + } + + public Integer getEmpresa_id() + { + return (Integer) get(EMPRESA_ID); + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + this.set(EMPRESA_ID, empresa_idValue ); + } + + public Integer getEstabelecimento_id() + { + return (Integer) get(ESTABELECIMENTO_ID); + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + this.set(ESTABELECIMENTO_ID, estabelecimento_idValue ); + } + + public String getAdministrador() + { + return (String) get(ADMINISTRADOR); + } + + public void setAdministrador(String administradorValue ) + { + this.set(ADMINISTRADOR, administradorValue ); + } + + public Integer getMedico_id() + { + return (Integer) get(MEDICO_ID); + } + + public void setMedico_id(Integer medico_idValue ) + { + this.set(MEDICO_ID, medico_idValue ); + } + + public Integer getTipo() + { + return (Integer) get(TIPO); + } + + public void setTipo(Integer tipoValue ) + { + this.set(TIPO, tipoValue ); + } + + public String getNumero_cedula() + { + return (String) get(NUMERO_CEDULA); + } + + public void setNumero_cedula(String numero_cedulaValue ) + { + this.set(NUMERO_CEDULA, numero_cedulaValue ); + } + + public String getCap() + { + return (String) get(CAP); + } + + public void setCap(String capValue ) + { + this.set(CAP, capValue ); + } + + public String getNome() + { + return (String) get(NOME); + } + + public void setNome(String nomeValue ) + { + this.set(NOME, nomeValue ); + } + + public Integer getFuncionario_hst_id() + { + return (Integer) get(FUNCIONARIO_HST_ID); + } + + public void setFuncionario_hst_id(Integer funcionario_hst_idValue ) + { + this.set(FUNCIONARIO_HST_ID, funcionario_hst_idValue ); + } + + public String getActivo() + { + return (String) get(ACTIVO); + } + + public void setActivo(String activoValue ) + { + this.set(ACTIVO, activoValue ); + } + + public String getResponsavel_loja() + { + return (String) get(RESPONSAVEL_LOJA); + } + + public void setResponsavel_loja(String responsavel_lojaValue ) + { + this.set(RESPONSAVEL_LOJA, responsavel_lojaValue ); + } + + public String getNumero_mecanografico() + { + return (String) get(NUMERO_MECANOGRAFICO); + } + + public void setNumero_mecanografico(String numero_mecanograficoValue ) + { + this.set(NUMERO_MECANOGRAFICO, numero_mecanograficoValue ); + } + + public String getGestor_geral() + { + return (String) get(GESTOR_GERAL); + } + + public void setGestor_geral(String gestor_geralValue ) + { + this.set(GESTOR_GERAL, gestor_geralValue ); + } + + public String getPrimeiro_login() + { + return (String) get(PRIMEIRO_LOGIN); + } + + public void setPrimeiro_login(String primeiro_loginValue ) + { + this.set(PRIMEIRO_LOGIN, primeiro_loginValue ); + } + + public String getApagado() + { + return (String) get(APAGADO); + } + + public void setApagado(String apagadoValue ) + { + this.set(APAGADO, apagadoValue ); + } + + public java.util.Date getData_password() + { + return (java.util.Date) get(DATA_PASSWORD); + } + + public void setData_password(java.util.Date data_passwordValue ) + { + this.set(DATA_PASSWORD, data_passwordValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Utilizadores.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/package.jdo b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/package.jdo new file mode 100644 index 00000000..b3e7a108 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/package.jdo @@ -0,0 +1,1001 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Actualizacao.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Actualizacao.java new file mode 100644 index 00000000..c2cf9d4c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Actualizacao.java @@ -0,0 +1,102 @@ +/* +* Actualizacao.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class Actualizacao implements JDOInnerObject +{ + private java.sql.Timestamp hora; + private Integer id; + + public Actualizacao() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == ActualizacaoDataAuto.HORA ) + { + return hora; + } + else if( fieldName == ActualizacaoDataAuto.ID ) + { + return id; + } + else if( fieldName.equals( ActualizacaoDataAuto.HORA ) ) + { + return hora; + } + else if( fieldName.equals( ActualizacaoDataAuto.ID ) ) + { + return id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == ActualizacaoDataAuto.HORA ) + { + hora = ( java.sql.Timestamp ) value; + } + else if( fieldName == ActualizacaoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( ActualizacaoDataAuto.HORA ) ) + { + hora = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( ActualizacaoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + } + + public java.sql.Timestamp getHora() + { + return hora; + } + + public void setHora(java.sql.Timestamp horaValue ) + { + this.hora = horaValue; + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Class getOuterClass() + { + return ActualizacaoDataAuto.class; + } + + public ActualizacaoDataAuto getOuterClassInstance() + { + ActualizacaoDataAuto outerObj = new ActualizacaoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ActualizacaoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ActualizacaoData.java new file mode 100644 index 00000000..b4609619 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ActualizacaoData.java @@ -0,0 +1,18 @@ +/* +* ActualizacaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class ActualizacaoData extends com.evolute.siprp.server.db.data.siprp_local3.ActualizacaoDataAuto +{ + + public ActualizacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ActualizacaoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ActualizacaoDataAuto.java new file mode 100644 index 00000000..476395c7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ActualizacaoDataAuto.java @@ -0,0 +1,95 @@ +/* +* ActualizacaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class ActualizacaoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "actualizacao"; + + public static final String HORA = "hora"; + public static final String HORA_FULL = "actualizacao.hora"; + public static final String ID = "id"; + public static final String ID_FULL = "actualizacao.id"; + + public static final String FIELD_NAMES[] = new String[]{ + HORA, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + HORA, ID, }; + + private Map dataHash; + + public ActualizacaoDataAuto() + { + dataHash = new HashMap(); + } + + public java.sql.Timestamp getHora() + { + return (java.sql.Timestamp) get(HORA); + } + + public void setHora(java.sql.Timestamp horaValue ) + { + this.set(HORA, horaValue ); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Actualizacao.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Avisos.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Avisos.java new file mode 100644 index 00000000..70a6c4af --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Avisos.java @@ -0,0 +1,291 @@ +/* +* Avisos.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class Avisos implements JDOInnerObject +{ + private Integer id; + private Integer tipo; + private Integer empresa_id; + private Integer estabelecimento_id; + private Integer trabalhador_id; + private Integer evento_id; + private java.util.Date data_aviso; + private java.util.Date data_evento; + private String descricao; + + public Avisos() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == AvisosDataAuto.ID ) + { + return id; + } + else if( fieldName == AvisosDataAuto.TIPO ) + { + return tipo; + } + else if( fieldName == AvisosDataAuto.EMPRESA_ID ) + { + return empresa_id; + } + else if( fieldName == AvisosDataAuto.ESTABELECIMENTO_ID ) + { + return estabelecimento_id; + } + else if( fieldName == AvisosDataAuto.TRABALHADOR_ID ) + { + return trabalhador_id; + } + else if( fieldName == AvisosDataAuto.EVENTO_ID ) + { + return evento_id; + } + else if( fieldName == AvisosDataAuto.DATA_AVISO ) + { + return data_aviso; + } + else if( fieldName == AvisosDataAuto.DATA_EVENTO ) + { + return data_evento; + } + else if( fieldName == AvisosDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName.equals( AvisosDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( AvisosDataAuto.TIPO ) ) + { + return tipo; + } + else if( fieldName.equals( AvisosDataAuto.EMPRESA_ID ) ) + { + return empresa_id; + } + else if( fieldName.equals( AvisosDataAuto.ESTABELECIMENTO_ID ) ) + { + return estabelecimento_id; + } + else if( fieldName.equals( AvisosDataAuto.TRABALHADOR_ID ) ) + { + return trabalhador_id; + } + else if( fieldName.equals( AvisosDataAuto.EVENTO_ID ) ) + { + return evento_id; + } + else if( fieldName.equals( AvisosDataAuto.DATA_AVISO ) ) + { + return data_aviso; + } + else if( fieldName.equals( AvisosDataAuto.DATA_EVENTO ) ) + { + return data_evento; + } + else if( fieldName.equals( AvisosDataAuto.DESCRICAO ) ) + { + return descricao; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == AvisosDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == AvisosDataAuto.TIPO ) + { + tipo = ( Integer ) value; + } + else if( fieldName == AvisosDataAuto.EMPRESA_ID ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName == AvisosDataAuto.ESTABELECIMENTO_ID ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName == AvisosDataAuto.TRABALHADOR_ID ) + { + trabalhador_id = ( Integer ) value; + } + else if( fieldName == AvisosDataAuto.EVENTO_ID ) + { + evento_id = ( Integer ) value; + } + else if( fieldName == AvisosDataAuto.DATA_AVISO ) + { + data_aviso = ( java.util.Date ) value; + } + else if( fieldName == AvisosDataAuto.DATA_EVENTO ) + { + data_evento = ( java.util.Date ) value; + } + else if( fieldName == AvisosDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( AvisosDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( AvisosDataAuto.TIPO ) ) + { + tipo = ( Integer ) value; + } + else if( fieldName.equals( AvisosDataAuto.EMPRESA_ID ) ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName.equals( AvisosDataAuto.ESTABELECIMENTO_ID ) ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName.equals( AvisosDataAuto.TRABALHADOR_ID ) ) + { + trabalhador_id = ( Integer ) value; + } + else if( fieldName.equals( AvisosDataAuto.EVENTO_ID ) ) + { + evento_id = ( Integer ) value; + } + else if( fieldName.equals( AvisosDataAuto.DATA_AVISO ) ) + { + data_aviso = ( java.util.Date ) value; + } + else if( fieldName.equals( AvisosDataAuto.DATA_EVENTO ) ) + { + data_evento = ( java.util.Date ) value; + } + else if( fieldName.equals( AvisosDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getTipo() + { + return tipo; + } + + public void setTipo(Integer tipoValue ) + { + this.tipo = tipoValue; + } + + public Integer getEmpresa_id() + { + return empresa_id; + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + this.empresa_id = empresa_idValue; + } + + public Integer getEstabelecimento_id() + { + return estabelecimento_id; + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + this.estabelecimento_id = estabelecimento_idValue; + } + + public Integer getTrabalhador_id() + { + return trabalhador_id; + } + + public void setTrabalhador_id(Integer trabalhador_idValue ) + { + this.trabalhador_id = trabalhador_idValue; + } + + public Integer getEvento_id() + { + return evento_id; + } + + public void setEvento_id(Integer evento_idValue ) + { + this.evento_id = evento_idValue; + } + + public java.util.Date getData_aviso() + { + return data_aviso; + } + + public void setData_aviso(java.util.Date data_avisoValue ) + { + this.data_aviso = data_avisoValue; + } + + public java.util.Date getData_evento() + { + return data_evento; + } + + public void setData_evento(java.util.Date data_eventoValue ) + { + this.data_evento = data_eventoValue; + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public Class getOuterClass() + { + return AvisosDataAuto.class; + } + + public AvisosDataAuto getOuterClassInstance() + { + AvisosDataAuto outerObj = new AvisosDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/AvisosData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/AvisosData.java new file mode 100644 index 00000000..b860d562 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/AvisosData.java @@ -0,0 +1,18 @@ +/* +* AvisosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class AvisosData extends com.evolute.siprp.server.db.data.siprp_local3.AvisosDataAuto +{ + + public AvisosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/AvisosDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/AvisosDataAuto.java new file mode 100644 index 00000000..bddf66ac --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/AvisosDataAuto.java @@ -0,0 +1,287 @@ +/* +* AvisosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class AvisosDataAuto extends JDOObject +{ + + public static final String TABLENAME = "avisos"; + + public static final String ID = "id"; + public static final String ID_FULL = "avisos.id"; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "avisos.tipo"; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "avisos.empresa_id"; + public static final String TO_EMPRESA_ID = "to empresa_id"; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "avisos.estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id"; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "avisos.trabalhador_id"; + public static final String EVENTO_ID = "evento_id"; + public static final String EVENTO_ID_FULL = "avisos.evento_id"; + public static final String DATA_AVISO = "data_aviso"; + public static final String DATA_AVISO_FULL = "avisos.data_aviso"; + public static final String DATA_EVENTO = "data_evento"; + public static final String DATA_EVENTO_FULL = "avisos.data_evento"; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "avisos.descricao"; + + public static final String FIELD_NAMES[] = new String[]{ + TIPO, EMPRESA_ID, TO_EMPRESA_ID, ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, + TRABALHADOR_ID, EVENTO_ID, DATA_AVISO, DATA_EVENTO, DESCRICAO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, TIPO, EMPRESA_ID, ESTABELECIMENTO_ID, TRABALHADOR_ID, EVENTO_ID, DATA_AVISO, + DATA_EVENTO, DESCRICAO, }; + + private Map dataHash; + + public AvisosDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getTipo() + { + return (Integer) get(TIPO); + } + + public void setTipo(Integer tipoValue ) + { + this.set(TIPO, tipoValue ); + } + + public Integer getEmpresa_id() + { + return (Integer) dataHash.get(EMPRESA_ID); + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + dataHash.put(TO_EMPRESA_ID, null); + dataHash.put(EMPRESA_ID, empresa_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EmpresasData toEmpresa_id() + throws Exception + { + if( dataHash.get(TO_EMPRESA_ID) == null && getEmpresa_id() != null ) + { + dataHash.put(TO_EMPRESA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.class, new Object[]{ getEmpresa_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) dataHash.get(TO_EMPRESA_ID); + } + + public void setToEmpresa_id(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData empresa_idObject ) + { + if( empresa_idObject == null ) + { + dataHash.put(EMPRESA_ID, null); + } + else + { + dataHash.put(EMPRESA_ID, empresa_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + dataHash.put(TO_EMPRESA_ID, empresa_idObject); + } + + public Integer getEstabelecimento_id() + { + return (Integer) dataHash.get(ESTABELECIMENTO_ID); + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, null); + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id() + throws Exception + { + if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID); + } + + public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject ) + { + if( estabelecimento_idObject == null ) + { + dataHash.put(ESTABELECIMENTO_ID, null); + } + else + { + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject); + } + + public Integer getTrabalhador_id() + { + return (Integer) get(TRABALHADOR_ID); + } + + public void setTrabalhador_id(Integer trabalhador_idValue ) + { + this.set(TRABALHADOR_ID, trabalhador_idValue ); + } + + public Integer getEvento_id() + { + return (Integer) get(EVENTO_ID); + } + + public void setEvento_id(Integer evento_idValue ) + { + this.set(EVENTO_ID, evento_idValue ); + } + + public java.util.Date getData_aviso() + { + return (java.util.Date) get(DATA_AVISO); + } + + public void setData_aviso(java.util.Date data_avisoValue ) + { + this.set(DATA_AVISO, data_avisoValue ); + } + + public java.util.Date getData_evento() + { + return (java.util.Date) get(DATA_EVENTO); + } + + public void setData_evento(java.util.Date data_eventoValue ) + { + this.set(DATA_EVENTO, data_eventoValue ); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = getEstabelecimento_id(); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = toEstabelecimento_id(); + } + else if( TO_EMPRESA_ID.equals( fieldName ) ) + { + value = toEmpresa_id(); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + value = getEmpresa_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setEstabelecimento_id( (Integer) value ); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value ); + } + else if( TO_EMPRESA_ID.equals( fieldName ) ) + { + setToEmpresa_id( (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) value ); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + setEmpresa_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_EMPRESA_ID) != null ) + { + toEmpresa_id().save(); + dataHash.put(EMPRESA_ID, toEmpresa_id().get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + + if( dataHash.get(TO_ESTABELECIMENTO_ID) != null ) + { + toEstabelecimento_id().save(); + dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Avisos.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Contactos.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Contactos.java new file mode 100644 index 00000000..1b5191ba --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Contactos.java @@ -0,0 +1,237 @@ +/* +* Contactos.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class Contactos implements JDOInnerObject +{ + private Integer id; + private String nome; + private String telefone; + private String telemovel; + private String fax; + private String email; + private String cargo; + + public Contactos() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == ContactosDataAuto.ID ) + { + return id; + } + else if( fieldName == ContactosDataAuto.NOME ) + { + return nome; + } + else if( fieldName == ContactosDataAuto.TELEFONE ) + { + return telefone; + } + else if( fieldName == ContactosDataAuto.TELEMOVEL ) + { + return telemovel; + } + else if( fieldName == ContactosDataAuto.FAX ) + { + return fax; + } + else if( fieldName == ContactosDataAuto.EMAIL ) + { + return email; + } + else if( fieldName == ContactosDataAuto.CARGO ) + { + return cargo; + } + else if( fieldName.equals( ContactosDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( ContactosDataAuto.NOME ) ) + { + return nome; + } + else if( fieldName.equals( ContactosDataAuto.TELEFONE ) ) + { + return telefone; + } + else if( fieldName.equals( ContactosDataAuto.TELEMOVEL ) ) + { + return telemovel; + } + else if( fieldName.equals( ContactosDataAuto.FAX ) ) + { + return fax; + } + else if( fieldName.equals( ContactosDataAuto.EMAIL ) ) + { + return email; + } + else if( fieldName.equals( ContactosDataAuto.CARGO ) ) + { + return cargo; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == ContactosDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == ContactosDataAuto.NOME ) + { + nome = ( String ) value; + } + else if( fieldName == ContactosDataAuto.TELEFONE ) + { + telefone = ( String ) value; + } + else if( fieldName == ContactosDataAuto.TELEMOVEL ) + { + telemovel = ( String ) value; + } + else if( fieldName == ContactosDataAuto.FAX ) + { + fax = ( String ) value; + } + else if( fieldName == ContactosDataAuto.EMAIL ) + { + email = ( String ) value; + } + else if( fieldName == ContactosDataAuto.CARGO ) + { + cargo = ( String ) value; + } + else if( fieldName.equals( ContactosDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( ContactosDataAuto.NOME ) ) + { + nome = ( String ) value; + } + else if( fieldName.equals( ContactosDataAuto.TELEFONE ) ) + { + telefone = ( String ) value; + } + else if( fieldName.equals( ContactosDataAuto.TELEMOVEL ) ) + { + telemovel = ( String ) value; + } + else if( fieldName.equals( ContactosDataAuto.FAX ) ) + { + fax = ( String ) value; + } + else if( fieldName.equals( ContactosDataAuto.EMAIL ) ) + { + email = ( String ) value; + } + else if( fieldName.equals( ContactosDataAuto.CARGO ) ) + { + cargo = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getNome() + { + return nome; + } + + public void setNome(String nomeValue ) + { + this.nome = nomeValue; + } + + public String getTelefone() + { + return telefone; + } + + public void setTelefone(String telefoneValue ) + { + this.telefone = telefoneValue; + } + + public String getTelemovel() + { + return telemovel; + } + + public void setTelemovel(String telemovelValue ) + { + this.telemovel = telemovelValue; + } + + public String getFax() + { + return fax; + } + + public void setFax(String faxValue ) + { + this.fax = faxValue; + } + + public String getEmail() + { + return email; + } + + public void setEmail(String emailValue ) + { + this.email = emailValue; + } + + public String getCargo() + { + return cargo; + } + + public void setCargo(String cargoValue ) + { + this.cargo = cargoValue; + } + + public Class getOuterClass() + { + return ContactosDataAuto.class; + } + + public ContactosDataAuto getOuterClassInstance() + { + ContactosDataAuto outerObj = new ContactosDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ContactosData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ContactosData.java new file mode 100644 index 00000000..85378c6a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ContactosData.java @@ -0,0 +1,18 @@ +/* +* ContactosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class ContactosData extends com.evolute.siprp.server.db.data.siprp_local3.ContactosDataAuto +{ + + public ContactosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ContactosDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ContactosDataAuto.java new file mode 100644 index 00000000..c452497f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ContactosDataAuto.java @@ -0,0 +1,155 @@ +/* +* ContactosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class ContactosDataAuto extends JDOObject +{ + + public static final String TABLENAME = "contactos"; + + public static final String ID = "id"; + public static final String ID_FULL = "contactos.id"; + public static final String NOME = "nome"; + public static final String NOME_FULL = "contactos.nome"; + public static final String TELEFONE = "telefone"; + public static final String TELEFONE_FULL = "contactos.telefone"; + public static final String TELEMOVEL = "telemovel"; + public static final String TELEMOVEL_FULL = "contactos.telemovel"; + public static final String FAX = "fax"; + public static final String FAX_FULL = "contactos.fax"; + public static final String EMAIL = "email"; + public static final String EMAIL_FULL = "contactos.email"; + public static final String CARGO = "cargo"; + public static final String CARGO_FULL = "contactos.cargo"; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, }; + + private Map dataHash; + + public ContactosDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getNome() + { + return (String) get(NOME); + } + + public void setNome(String nomeValue ) + { + this.set(NOME, nomeValue ); + } + + public String getTelefone() + { + return (String) get(TELEFONE); + } + + public void setTelefone(String telefoneValue ) + { + this.set(TELEFONE, telefoneValue ); + } + + public String getTelemovel() + { + return (String) get(TELEMOVEL); + } + + public void setTelemovel(String telemovelValue ) + { + this.set(TELEMOVEL, telemovelValue ); + } + + public String getFax() + { + return (String) get(FAX); + } + + public void setFax(String faxValue ) + { + this.set(FAX, faxValue ); + } + + public String getEmail() + { + return (String) get(EMAIL); + } + + public void setEmail(String emailValue ) + { + this.set(EMAIL, emailValue ); + } + + public String getCargo() + { + return (String) get(CARGO); + } + + public void setCargo(String cargoValue ) + { + this.set(CARGO, cargoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Contactos.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficial.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficial.java new file mode 100644 index 00000000..3405cbd4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficial.java @@ -0,0 +1,183 @@ +/* +* EcdOficial.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class EcdOficial implements JDOInnerObject +{ + private Integer id; + private String descricao; + private String descricao_plain; + private Integer ordem; + private String activo; + + public EcdOficial() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == EcdOficialDataAuto.ID ) + { + return id; + } + else if( fieldName == EcdOficialDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == EcdOficialDataAuto.DESCRICAO_PLAIN ) + { + return descricao_plain; + } + else if( fieldName == EcdOficialDataAuto.ORDEM ) + { + return ordem; + } + else if( fieldName == EcdOficialDataAuto.ACTIVO ) + { + return activo; + } + else if( fieldName.equals( EcdOficialDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( EcdOficialDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( EcdOficialDataAuto.DESCRICAO_PLAIN ) ) + { + return descricao_plain; + } + else if( fieldName.equals( EcdOficialDataAuto.ORDEM ) ) + { + return ordem; + } + else if( fieldName.equals( EcdOficialDataAuto.ACTIVO ) ) + { + return activo; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == EcdOficialDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == EcdOficialDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == EcdOficialDataAuto.DESCRICAO_PLAIN ) + { + descricao_plain = ( String ) value; + } + else if( fieldName == EcdOficialDataAuto.ORDEM ) + { + ordem = ( Integer ) value; + } + else if( fieldName == EcdOficialDataAuto.ACTIVO ) + { + activo = ( String ) value; + } + else if( fieldName.equals( EcdOficialDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( EcdOficialDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( EcdOficialDataAuto.DESCRICAO_PLAIN ) ) + { + descricao_plain = ( String ) value; + } + else if( fieldName.equals( EcdOficialDataAuto.ORDEM ) ) + { + ordem = ( Integer ) value; + } + else if( fieldName.equals( EcdOficialDataAuto.ACTIVO ) ) + { + activo = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public String getDescricao_plain() + { + return descricao_plain; + } + + public void setDescricao_plain(String descricao_plainValue ) + { + this.descricao_plain = descricao_plainValue; + } + + public Integer getOrdem() + { + return ordem; + } + + public void setOrdem(Integer ordemValue ) + { + this.ordem = ordemValue; + } + + public String getActivo() + { + return activo; + } + + public void setActivo(String activoValue ) + { + this.activo = activoValue; + } + + public Class getOuterClass() + { + return EcdOficialDataAuto.class; + } + + public EcdOficialDataAuto getOuterClassInstance() + { + EcdOficialDataAuto outerObj = new EcdOficialDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficialData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficialData.java new file mode 100644 index 00000000..79d44702 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficialData.java @@ -0,0 +1,18 @@ +/* +* EcdOficialDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class EcdOficialData extends com.evolute.siprp.server.db.data.siprp_local3.EcdOficialDataAuto +{ + + public EcdOficialData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficialDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficialDataAuto.java new file mode 100644 index 00000000..b66c1d0f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficialDataAuto.java @@ -0,0 +1,131 @@ +/* +* EcdOficialDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class EcdOficialDataAuto extends JDOObject +{ + + public static final String TABLENAME = "ecd_oficial"; + + public static final String ID = "id"; + public static final String ID_FULL = "ecd_oficial.id"; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "ecd_oficial.descricao"; + public static final String DESCRICAO_PLAIN = "descricao_plain"; + public static final String DESCRICAO_PLAIN_FULL = "ecd_oficial.descricao_plain"; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "ecd_oficial.ordem"; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "ecd_oficial.activo"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, DESCRICAO_PLAIN, ORDEM, ACTIVO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, DESCRICAO_PLAIN, ORDEM, ACTIVO, }; + + private Map dataHash; + + public EcdOficialDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public String getDescricao_plain() + { + return (String) get(DESCRICAO_PLAIN); + } + + public void setDescricao_plain(String descricao_plainValue ) + { + this.set(DESCRICAO_PLAIN, descricao_plainValue ); + } + + public Integer getOrdem() + { + return (Integer) get(ORDEM); + } + + public void setOrdem(Integer ordemValue ) + { + this.set(ORDEM, ordemValue ); + } + + public String getActivo() + { + return (String) get(ACTIVO); + } + + public void setActivo(String activoValue ) + { + this.set(ACTIVO, activoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return EcdOficial.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacao.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacao.java new file mode 100644 index 00000000..ef5cfc70 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacao.java @@ -0,0 +1,129 @@ +/* +* EmailPlanoDeActuacao.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class EmailPlanoDeActuacao implements JDOInnerObject +{ + private Integer id; + private String description; + private Integer estabelecimento_id; + + public EmailPlanoDeActuacao() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == EmailPlanoDeActuacaoDataAuto.ID ) + { + return id; + } + else if( fieldName == EmailPlanoDeActuacaoDataAuto.DESCRIPTION ) + { + return description; + } + else if( fieldName == EmailPlanoDeActuacaoDataAuto.ESTABELECIMENTO_ID ) + { + return estabelecimento_id; + } + else if( fieldName.equals( EmailPlanoDeActuacaoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( EmailPlanoDeActuacaoDataAuto.DESCRIPTION ) ) + { + return description; + } + else if( fieldName.equals( EmailPlanoDeActuacaoDataAuto.ESTABELECIMENTO_ID ) ) + { + return estabelecimento_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == EmailPlanoDeActuacaoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == EmailPlanoDeActuacaoDataAuto.DESCRIPTION ) + { + description = ( String ) value; + } + else if( fieldName == EmailPlanoDeActuacaoDataAuto.ESTABELECIMENTO_ID ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName.equals( EmailPlanoDeActuacaoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( EmailPlanoDeActuacaoDataAuto.DESCRIPTION ) ) + { + description = ( String ) value; + } + else if( fieldName.equals( EmailPlanoDeActuacaoDataAuto.ESTABELECIMENTO_ID ) ) + { + estabelecimento_id = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String descriptionValue ) + { + this.description = descriptionValue; + } + + public Integer getEstabelecimento_id() + { + return estabelecimento_id; + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + this.estabelecimento_id = estabelecimento_idValue; + } + + public Class getOuterClass() + { + return EmailPlanoDeActuacaoDataAuto.class; + } + + public EmailPlanoDeActuacaoDataAuto getOuterClassInstance() + { + EmailPlanoDeActuacaoDataAuto outerObj = new EmailPlanoDeActuacaoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacaoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacaoData.java new file mode 100644 index 00000000..c9124dff --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacaoData.java @@ -0,0 +1,18 @@ +/* +* EmailPlanoDeActuacaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class EmailPlanoDeActuacaoData extends com.evolute.siprp.server.db.data.siprp_local3.EmailPlanoDeActuacaoDataAuto +{ + + public EmailPlanoDeActuacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacaoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacaoDataAuto.java new file mode 100644 index 00000000..420b63a9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacaoDataAuto.java @@ -0,0 +1,166 @@ +/* +* EmailPlanoDeActuacaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class EmailPlanoDeActuacaoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "email_plano_de_actuacao"; + + public static final String ID = "id"; + public static final String ID_FULL = "email_plano_de_actuacao.id"; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "email_plano_de_actuacao.description"; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "email_plano_de_actuacao.estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRIPTION, ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DESCRIPTION, ESTABELECIMENTO_ID, }; + + private Map dataHash; + + public EmailPlanoDeActuacaoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getDescription() + { + return (String) get(DESCRIPTION); + } + + public void setDescription(String descriptionValue ) + { + this.set(DESCRIPTION, descriptionValue ); + } + + public Integer getEstabelecimento_id() + { + return (Integer) dataHash.get(ESTABELECIMENTO_ID); + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, null); + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id() + throws Exception + { + if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID); + } + + public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject ) + { + if( estabelecimento_idObject == null ) + { + dataHash.put(ESTABELECIMENTO_ID, null); + } + else + { + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = getEstabelecimento_id(); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = toEstabelecimento_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setEstabelecimento_id( (Integer) value ); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_ESTABELECIMENTO_ID) != null ) + { + toEstabelecimento_id().save(); + dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return EmailPlanoDeActuacao.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Empresas.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Empresas.java new file mode 100644 index 00000000..e7abed30 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Empresas.java @@ -0,0 +1,1263 @@ +/* +* Empresas.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class Empresas implements JDOInnerObject +{ + private Integer id; + private String designacao_social; + private Integer servico_saude_tipo; + private String servico_saude_designacao; + private Integer servico_higiene_tipo; + private String servico_higiene_designacao; + private String inactivo; + private String morada; + private String codigo_postal; + private String localidade; + private String distrito; + private String concelho; + private Integer numero_trabalhadores; + private java.util.Date data_proposta; + private java.util.Date data_aceitacao; + private String perfil_1; + private String perfil_2; + private java.util.Date data_envio_contrato; + private java.util.Date data_recepcao_contrato; + private java.util.Date data_envio_idict; + private String cae; + private String contribuinte; + private String seguranca_social; + private String codigo_1; + private String codigo_2; + private String codigo_3; + private Integer servicos; + private Integer contacto_1; + private Integer contacto_2; + private java.util.Date data_relatorio_anual; + private Double preco_higiene; + private Double preco_medicina; + private String periodicidade; + private String actividade; + private java.sql.Timestamp actualizacao; + private String designacao_social_plain; + private String a_consultas; + private String a_exames; + private String b_consultas; + private String b_exames; + private java.util.Date data_cancelamento; + private Integer duracao; + private java.util.Date inicio_contrato; + private Integer empresa_logo_id; + private Boolean imprimir_tabela_alargada; + + public Empresas() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == EmpresasDataAuto.ID ) + { + return id; + } + else if( fieldName == EmpresasDataAuto.DESIGNACAO_SOCIAL ) + { + return designacao_social; + } + else if( fieldName == EmpresasDataAuto.SERVICO_SAUDE_TIPO ) + { + return servico_saude_tipo; + } + else if( fieldName == EmpresasDataAuto.SERVICO_SAUDE_DESIGNACAO ) + { + return servico_saude_designacao; + } + else if( fieldName == EmpresasDataAuto.SERVICO_HIGIENE_TIPO ) + { + return servico_higiene_tipo; + } + else if( fieldName == EmpresasDataAuto.SERVICO_HIGIENE_DESIGNACAO ) + { + return servico_higiene_designacao; + } + else if( fieldName == EmpresasDataAuto.INACTIVO ) + { + return inactivo; + } + else if( fieldName == EmpresasDataAuto.MORADA ) + { + return morada; + } + else if( fieldName == EmpresasDataAuto.CODIGO_POSTAL ) + { + return codigo_postal; + } + else if( fieldName == EmpresasDataAuto.LOCALIDADE ) + { + return localidade; + } + else if( fieldName == EmpresasDataAuto.DISTRITO ) + { + return distrito; + } + else if( fieldName == EmpresasDataAuto.CONCELHO ) + { + return concelho; + } + else if( fieldName == EmpresasDataAuto.NUMERO_TRABALHADORES ) + { + return numero_trabalhadores; + } + else if( fieldName == EmpresasDataAuto.DATA_PROPOSTA ) + { + return data_proposta; + } + else if( fieldName == EmpresasDataAuto.DATA_ACEITACAO ) + { + return data_aceitacao; + } + else if( fieldName == EmpresasDataAuto.PERFIL_1 ) + { + return perfil_1; + } + else if( fieldName == EmpresasDataAuto.PERFIL_2 ) + { + return perfil_2; + } + else if( fieldName == EmpresasDataAuto.DATA_ENVIO_CONTRATO ) + { + return data_envio_contrato; + } + else if( fieldName == EmpresasDataAuto.DATA_RECEPCAO_CONTRATO ) + { + return data_recepcao_contrato; + } + else if( fieldName == EmpresasDataAuto.DATA_ENVIO_IDICT ) + { + return data_envio_idict; + } + else if( fieldName == EmpresasDataAuto.CAE ) + { + return cae; + } + else if( fieldName == EmpresasDataAuto.CONTRIBUINTE ) + { + return contribuinte; + } + else if( fieldName == EmpresasDataAuto.SEGURANCA_SOCIAL ) + { + return seguranca_social; + } + else if( fieldName == EmpresasDataAuto.CODIGO_1 ) + { + return codigo_1; + } + else if( fieldName == EmpresasDataAuto.CODIGO_2 ) + { + return codigo_2; + } + else if( fieldName == EmpresasDataAuto.CODIGO_3 ) + { + return codigo_3; + } + else if( fieldName == EmpresasDataAuto.SERVICOS ) + { + return servicos; + } + else if( fieldName == EmpresasDataAuto.CONTACTO_1 ) + { + return contacto_1; + } + else if( fieldName == EmpresasDataAuto.CONTACTO_2 ) + { + return contacto_2; + } + else if( fieldName == EmpresasDataAuto.DATA_RELATORIO_ANUAL ) + { + return data_relatorio_anual; + } + else if( fieldName == EmpresasDataAuto.PRECO_HIGIENE ) + { + return preco_higiene; + } + else if( fieldName == EmpresasDataAuto.PRECO_MEDICINA ) + { + return preco_medicina; + } + else if( fieldName == EmpresasDataAuto.PERIODICIDADE ) + { + return periodicidade; + } + else if( fieldName == EmpresasDataAuto.ACTIVIDADE ) + { + return actividade; + } + else if( fieldName == EmpresasDataAuto.ACTUALIZACAO ) + { + return actualizacao; + } + else if( fieldName == EmpresasDataAuto.DESIGNACAO_SOCIAL_PLAIN ) + { + return designacao_social_plain; + } + else if( fieldName == EmpresasDataAuto.A_CONSULTAS ) + { + return a_consultas; + } + else if( fieldName == EmpresasDataAuto.A_EXAMES ) + { + return a_exames; + } + else if( fieldName == EmpresasDataAuto.B_CONSULTAS ) + { + return b_consultas; + } + else if( fieldName == EmpresasDataAuto.B_EXAMES ) + { + return b_exames; + } + else if( fieldName == EmpresasDataAuto.DATA_CANCELAMENTO ) + { + return data_cancelamento; + } + else if( fieldName == EmpresasDataAuto.DURACAO ) + { + return duracao; + } + else if( fieldName == EmpresasDataAuto.INICIO_CONTRATO ) + { + return inicio_contrato; + } + else if( fieldName == EmpresasDataAuto.EMPRESA_LOGO_ID ) + { + return empresa_logo_id; + } + else if( fieldName == EmpresasDataAuto.IMPRIMIR_TABELA_ALARGADA ) + { + return imprimir_tabela_alargada; + } + else if( fieldName.equals( EmpresasDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( EmpresasDataAuto.DESIGNACAO_SOCIAL ) ) + { + return designacao_social; + } + else if( fieldName.equals( EmpresasDataAuto.SERVICO_SAUDE_TIPO ) ) + { + return servico_saude_tipo; + } + else if( fieldName.equals( EmpresasDataAuto.SERVICO_SAUDE_DESIGNACAO ) ) + { + return servico_saude_designacao; + } + else if( fieldName.equals( EmpresasDataAuto.SERVICO_HIGIENE_TIPO ) ) + { + return servico_higiene_tipo; + } + else if( fieldName.equals( EmpresasDataAuto.SERVICO_HIGIENE_DESIGNACAO ) ) + { + return servico_higiene_designacao; + } + else if( fieldName.equals( EmpresasDataAuto.INACTIVO ) ) + { + return inactivo; + } + else if( fieldName.equals( EmpresasDataAuto.MORADA ) ) + { + return morada; + } + else if( fieldName.equals( EmpresasDataAuto.CODIGO_POSTAL ) ) + { + return codigo_postal; + } + else if( fieldName.equals( EmpresasDataAuto.LOCALIDADE ) ) + { + return localidade; + } + else if( fieldName.equals( EmpresasDataAuto.DISTRITO ) ) + { + return distrito; + } + else if( fieldName.equals( EmpresasDataAuto.CONCELHO ) ) + { + return concelho; + } + else if( fieldName.equals( EmpresasDataAuto.NUMERO_TRABALHADORES ) ) + { + return numero_trabalhadores; + } + else if( fieldName.equals( EmpresasDataAuto.DATA_PROPOSTA ) ) + { + return data_proposta; + } + else if( fieldName.equals( EmpresasDataAuto.DATA_ACEITACAO ) ) + { + return data_aceitacao; + } + else if( fieldName.equals( EmpresasDataAuto.PERFIL_1 ) ) + { + return perfil_1; + } + else if( fieldName.equals( EmpresasDataAuto.PERFIL_2 ) ) + { + return perfil_2; + } + else if( fieldName.equals( EmpresasDataAuto.DATA_ENVIO_CONTRATO ) ) + { + return data_envio_contrato; + } + else if( fieldName.equals( EmpresasDataAuto.DATA_RECEPCAO_CONTRATO ) ) + { + return data_recepcao_contrato; + } + else if( fieldName.equals( EmpresasDataAuto.DATA_ENVIO_IDICT ) ) + { + return data_envio_idict; + } + else if( fieldName.equals( EmpresasDataAuto.CAE ) ) + { + return cae; + } + else if( fieldName.equals( EmpresasDataAuto.CONTRIBUINTE ) ) + { + return contribuinte; + } + else if( fieldName.equals( EmpresasDataAuto.SEGURANCA_SOCIAL ) ) + { + return seguranca_social; + } + else if( fieldName.equals( EmpresasDataAuto.CODIGO_1 ) ) + { + return codigo_1; + } + else if( fieldName.equals( EmpresasDataAuto.CODIGO_2 ) ) + { + return codigo_2; + } + else if( fieldName.equals( EmpresasDataAuto.CODIGO_3 ) ) + { + return codigo_3; + } + else if( fieldName.equals( EmpresasDataAuto.SERVICOS ) ) + { + return servicos; + } + else if( fieldName.equals( EmpresasDataAuto.CONTACTO_1 ) ) + { + return contacto_1; + } + else if( fieldName.equals( EmpresasDataAuto.CONTACTO_2 ) ) + { + return contacto_2; + } + else if( fieldName.equals( EmpresasDataAuto.DATA_RELATORIO_ANUAL ) ) + { + return data_relatorio_anual; + } + else if( fieldName.equals( EmpresasDataAuto.PRECO_HIGIENE ) ) + { + return preco_higiene; + } + else if( fieldName.equals( EmpresasDataAuto.PRECO_MEDICINA ) ) + { + return preco_medicina; + } + else if( fieldName.equals( EmpresasDataAuto.PERIODICIDADE ) ) + { + return periodicidade; + } + else if( fieldName.equals( EmpresasDataAuto.ACTIVIDADE ) ) + { + return actividade; + } + else if( fieldName.equals( EmpresasDataAuto.ACTUALIZACAO ) ) + { + return actualizacao; + } + else if( fieldName.equals( EmpresasDataAuto.DESIGNACAO_SOCIAL_PLAIN ) ) + { + return designacao_social_plain; + } + else if( fieldName.equals( EmpresasDataAuto.A_CONSULTAS ) ) + { + return a_consultas; + } + else if( fieldName.equals( EmpresasDataAuto.A_EXAMES ) ) + { + return a_exames; + } + else if( fieldName.equals( EmpresasDataAuto.B_CONSULTAS ) ) + { + return b_consultas; + } + else if( fieldName.equals( EmpresasDataAuto.B_EXAMES ) ) + { + return b_exames; + } + else if( fieldName.equals( EmpresasDataAuto.DATA_CANCELAMENTO ) ) + { + return data_cancelamento; + } + else if( fieldName.equals( EmpresasDataAuto.DURACAO ) ) + { + return duracao; + } + else if( fieldName.equals( EmpresasDataAuto.INICIO_CONTRATO ) ) + { + return inicio_contrato; + } + else if( fieldName.equals( EmpresasDataAuto.EMPRESA_LOGO_ID ) ) + { + return empresa_logo_id; + } + else if( fieldName.equals( EmpresasDataAuto.IMPRIMIR_TABELA_ALARGADA ) ) + { + return imprimir_tabela_alargada; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == EmpresasDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == EmpresasDataAuto.DESIGNACAO_SOCIAL ) + { + designacao_social = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.SERVICO_SAUDE_TIPO ) + { + servico_saude_tipo = ( Integer ) value; + } + else if( fieldName == EmpresasDataAuto.SERVICO_SAUDE_DESIGNACAO ) + { + servico_saude_designacao = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.SERVICO_HIGIENE_TIPO ) + { + servico_higiene_tipo = ( Integer ) value; + } + else if( fieldName == EmpresasDataAuto.SERVICO_HIGIENE_DESIGNACAO ) + { + servico_higiene_designacao = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.INACTIVO ) + { + inactivo = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.MORADA ) + { + morada = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.CODIGO_POSTAL ) + { + codigo_postal = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.LOCALIDADE ) + { + localidade = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.DISTRITO ) + { + distrito = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.CONCELHO ) + { + concelho = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.NUMERO_TRABALHADORES ) + { + numero_trabalhadores = ( Integer ) value; + } + else if( fieldName == EmpresasDataAuto.DATA_PROPOSTA ) + { + data_proposta = ( java.util.Date ) value; + } + else if( fieldName == EmpresasDataAuto.DATA_ACEITACAO ) + { + data_aceitacao = ( java.util.Date ) value; + } + else if( fieldName == EmpresasDataAuto.PERFIL_1 ) + { + perfil_1 = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.PERFIL_2 ) + { + perfil_2 = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.DATA_ENVIO_CONTRATO ) + { + data_envio_contrato = ( java.util.Date ) value; + } + else if( fieldName == EmpresasDataAuto.DATA_RECEPCAO_CONTRATO ) + { + data_recepcao_contrato = ( java.util.Date ) value; + } + else if( fieldName == EmpresasDataAuto.DATA_ENVIO_IDICT ) + { + data_envio_idict = ( java.util.Date ) value; + } + else if( fieldName == EmpresasDataAuto.CAE ) + { + cae = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.CONTRIBUINTE ) + { + contribuinte = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.SEGURANCA_SOCIAL ) + { + seguranca_social = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.CODIGO_1 ) + { + codigo_1 = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.CODIGO_2 ) + { + codigo_2 = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.CODIGO_3 ) + { + codigo_3 = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.SERVICOS ) + { + servicos = ( Integer ) value; + } + else if( fieldName == EmpresasDataAuto.CONTACTO_1 ) + { + contacto_1 = ( Integer ) value; + } + else if( fieldName == EmpresasDataAuto.CONTACTO_2 ) + { + contacto_2 = ( Integer ) value; + } + else if( fieldName == EmpresasDataAuto.DATA_RELATORIO_ANUAL ) + { + data_relatorio_anual = ( java.util.Date ) value; + } + else if( fieldName == EmpresasDataAuto.PRECO_HIGIENE ) + { + preco_higiene = ( Double ) value; + } + else if( fieldName == EmpresasDataAuto.PRECO_MEDICINA ) + { + preco_medicina = ( Double ) value; + } + else if( fieldName == EmpresasDataAuto.PERIODICIDADE ) + { + periodicidade = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.ACTIVIDADE ) + { + actividade = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.ACTUALIZACAO ) + { + actualizacao = ( java.sql.Timestamp ) value; + } + else if( fieldName == EmpresasDataAuto.DESIGNACAO_SOCIAL_PLAIN ) + { + designacao_social_plain = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.A_CONSULTAS ) + { + a_consultas = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.A_EXAMES ) + { + a_exames = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.B_CONSULTAS ) + { + b_consultas = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.B_EXAMES ) + { + b_exames = ( String ) value; + } + else if( fieldName == EmpresasDataAuto.DATA_CANCELAMENTO ) + { + data_cancelamento = ( java.util.Date ) value; + } + else if( fieldName == EmpresasDataAuto.DURACAO ) + { + duracao = ( Integer ) value; + } + else if( fieldName == EmpresasDataAuto.INICIO_CONTRATO ) + { + inicio_contrato = ( java.util.Date ) value; + } + else if( fieldName == EmpresasDataAuto.EMPRESA_LOGO_ID ) + { + empresa_logo_id = ( Integer ) value; + } + else if( fieldName == EmpresasDataAuto.IMPRIMIR_TABELA_ALARGADA ) + { + imprimir_tabela_alargada = ( Boolean ) value; + } + else if( fieldName.equals( EmpresasDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( EmpresasDataAuto.DESIGNACAO_SOCIAL ) ) + { + designacao_social = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.SERVICO_SAUDE_TIPO ) ) + { + servico_saude_tipo = ( Integer ) value; + } + else if( fieldName.equals( EmpresasDataAuto.SERVICO_SAUDE_DESIGNACAO ) ) + { + servico_saude_designacao = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.SERVICO_HIGIENE_TIPO ) ) + { + servico_higiene_tipo = ( Integer ) value; + } + else if( fieldName.equals( EmpresasDataAuto.SERVICO_HIGIENE_DESIGNACAO ) ) + { + servico_higiene_designacao = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.INACTIVO ) ) + { + inactivo = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.MORADA ) ) + { + morada = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.CODIGO_POSTAL ) ) + { + codigo_postal = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.LOCALIDADE ) ) + { + localidade = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.DISTRITO ) ) + { + distrito = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.CONCELHO ) ) + { + concelho = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.NUMERO_TRABALHADORES ) ) + { + numero_trabalhadores = ( Integer ) value; + } + else if( fieldName.equals( EmpresasDataAuto.DATA_PROPOSTA ) ) + { + data_proposta = ( java.util.Date ) value; + } + else if( fieldName.equals( EmpresasDataAuto.DATA_ACEITACAO ) ) + { + data_aceitacao = ( java.util.Date ) value; + } + else if( fieldName.equals( EmpresasDataAuto.PERFIL_1 ) ) + { + perfil_1 = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.PERFIL_2 ) ) + { + perfil_2 = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.DATA_ENVIO_CONTRATO ) ) + { + data_envio_contrato = ( java.util.Date ) value; + } + else if( fieldName.equals( EmpresasDataAuto.DATA_RECEPCAO_CONTRATO ) ) + { + data_recepcao_contrato = ( java.util.Date ) value; + } + else if( fieldName.equals( EmpresasDataAuto.DATA_ENVIO_IDICT ) ) + { + data_envio_idict = ( java.util.Date ) value; + } + else if( fieldName.equals( EmpresasDataAuto.CAE ) ) + { + cae = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.CONTRIBUINTE ) ) + { + contribuinte = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.SEGURANCA_SOCIAL ) ) + { + seguranca_social = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.CODIGO_1 ) ) + { + codigo_1 = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.CODIGO_2 ) ) + { + codigo_2 = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.CODIGO_3 ) ) + { + codigo_3 = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.SERVICOS ) ) + { + servicos = ( Integer ) value; + } + else if( fieldName.equals( EmpresasDataAuto.CONTACTO_1 ) ) + { + contacto_1 = ( Integer ) value; + } + else if( fieldName.equals( EmpresasDataAuto.CONTACTO_2 ) ) + { + contacto_2 = ( Integer ) value; + } + else if( fieldName.equals( EmpresasDataAuto.DATA_RELATORIO_ANUAL ) ) + { + data_relatorio_anual = ( java.util.Date ) value; + } + else if( fieldName.equals( EmpresasDataAuto.PRECO_HIGIENE ) ) + { + preco_higiene = ( Double ) value; + } + else if( fieldName.equals( EmpresasDataAuto.PRECO_MEDICINA ) ) + { + preco_medicina = ( Double ) value; + } + else if( fieldName.equals( EmpresasDataAuto.PERIODICIDADE ) ) + { + periodicidade = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.ACTIVIDADE ) ) + { + actividade = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.ACTUALIZACAO ) ) + { + actualizacao = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( EmpresasDataAuto.DESIGNACAO_SOCIAL_PLAIN ) ) + { + designacao_social_plain = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.A_CONSULTAS ) ) + { + a_consultas = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.A_EXAMES ) ) + { + a_exames = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.B_CONSULTAS ) ) + { + b_consultas = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.B_EXAMES ) ) + { + b_exames = ( String ) value; + } + else if( fieldName.equals( EmpresasDataAuto.DATA_CANCELAMENTO ) ) + { + data_cancelamento = ( java.util.Date ) value; + } + else if( fieldName.equals( EmpresasDataAuto.DURACAO ) ) + { + duracao = ( Integer ) value; + } + else if( fieldName.equals( EmpresasDataAuto.INICIO_CONTRATO ) ) + { + inicio_contrato = ( java.util.Date ) value; + } + else if( fieldName.equals( EmpresasDataAuto.EMPRESA_LOGO_ID ) ) + { + empresa_logo_id = ( Integer ) value; + } + else if( fieldName.equals( EmpresasDataAuto.IMPRIMIR_TABELA_ALARGADA ) ) + { + imprimir_tabela_alargada = ( Boolean ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getDesignacao_social() + { + return designacao_social; + } + + public void setDesignacao_social(String designacao_socialValue ) + { + this.designacao_social = designacao_socialValue; + } + + public Integer getServico_saude_tipo() + { + return servico_saude_tipo; + } + + public void setServico_saude_tipo(Integer servico_saude_tipoValue ) + { + this.servico_saude_tipo = servico_saude_tipoValue; + } + + public String getServico_saude_designacao() + { + return servico_saude_designacao; + } + + public void setServico_saude_designacao(String servico_saude_designacaoValue ) + { + this.servico_saude_designacao = servico_saude_designacaoValue; + } + + public Integer getServico_higiene_tipo() + { + return servico_higiene_tipo; + } + + public void setServico_higiene_tipo(Integer servico_higiene_tipoValue ) + { + this.servico_higiene_tipo = servico_higiene_tipoValue; + } + + public String getServico_higiene_designacao() + { + return servico_higiene_designacao; + } + + public void setServico_higiene_designacao(String servico_higiene_designacaoValue ) + { + this.servico_higiene_designacao = servico_higiene_designacaoValue; + } + + public String getInactivo() + { + return inactivo; + } + + public void setInactivo(String inactivoValue ) + { + this.inactivo = inactivoValue; + } + + public String getMorada() + { + return morada; + } + + public void setMorada(String moradaValue ) + { + this.morada = moradaValue; + } + + public String getCodigo_postal() + { + return codigo_postal; + } + + public void setCodigo_postal(String codigo_postalValue ) + { + this.codigo_postal = codigo_postalValue; + } + + public String getLocalidade() + { + return localidade; + } + + public void setLocalidade(String localidadeValue ) + { + this.localidade = localidadeValue; + } + + public String getDistrito() + { + return distrito; + } + + public void setDistrito(String distritoValue ) + { + this.distrito = distritoValue; + } + + public String getConcelho() + { + return concelho; + } + + public void setConcelho(String concelhoValue ) + { + this.concelho = concelhoValue; + } + + public Integer getNumero_trabalhadores() + { + return numero_trabalhadores; + } + + public void setNumero_trabalhadores(Integer numero_trabalhadoresValue ) + { + this.numero_trabalhadores = numero_trabalhadoresValue; + } + + public java.util.Date getData_proposta() + { + return data_proposta; + } + + public void setData_proposta(java.util.Date data_propostaValue ) + { + this.data_proposta = data_propostaValue; + } + + public java.util.Date getData_aceitacao() + { + return data_aceitacao; + } + + public void setData_aceitacao(java.util.Date data_aceitacaoValue ) + { + this.data_aceitacao = data_aceitacaoValue; + } + + public String getPerfil_1() + { + return perfil_1; + } + + public void setPerfil_1(String perfil_1Value ) + { + this.perfil_1 = perfil_1Value; + } + + public String getPerfil_2() + { + return perfil_2; + } + + public void setPerfil_2(String perfil_2Value ) + { + this.perfil_2 = perfil_2Value; + } + + public java.util.Date getData_envio_contrato() + { + return data_envio_contrato; + } + + public void setData_envio_contrato(java.util.Date data_envio_contratoValue ) + { + this.data_envio_contrato = data_envio_contratoValue; + } + + public java.util.Date getData_recepcao_contrato() + { + return data_recepcao_contrato; + } + + public void setData_recepcao_contrato(java.util.Date data_recepcao_contratoValue ) + { + this.data_recepcao_contrato = data_recepcao_contratoValue; + } + + public java.util.Date getData_envio_idict() + { + return data_envio_idict; + } + + public void setData_envio_idict(java.util.Date data_envio_idictValue ) + { + this.data_envio_idict = data_envio_idictValue; + } + + public String getCae() + { + return cae; + } + + public void setCae(String caeValue ) + { + this.cae = caeValue; + } + + public String getContribuinte() + { + return contribuinte; + } + + public void setContribuinte(String contribuinteValue ) + { + this.contribuinte = contribuinteValue; + } + + public String getSeguranca_social() + { + return seguranca_social; + } + + public void setSeguranca_social(String seguranca_socialValue ) + { + this.seguranca_social = seguranca_socialValue; + } + + public String getCodigo_1() + { + return codigo_1; + } + + public void setCodigo_1(String codigo_1Value ) + { + this.codigo_1 = codigo_1Value; + } + + public String getCodigo_2() + { + return codigo_2; + } + + public void setCodigo_2(String codigo_2Value ) + { + this.codigo_2 = codigo_2Value; + } + + public String getCodigo_3() + { + return codigo_3; + } + + public void setCodigo_3(String codigo_3Value ) + { + this.codigo_3 = codigo_3Value; + } + + public Integer getServicos() + { + return servicos; + } + + public void setServicos(Integer servicosValue ) + { + this.servicos = servicosValue; + } + + public Integer getContacto_1() + { + return contacto_1; + } + + public void setContacto_1(Integer contacto_1Value ) + { + this.contacto_1 = contacto_1Value; + } + + public Integer getContacto_2() + { + return contacto_2; + } + + public void setContacto_2(Integer contacto_2Value ) + { + this.contacto_2 = contacto_2Value; + } + + public java.util.Date getData_relatorio_anual() + { + return data_relatorio_anual; + } + + public void setData_relatorio_anual(java.util.Date data_relatorio_anualValue ) + { + this.data_relatorio_anual = data_relatorio_anualValue; + } + + public Double getPreco_higiene() + { + return preco_higiene; + } + + public void setPreco_higiene(Double preco_higieneValue ) + { + this.preco_higiene = preco_higieneValue; + } + + public Double getPreco_medicina() + { + return preco_medicina; + } + + public void setPreco_medicina(Double preco_medicinaValue ) + { + this.preco_medicina = preco_medicinaValue; + } + + public String getPeriodicidade() + { + return periodicidade; + } + + public void setPeriodicidade(String periodicidadeValue ) + { + this.periodicidade = periodicidadeValue; + } + + public String getActividade() + { + return actividade; + } + + public void setActividade(String actividadeValue ) + { + this.actividade = actividadeValue; + } + + public java.sql.Timestamp getActualizacao() + { + return actualizacao; + } + + public void setActualizacao(java.sql.Timestamp actualizacaoValue ) + { + this.actualizacao = actualizacaoValue; + } + + public String getDesignacao_social_plain() + { + return designacao_social_plain; + } + + public void setDesignacao_social_plain(String designacao_social_plainValue ) + { + this.designacao_social_plain = designacao_social_plainValue; + } + + public String getA_consultas() + { + return a_consultas; + } + + public void setA_consultas(String a_consultasValue ) + { + this.a_consultas = a_consultasValue; + } + + public String getA_exames() + { + return a_exames; + } + + public void setA_exames(String a_examesValue ) + { + this.a_exames = a_examesValue; + } + + public String getB_consultas() + { + return b_consultas; + } + + public void setB_consultas(String b_consultasValue ) + { + this.b_consultas = b_consultasValue; + } + + public String getB_exames() + { + return b_exames; + } + + public void setB_exames(String b_examesValue ) + { + this.b_exames = b_examesValue; + } + + public java.util.Date getData_cancelamento() + { + return data_cancelamento; + } + + public void setData_cancelamento(java.util.Date data_cancelamentoValue ) + { + this.data_cancelamento = data_cancelamentoValue; + } + + public Integer getDuracao() + { + return duracao; + } + + public void setDuracao(Integer duracaoValue ) + { + this.duracao = duracaoValue; + } + + public java.util.Date getInicio_contrato() + { + return inicio_contrato; + } + + public void setInicio_contrato(java.util.Date inicio_contratoValue ) + { + this.inicio_contrato = inicio_contratoValue; + } + + public Integer getEmpresa_logo_id() + { + return empresa_logo_id; + } + + public void setEmpresa_logo_id(Integer empresa_logo_idValue ) + { + this.empresa_logo_id = empresa_logo_idValue; + } + + public Boolean getImprimir_tabela_alargada() + { + return imprimir_tabela_alargada; + } + + public void setImprimir_tabela_alargada(Boolean imprimir_tabela_alargadaValue ) + { + this.imprimir_tabela_alargada = imprimir_tabela_alargadaValue; + } + + public Class getOuterClass() + { + return EmpresasDataAuto.class; + } + + public EmpresasDataAuto getOuterClassInstance() + { + EmpresasDataAuto outerObj = new EmpresasDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmpresasData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmpresasData.java new file mode 100644 index 00000000..dc525cdb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmpresasData.java @@ -0,0 +1,18 @@ +/* +* EmpresasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class EmpresasData extends com.evolute.siprp.server.db.data.siprp_local3.EmpresasDataAuto +{ + + public EmpresasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmpresasDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmpresasDataAuto.java new file mode 100644 index 00000000..a25597d4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmpresasDataAuto.java @@ -0,0 +1,782 @@ +/* +* EmpresasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class EmpresasDataAuto extends JDOObject +{ + + public static final String TABLENAME = "empresas"; + + public static final String ID = "id"; + public static final String ID_FULL = "empresas.id"; + public static final String DESIGNACAO_SOCIAL = "designacao_social"; + public static final String DESIGNACAO_SOCIAL_FULL = "empresas.designacao_social"; + public static final String SERVICO_SAUDE_TIPO = "servico_saude_tipo"; + public static final String SERVICO_SAUDE_TIPO_FULL = "empresas.servico_saude_tipo"; + public static final String SERVICO_SAUDE_DESIGNACAO = "servico_saude_designacao"; + public static final String SERVICO_SAUDE_DESIGNACAO_FULL = "empresas.servico_saude_designacao"; + public static final String SERVICO_HIGIENE_TIPO = "servico_higiene_tipo"; + public static final String SERVICO_HIGIENE_TIPO_FULL = "empresas.servico_higiene_tipo"; + public static final String SERVICO_HIGIENE_DESIGNACAO = "servico_higiene_designacao"; + public static final String SERVICO_HIGIENE_DESIGNACAO_FULL = "empresas.servico_higiene_designacao"; + public static final String INACTIVO = "inactivo"; + public static final String INACTIVO_FULL = "empresas.inactivo"; + public static final String MORADA = "morada"; + public static final String MORADA_FULL = "empresas.morada"; + public static final String CODIGO_POSTAL = "codigo_postal"; + public static final String CODIGO_POSTAL_FULL = "empresas.codigo_postal"; + public static final String LOCALIDADE = "localidade"; + public static final String LOCALIDADE_FULL = "empresas.localidade"; + public static final String DISTRITO = "distrito"; + public static final String DISTRITO_FULL = "empresas.distrito"; + public static final String CONCELHO = "concelho"; + public static final String CONCELHO_FULL = "empresas.concelho"; + public static final String NUMERO_TRABALHADORES = "numero_trabalhadores"; + public static final String NUMERO_TRABALHADORES_FULL = "empresas.numero_trabalhadores"; + public static final String DATA_PROPOSTA = "data_proposta"; + public static final String DATA_PROPOSTA_FULL = "empresas.data_proposta"; + public static final String DATA_ACEITACAO = "data_aceitacao"; + public static final String DATA_ACEITACAO_FULL = "empresas.data_aceitacao"; + public static final String PERFIL_1 = "perfil_1"; + public static final String PERFIL_1_FULL = "empresas.perfil_1"; + public static final String PERFIL_2 = "perfil_2"; + public static final String PERFIL_2_FULL = "empresas.perfil_2"; + public static final String DATA_ENVIO_CONTRATO = "data_envio_contrato"; + public static final String DATA_ENVIO_CONTRATO_FULL = "empresas.data_envio_contrato"; + public static final String DATA_RECEPCAO_CONTRATO = "data_recepcao_contrato"; + public static final String DATA_RECEPCAO_CONTRATO_FULL = "empresas.data_recepcao_contrato"; + public static final String DATA_ENVIO_IDICT = "data_envio_idict"; + public static final String DATA_ENVIO_IDICT_FULL = "empresas.data_envio_idict"; + public static final String CAE = "cae"; + public static final String CAE_FULL = "empresas.cae"; + public static final String CONTRIBUINTE = "contribuinte"; + public static final String CONTRIBUINTE_FULL = "empresas.contribuinte"; + public static final String SEGURANCA_SOCIAL = "seguranca_social"; + public static final String SEGURANCA_SOCIAL_FULL = "empresas.seguranca_social"; + public static final String CODIGO_1 = "codigo_1"; + public static final String CODIGO_1_FULL = "empresas.codigo_1"; + public static final String CODIGO_2 = "codigo_2"; + public static final String CODIGO_2_FULL = "empresas.codigo_2"; + public static final String CODIGO_3 = "codigo_3"; + public static final String CODIGO_3_FULL = "empresas.codigo_3"; + public static final String SERVICOS = "servicos"; + public static final String SERVICOS_FULL = "empresas.servicos"; + public static final String CONTACTO_1 = "contacto_1"; + public static final String CONTACTO_1_FULL = "empresas.contacto_1"; + public static final String TO_CONTACTO_1 = "to contacto_1"; + public static final String CONTACTO_2 = "contacto_2"; + public static final String CONTACTO_2_FULL = "empresas.contacto_2"; + public static final String TO_CONTACTO_2 = "to contacto_2"; + public static final String DATA_RELATORIO_ANUAL = "data_relatorio_anual"; + public static final String DATA_RELATORIO_ANUAL_FULL = "empresas.data_relatorio_anual"; + public static final String PRECO_HIGIENE = "preco_higiene"; + public static final String PRECO_HIGIENE_FULL = "empresas.preco_higiene"; + public static final String PRECO_MEDICINA = "preco_medicina"; + public static final String PRECO_MEDICINA_FULL = "empresas.preco_medicina"; + public static final String PERIODICIDADE = "periodicidade"; + public static final String PERIODICIDADE_FULL = "empresas.periodicidade"; + public static final String ACTIVIDADE = "actividade"; + public static final String ACTIVIDADE_FULL = "empresas.actividade"; + public static final String ACTUALIZACAO = "actualizacao"; + public static final String ACTUALIZACAO_FULL = "empresas.actualizacao"; + public static final String DESIGNACAO_SOCIAL_PLAIN = "designacao_social_plain"; + public static final String DESIGNACAO_SOCIAL_PLAIN_FULL = "empresas.designacao_social_plain"; + public static final String A_CONSULTAS = "a_consultas"; + public static final String A_CONSULTAS_FULL = "empresas.a_consultas"; + public static final String A_EXAMES = "a_exames"; + public static final String A_EXAMES_FULL = "empresas.a_exames"; + public static final String B_CONSULTAS = "b_consultas"; + public static final String B_CONSULTAS_FULL = "empresas.b_consultas"; + public static final String B_EXAMES = "b_exames"; + public static final String B_EXAMES_FULL = "empresas.b_exames"; + public static final String DATA_CANCELAMENTO = "data_cancelamento"; + public static final String DATA_CANCELAMENTO_FULL = "empresas.data_cancelamento"; + public static final String DURACAO = "duracao"; + public static final String DURACAO_FULL = "empresas.duracao"; + public static final String INICIO_CONTRATO = "inicio_contrato"; + public static final String INICIO_CONTRATO_FULL = "empresas.inicio_contrato"; + public static final String EMPRESA_LOGO_ID = "empresa_logo_id"; + public static final String EMPRESA_LOGO_ID_FULL = "empresas.empresa_logo_id"; + public static final String TO_EMPRESA_LOGO_ID = "to empresa_logo_id"; + public static final String IMPRIMIR_TABELA_ALARGADA = "imprimir_tabela_alargada"; + public static final String IMPRIMIR_TABELA_ALARGADA_FULL = "empresas.imprimir_tabela_alargada"; + + public static final String FIELD_NAMES[] = new String[]{ + DESIGNACAO_SOCIAL, SERVICO_SAUDE_TIPO, SERVICO_SAUDE_DESIGNACAO, + SERVICO_HIGIENE_TIPO, SERVICO_HIGIENE_DESIGNACAO, INACTIVO, MORADA, + CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, NUMERO_TRABALHADORES, + DATA_PROPOSTA, DATA_ACEITACAO, PERFIL_1, PERFIL_2, DATA_ENVIO_CONTRATO, + DATA_RECEPCAO_CONTRATO, DATA_ENVIO_IDICT, CAE, CONTRIBUINTE, SEGURANCA_SOCIAL, + CODIGO_1, CODIGO_2, CODIGO_3, SERVICOS, CONTACTO_1, TO_CONTACTO_1, CONTACTO_2, + TO_CONTACTO_2, DATA_RELATORIO_ANUAL, PRECO_HIGIENE, PRECO_MEDICINA, + PERIODICIDADE, ACTIVIDADE, ACTUALIZACAO, DESIGNACAO_SOCIAL_PLAIN, A_CONSULTAS, + A_EXAMES, B_CONSULTAS, B_EXAMES, DATA_CANCELAMENTO, DURACAO, INICIO_CONTRATO, + EMPRESA_LOGO_ID, TO_EMPRESA_LOGO_ID, IMPRIMIR_TABELA_ALARGADA, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DESIGNACAO_SOCIAL, SERVICO_SAUDE_TIPO, SERVICO_SAUDE_DESIGNACAO, + SERVICO_HIGIENE_TIPO, SERVICO_HIGIENE_DESIGNACAO, INACTIVO, MORADA, + CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, NUMERO_TRABALHADORES, + DATA_PROPOSTA, DATA_ACEITACAO, PERFIL_1, PERFIL_2, DATA_ENVIO_CONTRATO, + DATA_RECEPCAO_CONTRATO, DATA_ENVIO_IDICT, CAE, CONTRIBUINTE, SEGURANCA_SOCIAL, + CODIGO_1, CODIGO_2, CODIGO_3, SERVICOS, CONTACTO_1, CONTACTO_2, + DATA_RELATORIO_ANUAL, PRECO_HIGIENE, PRECO_MEDICINA, PERIODICIDADE, ACTIVIDADE, + ACTUALIZACAO, DESIGNACAO_SOCIAL_PLAIN, A_CONSULTAS, A_EXAMES, B_CONSULTAS, + B_EXAMES, DATA_CANCELAMENTO, DURACAO, INICIO_CONTRATO, EMPRESA_LOGO_ID, + IMPRIMIR_TABELA_ALARGADA, }; + + private Map dataHash; + + public EmpresasDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getDesignacao_social() + { + return (String) get(DESIGNACAO_SOCIAL); + } + + public void setDesignacao_social(String designacao_socialValue ) + { + this.set(DESIGNACAO_SOCIAL, designacao_socialValue ); + } + + public Integer getServico_saude_tipo() + { + return (Integer) get(SERVICO_SAUDE_TIPO); + } + + public void setServico_saude_tipo(Integer servico_saude_tipoValue ) + { + this.set(SERVICO_SAUDE_TIPO, servico_saude_tipoValue ); + } + + public String getServico_saude_designacao() + { + return (String) get(SERVICO_SAUDE_DESIGNACAO); + } + + public void setServico_saude_designacao(String servico_saude_designacaoValue ) + { + this.set(SERVICO_SAUDE_DESIGNACAO, servico_saude_designacaoValue ); + } + + public Integer getServico_higiene_tipo() + { + return (Integer) get(SERVICO_HIGIENE_TIPO); + } + + public void setServico_higiene_tipo(Integer servico_higiene_tipoValue ) + { + this.set(SERVICO_HIGIENE_TIPO, servico_higiene_tipoValue ); + } + + public String getServico_higiene_designacao() + { + return (String) get(SERVICO_HIGIENE_DESIGNACAO); + } + + public void setServico_higiene_designacao(String servico_higiene_designacaoValue ) + { + this.set(SERVICO_HIGIENE_DESIGNACAO, servico_higiene_designacaoValue ); + } + + public String getInactivo() + { + return (String) get(INACTIVO); + } + + public void setInactivo(String inactivoValue ) + { + this.set(INACTIVO, inactivoValue ); + } + + public String getMorada() + { + return (String) get(MORADA); + } + + public void setMorada(String moradaValue ) + { + this.set(MORADA, moradaValue ); + } + + public String getCodigo_postal() + { + return (String) get(CODIGO_POSTAL); + } + + public void setCodigo_postal(String codigo_postalValue ) + { + this.set(CODIGO_POSTAL, codigo_postalValue ); + } + + public String getLocalidade() + { + return (String) get(LOCALIDADE); + } + + public void setLocalidade(String localidadeValue ) + { + this.set(LOCALIDADE, localidadeValue ); + } + + public String getDistrito() + { + return (String) get(DISTRITO); + } + + public void setDistrito(String distritoValue ) + { + this.set(DISTRITO, distritoValue ); + } + + public String getConcelho() + { + return (String) get(CONCELHO); + } + + public void setConcelho(String concelhoValue ) + { + this.set(CONCELHO, concelhoValue ); + } + + public Integer getNumero_trabalhadores() + { + return (Integer) get(NUMERO_TRABALHADORES); + } + + public void setNumero_trabalhadores(Integer numero_trabalhadoresValue ) + { + this.set(NUMERO_TRABALHADORES, numero_trabalhadoresValue ); + } + + public java.util.Date getData_proposta() + { + return (java.util.Date) get(DATA_PROPOSTA); + } + + public void setData_proposta(java.util.Date data_propostaValue ) + { + this.set(DATA_PROPOSTA, data_propostaValue ); + } + + public java.util.Date getData_aceitacao() + { + return (java.util.Date) get(DATA_ACEITACAO); + } + + public void setData_aceitacao(java.util.Date data_aceitacaoValue ) + { + this.set(DATA_ACEITACAO, data_aceitacaoValue ); + } + + public String getPerfil_1() + { + return (String) get(PERFIL_1); + } + + public void setPerfil_1(String perfil_1Value ) + { + this.set(PERFIL_1, perfil_1Value ); + } + + public String getPerfil_2() + { + return (String) get(PERFIL_2); + } + + public void setPerfil_2(String perfil_2Value ) + { + this.set(PERFIL_2, perfil_2Value ); + } + + public java.util.Date getData_envio_contrato() + { + return (java.util.Date) get(DATA_ENVIO_CONTRATO); + } + + public void setData_envio_contrato(java.util.Date data_envio_contratoValue ) + { + this.set(DATA_ENVIO_CONTRATO, data_envio_contratoValue ); + } + + public java.util.Date getData_recepcao_contrato() + { + return (java.util.Date) get(DATA_RECEPCAO_CONTRATO); + } + + public void setData_recepcao_contrato(java.util.Date data_recepcao_contratoValue ) + { + this.set(DATA_RECEPCAO_CONTRATO, data_recepcao_contratoValue ); + } + + public java.util.Date getData_envio_idict() + { + return (java.util.Date) get(DATA_ENVIO_IDICT); + } + + public void setData_envio_idict(java.util.Date data_envio_idictValue ) + { + this.set(DATA_ENVIO_IDICT, data_envio_idictValue ); + } + + public String getCae() + { + return (String) get(CAE); + } + + public void setCae(String caeValue ) + { + this.set(CAE, caeValue ); + } + + public String getContribuinte() + { + return (String) get(CONTRIBUINTE); + } + + public void setContribuinte(String contribuinteValue ) + { + this.set(CONTRIBUINTE, contribuinteValue ); + } + + public String getSeguranca_social() + { + return (String) get(SEGURANCA_SOCIAL); + } + + public void setSeguranca_social(String seguranca_socialValue ) + { + this.set(SEGURANCA_SOCIAL, seguranca_socialValue ); + } + + public String getCodigo_1() + { + return (String) get(CODIGO_1); + } + + public void setCodigo_1(String codigo_1Value ) + { + this.set(CODIGO_1, codigo_1Value ); + } + + public String getCodigo_2() + { + return (String) get(CODIGO_2); + } + + public void setCodigo_2(String codigo_2Value ) + { + this.set(CODIGO_2, codigo_2Value ); + } + + public String getCodigo_3() + { + return (String) get(CODIGO_3); + } + + public void setCodigo_3(String codigo_3Value ) + { + this.set(CODIGO_3, codigo_3Value ); + } + + public Integer getServicos() + { + return (Integer) get(SERVICOS); + } + + public void setServicos(Integer servicosValue ) + { + this.set(SERVICOS, servicosValue ); + } + + public Integer getContacto_1() + { + return (Integer) dataHash.get(CONTACTO_1); + } + + public void setContacto_1(Integer contacto_1Value ) + { + dataHash.put(TO_CONTACTO_1, null); + dataHash.put(CONTACTO_1, contacto_1Value ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.ContactosData toContacto_1() + throws Exception + { + if( dataHash.get(TO_CONTACTO_1) == null && getContacto_1() != null ) + { + dataHash.put(TO_CONTACTO_1, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.ContactosData.class, new Object[]{ getContacto_1() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.ContactosData) dataHash.get(TO_CONTACTO_1); + } + + public void setToContacto_1(com.evolute.siprp.server.db.data.siprp_local3.ContactosData contacto_1Object ) + { + if( contacto_1Object == null ) + { + dataHash.put(CONTACTO_1, null); + } + else + { + dataHash.put(CONTACTO_1, contacto_1Object.get( com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID )); + } + dataHash.put(TO_CONTACTO_1, contacto_1Object); + } + + public Integer getContacto_2() + { + return (Integer) dataHash.get(CONTACTO_2); + } + + public void setContacto_2(Integer contacto_2Value ) + { + dataHash.put(TO_CONTACTO_2, null); + dataHash.put(CONTACTO_2, contacto_2Value ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.ContactosData toContacto_2() + throws Exception + { + if( dataHash.get(TO_CONTACTO_2) == null && getContacto_2() != null ) + { + dataHash.put(TO_CONTACTO_2, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.ContactosData.class, new Object[]{ getContacto_2() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.ContactosData) dataHash.get(TO_CONTACTO_2); + } + + public void setToContacto_2(com.evolute.siprp.server.db.data.siprp_local3.ContactosData contacto_2Object ) + { + if( contacto_2Object == null ) + { + dataHash.put(CONTACTO_2, null); + } + else + { + dataHash.put(CONTACTO_2, contacto_2Object.get( com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID )); + } + dataHash.put(TO_CONTACTO_2, contacto_2Object); + } + + public java.util.Date getData_relatorio_anual() + { + return (java.util.Date) get(DATA_RELATORIO_ANUAL); + } + + public void setData_relatorio_anual(java.util.Date data_relatorio_anualValue ) + { + this.set(DATA_RELATORIO_ANUAL, data_relatorio_anualValue ); + } + + public Double getPreco_higiene() + { + return (Double) get(PRECO_HIGIENE); + } + + public void setPreco_higiene(Double preco_higieneValue ) + { + this.set(PRECO_HIGIENE, preco_higieneValue ); + } + + public Double getPreco_medicina() + { + return (Double) get(PRECO_MEDICINA); + } + + public void setPreco_medicina(Double preco_medicinaValue ) + { + this.set(PRECO_MEDICINA, preco_medicinaValue ); + } + + public String getPeriodicidade() + { + return (String) get(PERIODICIDADE); + } + + public void setPeriodicidade(String periodicidadeValue ) + { + this.set(PERIODICIDADE, periodicidadeValue ); + } + + public String getActividade() + { + return (String) get(ACTIVIDADE); + } + + public void setActividade(String actividadeValue ) + { + this.set(ACTIVIDADE, actividadeValue ); + } + + public java.sql.Timestamp getActualizacao() + { + return (java.sql.Timestamp) get(ACTUALIZACAO); + } + + public void setActualizacao(java.sql.Timestamp actualizacaoValue ) + { + this.set(ACTUALIZACAO, actualizacaoValue ); + } + + public String getDesignacao_social_plain() + { + return (String) get(DESIGNACAO_SOCIAL_PLAIN); + } + + public void setDesignacao_social_plain(String designacao_social_plainValue ) + { + this.set(DESIGNACAO_SOCIAL_PLAIN, designacao_social_plainValue ); + } + + public String getA_consultas() + { + return (String) get(A_CONSULTAS); + } + + public void setA_consultas(String a_consultasValue ) + { + this.set(A_CONSULTAS, a_consultasValue ); + } + + public String getA_exames() + { + return (String) get(A_EXAMES); + } + + public void setA_exames(String a_examesValue ) + { + this.set(A_EXAMES, a_examesValue ); + } + + public String getB_consultas() + { + return (String) get(B_CONSULTAS); + } + + public void setB_consultas(String b_consultasValue ) + { + this.set(B_CONSULTAS, b_consultasValue ); + } + + public String getB_exames() + { + return (String) get(B_EXAMES); + } + + public void setB_exames(String b_examesValue ) + { + this.set(B_EXAMES, b_examesValue ); + } + + public java.util.Date getData_cancelamento() + { + return (java.util.Date) get(DATA_CANCELAMENTO); + } + + public void setData_cancelamento(java.util.Date data_cancelamentoValue ) + { + this.set(DATA_CANCELAMENTO, data_cancelamentoValue ); + } + + public Integer getDuracao() + { + return (Integer) get(DURACAO); + } + + public void setDuracao(Integer duracaoValue ) + { + this.set(DURACAO, duracaoValue ); + } + + public java.util.Date getInicio_contrato() + { + return (java.util.Date) get(INICIO_CONTRATO); + } + + public void setInicio_contrato(java.util.Date inicio_contratoValue ) + { + this.set(INICIO_CONTRATO, inicio_contratoValue ); + } + + public Integer getEmpresa_logo_id() + { + return (Integer) dataHash.get(EMPRESA_LOGO_ID); + } + + public void setEmpresa_logo_id(Integer empresa_logo_idValue ) + { + dataHash.put(TO_EMPRESA_LOGO_ID, null); + dataHash.put(EMPRESA_LOGO_ID, empresa_logo_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.ImageData toEmpresa_logo_id() + throws Exception + { + if( dataHash.get(TO_EMPRESA_LOGO_ID) == null && getEmpresa_logo_id() != null ) + { + dataHash.put(TO_EMPRESA_LOGO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.ImageData.class, new Object[]{ getEmpresa_logo_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.ImageData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.ImageData) dataHash.get(TO_EMPRESA_LOGO_ID); + } + + public void setToEmpresa_logo_id(com.evolute.siprp.server.db.data.siprp_local3.ImageData empresa_logo_idObject ) + { + if( empresa_logo_idObject == null ) + { + dataHash.put(EMPRESA_LOGO_ID, null); + } + else + { + dataHash.put(EMPRESA_LOGO_ID, empresa_logo_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.ImageData.ID )); + } + dataHash.put(TO_EMPRESA_LOGO_ID, empresa_logo_idObject); + } + + public Boolean getImprimir_tabela_alargada() + { + return (Boolean) get(IMPRIMIR_TABELA_ALARGADA); + } + + public void setImprimir_tabela_alargada(Boolean imprimir_tabela_alargadaValue ) + { + this.set(IMPRIMIR_TABELA_ALARGADA, imprimir_tabela_alargadaValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_CONTACTO_1.equals( fieldName ) ) + { + value = toContacto_1(); + } + else if( TO_CONTACTO_2.equals( fieldName ) ) + { + value = toContacto_2(); + } + else if( TO_EMPRESA_LOGO_ID.equals( fieldName ) ) + { + value = toEmpresa_logo_id(); + } + else if( EMPRESA_LOGO_ID.equals( fieldName ) ) + { + value = getEmpresa_logo_id(); + } + else if( CONTACTO_1.equals( fieldName ) ) + { + value = getContacto_1(); + } + else if( CONTACTO_2.equals( fieldName ) ) + { + value = getContacto_2(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_CONTACTO_1.equals( fieldName ) ) + { + setToContacto_1( (com.evolute.siprp.server.db.data.siprp_local3.ContactosData) value ); + } + else if( TO_CONTACTO_2.equals( fieldName ) ) + { + setToContacto_2( (com.evolute.siprp.server.db.data.siprp_local3.ContactosData) value ); + } + else if( TO_EMPRESA_LOGO_ID.equals( fieldName ) ) + { + setToEmpresa_logo_id( (com.evolute.siprp.server.db.data.siprp_local3.ImageData) value ); + } + else if( EMPRESA_LOGO_ID.equals( fieldName ) ) + { + setEmpresa_logo_id( (Integer) value ); + } + else if( CONTACTO_1.equals( fieldName ) ) + { + setContacto_1( (Integer) value ); + } + else if( CONTACTO_2.equals( fieldName ) ) + { + setContacto_2( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_CONTACTO_1) != null ) + { + toContacto_1().save(); + dataHash.put(CONTACTO_1, toContacto_1().get( com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID )); + } + + if( dataHash.get(TO_CONTACTO_2) != null ) + { + toContacto_2().save(); + dataHash.put(CONTACTO_2, toContacto_2().get( com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID )); + } + + if( dataHash.get(TO_EMPRESA_LOGO_ID) != null ) + { + toEmpresa_logo_id().save(); + dataHash.put(EMPRESA_LOGO_ID, toEmpresa_logo_id().get( com.evolute.siprp.server.db.data.siprp_local3.ImageData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Empresas.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Errors.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Errors.java new file mode 100644 index 00000000..6b0e8d8a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Errors.java @@ -0,0 +1,183 @@ +/* +* Errors.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class Errors implements JDOInnerObject +{ + private Integer id; + private java.sql.Timestamp date; + private String type; + private String environment; + private String description; + + public Errors() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == ErrorsDataAuto.ID ) + { + return id; + } + else if( fieldName == ErrorsDataAuto.DATE ) + { + return date; + } + else if( fieldName == ErrorsDataAuto.TYPE ) + { + return type; + } + else if( fieldName == ErrorsDataAuto.ENVIRONMENT ) + { + return environment; + } + else if( fieldName == ErrorsDataAuto.DESCRIPTION ) + { + return description; + } + else if( fieldName.equals( ErrorsDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( ErrorsDataAuto.DATE ) ) + { + return date; + } + else if( fieldName.equals( ErrorsDataAuto.TYPE ) ) + { + return type; + } + else if( fieldName.equals( ErrorsDataAuto.ENVIRONMENT ) ) + { + return environment; + } + else if( fieldName.equals( ErrorsDataAuto.DESCRIPTION ) ) + { + return description; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == ErrorsDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == ErrorsDataAuto.DATE ) + { + date = ( java.sql.Timestamp ) value; + } + else if( fieldName == ErrorsDataAuto.TYPE ) + { + type = ( String ) value; + } + else if( fieldName == ErrorsDataAuto.ENVIRONMENT ) + { + environment = ( String ) value; + } + else if( fieldName == ErrorsDataAuto.DESCRIPTION ) + { + description = ( String ) value; + } + else if( fieldName.equals( ErrorsDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( ErrorsDataAuto.DATE ) ) + { + date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( ErrorsDataAuto.TYPE ) ) + { + type = ( String ) value; + } + else if( fieldName.equals( ErrorsDataAuto.ENVIRONMENT ) ) + { + environment = ( String ) value; + } + else if( fieldName.equals( ErrorsDataAuto.DESCRIPTION ) ) + { + description = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public java.sql.Timestamp getDate() + { + return date; + } + + public void setDate(java.sql.Timestamp dateValue ) + { + this.date = dateValue; + } + + public String getType() + { + return type; + } + + public void setType(String typeValue ) + { + this.type = typeValue; + } + + public String getEnvironment() + { + return environment; + } + + public void setEnvironment(String environmentValue ) + { + this.environment = environmentValue; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String descriptionValue ) + { + this.description = descriptionValue; + } + + public Class getOuterClass() + { + return ErrorsDataAuto.class; + } + + public ErrorsDataAuto getOuterClassInstance() + { + ErrorsDataAuto outerObj = new ErrorsDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ErrorsData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ErrorsData.java new file mode 100644 index 00000000..48187f9b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ErrorsData.java @@ -0,0 +1,18 @@ +/* +* ErrorsDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class ErrorsData extends com.evolute.siprp.server.db.data.siprp_local3.ErrorsDataAuto +{ + + public ErrorsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ErrorsDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ErrorsDataAuto.java new file mode 100644 index 00000000..93e4b325 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ErrorsDataAuto.java @@ -0,0 +1,131 @@ +/* +* ErrorsDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class ErrorsDataAuto extends JDOObject +{ + + public static final String TABLENAME = "errors"; + + public static final String ID = "id"; + public static final String ID_FULL = "errors.id"; + public static final String DATE = "date"; + public static final String DATE_FULL = "errors.date"; + public static final String TYPE = "type"; + public static final String TYPE_FULL = "errors.type"; + public static final String ENVIRONMENT = "environment"; + public static final String ENVIRONMENT_FULL = "errors.environment"; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "errors.description"; + + public static final String FIELD_NAMES[] = new String[]{ + DATE, TYPE, ENVIRONMENT, DESCRIPTION, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DATE, TYPE, ENVIRONMENT, DESCRIPTION, }; + + private Map dataHash; + + public ErrorsDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public java.sql.Timestamp getDate() + { + return (java.sql.Timestamp) get(DATE); + } + + public void setDate(java.sql.Timestamp dateValue ) + { + this.set(DATE, dateValue ); + } + + public String getType() + { + return (String) get(TYPE); + } + + public void setType(String typeValue ) + { + this.set(TYPE, typeValue ); + } + + public String getEnvironment() + { + return (String) get(ENVIRONMENT); + } + + public void setEnvironment(String environmentValue ) + { + this.set(ENVIRONMENT, environmentValue ); + } + + public String getDescription() + { + return (String) get(DESCRIPTION); + } + + public void setDescription(String descriptionValue ) + { + this.set(DESCRIPTION, descriptionValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Errors.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Estabelecimentos.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Estabelecimentos.java new file mode 100644 index 00000000..7485cfd9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Estabelecimentos.java @@ -0,0 +1,453 @@ +/* +* Estabelecimentos.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class Estabelecimentos implements JDOInnerObject +{ + private Integer id; + private String nome; + private String localidade; + private String inactivo; + private Integer empresa_id; + private String morada; + private String codigo_postal; + private String contacto_backup; + private String historico; + private java.sql.Timestamp actualizacao; + private String nome_plain; + private Integer medico_id; + private Integer prestador_consulta_id; + private Integer prestador_ecds_id; + private Integer contacto_id; + + public Estabelecimentos() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == EstabelecimentosDataAuto.ID ) + { + return id; + } + else if( fieldName == EstabelecimentosDataAuto.NOME ) + { + return nome; + } + else if( fieldName == EstabelecimentosDataAuto.LOCALIDADE ) + { + return localidade; + } + else if( fieldName == EstabelecimentosDataAuto.INACTIVO ) + { + return inactivo; + } + else if( fieldName == EstabelecimentosDataAuto.EMPRESA_ID ) + { + return empresa_id; + } + else if( fieldName == EstabelecimentosDataAuto.MORADA ) + { + return morada; + } + else if( fieldName == EstabelecimentosDataAuto.CODIGO_POSTAL ) + { + return codigo_postal; + } + else if( fieldName == EstabelecimentosDataAuto.CONTACTO_BACKUP ) + { + return contacto_backup; + } + else if( fieldName == EstabelecimentosDataAuto.HISTORICO ) + { + return historico; + } + else if( fieldName == EstabelecimentosDataAuto.ACTUALIZACAO ) + { + return actualizacao; + } + else if( fieldName == EstabelecimentosDataAuto.NOME_PLAIN ) + { + return nome_plain; + } + else if( fieldName == EstabelecimentosDataAuto.MEDICO_ID ) + { + return medico_id; + } + else if( fieldName == EstabelecimentosDataAuto.PRESTADOR_CONSULTA_ID ) + { + return prestador_consulta_id; + } + else if( fieldName == EstabelecimentosDataAuto.PRESTADOR_ECDS_ID ) + { + return prestador_ecds_id; + } + else if( fieldName == EstabelecimentosDataAuto.CONTACTO_ID ) + { + return contacto_id; + } + else if( fieldName.equals( EstabelecimentosDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( EstabelecimentosDataAuto.NOME ) ) + { + return nome; + } + else if( fieldName.equals( EstabelecimentosDataAuto.LOCALIDADE ) ) + { + return localidade; + } + else if( fieldName.equals( EstabelecimentosDataAuto.INACTIVO ) ) + { + return inactivo; + } + else if( fieldName.equals( EstabelecimentosDataAuto.EMPRESA_ID ) ) + { + return empresa_id; + } + else if( fieldName.equals( EstabelecimentosDataAuto.MORADA ) ) + { + return morada; + } + else if( fieldName.equals( EstabelecimentosDataAuto.CODIGO_POSTAL ) ) + { + return codigo_postal; + } + else if( fieldName.equals( EstabelecimentosDataAuto.CONTACTO_BACKUP ) ) + { + return contacto_backup; + } + else if( fieldName.equals( EstabelecimentosDataAuto.HISTORICO ) ) + { + return historico; + } + else if( fieldName.equals( EstabelecimentosDataAuto.ACTUALIZACAO ) ) + { + return actualizacao; + } + else if( fieldName.equals( EstabelecimentosDataAuto.NOME_PLAIN ) ) + { + return nome_plain; + } + else if( fieldName.equals( EstabelecimentosDataAuto.MEDICO_ID ) ) + { + return medico_id; + } + else if( fieldName.equals( EstabelecimentosDataAuto.PRESTADOR_CONSULTA_ID ) ) + { + return prestador_consulta_id; + } + else if( fieldName.equals( EstabelecimentosDataAuto.PRESTADOR_ECDS_ID ) ) + { + return prestador_ecds_id; + } + else if( fieldName.equals( EstabelecimentosDataAuto.CONTACTO_ID ) ) + { + return contacto_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == EstabelecimentosDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == EstabelecimentosDataAuto.NOME ) + { + nome = ( String ) value; + } + else if( fieldName == EstabelecimentosDataAuto.LOCALIDADE ) + { + localidade = ( String ) value; + } + else if( fieldName == EstabelecimentosDataAuto.INACTIVO ) + { + inactivo = ( String ) value; + } + else if( fieldName == EstabelecimentosDataAuto.EMPRESA_ID ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName == EstabelecimentosDataAuto.MORADA ) + { + morada = ( String ) value; + } + else if( fieldName == EstabelecimentosDataAuto.CODIGO_POSTAL ) + { + codigo_postal = ( String ) value; + } + else if( fieldName == EstabelecimentosDataAuto.CONTACTO_BACKUP ) + { + contacto_backup = ( String ) value; + } + else if( fieldName == EstabelecimentosDataAuto.HISTORICO ) + { + historico = ( String ) value; + } + else if( fieldName == EstabelecimentosDataAuto.ACTUALIZACAO ) + { + actualizacao = ( java.sql.Timestamp ) value; + } + else if( fieldName == EstabelecimentosDataAuto.NOME_PLAIN ) + { + nome_plain = ( String ) value; + } + else if( fieldName == EstabelecimentosDataAuto.MEDICO_ID ) + { + medico_id = ( Integer ) value; + } + else if( fieldName == EstabelecimentosDataAuto.PRESTADOR_CONSULTA_ID ) + { + prestador_consulta_id = ( Integer ) value; + } + else if( fieldName == EstabelecimentosDataAuto.PRESTADOR_ECDS_ID ) + { + prestador_ecds_id = ( Integer ) value; + } + else if( fieldName == EstabelecimentosDataAuto.CONTACTO_ID ) + { + contacto_id = ( Integer ) value; + } + else if( fieldName.equals( EstabelecimentosDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( EstabelecimentosDataAuto.NOME ) ) + { + nome = ( String ) value; + } + else if( fieldName.equals( EstabelecimentosDataAuto.LOCALIDADE ) ) + { + localidade = ( String ) value; + } + else if( fieldName.equals( EstabelecimentosDataAuto.INACTIVO ) ) + { + inactivo = ( String ) value; + } + else if( fieldName.equals( EstabelecimentosDataAuto.EMPRESA_ID ) ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName.equals( EstabelecimentosDataAuto.MORADA ) ) + { + morada = ( String ) value; + } + else if( fieldName.equals( EstabelecimentosDataAuto.CODIGO_POSTAL ) ) + { + codigo_postal = ( String ) value; + } + else if( fieldName.equals( EstabelecimentosDataAuto.CONTACTO_BACKUP ) ) + { + contacto_backup = ( String ) value; + } + else if( fieldName.equals( EstabelecimentosDataAuto.HISTORICO ) ) + { + historico = ( String ) value; + } + else if( fieldName.equals( EstabelecimentosDataAuto.ACTUALIZACAO ) ) + { + actualizacao = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( EstabelecimentosDataAuto.NOME_PLAIN ) ) + { + nome_plain = ( String ) value; + } + else if( fieldName.equals( EstabelecimentosDataAuto.MEDICO_ID ) ) + { + medico_id = ( Integer ) value; + } + else if( fieldName.equals( EstabelecimentosDataAuto.PRESTADOR_CONSULTA_ID ) ) + { + prestador_consulta_id = ( Integer ) value; + } + else if( fieldName.equals( EstabelecimentosDataAuto.PRESTADOR_ECDS_ID ) ) + { + prestador_ecds_id = ( Integer ) value; + } + else if( fieldName.equals( EstabelecimentosDataAuto.CONTACTO_ID ) ) + { + contacto_id = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getNome() + { + return nome; + } + + public void setNome(String nomeValue ) + { + this.nome = nomeValue; + } + + public String getLocalidade() + { + return localidade; + } + + public void setLocalidade(String localidadeValue ) + { + this.localidade = localidadeValue; + } + + public String getInactivo() + { + return inactivo; + } + + public void setInactivo(String inactivoValue ) + { + this.inactivo = inactivoValue; + } + + public Integer getEmpresa_id() + { + return empresa_id; + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + this.empresa_id = empresa_idValue; + } + + public String getMorada() + { + return morada; + } + + public void setMorada(String moradaValue ) + { + this.morada = moradaValue; + } + + public String getCodigo_postal() + { + return codigo_postal; + } + + public void setCodigo_postal(String codigo_postalValue ) + { + this.codigo_postal = codigo_postalValue; + } + + public String getContacto_backup() + { + return contacto_backup; + } + + public void setContacto_backup(String contacto_backupValue ) + { + this.contacto_backup = contacto_backupValue; + } + + public String getHistorico() + { + return historico; + } + + public void setHistorico(String historicoValue ) + { + this.historico = historicoValue; + } + + public java.sql.Timestamp getActualizacao() + { + return actualizacao; + } + + public void setActualizacao(java.sql.Timestamp actualizacaoValue ) + { + this.actualizacao = actualizacaoValue; + } + + public String getNome_plain() + { + return nome_plain; + } + + public void setNome_plain(String nome_plainValue ) + { + this.nome_plain = nome_plainValue; + } + + public Integer getMedico_id() + { + return medico_id; + } + + public void setMedico_id(Integer medico_idValue ) + { + this.medico_id = medico_idValue; + } + + public Integer getPrestador_consulta_id() + { + return prestador_consulta_id; + } + + public void setPrestador_consulta_id(Integer prestador_consulta_idValue ) + { + this.prestador_consulta_id = prestador_consulta_idValue; + } + + public Integer getPrestador_ecds_id() + { + return prestador_ecds_id; + } + + public void setPrestador_ecds_id(Integer prestador_ecds_idValue ) + { + this.prestador_ecds_id = prestador_ecds_idValue; + } + + public Integer getContacto_id() + { + return contacto_id; + } + + public void setContacto_id(Integer contacto_idValue ) + { + this.contacto_id = contacto_idValue; + } + + public Class getOuterClass() + { + return EstabelecimentosDataAuto.class; + } + + public EstabelecimentosDataAuto getOuterClassInstance() + { + EstabelecimentosDataAuto outerObj = new EstabelecimentosDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EstabelecimentosData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EstabelecimentosData.java new file mode 100644 index 00000000..a695b73a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EstabelecimentosData.java @@ -0,0 +1,18 @@ +/* +* EstabelecimentosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class EstabelecimentosData extends com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosDataAuto +{ + + public EstabelecimentosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EstabelecimentosDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EstabelecimentosDataAuto.java new file mode 100644 index 00000000..038eeab5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EstabelecimentosDataAuto.java @@ -0,0 +1,503 @@ +/* +* EstabelecimentosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class EstabelecimentosDataAuto extends JDOObject +{ + + public static final String TABLENAME = "estabelecimentos"; + + public static final String ID = "id"; + public static final String ID_FULL = "estabelecimentos.id"; + public static final String NOME = "nome"; + public static final String NOME_FULL = "estabelecimentos.nome"; + public static final String LOCALIDADE = "localidade"; + public static final String LOCALIDADE_FULL = "estabelecimentos.localidade"; + public static final String INACTIVO = "inactivo"; + public static final String INACTIVO_FULL = "estabelecimentos.inactivo"; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "estabelecimentos.empresa_id"; + public static final String TO_EMPRESA_ID = "to empresa_id"; + public static final String MORADA = "morada"; + public static final String MORADA_FULL = "estabelecimentos.morada"; + public static final String CODIGO_POSTAL = "codigo_postal"; + public static final String CODIGO_POSTAL_FULL = "estabelecimentos.codigo_postal"; + public static final String CONTACTO_BACKUP = "contacto_backup"; + public static final String CONTACTO_BACKUP_FULL = "estabelecimentos.contacto_backup"; + public static final String HISTORICO = "historico"; + public static final String HISTORICO_FULL = "estabelecimentos.historico"; + public static final String ACTUALIZACAO = "actualizacao"; + public static final String ACTUALIZACAO_FULL = "estabelecimentos.actualizacao"; + public static final String NOME_PLAIN = "nome_plain"; + public static final String NOME_PLAIN_FULL = "estabelecimentos.nome_plain"; + public static final String MEDICO_ID = "medico_id"; + public static final String MEDICO_ID_FULL = "estabelecimentos.medico_id"; + public static final String TO_MEDICO_ID = "to medico_id"; + public static final String PRESTADOR_CONSULTA_ID = "prestador_consulta_id"; + public static final String PRESTADOR_CONSULTA_ID_FULL = "estabelecimentos.prestador_consulta_id"; + public static final String TO_PRESTADOR_CONSULTA_ID = "to prestador_consulta_id"; + public static final String PRESTADOR_ECDS_ID = "prestador_ecds_id"; + public static final String PRESTADOR_ECDS_ID_FULL = "estabelecimentos.prestador_ecds_id"; + public static final String TO_PRESTADOR_ECDS_ID = "to prestador_ecds_id"; + public static final String CONTACTO_ID = "contacto_id"; + public static final String CONTACTO_ID_FULL = "estabelecimentos.contacto_id"; + public static final String TO_CONTACTO_ID = "to contacto_id"; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, LOCALIDADE, INACTIVO, EMPRESA_ID, TO_EMPRESA_ID, MORADA, CODIGO_POSTAL, + CONTACTO_BACKUP, HISTORICO, ACTUALIZACAO, NOME_PLAIN, MEDICO_ID, TO_MEDICO_ID, + PRESTADOR_CONSULTA_ID, TO_PRESTADOR_CONSULTA_ID, PRESTADOR_ECDS_ID, + TO_PRESTADOR_ECDS_ID, CONTACTO_ID, TO_CONTACTO_ID, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, NOME, LOCALIDADE, INACTIVO, EMPRESA_ID, MORADA, CODIGO_POSTAL, CONTACTO_BACKUP, + HISTORICO, ACTUALIZACAO, NOME_PLAIN, MEDICO_ID, PRESTADOR_CONSULTA_ID, + PRESTADOR_ECDS_ID, CONTACTO_ID, }; + + private Map dataHash; + + public EstabelecimentosDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getNome() + { + return (String) get(NOME); + } + + public void setNome(String nomeValue ) + { + this.set(NOME, nomeValue ); + } + + public String getLocalidade() + { + return (String) get(LOCALIDADE); + } + + public void setLocalidade(String localidadeValue ) + { + this.set(LOCALIDADE, localidadeValue ); + } + + public String getInactivo() + { + return (String) get(INACTIVO); + } + + public void setInactivo(String inactivoValue ) + { + this.set(INACTIVO, inactivoValue ); + } + + public Integer getEmpresa_id() + { + return (Integer) dataHash.get(EMPRESA_ID); + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + dataHash.put(TO_EMPRESA_ID, null); + dataHash.put(EMPRESA_ID, empresa_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EmpresasData toEmpresa_id() + throws Exception + { + if( dataHash.get(TO_EMPRESA_ID) == null && getEmpresa_id() != null ) + { + dataHash.put(TO_EMPRESA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.class, new Object[]{ getEmpresa_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) dataHash.get(TO_EMPRESA_ID); + } + + public void setToEmpresa_id(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData empresa_idObject ) + { + if( empresa_idObject == null ) + { + dataHash.put(EMPRESA_ID, null); + } + else + { + dataHash.put(EMPRESA_ID, empresa_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + dataHash.put(TO_EMPRESA_ID, empresa_idObject); + } + + public String getMorada() + { + return (String) get(MORADA); + } + + public void setMorada(String moradaValue ) + { + this.set(MORADA, moradaValue ); + } + + public String getCodigo_postal() + { + return (String) get(CODIGO_POSTAL); + } + + public void setCodigo_postal(String codigo_postalValue ) + { + this.set(CODIGO_POSTAL, codigo_postalValue ); + } + + public String getContacto_backup() + { + return (String) get(CONTACTO_BACKUP); + } + + public void setContacto_backup(String contacto_backupValue ) + { + this.set(CONTACTO_BACKUP, contacto_backupValue ); + } + + public String getHistorico() + { + return (String) get(HISTORICO); + } + + public void setHistorico(String historicoValue ) + { + this.set(HISTORICO, historicoValue ); + } + + public java.sql.Timestamp getActualizacao() + { + return (java.sql.Timestamp) get(ACTUALIZACAO); + } + + public void setActualizacao(java.sql.Timestamp actualizacaoValue ) + { + this.set(ACTUALIZACAO, actualizacaoValue ); + } + + public String getNome_plain() + { + return (String) get(NOME_PLAIN); + } + + public void setNome_plain(String nome_plainValue ) + { + this.set(NOME_PLAIN, nome_plainValue ); + } + + public Integer getMedico_id() + { + return (Integer) dataHash.get(MEDICO_ID); + } + + public void setMedico_id(Integer medico_idValue ) + { + dataHash.put(TO_MEDICO_ID, null); + dataHash.put(MEDICO_ID, medico_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.MedicosData toMedico_id() + throws Exception + { + if( dataHash.get(TO_MEDICO_ID) == null && getMedico_id() != null ) + { + dataHash.put(TO_MEDICO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.MedicosData.class, new Object[]{ getMedico_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.MedicosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.MedicosData) dataHash.get(TO_MEDICO_ID); + } + + public void setToMedico_id(com.evolute.siprp.server.db.data.siprp_local3.MedicosData medico_idObject ) + { + if( medico_idObject == null ) + { + dataHash.put(MEDICO_ID, null); + } + else + { + dataHash.put(MEDICO_ID, medico_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.MedicosData.ID )); + } + dataHash.put(TO_MEDICO_ID, medico_idObject); + } + + public Integer getPrestador_consulta_id() + { + return (Integer) dataHash.get(PRESTADOR_CONSULTA_ID); + } + + public void setPrestador_consulta_id(Integer prestador_consulta_idValue ) + { + dataHash.put(TO_PRESTADOR_CONSULTA_ID, null); + dataHash.put(PRESTADOR_CONSULTA_ID, prestador_consulta_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData toPrestador_consulta_id() + throws Exception + { + if( dataHash.get(TO_PRESTADOR_CONSULTA_ID) == null && getPrestador_consulta_id() != null ) + { + dataHash.put(TO_PRESTADOR_CONSULTA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.class, new Object[]{ getPrestador_consulta_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) dataHash.get(TO_PRESTADOR_CONSULTA_ID); + } + + public void setToPrestador_consulta_id(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData prestador_consulta_idObject ) + { + if( prestador_consulta_idObject == null ) + { + dataHash.put(PRESTADOR_CONSULTA_ID, null); + } + else + { + dataHash.put(PRESTADOR_CONSULTA_ID, prestador_consulta_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + dataHash.put(TO_PRESTADOR_CONSULTA_ID, prestador_consulta_idObject); + } + + public Integer getPrestador_ecds_id() + { + return (Integer) dataHash.get(PRESTADOR_ECDS_ID); + } + + public void setPrestador_ecds_id(Integer prestador_ecds_idValue ) + { + dataHash.put(TO_PRESTADOR_ECDS_ID, null); + dataHash.put(PRESTADOR_ECDS_ID, prestador_ecds_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData toPrestador_ecds_id() + throws Exception + { + if( dataHash.get(TO_PRESTADOR_ECDS_ID) == null && getPrestador_ecds_id() != null ) + { + dataHash.put(TO_PRESTADOR_ECDS_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.class, new Object[]{ getPrestador_ecds_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) dataHash.get(TO_PRESTADOR_ECDS_ID); + } + + public void setToPrestador_ecds_id(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData prestador_ecds_idObject ) + { + if( prestador_ecds_idObject == null ) + { + dataHash.put(PRESTADOR_ECDS_ID, null); + } + else + { + dataHash.put(PRESTADOR_ECDS_ID, prestador_ecds_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + dataHash.put(TO_PRESTADOR_ECDS_ID, prestador_ecds_idObject); + } + + public Integer getContacto_id() + { + return (Integer) dataHash.get(CONTACTO_ID); + } + + public void setContacto_id(Integer contacto_idValue ) + { + dataHash.put(TO_CONTACTO_ID, null); + dataHash.put(CONTACTO_ID, contacto_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.ContactosData toContacto_id() + throws Exception + { + if( dataHash.get(TO_CONTACTO_ID) == null && getContacto_id() != null ) + { + dataHash.put(TO_CONTACTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.ContactosData.class, new Object[]{ getContacto_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.ContactosData) dataHash.get(TO_CONTACTO_ID); + } + + public void setToContacto_id(com.evolute.siprp.server.db.data.siprp_local3.ContactosData contacto_idObject ) + { + if( contacto_idObject == null ) + { + dataHash.put(CONTACTO_ID, null); + } + else + { + dataHash.put(CONTACTO_ID, contacto_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID )); + } + dataHash.put(TO_CONTACTO_ID, contacto_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( CONTACTO_ID.equals( fieldName ) ) + { + value = getContacto_id(); + } + else if( TO_PRESTADOR_ECDS_ID.equals( fieldName ) ) + { + value = toPrestador_ecds_id(); + } + else if( TO_PRESTADOR_CONSULTA_ID.equals( fieldName ) ) + { + value = toPrestador_consulta_id(); + } + else if( TO_CONTACTO_ID.equals( fieldName ) ) + { + value = toContacto_id(); + } + else if( TO_EMPRESA_ID.equals( fieldName ) ) + { + value = toEmpresa_id(); + } + else if( PRESTADOR_CONSULTA_ID.equals( fieldName ) ) + { + value = getPrestador_consulta_id(); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + value = getEmpresa_id(); + } + else if( TO_MEDICO_ID.equals( fieldName ) ) + { + value = toMedico_id(); + } + else if( PRESTADOR_ECDS_ID.equals( fieldName ) ) + { + value = getPrestador_ecds_id(); + } + else if( MEDICO_ID.equals( fieldName ) ) + { + value = getMedico_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( CONTACTO_ID.equals( fieldName ) ) + { + setContacto_id( (Integer) value ); + } + else if( TO_PRESTADOR_ECDS_ID.equals( fieldName ) ) + { + setToPrestador_ecds_id( (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) value ); + } + else if( TO_PRESTADOR_CONSULTA_ID.equals( fieldName ) ) + { + setToPrestador_consulta_id( (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) value ); + } + else if( TO_CONTACTO_ID.equals( fieldName ) ) + { + setToContacto_id( (com.evolute.siprp.server.db.data.siprp_local3.ContactosData) value ); + } + else if( TO_EMPRESA_ID.equals( fieldName ) ) + { + setToEmpresa_id( (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) value ); + } + else if( PRESTADOR_CONSULTA_ID.equals( fieldName ) ) + { + setPrestador_consulta_id( (Integer) value ); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + setEmpresa_id( (Integer) value ); + } + else if( TO_MEDICO_ID.equals( fieldName ) ) + { + setToMedico_id( (com.evolute.siprp.server.db.data.siprp_local3.MedicosData) value ); + } + else if( PRESTADOR_ECDS_ID.equals( fieldName ) ) + { + setPrestador_ecds_id( (Integer) value ); + } + else if( MEDICO_ID.equals( fieldName ) ) + { + setMedico_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_EMPRESA_ID) != null ) + { + toEmpresa_id().save(); + dataHash.put(EMPRESA_ID, toEmpresa_id().get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + + if( dataHash.get(TO_MEDICO_ID) != null ) + { + toMedico_id().save(); + dataHash.put(MEDICO_ID, toMedico_id().get( com.evolute.siprp.server.db.data.siprp_local3.MedicosData.ID )); + } + + if( dataHash.get(TO_PRESTADOR_CONSULTA_ID) != null ) + { + toPrestador_consulta_id().save(); + dataHash.put(PRESTADOR_CONSULTA_ID, toPrestador_consulta_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + + if( dataHash.get(TO_PRESTADOR_ECDS_ID) != null ) + { + toPrestador_ecds_id().save(); + dataHash.put(PRESTADOR_ECDS_ID, toPrestador_ecds_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + + if( dataHash.get(TO_CONTACTO_ID) != null ) + { + toContacto_id().save(); + dataHash.put(CONTACTO_ID, toContacto_id().get( com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Estabelecimentos.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Etiquetas.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Etiquetas.java new file mode 100644 index 00000000..612e886b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Etiquetas.java @@ -0,0 +1,426 @@ +/* +* Etiquetas.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class Etiquetas implements JDOInnerObject +{ + private Integer id; + private String descricao; + private String descricao_plain; + private Double altura; + private Double largura; + private Double margem_esquerda; + private Double margem_cima; + private Integer colunas; + private Integer linhas; + private String continua; + private Double altura_folha; + private Double largura_folha; + private Double margem_vertical_folha; + private Double margem_horizontal_folha; + + public Etiquetas() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == EtiquetasDataAuto.ID ) + { + return id; + } + else if( fieldName == EtiquetasDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == EtiquetasDataAuto.DESCRICAO_PLAIN ) + { + return descricao_plain; + } + else if( fieldName == EtiquetasDataAuto.ALTURA ) + { + return altura; + } + else if( fieldName == EtiquetasDataAuto.LARGURA ) + { + return largura; + } + else if( fieldName == EtiquetasDataAuto.MARGEM_ESQUERDA ) + { + return margem_esquerda; + } + else if( fieldName == EtiquetasDataAuto.MARGEM_CIMA ) + { + return margem_cima; + } + else if( fieldName == EtiquetasDataAuto.COLUNAS ) + { + return colunas; + } + else if( fieldName == EtiquetasDataAuto.LINHAS ) + { + return linhas; + } + else if( fieldName == EtiquetasDataAuto.CONTINUA ) + { + return continua; + } + else if( fieldName == EtiquetasDataAuto.ALTURA_FOLHA ) + { + return altura_folha; + } + else if( fieldName == EtiquetasDataAuto.LARGURA_FOLHA ) + { + return largura_folha; + } + else if( fieldName == EtiquetasDataAuto.MARGEM_VERTICAL_FOLHA ) + { + return margem_vertical_folha; + } + else if( fieldName == EtiquetasDataAuto.MARGEM_HORIZONTAL_FOLHA ) + { + return margem_horizontal_folha; + } + else if( fieldName.equals( EtiquetasDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( EtiquetasDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( EtiquetasDataAuto.DESCRICAO_PLAIN ) ) + { + return descricao_plain; + } + else if( fieldName.equals( EtiquetasDataAuto.ALTURA ) ) + { + return altura; + } + else if( fieldName.equals( EtiquetasDataAuto.LARGURA ) ) + { + return largura; + } + else if( fieldName.equals( EtiquetasDataAuto.MARGEM_ESQUERDA ) ) + { + return margem_esquerda; + } + else if( fieldName.equals( EtiquetasDataAuto.MARGEM_CIMA ) ) + { + return margem_cima; + } + else if( fieldName.equals( EtiquetasDataAuto.COLUNAS ) ) + { + return colunas; + } + else if( fieldName.equals( EtiquetasDataAuto.LINHAS ) ) + { + return linhas; + } + else if( fieldName.equals( EtiquetasDataAuto.CONTINUA ) ) + { + return continua; + } + else if( fieldName.equals( EtiquetasDataAuto.ALTURA_FOLHA ) ) + { + return altura_folha; + } + else if( fieldName.equals( EtiquetasDataAuto.LARGURA_FOLHA ) ) + { + return largura_folha; + } + else if( fieldName.equals( EtiquetasDataAuto.MARGEM_VERTICAL_FOLHA ) ) + { + return margem_vertical_folha; + } + else if( fieldName.equals( EtiquetasDataAuto.MARGEM_HORIZONTAL_FOLHA ) ) + { + return margem_horizontal_folha; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == EtiquetasDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == EtiquetasDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == EtiquetasDataAuto.DESCRICAO_PLAIN ) + { + descricao_plain = ( String ) value; + } + else if( fieldName == EtiquetasDataAuto.ALTURA ) + { + altura = ( Double ) value; + } + else if( fieldName == EtiquetasDataAuto.LARGURA ) + { + largura = ( Double ) value; + } + else if( fieldName == EtiquetasDataAuto.MARGEM_ESQUERDA ) + { + margem_esquerda = ( Double ) value; + } + else if( fieldName == EtiquetasDataAuto.MARGEM_CIMA ) + { + margem_cima = ( Double ) value; + } + else if( fieldName == EtiquetasDataAuto.COLUNAS ) + { + colunas = ( Integer ) value; + } + else if( fieldName == EtiquetasDataAuto.LINHAS ) + { + linhas = ( Integer ) value; + } + else if( fieldName == EtiquetasDataAuto.CONTINUA ) + { + continua = ( String ) value; + } + else if( fieldName == EtiquetasDataAuto.ALTURA_FOLHA ) + { + altura_folha = ( Double ) value; + } + else if( fieldName == EtiquetasDataAuto.LARGURA_FOLHA ) + { + largura_folha = ( Double ) value; + } + else if( fieldName == EtiquetasDataAuto.MARGEM_VERTICAL_FOLHA ) + { + margem_vertical_folha = ( Double ) value; + } + else if( fieldName == EtiquetasDataAuto.MARGEM_HORIZONTAL_FOLHA ) + { + margem_horizontal_folha = ( Double ) value; + } + else if( fieldName.equals( EtiquetasDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( EtiquetasDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( EtiquetasDataAuto.DESCRICAO_PLAIN ) ) + { + descricao_plain = ( String ) value; + } + else if( fieldName.equals( EtiquetasDataAuto.ALTURA ) ) + { + altura = ( Double ) value; + } + else if( fieldName.equals( EtiquetasDataAuto.LARGURA ) ) + { + largura = ( Double ) value; + } + else if( fieldName.equals( EtiquetasDataAuto.MARGEM_ESQUERDA ) ) + { + margem_esquerda = ( Double ) value; + } + else if( fieldName.equals( EtiquetasDataAuto.MARGEM_CIMA ) ) + { + margem_cima = ( Double ) value; + } + else if( fieldName.equals( EtiquetasDataAuto.COLUNAS ) ) + { + colunas = ( Integer ) value; + } + else if( fieldName.equals( EtiquetasDataAuto.LINHAS ) ) + { + linhas = ( Integer ) value; + } + else if( fieldName.equals( EtiquetasDataAuto.CONTINUA ) ) + { + continua = ( String ) value; + } + else if( fieldName.equals( EtiquetasDataAuto.ALTURA_FOLHA ) ) + { + altura_folha = ( Double ) value; + } + else if( fieldName.equals( EtiquetasDataAuto.LARGURA_FOLHA ) ) + { + largura_folha = ( Double ) value; + } + else if( fieldName.equals( EtiquetasDataAuto.MARGEM_VERTICAL_FOLHA ) ) + { + margem_vertical_folha = ( Double ) value; + } + else if( fieldName.equals( EtiquetasDataAuto.MARGEM_HORIZONTAL_FOLHA ) ) + { + margem_horizontal_folha = ( Double ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public String getDescricao_plain() + { + return descricao_plain; + } + + public void setDescricao_plain(String descricao_plainValue ) + { + this.descricao_plain = descricao_plainValue; + } + + public Double getAltura() + { + return altura; + } + + public void setAltura(Double alturaValue ) + { + this.altura = alturaValue; + } + + public Double getLargura() + { + return largura; + } + + public void setLargura(Double larguraValue ) + { + this.largura = larguraValue; + } + + public Double getMargem_esquerda() + { + return margem_esquerda; + } + + public void setMargem_esquerda(Double margem_esquerdaValue ) + { + this.margem_esquerda = margem_esquerdaValue; + } + + public Double getMargem_cima() + { + return margem_cima; + } + + public void setMargem_cima(Double margem_cimaValue ) + { + this.margem_cima = margem_cimaValue; + } + + public Integer getColunas() + { + return colunas; + } + + public void setColunas(Integer colunasValue ) + { + this.colunas = colunasValue; + } + + public Integer getLinhas() + { + return linhas; + } + + public void setLinhas(Integer linhasValue ) + { + this.linhas = linhasValue; + } + + public String getContinua() + { + return continua; + } + + public void setContinua(String continuaValue ) + { + this.continua = continuaValue; + } + + public Double getAltura_folha() + { + return altura_folha; + } + + public void setAltura_folha(Double altura_folhaValue ) + { + this.altura_folha = altura_folhaValue; + } + + public Double getLargura_folha() + { + return largura_folha; + } + + public void setLargura_folha(Double largura_folhaValue ) + { + this.largura_folha = largura_folhaValue; + } + + public Double getMargem_vertical_folha() + { + return margem_vertical_folha; + } + + public void setMargem_vertical_folha(Double margem_vertical_folhaValue ) + { + this.margem_vertical_folha = margem_vertical_folhaValue; + } + + public Double getMargem_horizontal_folha() + { + return margem_horizontal_folha; + } + + public void setMargem_horizontal_folha(Double margem_horizontal_folhaValue ) + { + this.margem_horizontal_folha = margem_horizontal_folhaValue; + } + + public Class getOuterClass() + { + return EtiquetasDataAuto.class; + } + + public EtiquetasDataAuto getOuterClassInstance() + { + EtiquetasDataAuto outerObj = new EtiquetasDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EtiquetasData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EtiquetasData.java new file mode 100644 index 00000000..9fcc0122 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EtiquetasData.java @@ -0,0 +1,18 @@ +/* +* EtiquetasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class EtiquetasData extends com.evolute.siprp.server.db.data.siprp_local3.EtiquetasDataAuto +{ + + public EtiquetasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EtiquetasDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EtiquetasDataAuto.java new file mode 100644 index 00000000..650d0e17 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EtiquetasDataAuto.java @@ -0,0 +1,243 @@ +/* +* EtiquetasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class EtiquetasDataAuto extends JDOObject +{ + + public static final String TABLENAME = "etiquetas"; + + public static final String ID = "id"; + public static final String ID_FULL = "etiquetas.id"; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "etiquetas.descricao"; + public static final String DESCRICAO_PLAIN = "descricao_plain"; + public static final String DESCRICAO_PLAIN_FULL = "etiquetas.descricao_plain"; + public static final String ALTURA = "altura"; + public static final String ALTURA_FULL = "etiquetas.altura"; + public static final String LARGURA = "largura"; + public static final String LARGURA_FULL = "etiquetas.largura"; + public static final String MARGEM_ESQUERDA = "margem_esquerda"; + public static final String MARGEM_ESQUERDA_FULL = "etiquetas.margem_esquerda"; + public static final String MARGEM_CIMA = "margem_cima"; + public static final String MARGEM_CIMA_FULL = "etiquetas.margem_cima"; + public static final String COLUNAS = "colunas"; + public static final String COLUNAS_FULL = "etiquetas.colunas"; + public static final String LINHAS = "linhas"; + public static final String LINHAS_FULL = "etiquetas.linhas"; + public static final String CONTINUA = "continua"; + public static final String CONTINUA_FULL = "etiquetas.continua"; + public static final String ALTURA_FOLHA = "altura_folha"; + public static final String ALTURA_FOLHA_FULL = "etiquetas.altura_folha"; + public static final String LARGURA_FOLHA = "largura_folha"; + public static final String LARGURA_FOLHA_FULL = "etiquetas.largura_folha"; + public static final String MARGEM_VERTICAL_FOLHA = "margem_vertical_folha"; + public static final String MARGEM_VERTICAL_FOLHA_FULL = "etiquetas.margem_vertical_folha"; + public static final String MARGEM_HORIZONTAL_FOLHA = "margem_horizontal_folha"; + public static final String MARGEM_HORIZONTAL_FOLHA_FULL = "etiquetas.margem_horizontal_folha"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, DESCRICAO_PLAIN, ALTURA, LARGURA, MARGEM_ESQUERDA, MARGEM_CIMA, COLUNAS, + LINHAS, CONTINUA, ALTURA_FOLHA, LARGURA_FOLHA, MARGEM_VERTICAL_FOLHA, + MARGEM_HORIZONTAL_FOLHA, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, DESCRICAO_PLAIN, ALTURA, LARGURA, MARGEM_ESQUERDA, MARGEM_CIMA, + COLUNAS, LINHAS, CONTINUA, ALTURA_FOLHA, LARGURA_FOLHA, MARGEM_VERTICAL_FOLHA, + MARGEM_HORIZONTAL_FOLHA, }; + + private Map dataHash; + + public EtiquetasDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public String getDescricao_plain() + { + return (String) get(DESCRICAO_PLAIN); + } + + public void setDescricao_plain(String descricao_plainValue ) + { + this.set(DESCRICAO_PLAIN, descricao_plainValue ); + } + + public Double getAltura() + { + return (Double) get(ALTURA); + } + + public void setAltura(Double alturaValue ) + { + this.set(ALTURA, alturaValue ); + } + + public Double getLargura() + { + return (Double) get(LARGURA); + } + + public void setLargura(Double larguraValue ) + { + this.set(LARGURA, larguraValue ); + } + + public Double getMargem_esquerda() + { + return (Double) get(MARGEM_ESQUERDA); + } + + public void setMargem_esquerda(Double margem_esquerdaValue ) + { + this.set(MARGEM_ESQUERDA, margem_esquerdaValue ); + } + + public Double getMargem_cima() + { + return (Double) get(MARGEM_CIMA); + } + + public void setMargem_cima(Double margem_cimaValue ) + { + this.set(MARGEM_CIMA, margem_cimaValue ); + } + + public Integer getColunas() + { + return (Integer) get(COLUNAS); + } + + public void setColunas(Integer colunasValue ) + { + this.set(COLUNAS, colunasValue ); + } + + public Integer getLinhas() + { + return (Integer) get(LINHAS); + } + + public void setLinhas(Integer linhasValue ) + { + this.set(LINHAS, linhasValue ); + } + + public String getContinua() + { + return (String) get(CONTINUA); + } + + public void setContinua(String continuaValue ) + { + this.set(CONTINUA, continuaValue ); + } + + public Double getAltura_folha() + { + return (Double) get(ALTURA_FOLHA); + } + + public void setAltura_folha(Double altura_folhaValue ) + { + this.set(ALTURA_FOLHA, altura_folhaValue ); + } + + public Double getLargura_folha() + { + return (Double) get(LARGURA_FOLHA); + } + + public void setLargura_folha(Double largura_folhaValue ) + { + this.set(LARGURA_FOLHA, largura_folhaValue ); + } + + public Double getMargem_vertical_folha() + { + return (Double) get(MARGEM_VERTICAL_FOLHA); + } + + public void setMargem_vertical_folha(Double margem_vertical_folhaValue ) + { + this.set(MARGEM_VERTICAL_FOLHA, margem_vertical_folhaValue ); + } + + public Double getMargem_horizontal_folha() + { + return (Double) get(MARGEM_HORIZONTAL_FOLHA); + } + + public void setMargem_horizontal_folha(Double margem_horizontal_folhaValue ) + { + this.set(MARGEM_HORIZONTAL_FOLHA, margem_horizontal_folhaValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Etiquetas.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Exames.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Exames.java new file mode 100644 index 00000000..db6ff331 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Exames.java @@ -0,0 +1,507 @@ +/* +* Exames.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class Exames implements JDOInnerObject +{ + private Integer id; + private java.util.Date data; + private Integer tipo; + private Integer ocasional; + private String outro_tipo; + private Integer resultado; + private String outra_funcao_1; + private String outra_funcao_2; + private String outra_funcao_3; + private String outra_funcao_4; + private java.util.Date proximo_exame; + private String outras_recomendacoes; + private String inactivo; + private Integer trabalhador_id; + private Integer medico_id; + private byte[] pdf; + private byte[] fo; + + public Exames() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == ExamesDataAuto.ID ) + { + return id; + } + else if( fieldName == ExamesDataAuto.DATA ) + { + return data; + } + else if( fieldName == ExamesDataAuto.TIPO ) + { + return tipo; + } + else if( fieldName == ExamesDataAuto.OCASIONAL ) + { + return ocasional; + } + else if( fieldName == ExamesDataAuto.OUTRO_TIPO ) + { + return outro_tipo; + } + else if( fieldName == ExamesDataAuto.RESULTADO ) + { + return resultado; + } + else if( fieldName == ExamesDataAuto.OUTRA_FUNCAO_1 ) + { + return outra_funcao_1; + } + else if( fieldName == ExamesDataAuto.OUTRA_FUNCAO_2 ) + { + return outra_funcao_2; + } + else if( fieldName == ExamesDataAuto.OUTRA_FUNCAO_3 ) + { + return outra_funcao_3; + } + else if( fieldName == ExamesDataAuto.OUTRA_FUNCAO_4 ) + { + return outra_funcao_4; + } + else if( fieldName == ExamesDataAuto.PROXIMO_EXAME ) + { + return proximo_exame; + } + else if( fieldName == ExamesDataAuto.OUTRAS_RECOMENDACOES ) + { + return outras_recomendacoes; + } + else if( fieldName == ExamesDataAuto.INACTIVO ) + { + return inactivo; + } + else if( fieldName == ExamesDataAuto.TRABALHADOR_ID ) + { + return trabalhador_id; + } + else if( fieldName == ExamesDataAuto.MEDICO_ID ) + { + return medico_id; + } + else if( fieldName == ExamesDataAuto.PDF ) + { + return pdf; + } + else if( fieldName == ExamesDataAuto.FO ) + { + return fo; + } + else if( fieldName.equals( ExamesDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( ExamesDataAuto.DATA ) ) + { + return data; + } + else if( fieldName.equals( ExamesDataAuto.TIPO ) ) + { + return tipo; + } + else if( fieldName.equals( ExamesDataAuto.OCASIONAL ) ) + { + return ocasional; + } + else if( fieldName.equals( ExamesDataAuto.OUTRO_TIPO ) ) + { + return outro_tipo; + } + else if( fieldName.equals( ExamesDataAuto.RESULTADO ) ) + { + return resultado; + } + else if( fieldName.equals( ExamesDataAuto.OUTRA_FUNCAO_1 ) ) + { + return outra_funcao_1; + } + else if( fieldName.equals( ExamesDataAuto.OUTRA_FUNCAO_2 ) ) + { + return outra_funcao_2; + } + else if( fieldName.equals( ExamesDataAuto.OUTRA_FUNCAO_3 ) ) + { + return outra_funcao_3; + } + else if( fieldName.equals( ExamesDataAuto.OUTRA_FUNCAO_4 ) ) + { + return outra_funcao_4; + } + else if( fieldName.equals( ExamesDataAuto.PROXIMO_EXAME ) ) + { + return proximo_exame; + } + else if( fieldName.equals( ExamesDataAuto.OUTRAS_RECOMENDACOES ) ) + { + return outras_recomendacoes; + } + else if( fieldName.equals( ExamesDataAuto.INACTIVO ) ) + { + return inactivo; + } + else if( fieldName.equals( ExamesDataAuto.TRABALHADOR_ID ) ) + { + return trabalhador_id; + } + else if( fieldName.equals( ExamesDataAuto.MEDICO_ID ) ) + { + return medico_id; + } + else if( fieldName.equals( ExamesDataAuto.PDF ) ) + { + return pdf; + } + else if( fieldName.equals( ExamesDataAuto.FO ) ) + { + return fo; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == ExamesDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == ExamesDataAuto.DATA ) + { + data = ( java.util.Date ) value; + } + else if( fieldName == ExamesDataAuto.TIPO ) + { + tipo = ( Integer ) value; + } + else if( fieldName == ExamesDataAuto.OCASIONAL ) + { + ocasional = ( Integer ) value; + } + else if( fieldName == ExamesDataAuto.OUTRO_TIPO ) + { + outro_tipo = ( String ) value; + } + else if( fieldName == ExamesDataAuto.RESULTADO ) + { + resultado = ( Integer ) value; + } + else if( fieldName == ExamesDataAuto.OUTRA_FUNCAO_1 ) + { + outra_funcao_1 = ( String ) value; + } + else if( fieldName == ExamesDataAuto.OUTRA_FUNCAO_2 ) + { + outra_funcao_2 = ( String ) value; + } + else if( fieldName == ExamesDataAuto.OUTRA_FUNCAO_3 ) + { + outra_funcao_3 = ( String ) value; + } + else if( fieldName == ExamesDataAuto.OUTRA_FUNCAO_4 ) + { + outra_funcao_4 = ( String ) value; + } + else if( fieldName == ExamesDataAuto.PROXIMO_EXAME ) + { + proximo_exame = ( java.util.Date ) value; + } + else if( fieldName == ExamesDataAuto.OUTRAS_RECOMENDACOES ) + { + outras_recomendacoes = ( String ) value; + } + else if( fieldName == ExamesDataAuto.INACTIVO ) + { + inactivo = ( String ) value; + } + else if( fieldName == ExamesDataAuto.TRABALHADOR_ID ) + { + trabalhador_id = ( Integer ) value; + } + else if( fieldName == ExamesDataAuto.MEDICO_ID ) + { + medico_id = ( Integer ) value; + } + else if( fieldName == ExamesDataAuto.PDF ) + { + pdf = ( byte[] ) value; + } + else if( fieldName == ExamesDataAuto.FO ) + { + fo = ( byte[] ) value; + } + else if( fieldName.equals( ExamesDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( ExamesDataAuto.DATA ) ) + { + data = ( java.util.Date ) value; + } + else if( fieldName.equals( ExamesDataAuto.TIPO ) ) + { + tipo = ( Integer ) value; + } + else if( fieldName.equals( ExamesDataAuto.OCASIONAL ) ) + { + ocasional = ( Integer ) value; + } + else if( fieldName.equals( ExamesDataAuto.OUTRO_TIPO ) ) + { + outro_tipo = ( String ) value; + } + else if( fieldName.equals( ExamesDataAuto.RESULTADO ) ) + { + resultado = ( Integer ) value; + } + else if( fieldName.equals( ExamesDataAuto.OUTRA_FUNCAO_1 ) ) + { + outra_funcao_1 = ( String ) value; + } + else if( fieldName.equals( ExamesDataAuto.OUTRA_FUNCAO_2 ) ) + { + outra_funcao_2 = ( String ) value; + } + else if( fieldName.equals( ExamesDataAuto.OUTRA_FUNCAO_3 ) ) + { + outra_funcao_3 = ( String ) value; + } + else if( fieldName.equals( ExamesDataAuto.OUTRA_FUNCAO_4 ) ) + { + outra_funcao_4 = ( String ) value; + } + else if( fieldName.equals( ExamesDataAuto.PROXIMO_EXAME ) ) + { + proximo_exame = ( java.util.Date ) value; + } + else if( fieldName.equals( ExamesDataAuto.OUTRAS_RECOMENDACOES ) ) + { + outras_recomendacoes = ( String ) value; + } + else if( fieldName.equals( ExamesDataAuto.INACTIVO ) ) + { + inactivo = ( String ) value; + } + else if( fieldName.equals( ExamesDataAuto.TRABALHADOR_ID ) ) + { + trabalhador_id = ( Integer ) value; + } + else if( fieldName.equals( ExamesDataAuto.MEDICO_ID ) ) + { + medico_id = ( Integer ) value; + } + else if( fieldName.equals( ExamesDataAuto.PDF ) ) + { + pdf = ( byte[] ) value; + } + else if( fieldName.equals( ExamesDataAuto.FO ) ) + { + fo = ( byte[] ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public java.util.Date getData() + { + return data; + } + + public void setData(java.util.Date dataValue ) + { + this.data = dataValue; + } + + public Integer getTipo() + { + return tipo; + } + + public void setTipo(Integer tipoValue ) + { + this.tipo = tipoValue; + } + + public Integer getOcasional() + { + return ocasional; + } + + public void setOcasional(Integer ocasionalValue ) + { + this.ocasional = ocasionalValue; + } + + public String getOutro_tipo() + { + return outro_tipo; + } + + public void setOutro_tipo(String outro_tipoValue ) + { + this.outro_tipo = outro_tipoValue; + } + + public Integer getResultado() + { + return resultado; + } + + public void setResultado(Integer resultadoValue ) + { + this.resultado = resultadoValue; + } + + public String getOutra_funcao_1() + { + return outra_funcao_1; + } + + public void setOutra_funcao_1(String outra_funcao_1Value ) + { + this.outra_funcao_1 = outra_funcao_1Value; + } + + public String getOutra_funcao_2() + { + return outra_funcao_2; + } + + public void setOutra_funcao_2(String outra_funcao_2Value ) + { + this.outra_funcao_2 = outra_funcao_2Value; + } + + public String getOutra_funcao_3() + { + return outra_funcao_3; + } + + public void setOutra_funcao_3(String outra_funcao_3Value ) + { + this.outra_funcao_3 = outra_funcao_3Value; + } + + public String getOutra_funcao_4() + { + return outra_funcao_4; + } + + public void setOutra_funcao_4(String outra_funcao_4Value ) + { + this.outra_funcao_4 = outra_funcao_4Value; + } + + public java.util.Date getProximo_exame() + { + return proximo_exame; + } + + public void setProximo_exame(java.util.Date proximo_exameValue ) + { + this.proximo_exame = proximo_exameValue; + } + + public String getOutras_recomendacoes() + { + return outras_recomendacoes; + } + + public void setOutras_recomendacoes(String outras_recomendacoesValue ) + { + this.outras_recomendacoes = outras_recomendacoesValue; + } + + public String getInactivo() + { + return inactivo; + } + + public void setInactivo(String inactivoValue ) + { + this.inactivo = inactivoValue; + } + + public Integer getTrabalhador_id() + { + return trabalhador_id; + } + + public void setTrabalhador_id(Integer trabalhador_idValue ) + { + this.trabalhador_id = trabalhador_idValue; + } + + public Integer getMedico_id() + { + return medico_id; + } + + public void setMedico_id(Integer medico_idValue ) + { + this.medico_id = medico_idValue; + } + + public byte[] getPdf() + { + return pdf; + } + + public void setPdf(byte[] pdfValue ) + { + this.pdf = pdfValue; + } + + public byte[] getFo() + { + return fo; + } + + public void setFo(byte[] foValue ) + { + this.fo = foValue; + } + + public Class getOuterClass() + { + return ExamesDataAuto.class; + } + + public ExamesDataAuto getOuterClassInstance() + { + ExamesDataAuto outerObj = new ExamesDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesData.java new file mode 100644 index 00000000..020efe58 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesData.java @@ -0,0 +1,18 @@ +/* +* ExamesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class ExamesData extends com.evolute.siprp.server.db.data.siprp_local3.ExamesDataAuto +{ + + public ExamesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesDataAuto.java new file mode 100644 index 00000000..7e6e54c6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesDataAuto.java @@ -0,0 +1,338 @@ +/* +* ExamesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class ExamesDataAuto extends JDOObject +{ + + public static final String TABLENAME = "exames"; + + public static final String ID = "id"; + public static final String ID_FULL = "exames.id"; + public static final String DATA = "data"; + public static final String DATA_FULL = "exames.data"; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "exames.tipo"; + public static final String OCASIONAL = "ocasional"; + public static final String OCASIONAL_FULL = "exames.ocasional"; + public static final String OUTRO_TIPO = "outro_tipo"; + public static final String OUTRO_TIPO_FULL = "exames.outro_tipo"; + public static final String RESULTADO = "resultado"; + public static final String RESULTADO_FULL = "exames.resultado"; + public static final String OUTRA_FUNCAO_1 = "outra_funcao_1"; + public static final String OUTRA_FUNCAO_1_FULL = "exames.outra_funcao_1"; + public static final String OUTRA_FUNCAO_2 = "outra_funcao_2"; + public static final String OUTRA_FUNCAO_2_FULL = "exames.outra_funcao_2"; + public static final String OUTRA_FUNCAO_3 = "outra_funcao_3"; + public static final String OUTRA_FUNCAO_3_FULL = "exames.outra_funcao_3"; + public static final String OUTRA_FUNCAO_4 = "outra_funcao_4"; + public static final String OUTRA_FUNCAO_4_FULL = "exames.outra_funcao_4"; + public static final String PROXIMO_EXAME = "proximo_exame"; + public static final String PROXIMO_EXAME_FULL = "exames.proximo_exame"; + public static final String OUTRAS_RECOMENDACOES = "outras_recomendacoes"; + public static final String OUTRAS_RECOMENDACOES_FULL = "exames.outras_recomendacoes"; + public static final String INACTIVO = "inactivo"; + public static final String INACTIVO_FULL = "exames.inactivo"; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "exames.trabalhador_id"; + public static final String MEDICO_ID = "medico_id"; + public static final String MEDICO_ID_FULL = "exames.medico_id"; + public static final String TO_MEDICO_ID = "to medico_id"; + public static final String PDF = "pdf"; + public static final String PDF_FULL = "exames.pdf"; + public static final String FO = "fo"; + public static final String FO_FULL = "exames.fo"; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, TIPO, OCASIONAL, OUTRO_TIPO, RESULTADO, OUTRA_FUNCAO_1, OUTRA_FUNCAO_2, + OUTRA_FUNCAO_3, OUTRA_FUNCAO_4, PROXIMO_EXAME, OUTRAS_RECOMENDACOES, INACTIVO, + TRABALHADOR_ID, MEDICO_ID, TO_MEDICO_ID, PDF, FO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DATA, TIPO, OCASIONAL, OUTRO_TIPO, RESULTADO, OUTRA_FUNCAO_1, OUTRA_FUNCAO_2, + OUTRA_FUNCAO_3, OUTRA_FUNCAO_4, PROXIMO_EXAME, OUTRAS_RECOMENDACOES, INACTIVO, + TRABALHADOR_ID, MEDICO_ID, PDF, FO, }; + + private Map dataHash; + + public ExamesDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public java.util.Date getData() + { + return (java.util.Date) get(DATA); + } + + public void setData(java.util.Date dataValue ) + { + this.set(DATA, dataValue ); + } + + public Integer getTipo() + { + return (Integer) get(TIPO); + } + + public void setTipo(Integer tipoValue ) + { + this.set(TIPO, tipoValue ); + } + + public Integer getOcasional() + { + return (Integer) get(OCASIONAL); + } + + public void setOcasional(Integer ocasionalValue ) + { + this.set(OCASIONAL, ocasionalValue ); + } + + public String getOutro_tipo() + { + return (String) get(OUTRO_TIPO); + } + + public void setOutro_tipo(String outro_tipoValue ) + { + this.set(OUTRO_TIPO, outro_tipoValue ); + } + + public Integer getResultado() + { + return (Integer) get(RESULTADO); + } + + public void setResultado(Integer resultadoValue ) + { + this.set(RESULTADO, resultadoValue ); + } + + public String getOutra_funcao_1() + { + return (String) get(OUTRA_FUNCAO_1); + } + + public void setOutra_funcao_1(String outra_funcao_1Value ) + { + this.set(OUTRA_FUNCAO_1, outra_funcao_1Value ); + } + + public String getOutra_funcao_2() + { + return (String) get(OUTRA_FUNCAO_2); + } + + public void setOutra_funcao_2(String outra_funcao_2Value ) + { + this.set(OUTRA_FUNCAO_2, outra_funcao_2Value ); + } + + public String getOutra_funcao_3() + { + return (String) get(OUTRA_FUNCAO_3); + } + + public void setOutra_funcao_3(String outra_funcao_3Value ) + { + this.set(OUTRA_FUNCAO_3, outra_funcao_3Value ); + } + + public String getOutra_funcao_4() + { + return (String) get(OUTRA_FUNCAO_4); + } + + public void setOutra_funcao_4(String outra_funcao_4Value ) + { + this.set(OUTRA_FUNCAO_4, outra_funcao_4Value ); + } + + public java.util.Date getProximo_exame() + { + return (java.util.Date) get(PROXIMO_EXAME); + } + + public void setProximo_exame(java.util.Date proximo_exameValue ) + { + this.set(PROXIMO_EXAME, proximo_exameValue ); + } + + public String getOutras_recomendacoes() + { + return (String) get(OUTRAS_RECOMENDACOES); + } + + public void setOutras_recomendacoes(String outras_recomendacoesValue ) + { + this.set(OUTRAS_RECOMENDACOES, outras_recomendacoesValue ); + } + + public String getInactivo() + { + return (String) get(INACTIVO); + } + + public void setInactivo(String inactivoValue ) + { + this.set(INACTIVO, inactivoValue ); + } + + public Integer getTrabalhador_id() + { + return (Integer) get(TRABALHADOR_ID); + } + + public void setTrabalhador_id(Integer trabalhador_idValue ) + { + this.set(TRABALHADOR_ID, trabalhador_idValue ); + } + + public Integer getMedico_id() + { + return (Integer) dataHash.get(MEDICO_ID); + } + + public void setMedico_id(Integer medico_idValue ) + { + dataHash.put(TO_MEDICO_ID, null); + dataHash.put(MEDICO_ID, medico_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.MedicosData toMedico_id() + throws Exception + { + if( dataHash.get(TO_MEDICO_ID) == null && getMedico_id() != null ) + { + dataHash.put(TO_MEDICO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.MedicosData.class, new Object[]{ getMedico_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.MedicosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.MedicosData) dataHash.get(TO_MEDICO_ID); + } + + public void setToMedico_id(com.evolute.siprp.server.db.data.siprp_local3.MedicosData medico_idObject ) + { + if( medico_idObject == null ) + { + dataHash.put(MEDICO_ID, null); + } + else + { + dataHash.put(MEDICO_ID, medico_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.MedicosData.ID )); + } + dataHash.put(TO_MEDICO_ID, medico_idObject); + } + + public byte[] getPdf() + { + return (byte[]) get(PDF); + } + + public void setPdf(byte[] pdfValue ) + { + this.set(PDF, pdfValue ); + } + + public byte[] getFo() + { + return (byte[]) get(FO); + } + + public void setFo(byte[] foValue ) + { + this.set(FO, foValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_MEDICO_ID.equals( fieldName ) ) + { + value = toMedico_id(); + } + else if( MEDICO_ID.equals( fieldName ) ) + { + value = getMedico_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_MEDICO_ID.equals( fieldName ) ) + { + setToMedico_id( (com.evolute.siprp.server.db.data.siprp_local3.MedicosData) value ); + } + else if( MEDICO_ID.equals( fieldName ) ) + { + setMedico_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_MEDICO_ID) != null ) + { + toMedico_id().save(); + dataHash.put(MEDICO_ID, toMedico_id().get( com.evolute.siprp.server.db.data.siprp_local3.MedicosData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Exames.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfis.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfis.java new file mode 100644 index 00000000..831d47ab --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfis.java @@ -0,0 +1,156 @@ +/* +* ExamesPerfis.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class ExamesPerfis implements JDOInnerObject +{ + private Integer id; + private Integer perfil; + private Integer tipo; + private Integer multiplicador; + + public ExamesPerfis() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == ExamesPerfisDataAuto.ID ) + { + return id; + } + else if( fieldName == ExamesPerfisDataAuto.PERFIL ) + { + return perfil; + } + else if( fieldName == ExamesPerfisDataAuto.TIPO ) + { + return tipo; + } + else if( fieldName == ExamesPerfisDataAuto.MULTIPLICADOR ) + { + return multiplicador; + } + else if( fieldName.equals( ExamesPerfisDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( ExamesPerfisDataAuto.PERFIL ) ) + { + return perfil; + } + else if( fieldName.equals( ExamesPerfisDataAuto.TIPO ) ) + { + return tipo; + } + else if( fieldName.equals( ExamesPerfisDataAuto.MULTIPLICADOR ) ) + { + return multiplicador; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == ExamesPerfisDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == ExamesPerfisDataAuto.PERFIL ) + { + perfil = ( Integer ) value; + } + else if( fieldName == ExamesPerfisDataAuto.TIPO ) + { + tipo = ( Integer ) value; + } + else if( fieldName == ExamesPerfisDataAuto.MULTIPLICADOR ) + { + multiplicador = ( Integer ) value; + } + else if( fieldName.equals( ExamesPerfisDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( ExamesPerfisDataAuto.PERFIL ) ) + { + perfil = ( Integer ) value; + } + else if( fieldName.equals( ExamesPerfisDataAuto.TIPO ) ) + { + tipo = ( Integer ) value; + } + else if( fieldName.equals( ExamesPerfisDataAuto.MULTIPLICADOR ) ) + { + multiplicador = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getPerfil() + { + return perfil; + } + + public void setPerfil(Integer perfilValue ) + { + this.perfil = perfilValue; + } + + public Integer getTipo() + { + return tipo; + } + + public void setTipo(Integer tipoValue ) + { + this.tipo = tipoValue; + } + + public Integer getMultiplicador() + { + return multiplicador; + } + + public void setMultiplicador(Integer multiplicadorValue ) + { + this.multiplicador = multiplicadorValue; + } + + public Class getOuterClass() + { + return ExamesPerfisDataAuto.class; + } + + public ExamesPerfisDataAuto getOuterClassInstance() + { + ExamesPerfisDataAuto outerObj = new ExamesPerfisDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfisData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfisData.java new file mode 100644 index 00000000..f3926b39 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfisData.java @@ -0,0 +1,18 @@ +/* +* ExamesPerfisDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class ExamesPerfisData extends com.evolute.siprp.server.db.data.siprp_local3.ExamesPerfisDataAuto +{ + + public ExamesPerfisData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfisDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfisDataAuto.java new file mode 100644 index 00000000..75953d60 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfisDataAuto.java @@ -0,0 +1,178 @@ +/* +* ExamesPerfisDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class ExamesPerfisDataAuto extends JDOObject +{ + + public static final String TABLENAME = "exames_perfis"; + + public static final String ID = "id"; + public static final String ID_FULL = "exames_perfis.id"; + public static final String PERFIL = "perfil"; + public static final String PERFIL_FULL = "exames_perfis.perfil"; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "exames_perfis.tipo"; + public static final String TO_TIPO = "to tipo"; + public static final String MULTIPLICADOR = "multiplicador"; + public static final String MULTIPLICADOR_FULL = "exames_perfis.multiplicador"; + + public static final String FIELD_NAMES[] = new String[]{ + PERFIL, TIPO, TO_TIPO, MULTIPLICADOR, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, PERFIL, TIPO, MULTIPLICADOR, }; + + private Map dataHash; + + public ExamesPerfisDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getPerfil() + { + return (Integer) get(PERFIL); + } + + public void setPerfil(Integer perfilValue ) + { + this.set(PERFIL, perfilValue ); + } + + public Integer getTipo() + { + return (Integer) dataHash.get(TIPO); + } + + public void setTipo(Integer tipoValue ) + { + dataHash.put(TO_TIPO, null); + dataHash.put(TIPO, tipoValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompData toTipo() + throws Exception + { + if( dataHash.get(TO_TIPO) == null && getTipo() != null ) + { + dataHash.put(TO_TIPO, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompData.class, new Object[]{ getTipo() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompData) dataHash.get(TO_TIPO); + } + + public void setToTipo(com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompData tipoObject ) + { + if( tipoObject == null ) + { + dataHash.put(TIPO, null); + } + else + { + dataHash.put(TIPO, tipoObject.get( com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompData.ID )); + } + dataHash.put(TO_TIPO, tipoObject); + } + + public Integer getMultiplicador() + { + return (Integer) get(MULTIPLICADOR); + } + + public void setMultiplicador(Integer multiplicadorValue ) + { + this.set(MULTIPLICADOR, multiplicadorValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TIPO.equals( fieldName ) ) + { + value = getTipo(); + } + else if( TO_TIPO.equals( fieldName ) ) + { + value = toTipo(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TIPO.equals( fieldName ) ) + { + setTipo( (Integer) value ); + } + else if( TO_TIPO.equals( fieldName ) ) + { + setToTipo( (com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_TIPO) != null ) + { + toTipo().save(); + dataHash.put(TIPO, toTipo().get( com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return ExamesPerfis.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortaria.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortaria.java new file mode 100644 index 00000000..e02bd930 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortaria.java @@ -0,0 +1,129 @@ +/* +* ExamesPortaria.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class ExamesPortaria implements JDOInnerObject +{ + private Integer id; + private String portaria; + private java.sql.Timestamp data_entrada; + + public ExamesPortaria() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == ExamesPortariaDataAuto.ID ) + { + return id; + } + else if( fieldName == ExamesPortariaDataAuto.PORTARIA ) + { + return portaria; + } + else if( fieldName == ExamesPortariaDataAuto.DATA_ENTRADA ) + { + return data_entrada; + } + else if( fieldName.equals( ExamesPortariaDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( ExamesPortariaDataAuto.PORTARIA ) ) + { + return portaria; + } + else if( fieldName.equals( ExamesPortariaDataAuto.DATA_ENTRADA ) ) + { + return data_entrada; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == ExamesPortariaDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == ExamesPortariaDataAuto.PORTARIA ) + { + portaria = ( String ) value; + } + else if( fieldName == ExamesPortariaDataAuto.DATA_ENTRADA ) + { + data_entrada = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( ExamesPortariaDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( ExamesPortariaDataAuto.PORTARIA ) ) + { + portaria = ( String ) value; + } + else if( fieldName.equals( ExamesPortariaDataAuto.DATA_ENTRADA ) ) + { + data_entrada = ( java.sql.Timestamp ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getPortaria() + { + return portaria; + } + + public void setPortaria(String portariaValue ) + { + this.portaria = portariaValue; + } + + public java.sql.Timestamp getData_entrada() + { + return data_entrada; + } + + public void setData_entrada(java.sql.Timestamp data_entradaValue ) + { + this.data_entrada = data_entradaValue; + } + + public Class getOuterClass() + { + return ExamesPortariaDataAuto.class; + } + + public ExamesPortariaDataAuto getOuterClassInstance() + { + ExamesPortariaDataAuto outerObj = new ExamesPortariaDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortariaData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortariaData.java new file mode 100644 index 00000000..cada00a5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortariaData.java @@ -0,0 +1,18 @@ +/* +* ExamesPortariaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class ExamesPortariaData extends com.evolute.siprp.server.db.data.siprp_local3.ExamesPortariaDataAuto +{ + + public ExamesPortariaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortariaDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortariaDataAuto.java new file mode 100644 index 00000000..16c2c1c9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortariaDataAuto.java @@ -0,0 +1,107 @@ +/* +* ExamesPortariaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class ExamesPortariaDataAuto extends JDOObject +{ + + public static final String TABLENAME = "exames_portaria"; + + public static final String ID = "id"; + public static final String ID_FULL = "exames_portaria.id"; + public static final String PORTARIA = "portaria"; + public static final String PORTARIA_FULL = "exames_portaria.portaria"; + public static final String DATA_ENTRADA = "data_entrada"; + public static final String DATA_ENTRADA_FULL = "exames_portaria.data_entrada"; + + public static final String FIELD_NAMES[] = new String[]{ + PORTARIA, DATA_ENTRADA, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, PORTARIA, DATA_ENTRADA, }; + + private Map dataHash; + + public ExamesPortariaDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getPortaria() + { + return (String) get(PORTARIA); + } + + public void setPortaria(String portariaValue ) + { + this.set(PORTARIA, portariaValue ); + } + + public java.sql.Timestamp getData_entrada() + { + return (java.sql.Timestamp) get(DATA_ENTRADA); + } + + public void setData_entrada(java.sql.Timestamp data_entradaValue ) + { + this.set(DATA_ENTRADA, data_entradaValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return ExamesPortaria.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimento.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimento.java new file mode 100644 index 00000000..4c42d13b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimento.java @@ -0,0 +1,156 @@ +/* +* HistoricoEstabelecimento.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HistoricoEstabelecimento implements JDOInnerObject +{ + private Integer id; + private Integer estabelecimento_id; + private java.util.Date data; + private String texto; + + public HistoricoEstabelecimento() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HistoricoEstabelecimentoDataAuto.ID ) + { + return id; + } + else if( fieldName == HistoricoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) + { + return estabelecimento_id; + } + else if( fieldName == HistoricoEstabelecimentoDataAuto.DATA ) + { + return data; + } + else if( fieldName == HistoricoEstabelecimentoDataAuto.TEXTO ) + { + return texto; + } + else if( fieldName.equals( HistoricoEstabelecimentoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HistoricoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) ) + { + return estabelecimento_id; + } + else if( fieldName.equals( HistoricoEstabelecimentoDataAuto.DATA ) ) + { + return data; + } + else if( fieldName.equals( HistoricoEstabelecimentoDataAuto.TEXTO ) ) + { + return texto; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HistoricoEstabelecimentoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HistoricoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName == HistoricoEstabelecimentoDataAuto.DATA ) + { + data = ( java.util.Date ) value; + } + else if( fieldName == HistoricoEstabelecimentoDataAuto.TEXTO ) + { + texto = ( String ) value; + } + else if( fieldName.equals( HistoricoEstabelecimentoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HistoricoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName.equals( HistoricoEstabelecimentoDataAuto.DATA ) ) + { + data = ( java.util.Date ) value; + } + else if( fieldName.equals( HistoricoEstabelecimentoDataAuto.TEXTO ) ) + { + texto = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getEstabelecimento_id() + { + return estabelecimento_id; + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + this.estabelecimento_id = estabelecimento_idValue; + } + + public java.util.Date getData() + { + return data; + } + + public void setData(java.util.Date dataValue ) + { + this.data = dataValue; + } + + public String getTexto() + { + return texto; + } + + public void setTexto(String textoValue ) + { + this.texto = textoValue; + } + + public Class getOuterClass() + { + return HistoricoEstabelecimentoDataAuto.class; + } + + public HistoricoEstabelecimentoDataAuto getOuterClassInstance() + { + HistoricoEstabelecimentoDataAuto outerObj = new HistoricoEstabelecimentoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimentoData.java new file mode 100644 index 00000000..d4b80f87 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HistoricoEstabelecimentoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HistoricoEstabelecimentoData extends com.evolute.siprp.server.db.data.siprp_local3.HistoricoEstabelecimentoDataAuto +{ + + public HistoricoEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimentoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimentoDataAuto.java new file mode 100644 index 00000000..a73cdcf0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimentoDataAuto.java @@ -0,0 +1,178 @@ +/* +* HistoricoEstabelecimentoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HistoricoEstabelecimentoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "historico_estabelecimento"; + + public static final String ID = "id"; + public static final String ID_FULL = "historico_estabelecimento.id"; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "historico_estabelecimento.estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id"; + public static final String DATA = "data"; + public static final String DATA_FULL = "historico_estabelecimento.data"; + public static final String TEXTO = "texto"; + public static final String TEXTO_FULL = "historico_estabelecimento.texto"; + + public static final String FIELD_NAMES[] = new String[]{ + ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, DATA, TEXTO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, ESTABELECIMENTO_ID, DATA, TEXTO, }; + + private Map dataHash; + + public HistoricoEstabelecimentoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getEstabelecimento_id() + { + return (Integer) dataHash.get(ESTABELECIMENTO_ID); + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, null); + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id() + throws Exception + { + if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID); + } + + public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject ) + { + if( estabelecimento_idObject == null ) + { + dataHash.put(ESTABELECIMENTO_ID, null); + } + else + { + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject); + } + + public java.util.Date getData() + { + return (java.util.Date) get(DATA); + } + + public void setData(java.util.Date dataValue ) + { + this.set(DATA, dataValue ); + } + + public String getTexto() + { + return (String) get(TEXTO); + } + + public void setTexto(String textoValue ) + { + this.set(TEXTO, textoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = getEstabelecimento_id(); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = toEstabelecimento_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setEstabelecimento_id( (Integer) value ); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_ESTABELECIMENTO_ID) != null ) + { + toEstabelecimento_id().save(); + dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HistoricoEstabelecimento.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsArea.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsArea.java new file mode 100644 index 00000000..00a2b74b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsArea.java @@ -0,0 +1,183 @@ +/* +* HsArea.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsArea implements JDOInnerObject +{ + private Integer id; + private Integer empresa_id; + private String description; + private java.sql.Timestamp deleted_date; + private Integer ordem; + + public HsArea() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsAreaDataAuto.ID ) + { + return id; + } + else if( fieldName == HsAreaDataAuto.EMPRESA_ID ) + { + return empresa_id; + } + else if( fieldName == HsAreaDataAuto.DESCRIPTION ) + { + return description; + } + else if( fieldName == HsAreaDataAuto.DELETED_DATE ) + { + return deleted_date; + } + else if( fieldName == HsAreaDataAuto.ORDEM ) + { + return ordem; + } + else if( fieldName.equals( HsAreaDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsAreaDataAuto.EMPRESA_ID ) ) + { + return empresa_id; + } + else if( fieldName.equals( HsAreaDataAuto.DESCRIPTION ) ) + { + return description; + } + else if( fieldName.equals( HsAreaDataAuto.DELETED_DATE ) ) + { + return deleted_date; + } + else if( fieldName.equals( HsAreaDataAuto.ORDEM ) ) + { + return ordem; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsAreaDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsAreaDataAuto.EMPRESA_ID ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName == HsAreaDataAuto.DESCRIPTION ) + { + description = ( String ) value; + } + else if( fieldName == HsAreaDataAuto.DELETED_DATE ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName == HsAreaDataAuto.ORDEM ) + { + ordem = ( Integer ) value; + } + else if( fieldName.equals( HsAreaDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsAreaDataAuto.EMPRESA_ID ) ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName.equals( HsAreaDataAuto.DESCRIPTION ) ) + { + description = ( String ) value; + } + else if( fieldName.equals( HsAreaDataAuto.DELETED_DATE ) ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( HsAreaDataAuto.ORDEM ) ) + { + ordem = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getEmpresa_id() + { + return empresa_id; + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + this.empresa_id = empresa_idValue; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String descriptionValue ) + { + this.description = descriptionValue; + } + + public java.sql.Timestamp getDeleted_date() + { + return deleted_date; + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.deleted_date = deleted_dateValue; + } + + public Integer getOrdem() + { + return ordem; + } + + public void setOrdem(Integer ordemValue ) + { + this.ordem = ordemValue; + } + + public Class getOuterClass() + { + return HsAreaDataAuto.class; + } + + public HsAreaDataAuto getOuterClassInstance() + { + HsAreaDataAuto outerObj = new HsAreaDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsAreaData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsAreaData.java new file mode 100644 index 00000000..370274f8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsAreaData.java @@ -0,0 +1,18 @@ +/* +* HsAreaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsAreaData extends com.evolute.siprp.server.db.data.siprp_local3.HsAreaDataAuto +{ + + public HsAreaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsAreaDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsAreaDataAuto.java new file mode 100644 index 00000000..a3c1020c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsAreaDataAuto.java @@ -0,0 +1,190 @@ +/* +* HsAreaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsAreaDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_area"; + + public static final String ID = "id"; + public static final String ID_FULL = "hs_area.id"; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "hs_area.empresa_id"; + public static final String TO_EMPRESA_ID = "to empresa_id"; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_area.description"; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_area.deleted_date"; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "hs_area.ordem"; + + public static final String FIELD_NAMES[] = new String[]{ + EMPRESA_ID, TO_EMPRESA_ID, DESCRIPTION, DELETED_DATE, ORDEM, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, EMPRESA_ID, DESCRIPTION, DELETED_DATE, ORDEM, }; + + private Map dataHash; + + public HsAreaDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getEmpresa_id() + { + return (Integer) dataHash.get(EMPRESA_ID); + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + dataHash.put(TO_EMPRESA_ID, null); + dataHash.put(EMPRESA_ID, empresa_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EmpresasData toEmpresa_id() + throws Exception + { + if( dataHash.get(TO_EMPRESA_ID) == null && getEmpresa_id() != null ) + { + dataHash.put(TO_EMPRESA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.class, new Object[]{ getEmpresa_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) dataHash.get(TO_EMPRESA_ID); + } + + public void setToEmpresa_id(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData empresa_idObject ) + { + if( empresa_idObject == null ) + { + dataHash.put(EMPRESA_ID, null); + } + else + { + dataHash.put(EMPRESA_ID, empresa_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + dataHash.put(TO_EMPRESA_ID, empresa_idObject); + } + + public String getDescription() + { + return (String) get(DESCRIPTION); + } + + public void setDescription(String descriptionValue ) + { + this.set(DESCRIPTION, descriptionValue ); + } + + public java.sql.Timestamp getDeleted_date() + { + return (java.sql.Timestamp) get(DELETED_DATE); + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.set(DELETED_DATE, deleted_dateValue ); + } + + public Integer getOrdem() + { + return (Integer) get(ORDEM); + } + + public void setOrdem(Integer ordemValue ) + { + this.set(ORDEM, ordemValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_EMPRESA_ID.equals( fieldName ) ) + { + value = toEmpresa_id(); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + value = getEmpresa_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_EMPRESA_ID.equals( fieldName ) ) + { + setToEmpresa_id( (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) value ); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + setEmpresa_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_EMPRESA_ID) != null ) + { + toEmpresa_id().save(); + dataHash.put(EMPRESA_ID, toEmpresa_id().get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsArea.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmail.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmail.java new file mode 100644 index 00000000..47fe8c47 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmail.java @@ -0,0 +1,102 @@ +/* +* HsEmail.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsEmail implements JDOInnerObject +{ + private Integer id; + private String email; + + public HsEmail() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsEmailDataAuto.ID ) + { + return id; + } + else if( fieldName == HsEmailDataAuto.EMAIL ) + { + return email; + } + else if( fieldName.equals( HsEmailDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsEmailDataAuto.EMAIL ) ) + { + return email; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsEmailDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsEmailDataAuto.EMAIL ) + { + email = ( String ) value; + } + else if( fieldName.equals( HsEmailDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsEmailDataAuto.EMAIL ) ) + { + email = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getEmail() + { + return email; + } + + public void setEmail(String emailValue ) + { + this.email = emailValue; + } + + public Class getOuterClass() + { + return HsEmailDataAuto.class; + } + + public HsEmailDataAuto getOuterClassInstance() + { + HsEmailDataAuto outerObj = new HsEmailDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailData.java new file mode 100644 index 00000000..000d7e1e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailData.java @@ -0,0 +1,18 @@ +/* +* HsEmailDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsEmailData extends com.evolute.siprp.server.db.data.siprp_local3.HsEmailDataAuto +{ + + public HsEmailData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailDataAuto.java new file mode 100644 index 00000000..8ddaf5a9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailDataAuto.java @@ -0,0 +1,95 @@ +/* +* HsEmailDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsEmailDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_email"; + + public static final String ID = "id"; + public static final String ID_FULL = "hs_email.id"; + public static final String EMAIL = "email"; + public static final String EMAIL_FULL = "hs_email.email"; + + public static final String FIELD_NAMES[] = new String[]{ + EMAIL, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, EMAIL, }; + + private Map dataHash; + + public HsEmailDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getEmail() + { + return (String) get(EMAIL); + } + + public void setEmail(String emailValue ) + { + this.set(EMAIL, emailValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsEmail.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresa.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresa.java new file mode 100644 index 00000000..f1f6bd34 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresa.java @@ -0,0 +1,114 @@ +/* +* HsEmailEmpresa.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsEmailEmpresa implements JDOInnerObject +{ + private Integer email_id; + private Integer empresa_id; + + public HsEmailEmpresa() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsEmailEmpresaDataAuto.EMAIL_ID ) + { + return email_id; + } + else if( fieldName == HsEmailEmpresaDataAuto.EMPRESA_ID ) + { + return empresa_id; + } + else if( fieldName.equals( HsEmailEmpresaDataAuto.EMAIL_ID ) ) + { + return email_id; + } + else if( fieldName.equals( HsEmailEmpresaDataAuto.EMPRESA_ID ) ) + { + return empresa_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsEmailEmpresaDataAuto.EMAIL_ID ) + { + email_id = ( Integer ) value; + } + else if( fieldName == HsEmailEmpresaDataAuto.EMPRESA_ID ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName.equals( HsEmailEmpresaDataAuto.EMAIL_ID ) ) + { + email_id = ( Integer ) value; + } + else if( fieldName.equals( HsEmailEmpresaDataAuto.EMPRESA_ID ) ) + { + empresa_id = ( Integer ) value; + } + } + + public Integer getEmail_id() + { + return email_id; + } + + public void setEmail_id(Integer email_idValue ) + { + this.email_id = email_idValue; + } + + public Integer getEmpresa_id() + { + return empresa_id; + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + this.empresa_id = empresa_idValue; + } + + public Class getOuterClass() + { + return HsEmailEmpresaDataAuto.class; + } + + public HsEmailEmpresaDataAuto getOuterClassInstance() + { + HsEmailEmpresaDataAuto outerObj = new HsEmailEmpresaDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsEmailEmpresaID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsEmailEmpresaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsEmailEmpresaID(); + + Object obj; + obj = this.getEmail_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.email_id = (Integer)obj; + + obj = this.getEmpresa_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.empresa_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaData.java new file mode 100644 index 00000000..8d62e893 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaData.java @@ -0,0 +1,18 @@ +/* +* HsEmailEmpresaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsEmailEmpresaData extends com.evolute.siprp.server.db.data.siprp_local3.HsEmailEmpresaDataAuto +{ + + public HsEmailEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaDataAuto.java new file mode 100644 index 00000000..e62e029b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaDataAuto.java @@ -0,0 +1,213 @@ +/* +* HsEmailEmpresaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsEmailEmpresaDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_email_empresa"; + + public static final String EMAIL_ID = "email_id"; + public static final String EMAIL_ID_FULL = "hs_email_empresa.email_id"; + public static final String TO_EMAIL_ID = "to email_id"; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "hs_email_empresa.empresa_id"; + public static final String TO_EMPRESA_ID = "to empresa_id"; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + EMAIL_ID, EMPRESA_ID, }; + + private Map dataHash; + + public HsEmailEmpresaDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getEmail_id() + { + return (Integer) dataHash.get(EMAIL_ID); + } + + public void setEmail_id(Integer email_idValue ) + { + dataHash.put(TO_EMAIL_ID, null); + dataHash.put(EMAIL_ID, email_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsEmailData toEmail_id() + throws Exception + { + if( dataHash.get(TO_EMAIL_ID) == null && getEmail_id() != null ) + { + dataHash.put(TO_EMAIL_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsEmailData.class, new Object[]{ getEmail_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsEmailData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsEmailData) dataHash.get(TO_EMAIL_ID); + } + + public void setToEmail_id(com.evolute.siprp.server.db.data.siprp_local3.HsEmailData email_idObject ) + { + if( email_idObject == null ) + { + dataHash.put(EMAIL_ID, null); + } + else + { + dataHash.put(EMAIL_ID, email_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsEmailData.ID )); + } + dataHash.put(TO_EMAIL_ID, email_idObject); + } + + public Integer getEmpresa_id() + { + return (Integer) dataHash.get(EMPRESA_ID); + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + dataHash.put(TO_EMPRESA_ID, null); + dataHash.put(EMPRESA_ID, empresa_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EmpresasData toEmpresa_id() + throws Exception + { + if( dataHash.get(TO_EMPRESA_ID) == null && getEmpresa_id() != null ) + { + dataHash.put(TO_EMPRESA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.class, new Object[]{ getEmpresa_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) dataHash.get(TO_EMPRESA_ID); + } + + public void setToEmpresa_id(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData empresa_idObject ) + { + if( empresa_idObject == null ) + { + dataHash.put(EMPRESA_ID, null); + } + else + { + dataHash.put(EMPRESA_ID, empresa_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + dataHash.put(TO_EMPRESA_ID, empresa_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_EMAIL_ID.equals( fieldName ) ) + { + value = toEmail_id(); + } + else if( TO_EMPRESA_ID.equals( fieldName ) ) + { + value = toEmpresa_id(); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + value = getEmpresa_id(); + } + else if( EMAIL_ID.equals( fieldName ) ) + { + value = getEmail_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_EMAIL_ID.equals( fieldName ) ) + { + setToEmail_id( (com.evolute.siprp.server.db.data.siprp_local3.HsEmailData) value ); + } + else if( TO_EMPRESA_ID.equals( fieldName ) ) + { + setToEmpresa_id( (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) value ); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + setEmpresa_id( (Integer) value ); + } + else if( EMAIL_ID.equals( fieldName ) ) + { + setEmail_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_EMAIL_ID) != null ) + { + toEmail_id().save(); + dataHash.put(EMAIL_ID, toEmail_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsEmailData.ID )); + } + + if( dataHash.get(TO_EMPRESA_ID) != null ) + { + toEmpresa_id().save(); + dataHash.put(EMPRESA_ID, toEmpresa_id().get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsEmailEmpresa.class; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsEmailEmpresaID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsEmailEmpresaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsEmailEmpresaID(); + + Object obj; + obj = this.getEmail_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.email_id = (Integer)obj; + + obj = this.getEmpresa_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.empresa_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaID.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaID.java new file mode 100644 index 00000000..e91ca3af --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaID.java @@ -0,0 +1,37 @@ +/* +* HsEmailEmpresaID.java +* +* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import java.io.*; + +import com.evolute.utils.jdo.jpox.JDOIDClass; + +public final class HsEmailEmpresaID extends JDOIDClass implements Serializable +{ + public Integer email_id; + public Integer empresa_id; + + public HsEmailEmpresaID() + { + } + + + public Object[] getValue() + { + Object value[] = new Object[ 2 ]; + value[ 0 ] = email_id; + value[ 1 ] = empresa_id; + return value; + } + + public void setValues( Object values[] ) + { + email_id = (Integer) values[ 0 ]; + empresa_id = (Integer) values[ 1 ]; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimento.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimento.java new file mode 100644 index 00000000..72604cbd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimento.java @@ -0,0 +1,114 @@ +/* +* HsEmailEstabelecimento.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsEmailEstabelecimento implements JDOInnerObject +{ + private Integer email_id; + private Integer estabelecimento_id; + + public HsEmailEstabelecimento() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsEmailEstabelecimentoDataAuto.EMAIL_ID ) + { + return email_id; + } + else if( fieldName == HsEmailEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) + { + return estabelecimento_id; + } + else if( fieldName.equals( HsEmailEstabelecimentoDataAuto.EMAIL_ID ) ) + { + return email_id; + } + else if( fieldName.equals( HsEmailEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) ) + { + return estabelecimento_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsEmailEstabelecimentoDataAuto.EMAIL_ID ) + { + email_id = ( Integer ) value; + } + else if( fieldName == HsEmailEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName.equals( HsEmailEstabelecimentoDataAuto.EMAIL_ID ) ) + { + email_id = ( Integer ) value; + } + else if( fieldName.equals( HsEmailEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) ) + { + estabelecimento_id = ( Integer ) value; + } + } + + public Integer getEmail_id() + { + return email_id; + } + + public void setEmail_id(Integer email_idValue ) + { + this.email_id = email_idValue; + } + + public Integer getEstabelecimento_id() + { + return estabelecimento_id; + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + this.estabelecimento_id = estabelecimento_idValue; + } + + public Class getOuterClass() + { + return HsEmailEstabelecimentoDataAuto.class; + } + + public HsEmailEstabelecimentoDataAuto getOuterClassInstance() + { + HsEmailEstabelecimentoDataAuto outerObj = new HsEmailEstabelecimentoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsEmailEstabelecimentoID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsEmailEstabelecimentoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsEmailEstabelecimentoID(); + + Object obj; + obj = this.getEmail_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.email_id = (Integer)obj; + + obj = this.getEstabelecimento_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.estabelecimento_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoData.java new file mode 100644 index 00000000..61825778 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HsEmailEstabelecimentoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsEmailEstabelecimentoData extends com.evolute.siprp.server.db.data.siprp_local3.HsEmailEstabelecimentoDataAuto +{ + + public HsEmailEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoDataAuto.java new file mode 100644 index 00000000..a8148460 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoDataAuto.java @@ -0,0 +1,213 @@ +/* +* HsEmailEstabelecimentoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsEmailEstabelecimentoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_email_estabelecimento"; + + public static final String EMAIL_ID = "email_id"; + public static final String EMAIL_ID_FULL = "hs_email_estabelecimento.email_id"; + public static final String TO_EMAIL_ID = "to email_id"; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "hs_email_estabelecimento.estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id"; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + EMAIL_ID, ESTABELECIMENTO_ID, }; + + private Map dataHash; + + public HsEmailEstabelecimentoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getEmail_id() + { + return (Integer) dataHash.get(EMAIL_ID); + } + + public void setEmail_id(Integer email_idValue ) + { + dataHash.put(TO_EMAIL_ID, null); + dataHash.put(EMAIL_ID, email_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsEmailData toEmail_id() + throws Exception + { + if( dataHash.get(TO_EMAIL_ID) == null && getEmail_id() != null ) + { + dataHash.put(TO_EMAIL_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsEmailData.class, new Object[]{ getEmail_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsEmailData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsEmailData) dataHash.get(TO_EMAIL_ID); + } + + public void setToEmail_id(com.evolute.siprp.server.db.data.siprp_local3.HsEmailData email_idObject ) + { + if( email_idObject == null ) + { + dataHash.put(EMAIL_ID, null); + } + else + { + dataHash.put(EMAIL_ID, email_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsEmailData.ID )); + } + dataHash.put(TO_EMAIL_ID, email_idObject); + } + + public Integer getEstabelecimento_id() + { + return (Integer) dataHash.get(ESTABELECIMENTO_ID); + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, null); + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id() + throws Exception + { + if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID); + } + + public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject ) + { + if( estabelecimento_idObject == null ) + { + dataHash.put(ESTABELECIMENTO_ID, null); + } + else + { + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = getEstabelecimento_id(); + } + else if( TO_EMAIL_ID.equals( fieldName ) ) + { + value = toEmail_id(); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = toEstabelecimento_id(); + } + else if( EMAIL_ID.equals( fieldName ) ) + { + value = getEmail_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setEstabelecimento_id( (Integer) value ); + } + else if( TO_EMAIL_ID.equals( fieldName ) ) + { + setToEmail_id( (com.evolute.siprp.server.db.data.siprp_local3.HsEmailData) value ); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value ); + } + else if( EMAIL_ID.equals( fieldName ) ) + { + setEmail_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_EMAIL_ID) != null ) + { + toEmail_id().save(); + dataHash.put(EMAIL_ID, toEmail_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsEmailData.ID )); + } + + if( dataHash.get(TO_ESTABELECIMENTO_ID) != null ) + { + toEstabelecimento_id().save(); + dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsEmailEstabelecimento.class; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsEmailEstabelecimentoID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsEmailEstabelecimentoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsEmailEstabelecimentoID(); + + Object obj; + obj = this.getEmail_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.email_id = (Integer)obj; + + obj = this.getEstabelecimento_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.estabelecimento_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoID.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoID.java new file mode 100644 index 00000000..b446e70b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoID.java @@ -0,0 +1,37 @@ +/* +* HsEmailEstabelecimentoID.java +* +* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import java.io.*; + +import com.evolute.utils.jdo.jpox.JDOIDClass; + +public final class HsEmailEstabelecimentoID extends JDOIDClass implements Serializable +{ + public Integer email_id; + public Integer estabelecimento_id; + + public HsEmailEstabelecimentoID() + { + } + + + public Object[] getValue() + { + Object value[] = new Object[ 2 ]; + value[ 0 ] = email_id; + value[ 1 ] = estabelecimento_id; + return value; + } + + public void setValues( Object values[] ) + { + email_id = (Integer) values[ 0 ]; + estabelecimento_id = (Integer) values[ 1 ]; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamento.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamento.java new file mode 100644 index 00000000..93b1088e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamento.java @@ -0,0 +1,183 @@ +/* +* HsEquipamento.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsEquipamento implements JDOInnerObject +{ + private Integer id; + private String tipo; + private String marca; + private String modelo; + private java.sql.Timestamp deleted_date; + + public HsEquipamento() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsEquipamentoDataAuto.ID ) + { + return id; + } + else if( fieldName == HsEquipamentoDataAuto.TIPO ) + { + return tipo; + } + else if( fieldName == HsEquipamentoDataAuto.MARCA ) + { + return marca; + } + else if( fieldName == HsEquipamentoDataAuto.MODELO ) + { + return modelo; + } + else if( fieldName == HsEquipamentoDataAuto.DELETED_DATE ) + { + return deleted_date; + } + else if( fieldName.equals( HsEquipamentoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsEquipamentoDataAuto.TIPO ) ) + { + return tipo; + } + else if( fieldName.equals( HsEquipamentoDataAuto.MARCA ) ) + { + return marca; + } + else if( fieldName.equals( HsEquipamentoDataAuto.MODELO ) ) + { + return modelo; + } + else if( fieldName.equals( HsEquipamentoDataAuto.DELETED_DATE ) ) + { + return deleted_date; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsEquipamentoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsEquipamentoDataAuto.TIPO ) + { + tipo = ( String ) value; + } + else if( fieldName == HsEquipamentoDataAuto.MARCA ) + { + marca = ( String ) value; + } + else if( fieldName == HsEquipamentoDataAuto.MODELO ) + { + modelo = ( String ) value; + } + else if( fieldName == HsEquipamentoDataAuto.DELETED_DATE ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( HsEquipamentoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsEquipamentoDataAuto.TIPO ) ) + { + tipo = ( String ) value; + } + else if( fieldName.equals( HsEquipamentoDataAuto.MARCA ) ) + { + marca = ( String ) value; + } + else if( fieldName.equals( HsEquipamentoDataAuto.MODELO ) ) + { + modelo = ( String ) value; + } + else if( fieldName.equals( HsEquipamentoDataAuto.DELETED_DATE ) ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getTipo() + { + return tipo; + } + + public void setTipo(String tipoValue ) + { + this.tipo = tipoValue; + } + + public String getMarca() + { + return marca; + } + + public void setMarca(String marcaValue ) + { + this.marca = marcaValue; + } + + public String getModelo() + { + return modelo; + } + + public void setModelo(String modeloValue ) + { + this.modelo = modeloValue; + } + + public java.sql.Timestamp getDeleted_date() + { + return deleted_date; + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.deleted_date = deleted_dateValue; + } + + public Class getOuterClass() + { + return HsEquipamentoDataAuto.class; + } + + public HsEquipamentoDataAuto getOuterClassInstance() + { + HsEquipamentoDataAuto outerObj = new HsEquipamentoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamentoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamentoData.java new file mode 100644 index 00000000..e1bc0c8e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamentoData.java @@ -0,0 +1,18 @@ +/* +* HsEquipamentoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsEquipamentoData extends com.evolute.siprp.server.db.data.siprp_local3.HsEquipamentoDataAuto +{ + + public HsEquipamentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamentoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamentoDataAuto.java new file mode 100644 index 00000000..fff3d566 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamentoDataAuto.java @@ -0,0 +1,131 @@ +/* +* HsEquipamentoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsEquipamentoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_equipamento"; + + public static final String ID = "id"; + public static final String ID_FULL = "hs_equipamento.id"; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "hs_equipamento.tipo"; + public static final String MARCA = "marca"; + public static final String MARCA_FULL = "hs_equipamento.marca"; + public static final String MODELO = "modelo"; + public static final String MODELO_FULL = "hs_equipamento.modelo"; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_equipamento.deleted_date"; + + public static final String FIELD_NAMES[] = new String[]{ + TIPO, MARCA, MODELO, DELETED_DATE, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, TIPO, MARCA, MODELO, DELETED_DATE, }; + + private Map dataHash; + + public HsEquipamentoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getTipo() + { + return (String) get(TIPO); + } + + public void setTipo(String tipoValue ) + { + this.set(TIPO, tipoValue ); + } + + public String getMarca() + { + return (String) get(MARCA); + } + + public void setMarca(String marcaValue ) + { + this.set(MARCA, marcaValue ); + } + + public String getModelo() + { + return (String) get(MODELO); + } + + public void setModelo(String modeloValue ) + { + this.set(MODELO, modeloValue ); + } + + public java.sql.Timestamp getDeleted_date() + { + return (java.sql.Timestamp) get(DELETED_DATE); + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.set(DELETED_DATE, deleted_dateValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsEquipamento.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacao.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacao.java new file mode 100644 index 00000000..9d907180 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacao.java @@ -0,0 +1,156 @@ +/* +* HsLegislacao.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsLegislacao implements JDOInnerObject +{ + private Integer id; + private String description; + private Integer categoria_id; + private java.sql.Timestamp deleted_date; + + public HsLegislacao() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsLegislacaoDataAuto.ID ) + { + return id; + } + else if( fieldName == HsLegislacaoDataAuto.DESCRIPTION ) + { + return description; + } + else if( fieldName == HsLegislacaoDataAuto.CATEGORIA_ID ) + { + return categoria_id; + } + else if( fieldName == HsLegislacaoDataAuto.DELETED_DATE ) + { + return deleted_date; + } + else if( fieldName.equals( HsLegislacaoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsLegislacaoDataAuto.DESCRIPTION ) ) + { + return description; + } + else if( fieldName.equals( HsLegislacaoDataAuto.CATEGORIA_ID ) ) + { + return categoria_id; + } + else if( fieldName.equals( HsLegislacaoDataAuto.DELETED_DATE ) ) + { + return deleted_date; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsLegislacaoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsLegislacaoDataAuto.DESCRIPTION ) + { + description = ( String ) value; + } + else if( fieldName == HsLegislacaoDataAuto.CATEGORIA_ID ) + { + categoria_id = ( Integer ) value; + } + else if( fieldName == HsLegislacaoDataAuto.DELETED_DATE ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( HsLegislacaoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsLegislacaoDataAuto.DESCRIPTION ) ) + { + description = ( String ) value; + } + else if( fieldName.equals( HsLegislacaoDataAuto.CATEGORIA_ID ) ) + { + categoria_id = ( Integer ) value; + } + else if( fieldName.equals( HsLegislacaoDataAuto.DELETED_DATE ) ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String descriptionValue ) + { + this.description = descriptionValue; + } + + public Integer getCategoria_id() + { + return categoria_id; + } + + public void setCategoria_id(Integer categoria_idValue ) + { + this.categoria_id = categoria_idValue; + } + + public java.sql.Timestamp getDeleted_date() + { + return deleted_date; + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.deleted_date = deleted_dateValue; + } + + public Class getOuterClass() + { + return HsLegislacaoDataAuto.class; + } + + public HsLegislacaoDataAuto getOuterClassInstance() + { + HsLegislacaoDataAuto outerObj = new HsLegislacaoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoria.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoria.java new file mode 100644 index 00000000..b5a12d2e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoria.java @@ -0,0 +1,129 @@ +/* +* HsLegislacaoCategoria.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsLegislacaoCategoria implements JDOInnerObject +{ + private Integer id; + private String description; + private java.sql.Timestamp deleted_date; + + public HsLegislacaoCategoria() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsLegislacaoCategoriaDataAuto.ID ) + { + return id; + } + else if( fieldName == HsLegislacaoCategoriaDataAuto.DESCRIPTION ) + { + return description; + } + else if( fieldName == HsLegislacaoCategoriaDataAuto.DELETED_DATE ) + { + return deleted_date; + } + else if( fieldName.equals( HsLegislacaoCategoriaDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsLegislacaoCategoriaDataAuto.DESCRIPTION ) ) + { + return description; + } + else if( fieldName.equals( HsLegislacaoCategoriaDataAuto.DELETED_DATE ) ) + { + return deleted_date; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsLegislacaoCategoriaDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsLegislacaoCategoriaDataAuto.DESCRIPTION ) + { + description = ( String ) value; + } + else if( fieldName == HsLegislacaoCategoriaDataAuto.DELETED_DATE ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( HsLegislacaoCategoriaDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsLegislacaoCategoriaDataAuto.DESCRIPTION ) ) + { + description = ( String ) value; + } + else if( fieldName.equals( HsLegislacaoCategoriaDataAuto.DELETED_DATE ) ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String descriptionValue ) + { + this.description = descriptionValue; + } + + public java.sql.Timestamp getDeleted_date() + { + return deleted_date; + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.deleted_date = deleted_dateValue; + } + + public Class getOuterClass() + { + return HsLegislacaoCategoriaDataAuto.class; + } + + public HsLegislacaoCategoriaDataAuto getOuterClassInstance() + { + HsLegislacaoCategoriaDataAuto outerObj = new HsLegislacaoCategoriaDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoriaData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoriaData.java new file mode 100644 index 00000000..a67d8598 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoriaData.java @@ -0,0 +1,18 @@ +/* +* HsLegislacaoCategoriaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsLegislacaoCategoriaData extends com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaDataAuto +{ + + public HsLegislacaoCategoriaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoriaDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoriaDataAuto.java new file mode 100644 index 00000000..cac6f64d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoriaDataAuto.java @@ -0,0 +1,107 @@ +/* +* HsLegislacaoCategoriaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsLegislacaoCategoriaDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_legislacao_categoria"; + + public static final String ID = "id"; + public static final String ID_FULL = "hs_legislacao_categoria.id"; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_legislacao_categoria.description"; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_legislacao_categoria.deleted_date"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRIPTION, DELETED_DATE, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DESCRIPTION, DELETED_DATE, }; + + private Map dataHash; + + public HsLegislacaoCategoriaDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getDescription() + { + return (String) get(DESCRIPTION); + } + + public void setDescription(String descriptionValue ) + { + this.set(DESCRIPTION, descriptionValue ); + } + + public java.sql.Timestamp getDeleted_date() + { + return (java.sql.Timestamp) get(DELETED_DATE); + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.set(DELETED_DATE, deleted_dateValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsLegislacaoCategoria.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoData.java new file mode 100644 index 00000000..fa0fd18e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoData.java @@ -0,0 +1,18 @@ +/* +* HsLegislacaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsLegislacaoData extends com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoDataAuto +{ + + public HsLegislacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoDataAuto.java new file mode 100644 index 00000000..f5ba2806 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoDataAuto.java @@ -0,0 +1,178 @@ +/* +* HsLegislacaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsLegislacaoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_legislacao"; + + public static final String ID = "id"; + public static final String ID_FULL = "hs_legislacao.id"; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_legislacao.description"; + public static final String CATEGORIA_ID = "categoria_id"; + public static final String CATEGORIA_ID_FULL = "hs_legislacao.categoria_id"; + public static final String TO_CATEGORIA_ID = "to categoria_id"; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_legislacao.deleted_date"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRIPTION, CATEGORIA_ID, TO_CATEGORIA_ID, DELETED_DATE, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DESCRIPTION, CATEGORIA_ID, DELETED_DATE, }; + + private Map dataHash; + + public HsLegislacaoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getDescription() + { + return (String) get(DESCRIPTION); + } + + public void setDescription(String descriptionValue ) + { + this.set(DESCRIPTION, descriptionValue ); + } + + public Integer getCategoria_id() + { + return (Integer) dataHash.get(CATEGORIA_ID); + } + + public void setCategoria_id(Integer categoria_idValue ) + { + dataHash.put(TO_CATEGORIA_ID, null); + dataHash.put(CATEGORIA_ID, categoria_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaData toCategoria_id() + throws Exception + { + if( dataHash.get(TO_CATEGORIA_ID) == null && getCategoria_id() != null ) + { + dataHash.put(TO_CATEGORIA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaData.class, new Object[]{ getCategoria_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaData) dataHash.get(TO_CATEGORIA_ID); + } + + public void setToCategoria_id(com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaData categoria_idObject ) + { + if( categoria_idObject == null ) + { + dataHash.put(CATEGORIA_ID, null); + } + else + { + dataHash.put(CATEGORIA_ID, categoria_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaData.ID )); + } + dataHash.put(TO_CATEGORIA_ID, categoria_idObject); + } + + public java.sql.Timestamp getDeleted_date() + { + return (java.sql.Timestamp) get(DELETED_DATE); + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.set(DELETED_DATE, deleted_dateValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( CATEGORIA_ID.equals( fieldName ) ) + { + value = getCategoria_id(); + } + else if( TO_CATEGORIA_ID.equals( fieldName ) ) + { + value = toCategoria_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( CATEGORIA_ID.equals( fieldName ) ) + { + setCategoria_id( (Integer) value ); + } + else if( TO_CATEGORIA_ID.equals( fieldName ) ) + { + setToCategoria_id( (com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_CATEGORIA_ID) != null ) + { + toCategoria_id().save(); + dataHash.put(CATEGORIA_ID, toCategoria_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsLegislacao.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresa.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresa.java new file mode 100644 index 00000000..d924dd3a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresa.java @@ -0,0 +1,114 @@ +/* +* HsLegislacaoEmpresa.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsLegislacaoEmpresa implements JDOInnerObject +{ + private Integer legislacao_id; + private Integer empresa_id; + + public HsLegislacaoEmpresa() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsLegislacaoEmpresaDataAuto.LEGISLACAO_ID ) + { + return legislacao_id; + } + else if( fieldName == HsLegislacaoEmpresaDataAuto.EMPRESA_ID ) + { + return empresa_id; + } + else if( fieldName.equals( HsLegislacaoEmpresaDataAuto.LEGISLACAO_ID ) ) + { + return legislacao_id; + } + else if( fieldName.equals( HsLegislacaoEmpresaDataAuto.EMPRESA_ID ) ) + { + return empresa_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsLegislacaoEmpresaDataAuto.LEGISLACAO_ID ) + { + legislacao_id = ( Integer ) value; + } + else if( fieldName == HsLegislacaoEmpresaDataAuto.EMPRESA_ID ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName.equals( HsLegislacaoEmpresaDataAuto.LEGISLACAO_ID ) ) + { + legislacao_id = ( Integer ) value; + } + else if( fieldName.equals( HsLegislacaoEmpresaDataAuto.EMPRESA_ID ) ) + { + empresa_id = ( Integer ) value; + } + } + + public Integer getLegislacao_id() + { + return legislacao_id; + } + + public void setLegislacao_id(Integer legislacao_idValue ) + { + this.legislacao_id = legislacao_idValue; + } + + public Integer getEmpresa_id() + { + return empresa_id; + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + this.empresa_id = empresa_idValue; + } + + public Class getOuterClass() + { + return HsLegislacaoEmpresaDataAuto.class; + } + + public HsLegislacaoEmpresaDataAuto getOuterClassInstance() + { + HsLegislacaoEmpresaDataAuto outerObj = new HsLegislacaoEmpresaDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEmpresaID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEmpresaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEmpresaID(); + + Object obj; + obj = this.getLegislacao_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.legislacao_id = (Integer)obj; + + obj = this.getEmpresa_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.empresa_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaData.java new file mode 100644 index 00000000..a813f1e0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaData.java @@ -0,0 +1,18 @@ +/* +* HsLegislacaoEmpresaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsLegislacaoEmpresaData extends com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEmpresaDataAuto +{ + + public HsLegislacaoEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaDataAuto.java new file mode 100644 index 00000000..13eae314 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaDataAuto.java @@ -0,0 +1,213 @@ +/* +* HsLegislacaoEmpresaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsLegislacaoEmpresaDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_legislacao_empresa"; + + public static final String LEGISLACAO_ID = "legislacao_id"; + public static final String LEGISLACAO_ID_FULL = "hs_legislacao_empresa.legislacao_id"; + public static final String TO_LEGISLACAO_ID = "to legislacao_id"; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "hs_legislacao_empresa.empresa_id"; + public static final String TO_EMPRESA_ID = "to empresa_id"; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + LEGISLACAO_ID, EMPRESA_ID, }; + + private Map dataHash; + + public HsLegislacaoEmpresaDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getLegislacao_id() + { + return (Integer) dataHash.get(LEGISLACAO_ID); + } + + public void setLegislacao_id(Integer legislacao_idValue ) + { + dataHash.put(TO_LEGISLACAO_ID, null); + dataHash.put(LEGISLACAO_ID, legislacao_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData toLegislacao_id() + throws Exception + { + if( dataHash.get(TO_LEGISLACAO_ID) == null && getLegislacao_id() != null ) + { + dataHash.put(TO_LEGISLACAO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData.class, new Object[]{ getLegislacao_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData) dataHash.get(TO_LEGISLACAO_ID); + } + + public void setToLegislacao_id(com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData legislacao_idObject ) + { + if( legislacao_idObject == null ) + { + dataHash.put(LEGISLACAO_ID, null); + } + else + { + dataHash.put(LEGISLACAO_ID, legislacao_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData.ID )); + } + dataHash.put(TO_LEGISLACAO_ID, legislacao_idObject); + } + + public Integer getEmpresa_id() + { + return (Integer) dataHash.get(EMPRESA_ID); + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + dataHash.put(TO_EMPRESA_ID, null); + dataHash.put(EMPRESA_ID, empresa_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EmpresasData toEmpresa_id() + throws Exception + { + if( dataHash.get(TO_EMPRESA_ID) == null && getEmpresa_id() != null ) + { + dataHash.put(TO_EMPRESA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.class, new Object[]{ getEmpresa_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) dataHash.get(TO_EMPRESA_ID); + } + + public void setToEmpresa_id(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData empresa_idObject ) + { + if( empresa_idObject == null ) + { + dataHash.put(EMPRESA_ID, null); + } + else + { + dataHash.put(EMPRESA_ID, empresa_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + dataHash.put(TO_EMPRESA_ID, empresa_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_LEGISLACAO_ID.equals( fieldName ) ) + { + value = toLegislacao_id(); + } + else if( TO_EMPRESA_ID.equals( fieldName ) ) + { + value = toEmpresa_id(); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + value = getEmpresa_id(); + } + else if( LEGISLACAO_ID.equals( fieldName ) ) + { + value = getLegislacao_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_LEGISLACAO_ID.equals( fieldName ) ) + { + setToLegislacao_id( (com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData) value ); + } + else if( TO_EMPRESA_ID.equals( fieldName ) ) + { + setToEmpresa_id( (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) value ); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + setEmpresa_id( (Integer) value ); + } + else if( LEGISLACAO_ID.equals( fieldName ) ) + { + setLegislacao_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_LEGISLACAO_ID) != null ) + { + toLegislacao_id().save(); + dataHash.put(LEGISLACAO_ID, toLegislacao_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData.ID )); + } + + if( dataHash.get(TO_EMPRESA_ID) != null ) + { + toEmpresa_id().save(); + dataHash.put(EMPRESA_ID, toEmpresa_id().get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsLegislacaoEmpresa.class; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEmpresaID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEmpresaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEmpresaID(); + + Object obj; + obj = this.getLegislacao_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.legislacao_id = (Integer)obj; + + obj = this.getEmpresa_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.empresa_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaID.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaID.java new file mode 100644 index 00000000..434b5896 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaID.java @@ -0,0 +1,37 @@ +/* +* HsLegislacaoEmpresaID.java +* +* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import java.io.*; + +import com.evolute.utils.jdo.jpox.JDOIDClass; + +public final class HsLegislacaoEmpresaID extends JDOIDClass implements Serializable +{ + public Integer legislacao_id; + public Integer empresa_id; + + public HsLegislacaoEmpresaID() + { + } + + + public Object[] getValue() + { + Object value[] = new Object[ 2 ]; + value[ 0 ] = legislacao_id; + value[ 1 ] = empresa_id; + return value; + } + + public void setValues( Object values[] ) + { + legislacao_id = (Integer) values[ 0 ]; + empresa_id = (Integer) values[ 1 ]; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimento.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimento.java new file mode 100644 index 00000000..1cfe7a33 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimento.java @@ -0,0 +1,141 @@ +/* +* HsLegislacaoEstabelecimento.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsLegislacaoEstabelecimento implements JDOInnerObject +{ + private Integer legislacao_id; + private Integer estabelecimento_id; + private Integer ordem; + + public HsLegislacaoEstabelecimento() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsLegislacaoEstabelecimentoDataAuto.LEGISLACAO_ID ) + { + return legislacao_id; + } + else if( fieldName == HsLegislacaoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) + { + return estabelecimento_id; + } + else if( fieldName == HsLegislacaoEstabelecimentoDataAuto.ORDEM ) + { + return ordem; + } + else if( fieldName.equals( HsLegislacaoEstabelecimentoDataAuto.LEGISLACAO_ID ) ) + { + return legislacao_id; + } + else if( fieldName.equals( HsLegislacaoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) ) + { + return estabelecimento_id; + } + else if( fieldName.equals( HsLegislacaoEstabelecimentoDataAuto.ORDEM ) ) + { + return ordem; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsLegislacaoEstabelecimentoDataAuto.LEGISLACAO_ID ) + { + legislacao_id = ( Integer ) value; + } + else if( fieldName == HsLegislacaoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName == HsLegislacaoEstabelecimentoDataAuto.ORDEM ) + { + ordem = ( Integer ) value; + } + else if( fieldName.equals( HsLegislacaoEstabelecimentoDataAuto.LEGISLACAO_ID ) ) + { + legislacao_id = ( Integer ) value; + } + else if( fieldName.equals( HsLegislacaoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName.equals( HsLegislacaoEstabelecimentoDataAuto.ORDEM ) ) + { + ordem = ( Integer ) value; + } + } + + public Integer getLegislacao_id() + { + return legislacao_id; + } + + public void setLegislacao_id(Integer legislacao_idValue ) + { + this.legislacao_id = legislacao_idValue; + } + + public Integer getEstabelecimento_id() + { + return estabelecimento_id; + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + this.estabelecimento_id = estabelecimento_idValue; + } + + public Integer getOrdem() + { + return ordem; + } + + public void setOrdem(Integer ordemValue ) + { + this.ordem = ordemValue; + } + + public Class getOuterClass() + { + return HsLegislacaoEstabelecimentoDataAuto.class; + } + + public HsLegislacaoEstabelecimentoDataAuto getOuterClassInstance() + { + HsLegislacaoEstabelecimentoDataAuto outerObj = new HsLegislacaoEstabelecimentoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEstabelecimentoID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEstabelecimentoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEstabelecimentoID(); + + Object obj; + obj = this.getLegislacao_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.legislacao_id = (Integer)obj; + + obj = this.getEstabelecimento_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.estabelecimento_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoData.java new file mode 100644 index 00000000..1b59d4b5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HsLegislacaoEstabelecimentoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsLegislacaoEstabelecimentoData extends com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEstabelecimentoDataAuto +{ + + public HsLegislacaoEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoDataAuto.java new file mode 100644 index 00000000..3a80bb57 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoDataAuto.java @@ -0,0 +1,225 @@ +/* +* HsLegislacaoEstabelecimentoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsLegislacaoEstabelecimentoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_legislacao_estabelecimento"; + + public static final String LEGISLACAO_ID = "legislacao_id"; + public static final String LEGISLACAO_ID_FULL = "hs_legislacao_estabelecimento.legislacao_id"; + public static final String TO_LEGISLACAO_ID = "to legislacao_id"; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "hs_legislacao_estabelecimento.estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id"; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "hs_legislacao_estabelecimento.ordem"; + + public static final String FIELD_NAMES[] = new String[]{ + ORDEM, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + LEGISLACAO_ID, ESTABELECIMENTO_ID, ORDEM, }; + + private Map dataHash; + + public HsLegislacaoEstabelecimentoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getLegislacao_id() + { + return (Integer) dataHash.get(LEGISLACAO_ID); + } + + public void setLegislacao_id(Integer legislacao_idValue ) + { + dataHash.put(TO_LEGISLACAO_ID, null); + dataHash.put(LEGISLACAO_ID, legislacao_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData toLegislacao_id() + throws Exception + { + if( dataHash.get(TO_LEGISLACAO_ID) == null && getLegislacao_id() != null ) + { + dataHash.put(TO_LEGISLACAO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData.class, new Object[]{ getLegislacao_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData) dataHash.get(TO_LEGISLACAO_ID); + } + + public void setToLegislacao_id(com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData legislacao_idObject ) + { + if( legislacao_idObject == null ) + { + dataHash.put(LEGISLACAO_ID, null); + } + else + { + dataHash.put(LEGISLACAO_ID, legislacao_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData.ID )); + } + dataHash.put(TO_LEGISLACAO_ID, legislacao_idObject); + } + + public Integer getEstabelecimento_id() + { + return (Integer) dataHash.get(ESTABELECIMENTO_ID); + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, null); + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id() + throws Exception + { + if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID); + } + + public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject ) + { + if( estabelecimento_idObject == null ) + { + dataHash.put(ESTABELECIMENTO_ID, null); + } + else + { + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject); + } + + public Integer getOrdem() + { + return (Integer) get(ORDEM); + } + + public void setOrdem(Integer ordemValue ) + { + this.set(ORDEM, ordemValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = getEstabelecimento_id(); + } + else if( TO_LEGISLACAO_ID.equals( fieldName ) ) + { + value = toLegislacao_id(); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = toEstabelecimento_id(); + } + else if( LEGISLACAO_ID.equals( fieldName ) ) + { + value = getLegislacao_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setEstabelecimento_id( (Integer) value ); + } + else if( TO_LEGISLACAO_ID.equals( fieldName ) ) + { + setToLegislacao_id( (com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData) value ); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value ); + } + else if( LEGISLACAO_ID.equals( fieldName ) ) + { + setLegislacao_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_LEGISLACAO_ID) != null ) + { + toLegislacao_id().save(); + dataHash.put(LEGISLACAO_ID, toLegislacao_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData.ID )); + } + + if( dataHash.get(TO_ESTABELECIMENTO_ID) != null ) + { + toEstabelecimento_id().save(); + dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsLegislacaoEstabelecimento.class; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEstabelecimentoID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEstabelecimentoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEstabelecimentoID(); + + Object obj; + obj = this.getLegislacao_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.legislacao_id = (Integer)obj; + + obj = this.getEstabelecimento_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.estabelecimento_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoID.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoID.java new file mode 100644 index 00000000..4458495b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoID.java @@ -0,0 +1,37 @@ +/* +* HsLegislacaoEstabelecimentoID.java +* +* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import java.io.*; + +import com.evolute.utils.jdo.jpox.JDOIDClass; + +public final class HsLegislacaoEstabelecimentoID extends JDOIDClass implements Serializable +{ + public Integer legislacao_id; + public Integer estabelecimento_id; + + public HsLegislacaoEstabelecimentoID() + { + } + + + public Object[] getValue() + { + Object value[] = new Object[ 2 ]; + value[ 0 ] = legislacao_id; + value[ 1 ] = estabelecimento_id; + return value; + } + + public void setValues( Object values[] ) + { + legislacao_id = (Integer) values[ 0 ]; + estabelecimento_id = (Integer) values[ 1 ]; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedida.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedida.java new file mode 100644 index 00000000..c7ca53da --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedida.java @@ -0,0 +1,156 @@ +/* +* HsMedida.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsMedida implements JDOInnerObject +{ + private Integer id; + private String description; + private String requesitos_legais; + private java.sql.Timestamp deleted_date; + + public HsMedida() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsMedidaDataAuto.ID ) + { + return id; + } + else if( fieldName == HsMedidaDataAuto.DESCRIPTION ) + { + return description; + } + else if( fieldName == HsMedidaDataAuto.REQUESITOS_LEGAIS ) + { + return requesitos_legais; + } + else if( fieldName == HsMedidaDataAuto.DELETED_DATE ) + { + return deleted_date; + } + else if( fieldName.equals( HsMedidaDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsMedidaDataAuto.DESCRIPTION ) ) + { + return description; + } + else if( fieldName.equals( HsMedidaDataAuto.REQUESITOS_LEGAIS ) ) + { + return requesitos_legais; + } + else if( fieldName.equals( HsMedidaDataAuto.DELETED_DATE ) ) + { + return deleted_date; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsMedidaDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsMedidaDataAuto.DESCRIPTION ) + { + description = ( String ) value; + } + else if( fieldName == HsMedidaDataAuto.REQUESITOS_LEGAIS ) + { + requesitos_legais = ( String ) value; + } + else if( fieldName == HsMedidaDataAuto.DELETED_DATE ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( HsMedidaDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsMedidaDataAuto.DESCRIPTION ) ) + { + description = ( String ) value; + } + else if( fieldName.equals( HsMedidaDataAuto.REQUESITOS_LEGAIS ) ) + { + requesitos_legais = ( String ) value; + } + else if( fieldName.equals( HsMedidaDataAuto.DELETED_DATE ) ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String descriptionValue ) + { + this.description = descriptionValue; + } + + public String getRequesitos_legais() + { + return requesitos_legais; + } + + public void setRequesitos_legais(String requesitos_legaisValue ) + { + this.requesitos_legais = requesitos_legaisValue; + } + + public java.sql.Timestamp getDeleted_date() + { + return deleted_date; + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.deleted_date = deleted_dateValue; + } + + public Class getOuterClass() + { + return HsMedidaDataAuto.class; + } + + public HsMedidaDataAuto getOuterClassInstance() + { + HsMedidaDataAuto outerObj = new HsMedidaDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedidaData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedidaData.java new file mode 100644 index 00000000..a8633b3e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsMedidaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsMedidaData extends com.evolute.siprp.server.db.data.siprp_local3.HsMedidaDataAuto +{ + + public HsMedidaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedidaDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedidaDataAuto.java new file mode 100644 index 00000000..cb1fe621 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedidaDataAuto.java @@ -0,0 +1,119 @@ +/* +* HsMedidaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsMedidaDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_medida"; + + public static final String ID = "id"; + public static final String ID_FULL = "hs_medida.id"; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_medida.description"; + public static final String REQUESITOS_LEGAIS = "requesitos_legais"; + public static final String REQUESITOS_LEGAIS_FULL = "hs_medida.requesitos_legais"; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_medida.deleted_date"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRIPTION, REQUESITOS_LEGAIS, DELETED_DATE, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DESCRIPTION, REQUESITOS_LEGAIS, DELETED_DATE, }; + + private Map dataHash; + + public HsMedidaDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getDescription() + { + return (String) get(DESCRIPTION); + } + + public void setDescription(String descriptionValue ) + { + this.set(DESCRIPTION, descriptionValue ); + } + + public String getRequesitos_legais() + { + return (String) get(REQUESITOS_LEGAIS); + } + + public void setRequesitos_legais(String requesitos_legaisValue ) + { + this.set(REQUESITOS_LEGAIS, requesitos_legaisValue ); + } + + public java.sql.Timestamp getDeleted_date() + { + return (java.sql.Timestamp) get(DELETED_DATE); + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.set(DELETED_DATE, deleted_dateValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsMedida.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacao.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacao.java new file mode 100644 index 00000000..ad7d6895 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacao.java @@ -0,0 +1,183 @@ +/* +* HsNormalizacao.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsNormalizacao implements JDOInnerObject +{ + private Integer id; + private String codigo; + private String descricao; + private Boolean portuguesa; + private java.sql.Timestamp deleted_date; + + public HsNormalizacao() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsNormalizacaoDataAuto.ID ) + { + return id; + } + else if( fieldName == HsNormalizacaoDataAuto.CODIGO ) + { + return codigo; + } + else if( fieldName == HsNormalizacaoDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == HsNormalizacaoDataAuto.PORTUGUESA ) + { + return portuguesa; + } + else if( fieldName == HsNormalizacaoDataAuto.DELETED_DATE ) + { + return deleted_date; + } + else if( fieldName.equals( HsNormalizacaoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsNormalizacaoDataAuto.CODIGO ) ) + { + return codigo; + } + else if( fieldName.equals( HsNormalizacaoDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( HsNormalizacaoDataAuto.PORTUGUESA ) ) + { + return portuguesa; + } + else if( fieldName.equals( HsNormalizacaoDataAuto.DELETED_DATE ) ) + { + return deleted_date; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsNormalizacaoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsNormalizacaoDataAuto.CODIGO ) + { + codigo = ( String ) value; + } + else if( fieldName == HsNormalizacaoDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == HsNormalizacaoDataAuto.PORTUGUESA ) + { + portuguesa = ( Boolean ) value; + } + else if( fieldName == HsNormalizacaoDataAuto.DELETED_DATE ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( HsNormalizacaoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsNormalizacaoDataAuto.CODIGO ) ) + { + codigo = ( String ) value; + } + else if( fieldName.equals( HsNormalizacaoDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( HsNormalizacaoDataAuto.PORTUGUESA ) ) + { + portuguesa = ( Boolean ) value; + } + else if( fieldName.equals( HsNormalizacaoDataAuto.DELETED_DATE ) ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getCodigo() + { + return codigo; + } + + public void setCodigo(String codigoValue ) + { + this.codigo = codigoValue; + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public Boolean getPortuguesa() + { + return portuguesa; + } + + public void setPortuguesa(Boolean portuguesaValue ) + { + this.portuguesa = portuguesaValue; + } + + public java.sql.Timestamp getDeleted_date() + { + return deleted_date; + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.deleted_date = deleted_dateValue; + } + + public Class getOuterClass() + { + return HsNormalizacaoDataAuto.class; + } + + public HsNormalizacaoDataAuto getOuterClassInstance() + { + HsNormalizacaoDataAuto outerObj = new HsNormalizacaoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoData.java new file mode 100644 index 00000000..4f3994c2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoData.java @@ -0,0 +1,18 @@ +/* +* HsNormalizacaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsNormalizacaoData extends com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoDataAuto +{ + + public HsNormalizacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoDataAuto.java new file mode 100644 index 00000000..24cb1ffa --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoDataAuto.java @@ -0,0 +1,131 @@ +/* +* HsNormalizacaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsNormalizacaoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_normalizacao"; + + public static final String ID = "id"; + public static final String ID_FULL = "hs_normalizacao.id"; + public static final String CODIGO = "codigo"; + public static final String CODIGO_FULL = "hs_normalizacao.codigo"; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "hs_normalizacao.descricao"; + public static final String PORTUGUESA = "portuguesa"; + public static final String PORTUGUESA_FULL = "hs_normalizacao.portuguesa"; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_normalizacao.deleted_date"; + + public static final String FIELD_NAMES[] = new String[]{ + CODIGO, DESCRICAO, PORTUGUESA, DELETED_DATE, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, CODIGO, DESCRICAO, PORTUGUESA, DELETED_DATE, }; + + private Map dataHash; + + public HsNormalizacaoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getCodigo() + { + return (String) get(CODIGO); + } + + public void setCodigo(String codigoValue ) + { + this.set(CODIGO, codigoValue ); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public Boolean getPortuguesa() + { + return (Boolean) get(PORTUGUESA); + } + + public void setPortuguesa(Boolean portuguesaValue ) + { + this.set(PORTUGUESA, portuguesaValue ); + } + + public java.sql.Timestamp getDeleted_date() + { + return (java.sql.Timestamp) get(DELETED_DATE); + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.set(DELETED_DATE, deleted_dateValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsNormalizacao.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresa.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresa.java new file mode 100644 index 00000000..f37ffcbc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresa.java @@ -0,0 +1,114 @@ +/* +* HsNormalizacaoEmpresa.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsNormalizacaoEmpresa implements JDOInnerObject +{ + private Integer normalizacao_id; + private Integer empresa_id; + + public HsNormalizacaoEmpresa() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsNormalizacaoEmpresaDataAuto.NORMALIZACAO_ID ) + { + return normalizacao_id; + } + else if( fieldName == HsNormalizacaoEmpresaDataAuto.EMPRESA_ID ) + { + return empresa_id; + } + else if( fieldName.equals( HsNormalizacaoEmpresaDataAuto.NORMALIZACAO_ID ) ) + { + return normalizacao_id; + } + else if( fieldName.equals( HsNormalizacaoEmpresaDataAuto.EMPRESA_ID ) ) + { + return empresa_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsNormalizacaoEmpresaDataAuto.NORMALIZACAO_ID ) + { + normalizacao_id = ( Integer ) value; + } + else if( fieldName == HsNormalizacaoEmpresaDataAuto.EMPRESA_ID ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName.equals( HsNormalizacaoEmpresaDataAuto.NORMALIZACAO_ID ) ) + { + normalizacao_id = ( Integer ) value; + } + else if( fieldName.equals( HsNormalizacaoEmpresaDataAuto.EMPRESA_ID ) ) + { + empresa_id = ( Integer ) value; + } + } + + public Integer getNormalizacao_id() + { + return normalizacao_id; + } + + public void setNormalizacao_id(Integer normalizacao_idValue ) + { + this.normalizacao_id = normalizacao_idValue; + } + + public Integer getEmpresa_id() + { + return empresa_id; + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + this.empresa_id = empresa_idValue; + } + + public Class getOuterClass() + { + return HsNormalizacaoEmpresaDataAuto.class; + } + + public HsNormalizacaoEmpresaDataAuto getOuterClassInstance() + { + HsNormalizacaoEmpresaDataAuto outerObj = new HsNormalizacaoEmpresaDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEmpresaID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEmpresaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEmpresaID(); + + Object obj; + obj = this.getNormalizacao_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.normalizacao_id = (Integer)obj; + + obj = this.getEmpresa_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.empresa_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaData.java new file mode 100644 index 00000000..5ac28c2b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaData.java @@ -0,0 +1,18 @@ +/* +* HsNormalizacaoEmpresaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsNormalizacaoEmpresaData extends com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEmpresaDataAuto +{ + + public HsNormalizacaoEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaDataAuto.java new file mode 100644 index 00000000..d93ea9ab --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaDataAuto.java @@ -0,0 +1,213 @@ +/* +* HsNormalizacaoEmpresaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsNormalizacaoEmpresaDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_normalizacao_empresa"; + + public static final String NORMALIZACAO_ID = "normalizacao_id"; + public static final String NORMALIZACAO_ID_FULL = "hs_normalizacao_empresa.normalizacao_id"; + public static final String TO_NORMALIZACAO_ID = "to normalizacao_id"; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "hs_normalizacao_empresa.empresa_id"; + public static final String TO_EMPRESA_ID = "to empresa_id"; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + NORMALIZACAO_ID, EMPRESA_ID, }; + + private Map dataHash; + + public HsNormalizacaoEmpresaDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getNormalizacao_id() + { + return (Integer) dataHash.get(NORMALIZACAO_ID); + } + + public void setNormalizacao_id(Integer normalizacao_idValue ) + { + dataHash.put(TO_NORMALIZACAO_ID, null); + dataHash.put(NORMALIZACAO_ID, normalizacao_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData toNormalizacao_id() + throws Exception + { + if( dataHash.get(TO_NORMALIZACAO_ID) == null && getNormalizacao_id() != null ) + { + dataHash.put(TO_NORMALIZACAO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData.class, new Object[]{ getNormalizacao_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData) dataHash.get(TO_NORMALIZACAO_ID); + } + + public void setToNormalizacao_id(com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData normalizacao_idObject ) + { + if( normalizacao_idObject == null ) + { + dataHash.put(NORMALIZACAO_ID, null); + } + else + { + dataHash.put(NORMALIZACAO_ID, normalizacao_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData.ID )); + } + dataHash.put(TO_NORMALIZACAO_ID, normalizacao_idObject); + } + + public Integer getEmpresa_id() + { + return (Integer) dataHash.get(EMPRESA_ID); + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + dataHash.put(TO_EMPRESA_ID, null); + dataHash.put(EMPRESA_ID, empresa_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EmpresasData toEmpresa_id() + throws Exception + { + if( dataHash.get(TO_EMPRESA_ID) == null && getEmpresa_id() != null ) + { + dataHash.put(TO_EMPRESA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.class, new Object[]{ getEmpresa_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) dataHash.get(TO_EMPRESA_ID); + } + + public void setToEmpresa_id(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData empresa_idObject ) + { + if( empresa_idObject == null ) + { + dataHash.put(EMPRESA_ID, null); + } + else + { + dataHash.put(EMPRESA_ID, empresa_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + dataHash.put(TO_EMPRESA_ID, empresa_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_EMPRESA_ID.equals( fieldName ) ) + { + value = toEmpresa_id(); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + value = getEmpresa_id(); + } + else if( NORMALIZACAO_ID.equals( fieldName ) ) + { + value = getNormalizacao_id(); + } + else if( TO_NORMALIZACAO_ID.equals( fieldName ) ) + { + value = toNormalizacao_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_EMPRESA_ID.equals( fieldName ) ) + { + setToEmpresa_id( (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) value ); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + setEmpresa_id( (Integer) value ); + } + else if( NORMALIZACAO_ID.equals( fieldName ) ) + { + setNormalizacao_id( (Integer) value ); + } + else if( TO_NORMALIZACAO_ID.equals( fieldName ) ) + { + setToNormalizacao_id( (com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_NORMALIZACAO_ID) != null ) + { + toNormalizacao_id().save(); + dataHash.put(NORMALIZACAO_ID, toNormalizacao_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData.ID )); + } + + if( dataHash.get(TO_EMPRESA_ID) != null ) + { + toEmpresa_id().save(); + dataHash.put(EMPRESA_ID, toEmpresa_id().get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsNormalizacaoEmpresa.class; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEmpresaID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEmpresaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEmpresaID(); + + Object obj; + obj = this.getNormalizacao_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.normalizacao_id = (Integer)obj; + + obj = this.getEmpresa_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.empresa_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaID.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaID.java new file mode 100644 index 00000000..1a6529b1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaID.java @@ -0,0 +1,37 @@ +/* +* HsNormalizacaoEmpresaID.java +* +* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import java.io.*; + +import com.evolute.utils.jdo.jpox.JDOIDClass; + +public final class HsNormalizacaoEmpresaID extends JDOIDClass implements Serializable +{ + public Integer normalizacao_id; + public Integer empresa_id; + + public HsNormalizacaoEmpresaID() + { + } + + + public Object[] getValue() + { + Object value[] = new Object[ 2 ]; + value[ 0 ] = normalizacao_id; + value[ 1 ] = empresa_id; + return value; + } + + public void setValues( Object values[] ) + { + normalizacao_id = (Integer) values[ 0 ]; + empresa_id = (Integer) values[ 1 ]; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimento.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimento.java new file mode 100644 index 00000000..97fb0089 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimento.java @@ -0,0 +1,114 @@ +/* +* HsNormalizacaoEstabelecimento.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsNormalizacaoEstabelecimento implements JDOInnerObject +{ + private Integer normalizacao_id; + private Integer estabelecimento_id; + + public HsNormalizacaoEstabelecimento() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsNormalizacaoEstabelecimentoDataAuto.NORMALIZACAO_ID ) + { + return normalizacao_id; + } + else if( fieldName == HsNormalizacaoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) + { + return estabelecimento_id; + } + else if( fieldName.equals( HsNormalizacaoEstabelecimentoDataAuto.NORMALIZACAO_ID ) ) + { + return normalizacao_id; + } + else if( fieldName.equals( HsNormalizacaoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) ) + { + return estabelecimento_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsNormalizacaoEstabelecimentoDataAuto.NORMALIZACAO_ID ) + { + normalizacao_id = ( Integer ) value; + } + else if( fieldName == HsNormalizacaoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName.equals( HsNormalizacaoEstabelecimentoDataAuto.NORMALIZACAO_ID ) ) + { + normalizacao_id = ( Integer ) value; + } + else if( fieldName.equals( HsNormalizacaoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) ) + { + estabelecimento_id = ( Integer ) value; + } + } + + public Integer getNormalizacao_id() + { + return normalizacao_id; + } + + public void setNormalizacao_id(Integer normalizacao_idValue ) + { + this.normalizacao_id = normalizacao_idValue; + } + + public Integer getEstabelecimento_id() + { + return estabelecimento_id; + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + this.estabelecimento_id = estabelecimento_idValue; + } + + public Class getOuterClass() + { + return HsNormalizacaoEstabelecimentoDataAuto.class; + } + + public HsNormalizacaoEstabelecimentoDataAuto getOuterClassInstance() + { + HsNormalizacaoEstabelecimentoDataAuto outerObj = new HsNormalizacaoEstabelecimentoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEstabelecimentoID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEstabelecimentoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEstabelecimentoID(); + + Object obj; + obj = this.getNormalizacao_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.normalizacao_id = (Integer)obj; + + obj = this.getEstabelecimento_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.estabelecimento_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoData.java new file mode 100644 index 00000000..f3343c7a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HsNormalizacaoEstabelecimentoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsNormalizacaoEstabelecimentoData extends com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEstabelecimentoDataAuto +{ + + public HsNormalizacaoEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoDataAuto.java new file mode 100644 index 00000000..d0074e2d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoDataAuto.java @@ -0,0 +1,213 @@ +/* +* HsNormalizacaoEstabelecimentoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsNormalizacaoEstabelecimentoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_normalizacao_estabelecimento"; + + public static final String NORMALIZACAO_ID = "normalizacao_id"; + public static final String NORMALIZACAO_ID_FULL = "hs_normalizacao_estabelecimento.normalizacao_id"; + public static final String TO_NORMALIZACAO_ID = "to normalizacao_id"; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "hs_normalizacao_estabelecimento.estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id"; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + NORMALIZACAO_ID, ESTABELECIMENTO_ID, }; + + private Map dataHash; + + public HsNormalizacaoEstabelecimentoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getNormalizacao_id() + { + return (Integer) dataHash.get(NORMALIZACAO_ID); + } + + public void setNormalizacao_id(Integer normalizacao_idValue ) + { + dataHash.put(TO_NORMALIZACAO_ID, null); + dataHash.put(NORMALIZACAO_ID, normalizacao_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData toNormalizacao_id() + throws Exception + { + if( dataHash.get(TO_NORMALIZACAO_ID) == null && getNormalizacao_id() != null ) + { + dataHash.put(TO_NORMALIZACAO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData.class, new Object[]{ getNormalizacao_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData) dataHash.get(TO_NORMALIZACAO_ID); + } + + public void setToNormalizacao_id(com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData normalizacao_idObject ) + { + if( normalizacao_idObject == null ) + { + dataHash.put(NORMALIZACAO_ID, null); + } + else + { + dataHash.put(NORMALIZACAO_ID, normalizacao_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData.ID )); + } + dataHash.put(TO_NORMALIZACAO_ID, normalizacao_idObject); + } + + public Integer getEstabelecimento_id() + { + return (Integer) dataHash.get(ESTABELECIMENTO_ID); + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, null); + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id() + throws Exception + { + if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID); + } + + public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject ) + { + if( estabelecimento_idObject == null ) + { + dataHash.put(ESTABELECIMENTO_ID, null); + } + else + { + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = getEstabelecimento_id(); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = toEstabelecimento_id(); + } + else if( NORMALIZACAO_ID.equals( fieldName ) ) + { + value = getNormalizacao_id(); + } + else if( TO_NORMALIZACAO_ID.equals( fieldName ) ) + { + value = toNormalizacao_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setEstabelecimento_id( (Integer) value ); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value ); + } + else if( NORMALIZACAO_ID.equals( fieldName ) ) + { + setNormalizacao_id( (Integer) value ); + } + else if( TO_NORMALIZACAO_ID.equals( fieldName ) ) + { + setToNormalizacao_id( (com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_NORMALIZACAO_ID) != null ) + { + toNormalizacao_id().save(); + dataHash.put(NORMALIZACAO_ID, toNormalizacao_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData.ID )); + } + + if( dataHash.get(TO_ESTABELECIMENTO_ID) != null ) + { + toEstabelecimento_id().save(); + dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsNormalizacaoEstabelecimento.class; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEstabelecimentoID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEstabelecimentoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEstabelecimentoID(); + + Object obj; + obj = this.getNormalizacao_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.normalizacao_id = (Integer)obj; + + obj = this.getEstabelecimento_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.estabelecimento_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoID.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoID.java new file mode 100644 index 00000000..76fbd4ae --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoID.java @@ -0,0 +1,37 @@ +/* +* HsNormalizacaoEstabelecimentoID.java +* +* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import java.io.*; + +import com.evolute.utils.jdo.jpox.JDOIDClass; + +public final class HsNormalizacaoEstabelecimentoID extends JDOIDClass implements Serializable +{ + public Integer normalizacao_id; + public Integer estabelecimento_id; + + public HsNormalizacaoEstabelecimentoID() + { + } + + + public Object[] getValue() + { + Object value[] = new Object[ 2 ]; + value[ 0 ] = normalizacao_id; + value[ 1 ] = estabelecimento_id; + return value; + } + + public void setValues( Object values[] ) + { + normalizacao_id = (Integer) values[ 0 ]; + estabelecimento_id = (Integer) values[ 1 ]; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPosto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPosto.java new file mode 100644 index 00000000..8a45fd18 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPosto.java @@ -0,0 +1,183 @@ +/* +* HsPosto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsPosto implements JDOInnerObject +{ + private Integer id; + private Integer area_id; + private String description; + private java.sql.Timestamp deleted_date; + private Boolean is_principal; + + public HsPosto() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsPostoDataAuto.ID ) + { + return id; + } + else if( fieldName == HsPostoDataAuto.AREA_ID ) + { + return area_id; + } + else if( fieldName == HsPostoDataAuto.DESCRIPTION ) + { + return description; + } + else if( fieldName == HsPostoDataAuto.DELETED_DATE ) + { + return deleted_date; + } + else if( fieldName == HsPostoDataAuto.IS_PRINCIPAL ) + { + return is_principal; + } + else if( fieldName.equals( HsPostoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsPostoDataAuto.AREA_ID ) ) + { + return area_id; + } + else if( fieldName.equals( HsPostoDataAuto.DESCRIPTION ) ) + { + return description; + } + else if( fieldName.equals( HsPostoDataAuto.DELETED_DATE ) ) + { + return deleted_date; + } + else if( fieldName.equals( HsPostoDataAuto.IS_PRINCIPAL ) ) + { + return is_principal; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsPostoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsPostoDataAuto.AREA_ID ) + { + area_id = ( Integer ) value; + } + else if( fieldName == HsPostoDataAuto.DESCRIPTION ) + { + description = ( String ) value; + } + else if( fieldName == HsPostoDataAuto.DELETED_DATE ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName == HsPostoDataAuto.IS_PRINCIPAL ) + { + is_principal = ( Boolean ) value; + } + else if( fieldName.equals( HsPostoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsPostoDataAuto.AREA_ID ) ) + { + area_id = ( Integer ) value; + } + else if( fieldName.equals( HsPostoDataAuto.DESCRIPTION ) ) + { + description = ( String ) value; + } + else if( fieldName.equals( HsPostoDataAuto.DELETED_DATE ) ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( HsPostoDataAuto.IS_PRINCIPAL ) ) + { + is_principal = ( Boolean ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getArea_id() + { + return area_id; + } + + public void setArea_id(Integer area_idValue ) + { + this.area_id = area_idValue; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String descriptionValue ) + { + this.description = descriptionValue; + } + + public java.sql.Timestamp getDeleted_date() + { + return deleted_date; + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.deleted_date = deleted_dateValue; + } + + public Boolean getIs_principal() + { + return is_principal; + } + + public void setIs_principal(Boolean is_principalValue ) + { + this.is_principal = is_principalValue; + } + + public Class getOuterClass() + { + return HsPostoDataAuto.class; + } + + public HsPostoDataAuto getOuterClassInstance() + { + HsPostoDataAuto outerObj = new HsPostoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoData.java new file mode 100644 index 00000000..3097ac5a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoData.java @@ -0,0 +1,18 @@ +/* +* HsPostoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsPostoData extends com.evolute.siprp.server.db.data.siprp_local3.HsPostoDataAuto +{ + + public HsPostoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoDataAuto.java new file mode 100644 index 00000000..5842bb3d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoDataAuto.java @@ -0,0 +1,190 @@ +/* +* HsPostoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsPostoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_posto"; + + public static final String ID = "id"; + public static final String ID_FULL = "hs_posto.id"; + public static final String AREA_ID = "area_id"; + public static final String AREA_ID_FULL = "hs_posto.area_id"; + public static final String TO_AREA_ID = "to area_id"; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_posto.description"; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_posto.deleted_date"; + public static final String IS_PRINCIPAL = "is_principal"; + public static final String IS_PRINCIPAL_FULL = "hs_posto.is_principal"; + + public static final String FIELD_NAMES[] = new String[]{ + AREA_ID, TO_AREA_ID, DESCRIPTION, DELETED_DATE, IS_PRINCIPAL, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, AREA_ID, DESCRIPTION, DELETED_DATE, IS_PRINCIPAL, }; + + private Map dataHash; + + public HsPostoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getArea_id() + { + return (Integer) dataHash.get(AREA_ID); + } + + public void setArea_id(Integer area_idValue ) + { + dataHash.put(TO_AREA_ID, null); + dataHash.put(AREA_ID, area_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsAreaData toArea_id() + throws Exception + { + if( dataHash.get(TO_AREA_ID) == null && getArea_id() != null ) + { + dataHash.put(TO_AREA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsAreaData.class, new Object[]{ getArea_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsAreaData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsAreaData) dataHash.get(TO_AREA_ID); + } + + public void setToArea_id(com.evolute.siprp.server.db.data.siprp_local3.HsAreaData area_idObject ) + { + if( area_idObject == null ) + { + dataHash.put(AREA_ID, null); + } + else + { + dataHash.put(AREA_ID, area_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsAreaData.ID )); + } + dataHash.put(TO_AREA_ID, area_idObject); + } + + public String getDescription() + { + return (String) get(DESCRIPTION); + } + + public void setDescription(String descriptionValue ) + { + this.set(DESCRIPTION, descriptionValue ); + } + + public java.sql.Timestamp getDeleted_date() + { + return (java.sql.Timestamp) get(DELETED_DATE); + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.set(DELETED_DATE, deleted_dateValue ); + } + + public Boolean getIs_principal() + { + return (Boolean) get(IS_PRINCIPAL); + } + + public void setIs_principal(Boolean is_principalValue ) + { + this.set(IS_PRINCIPAL, is_principalValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_AREA_ID.equals( fieldName ) ) + { + value = toArea_id(); + } + else if( AREA_ID.equals( fieldName ) ) + { + value = getArea_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_AREA_ID.equals( fieldName ) ) + { + setToArea_id( (com.evolute.siprp.server.db.data.siprp_local3.HsAreaData) value ); + } + else if( AREA_ID.equals( fieldName ) ) + { + setArea_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_AREA_ID) != null ) + { + toArea_id().save(); + dataHash.put(AREA_ID, toArea_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsAreaData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsPosto.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimento.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimento.java new file mode 100644 index 00000000..ae1afd80 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimento.java @@ -0,0 +1,114 @@ +/* +* HsPostoEstabelecimento.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsPostoEstabelecimento implements JDOInnerObject +{ + private Integer posto_id; + private Integer estabelecimento_id; + + public HsPostoEstabelecimento() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsPostoEstabelecimentoDataAuto.POSTO_ID ) + { + return posto_id; + } + else if( fieldName == HsPostoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) + { + return estabelecimento_id; + } + else if( fieldName.equals( HsPostoEstabelecimentoDataAuto.POSTO_ID ) ) + { + return posto_id; + } + else if( fieldName.equals( HsPostoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) ) + { + return estabelecimento_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsPostoEstabelecimentoDataAuto.POSTO_ID ) + { + posto_id = ( Integer ) value; + } + else if( fieldName == HsPostoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName.equals( HsPostoEstabelecimentoDataAuto.POSTO_ID ) ) + { + posto_id = ( Integer ) value; + } + else if( fieldName.equals( HsPostoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) ) + { + estabelecimento_id = ( Integer ) value; + } + } + + public Integer getPosto_id() + { + return posto_id; + } + + public void setPosto_id(Integer posto_idValue ) + { + this.posto_id = posto_idValue; + } + + public Integer getEstabelecimento_id() + { + return estabelecimento_id; + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + this.estabelecimento_id = estabelecimento_idValue; + } + + public Class getOuterClass() + { + return HsPostoEstabelecimentoDataAuto.class; + } + + public HsPostoEstabelecimentoDataAuto getOuterClassInstance() + { + HsPostoEstabelecimentoDataAuto outerObj = new HsPostoEstabelecimentoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsPostoEstabelecimentoID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsPostoEstabelecimentoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsPostoEstabelecimentoID(); + + Object obj; + obj = this.getPosto_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.posto_id = (Integer)obj; + + obj = this.getEstabelecimento_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.estabelecimento_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoData.java new file mode 100644 index 00000000..988cf403 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HsPostoEstabelecimentoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsPostoEstabelecimentoData extends com.evolute.siprp.server.db.data.siprp_local3.HsPostoEstabelecimentoDataAuto +{ + + public HsPostoEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoDataAuto.java new file mode 100644 index 00000000..caa1037d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoDataAuto.java @@ -0,0 +1,213 @@ +/* +* HsPostoEstabelecimentoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsPostoEstabelecimentoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_posto_estabelecimento"; + + public static final String POSTO_ID = "posto_id"; + public static final String POSTO_ID_FULL = "hs_posto_estabelecimento.posto_id"; + public static final String TO_POSTO_ID = "to posto_id"; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "hs_posto_estabelecimento.estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id"; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + POSTO_ID, ESTABELECIMENTO_ID, }; + + private Map dataHash; + + public HsPostoEstabelecimentoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getPosto_id() + { + return (Integer) dataHash.get(POSTO_ID); + } + + public void setPosto_id(Integer posto_idValue ) + { + dataHash.put(TO_POSTO_ID, null); + dataHash.put(POSTO_ID, posto_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsPostoData toPosto_id() + throws Exception + { + if( dataHash.get(TO_POSTO_ID) == null && getPosto_id() != null ) + { + dataHash.put(TO_POSTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.class, new Object[]{ getPosto_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsPostoData) dataHash.get(TO_POSTO_ID); + } + + public void setToPosto_id(com.evolute.siprp.server.db.data.siprp_local3.HsPostoData posto_idObject ) + { + if( posto_idObject == null ) + { + dataHash.put(POSTO_ID, null); + } + else + { + dataHash.put(POSTO_ID, posto_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID )); + } + dataHash.put(TO_POSTO_ID, posto_idObject); + } + + public Integer getEstabelecimento_id() + { + return (Integer) dataHash.get(ESTABELECIMENTO_ID); + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, null); + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id() + throws Exception + { + if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID); + } + + public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject ) + { + if( estabelecimento_idObject == null ) + { + dataHash.put(ESTABELECIMENTO_ID, null); + } + else + { + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_POSTO_ID.equals( fieldName ) ) + { + value = toPosto_id(); + } + else if( POSTO_ID.equals( fieldName ) ) + { + value = getPosto_id(); + } + else if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = getEstabelecimento_id(); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = toEstabelecimento_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_POSTO_ID.equals( fieldName ) ) + { + setToPosto_id( (com.evolute.siprp.server.db.data.siprp_local3.HsPostoData) value ); + } + else if( POSTO_ID.equals( fieldName ) ) + { + setPosto_id( (Integer) value ); + } + else if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setEstabelecimento_id( (Integer) value ); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_POSTO_ID) != null ) + { + toPosto_id().save(); + dataHash.put(POSTO_ID, toPosto_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID )); + } + + if( dataHash.get(TO_ESTABELECIMENTO_ID) != null ) + { + toEstabelecimento_id().save(); + dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsPostoEstabelecimento.class; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsPostoEstabelecimentoID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsPostoEstabelecimentoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsPostoEstabelecimentoID(); + + Object obj; + obj = this.getPosto_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.posto_id = (Integer)obj; + + obj = this.getEstabelecimento_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.estabelecimento_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoID.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoID.java new file mode 100644 index 00000000..444f59d1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoID.java @@ -0,0 +1,37 @@ +/* +* HsPostoEstabelecimentoID.java +* +* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import java.io.*; + +import com.evolute.utils.jdo.jpox.JDOIDClass; + +public final class HsPostoEstabelecimentoID extends JDOIDClass implements Serializable +{ + public Integer posto_id; + public Integer estabelecimento_id; + + public HsPostoEstabelecimentoID() + { + } + + + public Object[] getValue() + { + Object value[] = new Object[ 2 ]; + value[ 0 ] = posto_id; + value[ 1 ] = estabelecimento_id; + return value; + } + + public void setValues( Object values[] ) + { + posto_id = (Integer) values[ 0 ]; + estabelecimento_id = (Integer) values[ 1 ]; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedida.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedida.java new file mode 100644 index 00000000..b1340cca --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedida.java @@ -0,0 +1,114 @@ +/* +* HsPostoMedida.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsPostoMedida implements JDOInnerObject +{ + private Integer posto_id; + private Integer medida_id; + + public HsPostoMedida() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsPostoMedidaDataAuto.POSTO_ID ) + { + return posto_id; + } + else if( fieldName == HsPostoMedidaDataAuto.MEDIDA_ID ) + { + return medida_id; + } + else if( fieldName.equals( HsPostoMedidaDataAuto.POSTO_ID ) ) + { + return posto_id; + } + else if( fieldName.equals( HsPostoMedidaDataAuto.MEDIDA_ID ) ) + { + return medida_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsPostoMedidaDataAuto.POSTO_ID ) + { + posto_id = ( Integer ) value; + } + else if( fieldName == HsPostoMedidaDataAuto.MEDIDA_ID ) + { + medida_id = ( Integer ) value; + } + else if( fieldName.equals( HsPostoMedidaDataAuto.POSTO_ID ) ) + { + posto_id = ( Integer ) value; + } + else if( fieldName.equals( HsPostoMedidaDataAuto.MEDIDA_ID ) ) + { + medida_id = ( Integer ) value; + } + } + + public Integer getPosto_id() + { + return posto_id; + } + + public void setPosto_id(Integer posto_idValue ) + { + this.posto_id = posto_idValue; + } + + public Integer getMedida_id() + { + return medida_id; + } + + public void setMedida_id(Integer medida_idValue ) + { + this.medida_id = medida_idValue; + } + + public Class getOuterClass() + { + return HsPostoMedidaDataAuto.class; + } + + public HsPostoMedidaDataAuto getOuterClassInstance() + { + HsPostoMedidaDataAuto outerObj = new HsPostoMedidaDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsPostoMedidaID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsPostoMedidaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsPostoMedidaID(); + + Object obj; + obj = this.getPosto_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.posto_id = (Integer)obj; + + obj = this.getMedida_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.medida_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaData.java new file mode 100644 index 00000000..508f7f12 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsPostoMedidaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsPostoMedidaData extends com.evolute.siprp.server.db.data.siprp_local3.HsPostoMedidaDataAuto +{ + + public HsPostoMedidaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaDataAuto.java new file mode 100644 index 00000000..daeb7a9a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaDataAuto.java @@ -0,0 +1,213 @@ +/* +* HsPostoMedidaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsPostoMedidaDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_posto_medida"; + + public static final String POSTO_ID = "posto_id"; + public static final String POSTO_ID_FULL = "hs_posto_medida.posto_id"; + public static final String TO_POSTO_ID = "to posto_id"; + public static final String MEDIDA_ID = "medida_id"; + public static final String MEDIDA_ID_FULL = "hs_posto_medida.medida_id"; + public static final String TO_MEDIDA_ID = "to medida_id"; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + POSTO_ID, MEDIDA_ID, }; + + private Map dataHash; + + public HsPostoMedidaDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getPosto_id() + { + return (Integer) dataHash.get(POSTO_ID); + } + + public void setPosto_id(Integer posto_idValue ) + { + dataHash.put(TO_POSTO_ID, null); + dataHash.put(POSTO_ID, posto_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsPostoData toPosto_id() + throws Exception + { + if( dataHash.get(TO_POSTO_ID) == null && getPosto_id() != null ) + { + dataHash.put(TO_POSTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.class, new Object[]{ getPosto_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsPostoData) dataHash.get(TO_POSTO_ID); + } + + public void setToPosto_id(com.evolute.siprp.server.db.data.siprp_local3.HsPostoData posto_idObject ) + { + if( posto_idObject == null ) + { + dataHash.put(POSTO_ID, null); + } + else + { + dataHash.put(POSTO_ID, posto_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID )); + } + dataHash.put(TO_POSTO_ID, posto_idObject); + } + + public Integer getMedida_id() + { + return (Integer) dataHash.get(MEDIDA_ID); + } + + public void setMedida_id(Integer medida_idValue ) + { + dataHash.put(TO_MEDIDA_ID, null); + dataHash.put(MEDIDA_ID, medida_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData toMedida_id() + throws Exception + { + if( dataHash.get(TO_MEDIDA_ID) == null && getMedida_id() != null ) + { + dataHash.put(TO_MEDIDA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData.class, new Object[]{ getMedida_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData) dataHash.get(TO_MEDIDA_ID); + } + + public void setToMedida_id(com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData medida_idObject ) + { + if( medida_idObject == null ) + { + dataHash.put(MEDIDA_ID, null); + } + else + { + dataHash.put(MEDIDA_ID, medida_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData.ID )); + } + dataHash.put(TO_MEDIDA_ID, medida_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_POSTO_ID.equals( fieldName ) ) + { + value = toPosto_id(); + } + else if( POSTO_ID.equals( fieldName ) ) + { + value = getPosto_id(); + } + else if( MEDIDA_ID.equals( fieldName ) ) + { + value = getMedida_id(); + } + else if( TO_MEDIDA_ID.equals( fieldName ) ) + { + value = toMedida_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_POSTO_ID.equals( fieldName ) ) + { + setToPosto_id( (com.evolute.siprp.server.db.data.siprp_local3.HsPostoData) value ); + } + else if( POSTO_ID.equals( fieldName ) ) + { + setPosto_id( (Integer) value ); + } + else if( MEDIDA_ID.equals( fieldName ) ) + { + setMedida_id( (Integer) value ); + } + else if( TO_MEDIDA_ID.equals( fieldName ) ) + { + setToMedida_id( (com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_POSTO_ID) != null ) + { + toPosto_id().save(); + dataHash.put(POSTO_ID, toPosto_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID )); + } + + if( dataHash.get(TO_MEDIDA_ID) != null ) + { + toMedida_id().save(); + dataHash.put(MEDIDA_ID, toMedida_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsPostoMedida.class; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsPostoMedidaID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsPostoMedidaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsPostoMedidaID(); + + Object obj; + obj = this.getPosto_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.posto_id = (Integer)obj; + + obj = this.getMedida_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.medida_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaID.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaID.java new file mode 100644 index 00000000..788d3ad8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaID.java @@ -0,0 +1,37 @@ +/* +* HsPostoMedidaID.java +* +* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import java.io.*; + +import com.evolute.utils.jdo.jpox.JDOIDClass; + +public final class HsPostoMedidaID extends JDOIDClass implements Serializable +{ + public Integer posto_id; + public Integer medida_id; + + public HsPostoMedidaID() + { + } + + + public Object[] getValue() + { + Object value[] = new Object[ 2 ]; + value[ 0 ] = posto_id; + value[ 1 ] = medida_id; + return value; + } + + public void setValues( Object values[] ) + { + posto_id = (Integer) values[ 0 ]; + medida_id = (Integer) values[ 1 ]; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRisco.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRisco.java new file mode 100644 index 00000000..3f0ebc14 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRisco.java @@ -0,0 +1,249 @@ +/* +* HsPostoRisco.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsPostoRisco implements JDOInnerObject +{ + private Integer posto_id; + private Integer risco_id; + private Integer probabilidade; + private Integer severidade; + private Integer valor_qualitativo; + private String is_plano_actuacao; + private Integer ordem; + + public HsPostoRisco() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsPostoRiscoDataAuto.POSTO_ID ) + { + return posto_id; + } + else if( fieldName == HsPostoRiscoDataAuto.RISCO_ID ) + { + return risco_id; + } + else if( fieldName == HsPostoRiscoDataAuto.PROBABILIDADE ) + { + return probabilidade; + } + else if( fieldName == HsPostoRiscoDataAuto.SEVERIDADE ) + { + return severidade; + } + else if( fieldName == HsPostoRiscoDataAuto.VALOR_QUALITATIVO ) + { + return valor_qualitativo; + } + else if( fieldName == HsPostoRiscoDataAuto.IS_PLANO_ACTUACAO ) + { + return is_plano_actuacao; + } + else if( fieldName == HsPostoRiscoDataAuto.ORDEM ) + { + return ordem; + } + else if( fieldName.equals( HsPostoRiscoDataAuto.POSTO_ID ) ) + { + return posto_id; + } + else if( fieldName.equals( HsPostoRiscoDataAuto.RISCO_ID ) ) + { + return risco_id; + } + else if( fieldName.equals( HsPostoRiscoDataAuto.PROBABILIDADE ) ) + { + return probabilidade; + } + else if( fieldName.equals( HsPostoRiscoDataAuto.SEVERIDADE ) ) + { + return severidade; + } + else if( fieldName.equals( HsPostoRiscoDataAuto.VALOR_QUALITATIVO ) ) + { + return valor_qualitativo; + } + else if( fieldName.equals( HsPostoRiscoDataAuto.IS_PLANO_ACTUACAO ) ) + { + return is_plano_actuacao; + } + else if( fieldName.equals( HsPostoRiscoDataAuto.ORDEM ) ) + { + return ordem; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsPostoRiscoDataAuto.POSTO_ID ) + { + posto_id = ( Integer ) value; + } + else if( fieldName == HsPostoRiscoDataAuto.RISCO_ID ) + { + risco_id = ( Integer ) value; + } + else if( fieldName == HsPostoRiscoDataAuto.PROBABILIDADE ) + { + probabilidade = ( Integer ) value; + } + else if( fieldName == HsPostoRiscoDataAuto.SEVERIDADE ) + { + severidade = ( Integer ) value; + } + else if( fieldName == HsPostoRiscoDataAuto.VALOR_QUALITATIVO ) + { + valor_qualitativo = ( Integer ) value; + } + else if( fieldName == HsPostoRiscoDataAuto.IS_PLANO_ACTUACAO ) + { + is_plano_actuacao = ( String ) value; + } + else if( fieldName == HsPostoRiscoDataAuto.ORDEM ) + { + ordem = ( Integer ) value; + } + else if( fieldName.equals( HsPostoRiscoDataAuto.POSTO_ID ) ) + { + posto_id = ( Integer ) value; + } + else if( fieldName.equals( HsPostoRiscoDataAuto.RISCO_ID ) ) + { + risco_id = ( Integer ) value; + } + else if( fieldName.equals( HsPostoRiscoDataAuto.PROBABILIDADE ) ) + { + probabilidade = ( Integer ) value; + } + else if( fieldName.equals( HsPostoRiscoDataAuto.SEVERIDADE ) ) + { + severidade = ( Integer ) value; + } + else if( fieldName.equals( HsPostoRiscoDataAuto.VALOR_QUALITATIVO ) ) + { + valor_qualitativo = ( Integer ) value; + } + else if( fieldName.equals( HsPostoRiscoDataAuto.IS_PLANO_ACTUACAO ) ) + { + is_plano_actuacao = ( String ) value; + } + else if( fieldName.equals( HsPostoRiscoDataAuto.ORDEM ) ) + { + ordem = ( Integer ) value; + } + } + + public Integer getPosto_id() + { + return posto_id; + } + + public void setPosto_id(Integer posto_idValue ) + { + this.posto_id = posto_idValue; + } + + public Integer getRisco_id() + { + return risco_id; + } + + public void setRisco_id(Integer risco_idValue ) + { + this.risco_id = risco_idValue; + } + + public Integer getProbabilidade() + { + return probabilidade; + } + + public void setProbabilidade(Integer probabilidadeValue ) + { + this.probabilidade = probabilidadeValue; + } + + public Integer getSeveridade() + { + return severidade; + } + + public void setSeveridade(Integer severidadeValue ) + { + this.severidade = severidadeValue; + } + + public Integer getValor_qualitativo() + { + return valor_qualitativo; + } + + public void setValor_qualitativo(Integer valor_qualitativoValue ) + { + this.valor_qualitativo = valor_qualitativoValue; + } + + public String getIs_plano_actuacao() + { + return is_plano_actuacao; + } + + public void setIs_plano_actuacao(String is_plano_actuacaoValue ) + { + this.is_plano_actuacao = is_plano_actuacaoValue; + } + + public Integer getOrdem() + { + return ordem; + } + + public void setOrdem(Integer ordemValue ) + { + this.ordem = ordemValue; + } + + public Class getOuterClass() + { + return HsPostoRiscoDataAuto.class; + } + + public HsPostoRiscoDataAuto getOuterClassInstance() + { + HsPostoRiscoDataAuto outerObj = new HsPostoRiscoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsPostoRiscoID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsPostoRiscoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsPostoRiscoID(); + + Object obj; + obj = this.getPosto_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.posto_id = (Integer)obj; + + obj = this.getRisco_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.risco_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoData.java new file mode 100644 index 00000000..46e1e2a4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoData.java @@ -0,0 +1,18 @@ +/* +* HsPostoRiscoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsPostoRiscoData extends com.evolute.siprp.server.db.data.siprp_local3.HsPostoRiscoDataAuto +{ + + public HsPostoRiscoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoDataAuto.java new file mode 100644 index 00000000..6a729287 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoDataAuto.java @@ -0,0 +1,322 @@ +/* +* HsPostoRiscoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsPostoRiscoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_posto_risco"; + + public static final String POSTO_ID = "posto_id"; + public static final String POSTO_ID_FULL = "hs_posto_risco.posto_id"; + public static final String TO_POSTO_ID = "to posto_id"; + public static final String RISCO_ID = "risco_id"; + public static final String RISCO_ID_FULL = "hs_posto_risco.risco_id"; + public static final String TO_RISCO_ID = "to risco_id"; + public static final String PROBABILIDADE = "probabilidade"; + public static final String PROBABILIDADE_FULL = "hs_posto_risco.probabilidade"; + public static final String SEVERIDADE = "severidade"; + public static final String SEVERIDADE_FULL = "hs_posto_risco.severidade"; + public static final String VALOR_QUALITATIVO = "valor_qualitativo"; + public static final String VALOR_QUALITATIVO_FULL = "hs_posto_risco.valor_qualitativo"; + public static final String TO_VALOR_QUALITATIVO = "to valor_qualitativo"; + public static final String IS_PLANO_ACTUACAO = "is_plano_actuacao"; + public static final String IS_PLANO_ACTUACAO_FULL = "hs_posto_risco.is_plano_actuacao"; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "hs_posto_risco.ordem"; + + public static final String FIELD_NAMES[] = new String[]{ + PROBABILIDADE, SEVERIDADE, VALOR_QUALITATIVO, TO_VALOR_QUALITATIVO, + IS_PLANO_ACTUACAO, ORDEM, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + POSTO_ID, RISCO_ID, PROBABILIDADE, SEVERIDADE, VALOR_QUALITATIVO, + IS_PLANO_ACTUACAO, ORDEM, }; + + private Map dataHash; + + public HsPostoRiscoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getPosto_id() + { + return (Integer) dataHash.get(POSTO_ID); + } + + public void setPosto_id(Integer posto_idValue ) + { + dataHash.put(TO_POSTO_ID, null); + dataHash.put(POSTO_ID, posto_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsPostoData toPosto_id() + throws Exception + { + if( dataHash.get(TO_POSTO_ID) == null && getPosto_id() != null ) + { + dataHash.put(TO_POSTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.class, new Object[]{ getPosto_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsPostoData) dataHash.get(TO_POSTO_ID); + } + + public void setToPosto_id(com.evolute.siprp.server.db.data.siprp_local3.HsPostoData posto_idObject ) + { + if( posto_idObject == null ) + { + dataHash.put(POSTO_ID, null); + } + else + { + dataHash.put(POSTO_ID, posto_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID )); + } + dataHash.put(TO_POSTO_ID, posto_idObject); + } + + public Integer getRisco_id() + { + return (Integer) dataHash.get(RISCO_ID); + } + + public void setRisco_id(Integer risco_idValue ) + { + dataHash.put(TO_RISCO_ID, null); + dataHash.put(RISCO_ID, risco_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData toRisco_id() + throws Exception + { + if( dataHash.get(TO_RISCO_ID) == null && getRisco_id() != null ) + { + dataHash.put(TO_RISCO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData.class, new Object[]{ getRisco_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData) dataHash.get(TO_RISCO_ID); + } + + public void setToRisco_id(com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData risco_idObject ) + { + if( risco_idObject == null ) + { + dataHash.put(RISCO_ID, null); + } + else + { + dataHash.put(RISCO_ID, risco_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData.ID )); + } + dataHash.put(TO_RISCO_ID, risco_idObject); + } + + public Integer getProbabilidade() + { + return (Integer) get(PROBABILIDADE); + } + + public void setProbabilidade(Integer probabilidadeValue ) + { + this.set(PROBABILIDADE, probabilidadeValue ); + } + + public Integer getSeveridade() + { + return (Integer) get(SEVERIDADE); + } + + public void setSeveridade(Integer severidadeValue ) + { + this.set(SEVERIDADE, severidadeValue ); + } + + public Integer getValor_qualitativo() + { + return (Integer) dataHash.get(VALOR_QUALITATIVO); + } + + public void setValor_qualitativo(Integer valor_qualitativoValue ) + { + dataHash.put(TO_VALOR_QUALITATIVO, null); + dataHash.put(VALOR_QUALITATIVO, valor_qualitativoValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData toValor_qualitativo() + throws Exception + { + if( dataHash.get(TO_VALOR_QUALITATIVO) == null && getValor_qualitativo() != null ) + { + dataHash.put(TO_VALOR_QUALITATIVO, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData.class, new Object[]{ getValor_qualitativo() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData) dataHash.get(TO_VALOR_QUALITATIVO); + } + + public void setToValor_qualitativo(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData valor_qualitativoObject ) + { + if( valor_qualitativoObject == null ) + { + dataHash.put(VALOR_QUALITATIVO, null); + } + else + { + dataHash.put(VALOR_QUALITATIVO, valor_qualitativoObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData.ID )); + } + dataHash.put(TO_VALOR_QUALITATIVO, valor_qualitativoObject); + } + + public String getIs_plano_actuacao() + { + return (String) get(IS_PLANO_ACTUACAO); + } + + public void setIs_plano_actuacao(String is_plano_actuacaoValue ) + { + this.set(IS_PLANO_ACTUACAO, is_plano_actuacaoValue ); + } + + public Integer getOrdem() + { + return (Integer) get(ORDEM); + } + + public void setOrdem(Integer ordemValue ) + { + this.set(ORDEM, ordemValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_POSTO_ID.equals( fieldName ) ) + { + value = toPosto_id(); + } + else if( POSTO_ID.equals( fieldName ) ) + { + value = getPosto_id(); + } + else if( TO_VALOR_QUALITATIVO.equals( fieldName ) ) + { + value = toValor_qualitativo(); + } + else if( VALOR_QUALITATIVO.equals( fieldName ) ) + { + value = getValor_qualitativo(); + } + else if( TO_RISCO_ID.equals( fieldName ) ) + { + value = toRisco_id(); + } + else if( RISCO_ID.equals( fieldName ) ) + { + value = getRisco_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_POSTO_ID.equals( fieldName ) ) + { + setToPosto_id( (com.evolute.siprp.server.db.data.siprp_local3.HsPostoData) value ); + } + else if( POSTO_ID.equals( fieldName ) ) + { + setPosto_id( (Integer) value ); + } + else if( TO_VALOR_QUALITATIVO.equals( fieldName ) ) + { + setToValor_qualitativo( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData) value ); + } + else if( VALOR_QUALITATIVO.equals( fieldName ) ) + { + setValor_qualitativo( (Integer) value ); + } + else if( TO_RISCO_ID.equals( fieldName ) ) + { + setToRisco_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData) value ); + } + else if( RISCO_ID.equals( fieldName ) ) + { + setRisco_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_POSTO_ID) != null ) + { + toPosto_id().save(); + dataHash.put(POSTO_ID, toPosto_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID )); + } + + if( dataHash.get(TO_RISCO_ID) != null ) + { + toRisco_id().save(); + dataHash.put(RISCO_ID, toRisco_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData.ID )); + } + + if( dataHash.get(TO_VALOR_QUALITATIVO) != null ) + { + toValor_qualitativo().save(); + dataHash.put(VALOR_QUALITATIVO, toValor_qualitativo().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsPostoRisco.class; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsPostoRiscoID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsPostoRiscoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsPostoRiscoID(); + + Object obj; + obj = this.getPosto_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.posto_id = (Integer)obj; + + obj = this.getRisco_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.risco_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoID.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoID.java new file mode 100644 index 00000000..887d7c05 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoID.java @@ -0,0 +1,37 @@ +/* +* HsPostoRiscoID.java +* +* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import java.io.*; + +import com.evolute.utils.jdo.jpox.JDOIDClass; + +public final class HsPostoRiscoID extends JDOIDClass implements Serializable +{ + public Integer posto_id; + public Integer risco_id; + + public HsPostoRiscoID() + { + } + + + public Object[] getValue() + { + Object value[] = new Object[ 2 ]; + value[ 0 ] = posto_id; + value[ 1 ] = risco_id; + return value; + } + + public void setValues( Object values[] ) + { + posto_id = (Integer) values[ 0 ]; + risco_id = (Integer) values[ 1 ]; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorio.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorio.java new file mode 100644 index 00000000..5a338fd5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorio.java @@ -0,0 +1,399 @@ +/* +* HsRelatorio.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsRelatorio implements JDOInnerObject +{ + private Integer id; + private java.util.Date data; + private java.sql.Timestamp deleted_date; + private Integer marcacao_id; + private java.sql.Timestamp is_submetido; + private Boolean avaliacao_inicial; + private String acompanhante1; + private String funcao_acompanhante1; + private String acompanhante2; + private String funcao_acompanhante2; + private String acompanhante3; + private String funcao_acompanhante3; + private String funcionarios; + + public HsRelatorio() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsRelatorioDataAuto.ID ) + { + return id; + } + else if( fieldName == HsRelatorioDataAuto.DATA ) + { + return data; + } + else if( fieldName == HsRelatorioDataAuto.DELETED_DATE ) + { + return deleted_date; + } + else if( fieldName == HsRelatorioDataAuto.MARCACAO_ID ) + { + return marcacao_id; + } + else if( fieldName == HsRelatorioDataAuto.IS_SUBMETIDO ) + { + return is_submetido; + } + else if( fieldName == HsRelatorioDataAuto.AVALIACAO_INICIAL ) + { + return avaliacao_inicial; + } + else if( fieldName == HsRelatorioDataAuto.ACOMPANHANTE1 ) + { + return acompanhante1; + } + else if( fieldName == HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE1 ) + { + return funcao_acompanhante1; + } + else if( fieldName == HsRelatorioDataAuto.ACOMPANHANTE2 ) + { + return acompanhante2; + } + else if( fieldName == HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE2 ) + { + return funcao_acompanhante2; + } + else if( fieldName == HsRelatorioDataAuto.ACOMPANHANTE3 ) + { + return acompanhante3; + } + else if( fieldName == HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE3 ) + { + return funcao_acompanhante3; + } + else if( fieldName == HsRelatorioDataAuto.FUNCIONARIOS ) + { + return funcionarios; + } + else if( fieldName.equals( HsRelatorioDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsRelatorioDataAuto.DATA ) ) + { + return data; + } + else if( fieldName.equals( HsRelatorioDataAuto.DELETED_DATE ) ) + { + return deleted_date; + } + else if( fieldName.equals( HsRelatorioDataAuto.MARCACAO_ID ) ) + { + return marcacao_id; + } + else if( fieldName.equals( HsRelatorioDataAuto.IS_SUBMETIDO ) ) + { + return is_submetido; + } + else if( fieldName.equals( HsRelatorioDataAuto.AVALIACAO_INICIAL ) ) + { + return avaliacao_inicial; + } + else if( fieldName.equals( HsRelatorioDataAuto.ACOMPANHANTE1 ) ) + { + return acompanhante1; + } + else if( fieldName.equals( HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE1 ) ) + { + return funcao_acompanhante1; + } + else if( fieldName.equals( HsRelatorioDataAuto.ACOMPANHANTE2 ) ) + { + return acompanhante2; + } + else if( fieldName.equals( HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE2 ) ) + { + return funcao_acompanhante2; + } + else if( fieldName.equals( HsRelatorioDataAuto.ACOMPANHANTE3 ) ) + { + return acompanhante3; + } + else if( fieldName.equals( HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE3 ) ) + { + return funcao_acompanhante3; + } + else if( fieldName.equals( HsRelatorioDataAuto.FUNCIONARIOS ) ) + { + return funcionarios; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsRelatorioDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsRelatorioDataAuto.DATA ) + { + data = ( java.util.Date ) value; + } + else if( fieldName == HsRelatorioDataAuto.DELETED_DATE ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName == HsRelatorioDataAuto.MARCACAO_ID ) + { + marcacao_id = ( Integer ) value; + } + else if( fieldName == HsRelatorioDataAuto.IS_SUBMETIDO ) + { + is_submetido = ( java.sql.Timestamp ) value; + } + else if( fieldName == HsRelatorioDataAuto.AVALIACAO_INICIAL ) + { + avaliacao_inicial = ( Boolean ) value; + } + else if( fieldName == HsRelatorioDataAuto.ACOMPANHANTE1 ) + { + acompanhante1 = ( String ) value; + } + else if( fieldName == HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE1 ) + { + funcao_acompanhante1 = ( String ) value; + } + else if( fieldName == HsRelatorioDataAuto.ACOMPANHANTE2 ) + { + acompanhante2 = ( String ) value; + } + else if( fieldName == HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE2 ) + { + funcao_acompanhante2 = ( String ) value; + } + else if( fieldName == HsRelatorioDataAuto.ACOMPANHANTE3 ) + { + acompanhante3 = ( String ) value; + } + else if( fieldName == HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE3 ) + { + funcao_acompanhante3 = ( String ) value; + } + else if( fieldName == HsRelatorioDataAuto.FUNCIONARIOS ) + { + funcionarios = ( String ) value; + } + else if( fieldName.equals( HsRelatorioDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioDataAuto.DATA ) ) + { + data = ( java.util.Date ) value; + } + else if( fieldName.equals( HsRelatorioDataAuto.DELETED_DATE ) ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( HsRelatorioDataAuto.MARCACAO_ID ) ) + { + marcacao_id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioDataAuto.IS_SUBMETIDO ) ) + { + is_submetido = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( HsRelatorioDataAuto.AVALIACAO_INICIAL ) ) + { + avaliacao_inicial = ( Boolean ) value; + } + else if( fieldName.equals( HsRelatorioDataAuto.ACOMPANHANTE1 ) ) + { + acompanhante1 = ( String ) value; + } + else if( fieldName.equals( HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE1 ) ) + { + funcao_acompanhante1 = ( String ) value; + } + else if( fieldName.equals( HsRelatorioDataAuto.ACOMPANHANTE2 ) ) + { + acompanhante2 = ( String ) value; + } + else if( fieldName.equals( HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE2 ) ) + { + funcao_acompanhante2 = ( String ) value; + } + else if( fieldName.equals( HsRelatorioDataAuto.ACOMPANHANTE3 ) ) + { + acompanhante3 = ( String ) value; + } + else if( fieldName.equals( HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE3 ) ) + { + funcao_acompanhante3 = ( String ) value; + } + else if( fieldName.equals( HsRelatorioDataAuto.FUNCIONARIOS ) ) + { + funcionarios = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public java.util.Date getData() + { + return data; + } + + public void setData(java.util.Date dataValue ) + { + this.data = dataValue; + } + + public java.sql.Timestamp getDeleted_date() + { + return deleted_date; + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.deleted_date = deleted_dateValue; + } + + public Integer getMarcacao_id() + { + return marcacao_id; + } + + public void setMarcacao_id(Integer marcacao_idValue ) + { + this.marcacao_id = marcacao_idValue; + } + + public java.sql.Timestamp getIs_submetido() + { + return is_submetido; + } + + public void setIs_submetido(java.sql.Timestamp is_submetidoValue ) + { + this.is_submetido = is_submetidoValue; + } + + public Boolean getAvaliacao_inicial() + { + return avaliacao_inicial; + } + + public void setAvaliacao_inicial(Boolean avaliacao_inicialValue ) + { + this.avaliacao_inicial = avaliacao_inicialValue; + } + + public String getAcompanhante1() + { + return acompanhante1; + } + + public void setAcompanhante1(String acompanhante1Value ) + { + this.acompanhante1 = acompanhante1Value; + } + + public String getFuncao_acompanhante1() + { + return funcao_acompanhante1; + } + + public void setFuncao_acompanhante1(String funcao_acompanhante1Value ) + { + this.funcao_acompanhante1 = funcao_acompanhante1Value; + } + + public String getAcompanhante2() + { + return acompanhante2; + } + + public void setAcompanhante2(String acompanhante2Value ) + { + this.acompanhante2 = acompanhante2Value; + } + + public String getFuncao_acompanhante2() + { + return funcao_acompanhante2; + } + + public void setFuncao_acompanhante2(String funcao_acompanhante2Value ) + { + this.funcao_acompanhante2 = funcao_acompanhante2Value; + } + + public String getAcompanhante3() + { + return acompanhante3; + } + + public void setAcompanhante3(String acompanhante3Value ) + { + this.acompanhante3 = acompanhante3Value; + } + + public String getFuncao_acompanhante3() + { + return funcao_acompanhante3; + } + + public void setFuncao_acompanhante3(String funcao_acompanhante3Value ) + { + this.funcao_acompanhante3 = funcao_acompanhante3Value; + } + + public String getFuncionarios() + { + return funcionarios; + } + + public void setFuncionarios(String funcionariosValue ) + { + this.funcionarios = funcionariosValue; + } + + public Class getOuterClass() + { + return HsRelatorioDataAuto.class; + } + + public HsRelatorioDataAuto getOuterClassInstance() + { + HsRelatorioDataAuto outerObj = new HsRelatorioDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioArea.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioArea.java new file mode 100644 index 00000000..a8c808f4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioArea.java @@ -0,0 +1,183 @@ +/* +* HsRelatorioArea.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsRelatorioArea implements JDOInnerObject +{ + private Integer id; + private String description; + private java.sql.Timestamp deleted_date; + private Integer relatorio_id; + private Integer ordem; + + public HsRelatorioArea() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsRelatorioAreaDataAuto.ID ) + { + return id; + } + else if( fieldName == HsRelatorioAreaDataAuto.DESCRIPTION ) + { + return description; + } + else if( fieldName == HsRelatorioAreaDataAuto.DELETED_DATE ) + { + return deleted_date; + } + else if( fieldName == HsRelatorioAreaDataAuto.RELATORIO_ID ) + { + return relatorio_id; + } + else if( fieldName == HsRelatorioAreaDataAuto.ORDEM ) + { + return ordem; + } + else if( fieldName.equals( HsRelatorioAreaDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsRelatorioAreaDataAuto.DESCRIPTION ) ) + { + return description; + } + else if( fieldName.equals( HsRelatorioAreaDataAuto.DELETED_DATE ) ) + { + return deleted_date; + } + else if( fieldName.equals( HsRelatorioAreaDataAuto.RELATORIO_ID ) ) + { + return relatorio_id; + } + else if( fieldName.equals( HsRelatorioAreaDataAuto.ORDEM ) ) + { + return ordem; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsRelatorioAreaDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsRelatorioAreaDataAuto.DESCRIPTION ) + { + description = ( String ) value; + } + else if( fieldName == HsRelatorioAreaDataAuto.DELETED_DATE ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName == HsRelatorioAreaDataAuto.RELATORIO_ID ) + { + relatorio_id = ( Integer ) value; + } + else if( fieldName == HsRelatorioAreaDataAuto.ORDEM ) + { + ordem = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioAreaDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioAreaDataAuto.DESCRIPTION ) ) + { + description = ( String ) value; + } + else if( fieldName.equals( HsRelatorioAreaDataAuto.DELETED_DATE ) ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( HsRelatorioAreaDataAuto.RELATORIO_ID ) ) + { + relatorio_id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioAreaDataAuto.ORDEM ) ) + { + ordem = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String descriptionValue ) + { + this.description = descriptionValue; + } + + public java.sql.Timestamp getDeleted_date() + { + return deleted_date; + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.deleted_date = deleted_dateValue; + } + + public Integer getRelatorio_id() + { + return relatorio_id; + } + + public void setRelatorio_id(Integer relatorio_idValue ) + { + this.relatorio_id = relatorio_idValue; + } + + public Integer getOrdem() + { + return ordem; + } + + public void setOrdem(Integer ordemValue ) + { + this.ordem = ordemValue; + } + + public Class getOuterClass() + { + return HsRelatorioAreaDataAuto.class; + } + + public HsRelatorioAreaDataAuto getOuterClassInstance() + { + HsRelatorioAreaDataAuto outerObj = new HsRelatorioAreaDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioAreaData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioAreaData.java new file mode 100644 index 00000000..d9640a30 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioAreaData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioAreaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsRelatorioAreaData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaDataAuto +{ + + public HsRelatorioAreaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioAreaDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioAreaDataAuto.java new file mode 100644 index 00000000..6f84cb7a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioAreaDataAuto.java @@ -0,0 +1,190 @@ +/* +* HsRelatorioAreaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsRelatorioAreaDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_relatorio_area"; + + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio_area.id"; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_relatorio_area.description"; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_relatorio_area.deleted_date"; + public static final String RELATORIO_ID = "relatorio_id"; + public static final String RELATORIO_ID_FULL = "hs_relatorio_area.relatorio_id"; + public static final String TO_RELATORIO_ID = "to relatorio_id"; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "hs_relatorio_area.ordem"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRIPTION, DELETED_DATE, RELATORIO_ID, TO_RELATORIO_ID, ORDEM, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DESCRIPTION, DELETED_DATE, RELATORIO_ID, ORDEM, }; + + private Map dataHash; + + public HsRelatorioAreaDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getDescription() + { + return (String) get(DESCRIPTION); + } + + public void setDescription(String descriptionValue ) + { + this.set(DESCRIPTION, descriptionValue ); + } + + public java.sql.Timestamp getDeleted_date() + { + return (java.sql.Timestamp) get(DELETED_DATE); + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.set(DELETED_DATE, deleted_dateValue ); + } + + public Integer getRelatorio_id() + { + return (Integer) dataHash.get(RELATORIO_ID); + } + + public void setRelatorio_id(Integer relatorio_idValue ) + { + dataHash.put(TO_RELATORIO_ID, null); + dataHash.put(RELATORIO_ID, relatorio_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData toRelatorio_id() + throws Exception + { + if( dataHash.get(TO_RELATORIO_ID) == null && getRelatorio_id() != null ) + { + dataHash.put(TO_RELATORIO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.class, new Object[]{ getRelatorio_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) dataHash.get(TO_RELATORIO_ID); + } + + public void setToRelatorio_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData relatorio_idObject ) + { + if( relatorio_idObject == null ) + { + dataHash.put(RELATORIO_ID, null); + } + else + { + dataHash.put(RELATORIO_ID, relatorio_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID )); + } + dataHash.put(TO_RELATORIO_ID, relatorio_idObject); + } + + public Integer getOrdem() + { + return (Integer) get(ORDEM); + } + + public void setOrdem(Integer ordemValue ) + { + this.set(ORDEM, ordemValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( RELATORIO_ID.equals( fieldName ) ) + { + value = getRelatorio_id(); + } + else if( TO_RELATORIO_ID.equals( fieldName ) ) + { + value = toRelatorio_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( RELATORIO_ID.equals( fieldName ) ) + { + setRelatorio_id( (Integer) value ); + } + else if( TO_RELATORIO_ID.equals( fieldName ) ) + { + setToRelatorio_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_RELATORIO_ID) != null ) + { + toRelatorio_id().save(); + dataHash.put(RELATORIO_ID, toRelatorio_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsRelatorioArea.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioData.java new file mode 100644 index 00000000..2b6b80f3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsRelatorioData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioDataAuto +{ + + public HsRelatorioData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioDataAuto.java new file mode 100644 index 00000000..fa4a02ff --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioDataAuto.java @@ -0,0 +1,290 @@ +/* +* HsRelatorioDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsRelatorioDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_relatorio"; + + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio.id"; + public static final String DATA = "data"; + public static final String DATA_FULL = "hs_relatorio.data"; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_relatorio.deleted_date"; + public static final String MARCACAO_ID = "marcacao_id"; + public static final String MARCACAO_ID_FULL = "hs_relatorio.marcacao_id"; + public static final String TO_MARCACAO_ID = "to marcacao_id"; + public static final String IS_SUBMETIDO = "is_submetido"; + public static final String IS_SUBMETIDO_FULL = "hs_relatorio.is_submetido"; + public static final String AVALIACAO_INICIAL = "avaliacao_inicial"; + public static final String AVALIACAO_INICIAL_FULL = "hs_relatorio.avaliacao_inicial"; + public static final String ACOMPANHANTE1 = "acompanhante1"; + public static final String ACOMPANHANTE1_FULL = "hs_relatorio.acompanhante1"; + public static final String FUNCAO_ACOMPANHANTE1 = "funcao_acompanhante1"; + public static final String FUNCAO_ACOMPANHANTE1_FULL = "hs_relatorio.funcao_acompanhante1"; + public static final String ACOMPANHANTE2 = "acompanhante2"; + public static final String ACOMPANHANTE2_FULL = "hs_relatorio.acompanhante2"; + public static final String FUNCAO_ACOMPANHANTE2 = "funcao_acompanhante2"; + public static final String FUNCAO_ACOMPANHANTE2_FULL = "hs_relatorio.funcao_acompanhante2"; + public static final String ACOMPANHANTE3 = "acompanhante3"; + public static final String ACOMPANHANTE3_FULL = "hs_relatorio.acompanhante3"; + public static final String FUNCAO_ACOMPANHANTE3 = "funcao_acompanhante3"; + public static final String FUNCAO_ACOMPANHANTE3_FULL = "hs_relatorio.funcao_acompanhante3"; + public static final String FUNCIONARIOS = "funcionarios"; + public static final String FUNCIONARIOS_FULL = "hs_relatorio.funcionarios"; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, DELETED_DATE, MARCACAO_ID, TO_MARCACAO_ID, IS_SUBMETIDO, AVALIACAO_INICIAL, + ACOMPANHANTE1, FUNCAO_ACOMPANHANTE1, ACOMPANHANTE2, FUNCAO_ACOMPANHANTE2, + ACOMPANHANTE3, FUNCAO_ACOMPANHANTE3, FUNCIONARIOS, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DATA, DELETED_DATE, MARCACAO_ID, IS_SUBMETIDO, AVALIACAO_INICIAL, + ACOMPANHANTE1, FUNCAO_ACOMPANHANTE1, ACOMPANHANTE2, FUNCAO_ACOMPANHANTE2, + ACOMPANHANTE3, FUNCAO_ACOMPANHANTE3, FUNCIONARIOS, }; + + private Map dataHash; + + public HsRelatorioDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public java.util.Date getData() + { + return (java.util.Date) get(DATA); + } + + public void setData(java.util.Date dataValue ) + { + this.set(DATA, dataValue ); + } + + public java.sql.Timestamp getDeleted_date() + { + return (java.sql.Timestamp) get(DELETED_DATE); + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.set(DELETED_DATE, deleted_dateValue ); + } + + public Integer getMarcacao_id() + { + return (Integer) dataHash.get(MARCACAO_ID); + } + + public void setMarcacao_id(Integer marcacao_idValue ) + { + dataHash.put(TO_MARCACAO_ID, null); + dataHash.put(MARCACAO_ID, marcacao_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData toMarcacao_id() + throws Exception + { + if( dataHash.get(TO_MARCACAO_ID) == null && getMarcacao_id() != null ) + { + dataHash.put(TO_MARCACAO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData.class, new Object[]{ getMarcacao_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData) dataHash.get(TO_MARCACAO_ID); + } + + public void setToMarcacao_id(com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData marcacao_idObject ) + { + if( marcacao_idObject == null ) + { + dataHash.put(MARCACAO_ID, null); + } + else + { + dataHash.put(MARCACAO_ID, marcacao_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData.ID )); + } + dataHash.put(TO_MARCACAO_ID, marcacao_idObject); + } + + public java.sql.Timestamp getIs_submetido() + { + return (java.sql.Timestamp) get(IS_SUBMETIDO); + } + + public void setIs_submetido(java.sql.Timestamp is_submetidoValue ) + { + this.set(IS_SUBMETIDO, is_submetidoValue ); + } + + public Boolean getAvaliacao_inicial() + { + return (Boolean) get(AVALIACAO_INICIAL); + } + + public void setAvaliacao_inicial(Boolean avaliacao_inicialValue ) + { + this.set(AVALIACAO_INICIAL, avaliacao_inicialValue ); + } + + public String getAcompanhante1() + { + return (String) get(ACOMPANHANTE1); + } + + public void setAcompanhante1(String acompanhante1Value ) + { + this.set(ACOMPANHANTE1, acompanhante1Value ); + } + + public String getFuncao_acompanhante1() + { + return (String) get(FUNCAO_ACOMPANHANTE1); + } + + public void setFuncao_acompanhante1(String funcao_acompanhante1Value ) + { + this.set(FUNCAO_ACOMPANHANTE1, funcao_acompanhante1Value ); + } + + public String getAcompanhante2() + { + return (String) get(ACOMPANHANTE2); + } + + public void setAcompanhante2(String acompanhante2Value ) + { + this.set(ACOMPANHANTE2, acompanhante2Value ); + } + + public String getFuncao_acompanhante2() + { + return (String) get(FUNCAO_ACOMPANHANTE2); + } + + public void setFuncao_acompanhante2(String funcao_acompanhante2Value ) + { + this.set(FUNCAO_ACOMPANHANTE2, funcao_acompanhante2Value ); + } + + public String getAcompanhante3() + { + return (String) get(ACOMPANHANTE3); + } + + public void setAcompanhante3(String acompanhante3Value ) + { + this.set(ACOMPANHANTE3, acompanhante3Value ); + } + + public String getFuncao_acompanhante3() + { + return (String) get(FUNCAO_ACOMPANHANTE3); + } + + public void setFuncao_acompanhante3(String funcao_acompanhante3Value ) + { + this.set(FUNCAO_ACOMPANHANTE3, funcao_acompanhante3Value ); + } + + public String getFuncionarios() + { + return (String) get(FUNCIONARIOS); + } + + public void setFuncionarios(String funcionariosValue ) + { + this.set(FUNCIONARIOS, funcionariosValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_MARCACAO_ID.equals( fieldName ) ) + { + value = toMarcacao_id(); + } + else if( MARCACAO_ID.equals( fieldName ) ) + { + value = getMarcacao_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_MARCACAO_ID.equals( fieldName ) ) + { + setToMarcacao_id( (com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData) value ); + } + else if( MARCACAO_ID.equals( fieldName ) ) + { + setMarcacao_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_MARCACAO_ID) != null ) + { + toMarcacao_id().save(); + dataHash.put(MARCACAO_ID, toMarcacao_id().get( com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsRelatorio.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamento.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamento.java new file mode 100644 index 00000000..ee5abf9c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamento.java @@ -0,0 +1,210 @@ +/* +* HsRelatorioEquipamento.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsRelatorioEquipamento implements JDOInnerObject +{ + private Integer hs_relatorio_id; + private Integer hs_equipamento; + private Integer id; + private String tipo; + private String marca; + private String modelo; + + public HsRelatorioEquipamento() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsRelatorioEquipamentoDataAuto.HS_RELATORIO_ID ) + { + return hs_relatorio_id; + } + else if( fieldName == HsRelatorioEquipamentoDataAuto.HS_EQUIPAMENTO ) + { + return hs_equipamento; + } + else if( fieldName == HsRelatorioEquipamentoDataAuto.ID ) + { + return id; + } + else if( fieldName == HsRelatorioEquipamentoDataAuto.TIPO ) + { + return tipo; + } + else if( fieldName == HsRelatorioEquipamentoDataAuto.MARCA ) + { + return marca; + } + else if( fieldName == HsRelatorioEquipamentoDataAuto.MODELO ) + { + return modelo; + } + else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.HS_RELATORIO_ID ) ) + { + return hs_relatorio_id; + } + else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.HS_EQUIPAMENTO ) ) + { + return hs_equipamento; + } + else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.TIPO ) ) + { + return tipo; + } + else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.MARCA ) ) + { + return marca; + } + else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.MODELO ) ) + { + return modelo; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsRelatorioEquipamentoDataAuto.HS_RELATORIO_ID ) + { + hs_relatorio_id = ( Integer ) value; + } + else if( fieldName == HsRelatorioEquipamentoDataAuto.HS_EQUIPAMENTO ) + { + hs_equipamento = ( Integer ) value; + } + else if( fieldName == HsRelatorioEquipamentoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsRelatorioEquipamentoDataAuto.TIPO ) + { + tipo = ( String ) value; + } + else if( fieldName == HsRelatorioEquipamentoDataAuto.MARCA ) + { + marca = ( String ) value; + } + else if( fieldName == HsRelatorioEquipamentoDataAuto.MODELO ) + { + modelo = ( String ) value; + } + else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.HS_RELATORIO_ID ) ) + { + hs_relatorio_id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.HS_EQUIPAMENTO ) ) + { + hs_equipamento = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.TIPO ) ) + { + tipo = ( String ) value; + } + else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.MARCA ) ) + { + marca = ( String ) value; + } + else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.MODELO ) ) + { + modelo = ( String ) value; + } + } + + public Integer getHs_relatorio_id() + { + return hs_relatorio_id; + } + + public void setHs_relatorio_id(Integer hs_relatorio_idValue ) + { + this.hs_relatorio_id = hs_relatorio_idValue; + } + + public Integer getHs_equipamento() + { + return hs_equipamento; + } + + public void setHs_equipamento(Integer hs_equipamentoValue ) + { + this.hs_equipamento = hs_equipamentoValue; + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getTipo() + { + return tipo; + } + + public void setTipo(String tipoValue ) + { + this.tipo = tipoValue; + } + + public String getMarca() + { + return marca; + } + + public void setMarca(String marcaValue ) + { + this.marca = marcaValue; + } + + public String getModelo() + { + return modelo; + } + + public void setModelo(String modeloValue ) + { + this.modelo = modeloValue; + } + + public Class getOuterClass() + { + return HsRelatorioEquipamentoDataAuto.class; + } + + public HsRelatorioEquipamentoDataAuto getOuterClassInstance() + { + HsRelatorioEquipamentoDataAuto outerObj = new HsRelatorioEquipamentoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamentoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamentoData.java new file mode 100644 index 00000000..fdf9a44c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamentoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioEquipamentoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsRelatorioEquipamentoData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioEquipamentoDataAuto +{ + + public HsRelatorioEquipamentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamentoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamentoDataAuto.java new file mode 100644 index 00000000..1e94688b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamentoDataAuto.java @@ -0,0 +1,202 @@ +/* +* HsRelatorioEquipamentoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsRelatorioEquipamentoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_relatorio_equipamento"; + + public static final String HS_RELATORIO_ID = "hs_relatorio_id"; + public static final String HS_RELATORIO_ID_FULL = "hs_relatorio_equipamento.hs_relatorio_id"; + public static final String TO_HS_RELATORIO_ID = "to hs_relatorio_id"; + public static final String HS_EQUIPAMENTO = "hs_equipamento"; + public static final String HS_EQUIPAMENTO_FULL = "hs_relatorio_equipamento.hs_equipamento"; + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio_equipamento.id"; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "hs_relatorio_equipamento.tipo"; + public static final String MARCA = "marca"; + public static final String MARCA_FULL = "hs_relatorio_equipamento.marca"; + public static final String MODELO = "modelo"; + public static final String MODELO_FULL = "hs_relatorio_equipamento.modelo"; + + public static final String FIELD_NAMES[] = new String[]{ + HS_RELATORIO_ID, TO_HS_RELATORIO_ID, HS_EQUIPAMENTO, TIPO, MARCA, MODELO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + HS_RELATORIO_ID, HS_EQUIPAMENTO, ID, TIPO, MARCA, MODELO, }; + + private Map dataHash; + + public HsRelatorioEquipamentoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getHs_relatorio_id() + { + return (Integer) dataHash.get(HS_RELATORIO_ID); + } + + public void setHs_relatorio_id(Integer hs_relatorio_idValue ) + { + dataHash.put(TO_HS_RELATORIO_ID, null); + dataHash.put(HS_RELATORIO_ID, hs_relatorio_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData toHs_relatorio_id() + throws Exception + { + if( dataHash.get(TO_HS_RELATORIO_ID) == null && getHs_relatorio_id() != null ) + { + dataHash.put(TO_HS_RELATORIO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.class, new Object[]{ getHs_relatorio_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) dataHash.get(TO_HS_RELATORIO_ID); + } + + public void setToHs_relatorio_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData hs_relatorio_idObject ) + { + if( hs_relatorio_idObject == null ) + { + dataHash.put(HS_RELATORIO_ID, null); + } + else + { + dataHash.put(HS_RELATORIO_ID, hs_relatorio_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID )); + } + dataHash.put(TO_HS_RELATORIO_ID, hs_relatorio_idObject); + } + + public Integer getHs_equipamento() + { + return (Integer) get(HS_EQUIPAMENTO); + } + + public void setHs_equipamento(Integer hs_equipamentoValue ) + { + this.set(HS_EQUIPAMENTO, hs_equipamentoValue ); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getTipo() + { + return (String) get(TIPO); + } + + public void setTipo(String tipoValue ) + { + this.set(TIPO, tipoValue ); + } + + public String getMarca() + { + return (String) get(MARCA); + } + + public void setMarca(String marcaValue ) + { + this.set(MARCA, marcaValue ); + } + + public String getModelo() + { + return (String) get(MODELO); + } + + public void setModelo(String modeloValue ) + { + this.set(MODELO, modeloValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_HS_RELATORIO_ID.equals( fieldName ) ) + { + value = toHs_relatorio_id(); + } + else if( HS_RELATORIO_ID.equals( fieldName ) ) + { + value = getHs_relatorio_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_HS_RELATORIO_ID.equals( fieldName ) ) + { + setToHs_relatorio_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) value ); + } + else if( HS_RELATORIO_ID.equals( fieldName ) ) + { + setHs_relatorio_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_HS_RELATORIO_ID) != null ) + { + toHs_relatorio_id().save(); + dataHash.put(HS_RELATORIO_ID, toHs_relatorio_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsRelatorioEquipamento.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacao.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacao.java new file mode 100644 index 00000000..27d7e9c2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacao.java @@ -0,0 +1,210 @@ +/* +* HsRelatorioLegislacao.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsRelatorioLegislacao implements JDOInnerObject +{ + private Integer hs_relatorio_id; + private Integer hs_legislacao_id; + private Integer id; + private String categoria; + private String descricao; + private Integer ordem; + + public HsRelatorioLegislacao() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsRelatorioLegislacaoDataAuto.HS_RELATORIO_ID ) + { + return hs_relatorio_id; + } + else if( fieldName == HsRelatorioLegislacaoDataAuto.HS_LEGISLACAO_ID ) + { + return hs_legislacao_id; + } + else if( fieldName == HsRelatorioLegislacaoDataAuto.ID ) + { + return id; + } + else if( fieldName == HsRelatorioLegislacaoDataAuto.CATEGORIA ) + { + return categoria; + } + else if( fieldName == HsRelatorioLegislacaoDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == HsRelatorioLegislacaoDataAuto.ORDEM ) + { + return ordem; + } + else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.HS_RELATORIO_ID ) ) + { + return hs_relatorio_id; + } + else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.HS_LEGISLACAO_ID ) ) + { + return hs_legislacao_id; + } + else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.CATEGORIA ) ) + { + return categoria; + } + else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.ORDEM ) ) + { + return ordem; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsRelatorioLegislacaoDataAuto.HS_RELATORIO_ID ) + { + hs_relatorio_id = ( Integer ) value; + } + else if( fieldName == HsRelatorioLegislacaoDataAuto.HS_LEGISLACAO_ID ) + { + hs_legislacao_id = ( Integer ) value; + } + else if( fieldName == HsRelatorioLegislacaoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsRelatorioLegislacaoDataAuto.CATEGORIA ) + { + categoria = ( String ) value; + } + else if( fieldName == HsRelatorioLegislacaoDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == HsRelatorioLegislacaoDataAuto.ORDEM ) + { + ordem = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.HS_RELATORIO_ID ) ) + { + hs_relatorio_id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.HS_LEGISLACAO_ID ) ) + { + hs_legislacao_id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.CATEGORIA ) ) + { + categoria = ( String ) value; + } + else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.ORDEM ) ) + { + ordem = ( Integer ) value; + } + } + + public Integer getHs_relatorio_id() + { + return hs_relatorio_id; + } + + public void setHs_relatorio_id(Integer hs_relatorio_idValue ) + { + this.hs_relatorio_id = hs_relatorio_idValue; + } + + public Integer getHs_legislacao_id() + { + return hs_legislacao_id; + } + + public void setHs_legislacao_id(Integer hs_legislacao_idValue ) + { + this.hs_legislacao_id = hs_legislacao_idValue; + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getCategoria() + { + return categoria; + } + + public void setCategoria(String categoriaValue ) + { + this.categoria = categoriaValue; + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public Integer getOrdem() + { + return ordem; + } + + public void setOrdem(Integer ordemValue ) + { + this.ordem = ordemValue; + } + + public Class getOuterClass() + { + return HsRelatorioLegislacaoDataAuto.class; + } + + public HsRelatorioLegislacaoDataAuto getOuterClassInstance() + { + HsRelatorioLegislacaoDataAuto outerObj = new HsRelatorioLegislacaoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacaoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacaoData.java new file mode 100644 index 00000000..e26436ce --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacaoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioLegislacaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsRelatorioLegislacaoData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioLegislacaoDataAuto +{ + + public HsRelatorioLegislacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacaoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacaoDataAuto.java new file mode 100644 index 00000000..d01cb04c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacaoDataAuto.java @@ -0,0 +1,203 @@ +/* +* HsRelatorioLegislacaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsRelatorioLegislacaoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_relatorio_legislacao"; + + public static final String HS_RELATORIO_ID = "hs_relatorio_id"; + public static final String HS_RELATORIO_ID_FULL = "hs_relatorio_legislacao.hs_relatorio_id"; + public static final String TO_HS_RELATORIO_ID = "to hs_relatorio_id"; + public static final String HS_LEGISLACAO_ID = "hs_legislacao_id"; + public static final String HS_LEGISLACAO_ID_FULL = "hs_relatorio_legislacao.hs_legislacao_id"; + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio_legislacao.id"; + public static final String CATEGORIA = "categoria"; + public static final String CATEGORIA_FULL = "hs_relatorio_legislacao.categoria"; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "hs_relatorio_legislacao.descricao"; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "hs_relatorio_legislacao.ordem"; + + public static final String FIELD_NAMES[] = new String[]{ + HS_RELATORIO_ID, TO_HS_RELATORIO_ID, HS_LEGISLACAO_ID, CATEGORIA, DESCRICAO, + ORDEM, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + HS_RELATORIO_ID, HS_LEGISLACAO_ID, ID, CATEGORIA, DESCRICAO, ORDEM, }; + + private Map dataHash; + + public HsRelatorioLegislacaoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getHs_relatorio_id() + { + return (Integer) dataHash.get(HS_RELATORIO_ID); + } + + public void setHs_relatorio_id(Integer hs_relatorio_idValue ) + { + dataHash.put(TO_HS_RELATORIO_ID, null); + dataHash.put(HS_RELATORIO_ID, hs_relatorio_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData toHs_relatorio_id() + throws Exception + { + if( dataHash.get(TO_HS_RELATORIO_ID) == null && getHs_relatorio_id() != null ) + { + dataHash.put(TO_HS_RELATORIO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.class, new Object[]{ getHs_relatorio_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) dataHash.get(TO_HS_RELATORIO_ID); + } + + public void setToHs_relatorio_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData hs_relatorio_idObject ) + { + if( hs_relatorio_idObject == null ) + { + dataHash.put(HS_RELATORIO_ID, null); + } + else + { + dataHash.put(HS_RELATORIO_ID, hs_relatorio_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID )); + } + dataHash.put(TO_HS_RELATORIO_ID, hs_relatorio_idObject); + } + + public Integer getHs_legislacao_id() + { + return (Integer) get(HS_LEGISLACAO_ID); + } + + public void setHs_legislacao_id(Integer hs_legislacao_idValue ) + { + this.set(HS_LEGISLACAO_ID, hs_legislacao_idValue ); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getCategoria() + { + return (String) get(CATEGORIA); + } + + public void setCategoria(String categoriaValue ) + { + this.set(CATEGORIA, categoriaValue ); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public Integer getOrdem() + { + return (Integer) get(ORDEM); + } + + public void setOrdem(Integer ordemValue ) + { + this.set(ORDEM, ordemValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_HS_RELATORIO_ID.equals( fieldName ) ) + { + value = toHs_relatorio_id(); + } + else if( HS_RELATORIO_ID.equals( fieldName ) ) + { + value = getHs_relatorio_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_HS_RELATORIO_ID.equals( fieldName ) ) + { + setToHs_relatorio_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) value ); + } + else if( HS_RELATORIO_ID.equals( fieldName ) ) + { + setHs_relatorio_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_HS_RELATORIO_ID) != null ) + { + toHs_relatorio_id().save(); + dataHash.put(HS_RELATORIO_ID, toHs_relatorio_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsRelatorioLegislacao.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedida.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedida.java new file mode 100644 index 00000000..4bee51d5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedida.java @@ -0,0 +1,183 @@ +/* +* HsRelatorioMedida.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsRelatorioMedida implements JDOInnerObject +{ + private Integer id; + private Integer risco_id; + private String description; + private String requesitos_legais; + private java.sql.Timestamp deleted_date; + + public HsRelatorioMedida() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsRelatorioMedidaDataAuto.ID ) + { + return id; + } + else if( fieldName == HsRelatorioMedidaDataAuto.RISCO_ID ) + { + return risco_id; + } + else if( fieldName == HsRelatorioMedidaDataAuto.DESCRIPTION ) + { + return description; + } + else if( fieldName == HsRelatorioMedidaDataAuto.REQUESITOS_LEGAIS ) + { + return requesitos_legais; + } + else if( fieldName == HsRelatorioMedidaDataAuto.DELETED_DATE ) + { + return deleted_date; + } + else if( fieldName.equals( HsRelatorioMedidaDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsRelatorioMedidaDataAuto.RISCO_ID ) ) + { + return risco_id; + } + else if( fieldName.equals( HsRelatorioMedidaDataAuto.DESCRIPTION ) ) + { + return description; + } + else if( fieldName.equals( HsRelatorioMedidaDataAuto.REQUESITOS_LEGAIS ) ) + { + return requesitos_legais; + } + else if( fieldName.equals( HsRelatorioMedidaDataAuto.DELETED_DATE ) ) + { + return deleted_date; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsRelatorioMedidaDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsRelatorioMedidaDataAuto.RISCO_ID ) + { + risco_id = ( Integer ) value; + } + else if( fieldName == HsRelatorioMedidaDataAuto.DESCRIPTION ) + { + description = ( String ) value; + } + else if( fieldName == HsRelatorioMedidaDataAuto.REQUESITOS_LEGAIS ) + { + requesitos_legais = ( String ) value; + } + else if( fieldName == HsRelatorioMedidaDataAuto.DELETED_DATE ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( HsRelatorioMedidaDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioMedidaDataAuto.RISCO_ID ) ) + { + risco_id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioMedidaDataAuto.DESCRIPTION ) ) + { + description = ( String ) value; + } + else if( fieldName.equals( HsRelatorioMedidaDataAuto.REQUESITOS_LEGAIS ) ) + { + requesitos_legais = ( String ) value; + } + else if( fieldName.equals( HsRelatorioMedidaDataAuto.DELETED_DATE ) ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getRisco_id() + { + return risco_id; + } + + public void setRisco_id(Integer risco_idValue ) + { + this.risco_id = risco_idValue; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String descriptionValue ) + { + this.description = descriptionValue; + } + + public String getRequesitos_legais() + { + return requesitos_legais; + } + + public void setRequesitos_legais(String requesitos_legaisValue ) + { + this.requesitos_legais = requesitos_legaisValue; + } + + public java.sql.Timestamp getDeleted_date() + { + return deleted_date; + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.deleted_date = deleted_dateValue; + } + + public Class getOuterClass() + { + return HsRelatorioMedidaDataAuto.class; + } + + public HsRelatorioMedidaDataAuto getOuterClassInstance() + { + HsRelatorioMedidaDataAuto outerObj = new HsRelatorioMedidaDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedidaData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedidaData.java new file mode 100644 index 00000000..977b2091 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioMedidaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsRelatorioMedidaData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaDataAuto +{ + + public HsRelatorioMedidaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedidaDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedidaDataAuto.java new file mode 100644 index 00000000..1d546c5a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedidaDataAuto.java @@ -0,0 +1,190 @@ +/* +* HsRelatorioMedidaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsRelatorioMedidaDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_relatorio_medida"; + + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio_medida.id"; + public static final String RISCO_ID = "risco_id"; + public static final String RISCO_ID_FULL = "hs_relatorio_medida.risco_id"; + public static final String TO_RISCO_ID = "to risco_id"; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_relatorio_medida.description"; + public static final String REQUESITOS_LEGAIS = "requesitos_legais"; + public static final String REQUESITOS_LEGAIS_FULL = "hs_relatorio_medida.requesitos_legais"; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_relatorio_medida.deleted_date"; + + public static final String FIELD_NAMES[] = new String[]{ + RISCO_ID, TO_RISCO_ID, DESCRIPTION, REQUESITOS_LEGAIS, DELETED_DATE, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, RISCO_ID, DESCRIPTION, REQUESITOS_LEGAIS, DELETED_DATE, }; + + private Map dataHash; + + public HsRelatorioMedidaDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getRisco_id() + { + return (Integer) dataHash.get(RISCO_ID); + } + + public void setRisco_id(Integer risco_idValue ) + { + dataHash.put(TO_RISCO_ID, null); + dataHash.put(RISCO_ID, risco_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData toRisco_id() + throws Exception + { + if( dataHash.get(TO_RISCO_ID) == null && getRisco_id() != null ) + { + dataHash.put(TO_RISCO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData.class, new Object[]{ getRisco_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData) dataHash.get(TO_RISCO_ID); + } + + public void setToRisco_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData risco_idObject ) + { + if( risco_idObject == null ) + { + dataHash.put(RISCO_ID, null); + } + else + { + dataHash.put(RISCO_ID, risco_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData.ID )); + } + dataHash.put(TO_RISCO_ID, risco_idObject); + } + + public String getDescription() + { + return (String) get(DESCRIPTION); + } + + public void setDescription(String descriptionValue ) + { + this.set(DESCRIPTION, descriptionValue ); + } + + public String getRequesitos_legais() + { + return (String) get(REQUESITOS_LEGAIS); + } + + public void setRequesitos_legais(String requesitos_legaisValue ) + { + this.set(REQUESITOS_LEGAIS, requesitos_legaisValue ); + } + + public java.sql.Timestamp getDeleted_date() + { + return (java.sql.Timestamp) get(DELETED_DATE); + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.set(DELETED_DATE, deleted_dateValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_RISCO_ID.equals( fieldName ) ) + { + value = toRisco_id(); + } + else if( RISCO_ID.equals( fieldName ) ) + { + value = getRisco_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_RISCO_ID.equals( fieldName ) ) + { + setToRisco_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData) value ); + } + else if( RISCO_ID.equals( fieldName ) ) + { + setRisco_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_RISCO_ID) != null ) + { + toRisco_id().save(); + dataHash.put(RISCO_ID, toRisco_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsRelatorioMedida.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacao.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacao.java new file mode 100644 index 00000000..5cb7063e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacao.java @@ -0,0 +1,210 @@ +/* +* HsRelatorioNormalizacao.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsRelatorioNormalizacao implements JDOInnerObject +{ + private Integer hs_relatorio_id; + private Integer hs_normalizacao_id; + private Integer id; + private String codigo; + private String descricao; + private Boolean portuguesa; + + public HsRelatorioNormalizacao() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsRelatorioNormalizacaoDataAuto.HS_RELATORIO_ID ) + { + return hs_relatorio_id; + } + else if( fieldName == HsRelatorioNormalizacaoDataAuto.HS_NORMALIZACAO_ID ) + { + return hs_normalizacao_id; + } + else if( fieldName == HsRelatorioNormalizacaoDataAuto.ID ) + { + return id; + } + else if( fieldName == HsRelatorioNormalizacaoDataAuto.CODIGO ) + { + return codigo; + } + else if( fieldName == HsRelatorioNormalizacaoDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == HsRelatorioNormalizacaoDataAuto.PORTUGUESA ) + { + return portuguesa; + } + else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.HS_RELATORIO_ID ) ) + { + return hs_relatorio_id; + } + else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.HS_NORMALIZACAO_ID ) ) + { + return hs_normalizacao_id; + } + else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.CODIGO ) ) + { + return codigo; + } + else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.PORTUGUESA ) ) + { + return portuguesa; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsRelatorioNormalizacaoDataAuto.HS_RELATORIO_ID ) + { + hs_relatorio_id = ( Integer ) value; + } + else if( fieldName == HsRelatorioNormalizacaoDataAuto.HS_NORMALIZACAO_ID ) + { + hs_normalizacao_id = ( Integer ) value; + } + else if( fieldName == HsRelatorioNormalizacaoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsRelatorioNormalizacaoDataAuto.CODIGO ) + { + codigo = ( String ) value; + } + else if( fieldName == HsRelatorioNormalizacaoDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == HsRelatorioNormalizacaoDataAuto.PORTUGUESA ) + { + portuguesa = ( Boolean ) value; + } + else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.HS_RELATORIO_ID ) ) + { + hs_relatorio_id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.HS_NORMALIZACAO_ID ) ) + { + hs_normalizacao_id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.CODIGO ) ) + { + codigo = ( String ) value; + } + else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.PORTUGUESA ) ) + { + portuguesa = ( Boolean ) value; + } + } + + public Integer getHs_relatorio_id() + { + return hs_relatorio_id; + } + + public void setHs_relatorio_id(Integer hs_relatorio_idValue ) + { + this.hs_relatorio_id = hs_relatorio_idValue; + } + + public Integer getHs_normalizacao_id() + { + return hs_normalizacao_id; + } + + public void setHs_normalizacao_id(Integer hs_normalizacao_idValue ) + { + this.hs_normalizacao_id = hs_normalizacao_idValue; + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getCodigo() + { + return codigo; + } + + public void setCodigo(String codigoValue ) + { + this.codigo = codigoValue; + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public Boolean getPortuguesa() + { + return portuguesa; + } + + public void setPortuguesa(Boolean portuguesaValue ) + { + this.portuguesa = portuguesaValue; + } + + public Class getOuterClass() + { + return HsRelatorioNormalizacaoDataAuto.class; + } + + public HsRelatorioNormalizacaoDataAuto getOuterClassInstance() + { + HsRelatorioNormalizacaoDataAuto outerObj = new HsRelatorioNormalizacaoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacaoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacaoData.java new file mode 100644 index 00000000..a7386050 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacaoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioNormalizacaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsRelatorioNormalizacaoData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioNormalizacaoDataAuto +{ + + public HsRelatorioNormalizacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacaoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacaoDataAuto.java new file mode 100644 index 00000000..cb95f185 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacaoDataAuto.java @@ -0,0 +1,203 @@ +/* +* HsRelatorioNormalizacaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsRelatorioNormalizacaoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_relatorio_normalizacao"; + + public static final String HS_RELATORIO_ID = "hs_relatorio_id"; + public static final String HS_RELATORIO_ID_FULL = "hs_relatorio_normalizacao.hs_relatorio_id"; + public static final String TO_HS_RELATORIO_ID = "to hs_relatorio_id"; + public static final String HS_NORMALIZACAO_ID = "hs_normalizacao_id"; + public static final String HS_NORMALIZACAO_ID_FULL = "hs_relatorio_normalizacao.hs_normalizacao_id"; + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio_normalizacao.id"; + public static final String CODIGO = "codigo"; + public static final String CODIGO_FULL = "hs_relatorio_normalizacao.codigo"; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "hs_relatorio_normalizacao.descricao"; + public static final String PORTUGUESA = "portuguesa"; + public static final String PORTUGUESA_FULL = "hs_relatorio_normalizacao.portuguesa"; + + public static final String FIELD_NAMES[] = new String[]{ + HS_RELATORIO_ID, TO_HS_RELATORIO_ID, HS_NORMALIZACAO_ID, CODIGO, DESCRICAO, + PORTUGUESA, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + HS_RELATORIO_ID, HS_NORMALIZACAO_ID, ID, CODIGO, DESCRICAO, PORTUGUESA, }; + + private Map dataHash; + + public HsRelatorioNormalizacaoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getHs_relatorio_id() + { + return (Integer) dataHash.get(HS_RELATORIO_ID); + } + + public void setHs_relatorio_id(Integer hs_relatorio_idValue ) + { + dataHash.put(TO_HS_RELATORIO_ID, null); + dataHash.put(HS_RELATORIO_ID, hs_relatorio_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData toHs_relatorio_id() + throws Exception + { + if( dataHash.get(TO_HS_RELATORIO_ID) == null && getHs_relatorio_id() != null ) + { + dataHash.put(TO_HS_RELATORIO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.class, new Object[]{ getHs_relatorio_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) dataHash.get(TO_HS_RELATORIO_ID); + } + + public void setToHs_relatorio_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData hs_relatorio_idObject ) + { + if( hs_relatorio_idObject == null ) + { + dataHash.put(HS_RELATORIO_ID, null); + } + else + { + dataHash.put(HS_RELATORIO_ID, hs_relatorio_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID )); + } + dataHash.put(TO_HS_RELATORIO_ID, hs_relatorio_idObject); + } + + public Integer getHs_normalizacao_id() + { + return (Integer) get(HS_NORMALIZACAO_ID); + } + + public void setHs_normalizacao_id(Integer hs_normalizacao_idValue ) + { + this.set(HS_NORMALIZACAO_ID, hs_normalizacao_idValue ); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getCodigo() + { + return (String) get(CODIGO); + } + + public void setCodigo(String codigoValue ) + { + this.set(CODIGO, codigoValue ); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public Boolean getPortuguesa() + { + return (Boolean) get(PORTUGUESA); + } + + public void setPortuguesa(Boolean portuguesaValue ) + { + this.set(PORTUGUESA, portuguesaValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_HS_RELATORIO_ID.equals( fieldName ) ) + { + value = toHs_relatorio_id(); + } + else if( HS_RELATORIO_ID.equals( fieldName ) ) + { + value = getHs_relatorio_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_HS_RELATORIO_ID.equals( fieldName ) ) + { + setToHs_relatorio_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) value ); + } + else if( HS_RELATORIO_ID.equals( fieldName ) ) + { + setHs_relatorio_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_HS_RELATORIO_ID) != null ) + { + toHs_relatorio_id().save(); + dataHash.put(HS_RELATORIO_ID, toHs_relatorio_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsRelatorioNormalizacao.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPosto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPosto.java new file mode 100644 index 00000000..966c2a5e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPosto.java @@ -0,0 +1,183 @@ +/* +* HsRelatorioPosto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsRelatorioPosto implements JDOInnerObject +{ + private Integer id; + private String description; + private Integer area_id; + private java.sql.Timestamp deleted_date; + private Boolean is_principal; + + public HsRelatorioPosto() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsRelatorioPostoDataAuto.ID ) + { + return id; + } + else if( fieldName == HsRelatorioPostoDataAuto.DESCRIPTION ) + { + return description; + } + else if( fieldName == HsRelatorioPostoDataAuto.AREA_ID ) + { + return area_id; + } + else if( fieldName == HsRelatorioPostoDataAuto.DELETED_DATE ) + { + return deleted_date; + } + else if( fieldName == HsRelatorioPostoDataAuto.IS_PRINCIPAL ) + { + return is_principal; + } + else if( fieldName.equals( HsRelatorioPostoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsRelatorioPostoDataAuto.DESCRIPTION ) ) + { + return description; + } + else if( fieldName.equals( HsRelatorioPostoDataAuto.AREA_ID ) ) + { + return area_id; + } + else if( fieldName.equals( HsRelatorioPostoDataAuto.DELETED_DATE ) ) + { + return deleted_date; + } + else if( fieldName.equals( HsRelatorioPostoDataAuto.IS_PRINCIPAL ) ) + { + return is_principal; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsRelatorioPostoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsRelatorioPostoDataAuto.DESCRIPTION ) + { + description = ( String ) value; + } + else if( fieldName == HsRelatorioPostoDataAuto.AREA_ID ) + { + area_id = ( Integer ) value; + } + else if( fieldName == HsRelatorioPostoDataAuto.DELETED_DATE ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName == HsRelatorioPostoDataAuto.IS_PRINCIPAL ) + { + is_principal = ( Boolean ) value; + } + else if( fieldName.equals( HsRelatorioPostoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioPostoDataAuto.DESCRIPTION ) ) + { + description = ( String ) value; + } + else if( fieldName.equals( HsRelatorioPostoDataAuto.AREA_ID ) ) + { + area_id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioPostoDataAuto.DELETED_DATE ) ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( HsRelatorioPostoDataAuto.IS_PRINCIPAL ) ) + { + is_principal = ( Boolean ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String descriptionValue ) + { + this.description = descriptionValue; + } + + public Integer getArea_id() + { + return area_id; + } + + public void setArea_id(Integer area_idValue ) + { + this.area_id = area_idValue; + } + + public java.sql.Timestamp getDeleted_date() + { + return deleted_date; + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.deleted_date = deleted_dateValue; + } + + public Boolean getIs_principal() + { + return is_principal; + } + + public void setIs_principal(Boolean is_principalValue ) + { + this.is_principal = is_principalValue; + } + + public Class getOuterClass() + { + return HsRelatorioPostoDataAuto.class; + } + + public HsRelatorioPostoDataAuto getOuterClassInstance() + { + HsRelatorioPostoDataAuto outerObj = new HsRelatorioPostoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoData.java new file mode 100644 index 00000000..b304fc7b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioPostoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsRelatorioPostoData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoDataAuto +{ + + public HsRelatorioPostoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoDataAuto.java new file mode 100644 index 00000000..5d24162c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoDataAuto.java @@ -0,0 +1,190 @@ +/* +* HsRelatorioPostoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsRelatorioPostoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_relatorio_posto"; + + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio_posto.id"; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_relatorio_posto.description"; + public static final String AREA_ID = "area_id"; + public static final String AREA_ID_FULL = "hs_relatorio_posto.area_id"; + public static final String TO_AREA_ID = "to area_id"; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_relatorio_posto.deleted_date"; + public static final String IS_PRINCIPAL = "is_principal"; + public static final String IS_PRINCIPAL_FULL = "hs_relatorio_posto.is_principal"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRIPTION, AREA_ID, TO_AREA_ID, DELETED_DATE, IS_PRINCIPAL, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DESCRIPTION, AREA_ID, DELETED_DATE, IS_PRINCIPAL, }; + + private Map dataHash; + + public HsRelatorioPostoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getDescription() + { + return (String) get(DESCRIPTION); + } + + public void setDescription(String descriptionValue ) + { + this.set(DESCRIPTION, descriptionValue ); + } + + public Integer getArea_id() + { + return (Integer) dataHash.get(AREA_ID); + } + + public void setArea_id(Integer area_idValue ) + { + dataHash.put(TO_AREA_ID, null); + dataHash.put(AREA_ID, area_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaData toArea_id() + throws Exception + { + if( dataHash.get(TO_AREA_ID) == null && getArea_id() != null ) + { + dataHash.put(TO_AREA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaData.class, new Object[]{ getArea_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaData) dataHash.get(TO_AREA_ID); + } + + public void setToArea_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaData area_idObject ) + { + if( area_idObject == null ) + { + dataHash.put(AREA_ID, null); + } + else + { + dataHash.put(AREA_ID, area_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaData.ID )); + } + dataHash.put(TO_AREA_ID, area_idObject); + } + + public java.sql.Timestamp getDeleted_date() + { + return (java.sql.Timestamp) get(DELETED_DATE); + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.set(DELETED_DATE, deleted_dateValue ); + } + + public Boolean getIs_principal() + { + return (Boolean) get(IS_PRINCIPAL); + } + + public void setIs_principal(Boolean is_principalValue ) + { + this.set(IS_PRINCIPAL, is_principalValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_AREA_ID.equals( fieldName ) ) + { + value = toArea_id(); + } + else if( AREA_ID.equals( fieldName ) ) + { + value = getArea_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_AREA_ID.equals( fieldName ) ) + { + setToArea_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaData) value ); + } + else if( AREA_ID.equals( fieldName ) ) + { + setArea_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_AREA_ID) != null ) + { + toArea_id().save(); + dataHash.put(AREA_ID, toArea_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsRelatorioPosto.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedida.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedida.java new file mode 100644 index 00000000..17841d62 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedida.java @@ -0,0 +1,141 @@ +/* +* HsRelatorioPostoMedida.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsRelatorioPostoMedida implements JDOInnerObject +{ + private Integer posto_id; + private Integer medida_id; + private Boolean is_plano_actuacao; + + public HsRelatorioPostoMedida() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsRelatorioPostoMedidaDataAuto.POSTO_ID ) + { + return posto_id; + } + else if( fieldName == HsRelatorioPostoMedidaDataAuto.MEDIDA_ID ) + { + return medida_id; + } + else if( fieldName == HsRelatorioPostoMedidaDataAuto.IS_PLANO_ACTUACAO ) + { + return is_plano_actuacao; + } + else if( fieldName.equals( HsRelatorioPostoMedidaDataAuto.POSTO_ID ) ) + { + return posto_id; + } + else if( fieldName.equals( HsRelatorioPostoMedidaDataAuto.MEDIDA_ID ) ) + { + return medida_id; + } + else if( fieldName.equals( HsRelatorioPostoMedidaDataAuto.IS_PLANO_ACTUACAO ) ) + { + return is_plano_actuacao; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsRelatorioPostoMedidaDataAuto.POSTO_ID ) + { + posto_id = ( Integer ) value; + } + else if( fieldName == HsRelatorioPostoMedidaDataAuto.MEDIDA_ID ) + { + medida_id = ( Integer ) value; + } + else if( fieldName == HsRelatorioPostoMedidaDataAuto.IS_PLANO_ACTUACAO ) + { + is_plano_actuacao = ( Boolean ) value; + } + else if( fieldName.equals( HsRelatorioPostoMedidaDataAuto.POSTO_ID ) ) + { + posto_id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioPostoMedidaDataAuto.MEDIDA_ID ) ) + { + medida_id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioPostoMedidaDataAuto.IS_PLANO_ACTUACAO ) ) + { + is_plano_actuacao = ( Boolean ) value; + } + } + + public Integer getPosto_id() + { + return posto_id; + } + + public void setPosto_id(Integer posto_idValue ) + { + this.posto_id = posto_idValue; + } + + public Integer getMedida_id() + { + return medida_id; + } + + public void setMedida_id(Integer medida_idValue ) + { + this.medida_id = medida_idValue; + } + + public Boolean getIs_plano_actuacao() + { + return is_plano_actuacao; + } + + public void setIs_plano_actuacao(Boolean is_plano_actuacaoValue ) + { + this.is_plano_actuacao = is_plano_actuacaoValue; + } + + public Class getOuterClass() + { + return HsRelatorioPostoMedidaDataAuto.class; + } + + public HsRelatorioPostoMedidaDataAuto getOuterClassInstance() + { + HsRelatorioPostoMedidaDataAuto outerObj = new HsRelatorioPostoMedidaDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoMedidaID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoMedidaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoMedidaID(); + + Object obj; + obj = this.getPosto_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.posto_id = (Integer)obj; + + obj = this.getMedida_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.medida_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaData.java new file mode 100644 index 00000000..d9f3aa8a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioPostoMedidaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsRelatorioPostoMedidaData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoMedidaDataAuto +{ + + public HsRelatorioPostoMedidaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaDataAuto.java new file mode 100644 index 00000000..dc07a4a2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaDataAuto.java @@ -0,0 +1,225 @@ +/* +* HsRelatorioPostoMedidaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsRelatorioPostoMedidaDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_relatorio_posto_medida"; + + public static final String POSTO_ID = "posto_id"; + public static final String POSTO_ID_FULL = "hs_relatorio_posto_medida.posto_id"; + public static final String TO_POSTO_ID = "to posto_id"; + public static final String MEDIDA_ID = "medida_id"; + public static final String MEDIDA_ID_FULL = "hs_relatorio_posto_medida.medida_id"; + public static final String TO_MEDIDA_ID = "to medida_id"; + public static final String IS_PLANO_ACTUACAO = "is_plano_actuacao"; + public static final String IS_PLANO_ACTUACAO_FULL = "hs_relatorio_posto_medida.is_plano_actuacao"; + + public static final String FIELD_NAMES[] = new String[]{ + IS_PLANO_ACTUACAO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + POSTO_ID, MEDIDA_ID, IS_PLANO_ACTUACAO, }; + + private Map dataHash; + + public HsRelatorioPostoMedidaDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getPosto_id() + { + return (Integer) dataHash.get(POSTO_ID); + } + + public void setPosto_id(Integer posto_idValue ) + { + dataHash.put(TO_POSTO_ID, null); + dataHash.put(POSTO_ID, posto_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData toPosto_id() + throws Exception + { + if( dataHash.get(TO_POSTO_ID) == null && getPosto_id() != null ) + { + dataHash.put(TO_POSTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData.class, new Object[]{ getPosto_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData) dataHash.get(TO_POSTO_ID); + } + + public void setToPosto_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData posto_idObject ) + { + if( posto_idObject == null ) + { + dataHash.put(POSTO_ID, null); + } + else + { + dataHash.put(POSTO_ID, posto_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData.ID )); + } + dataHash.put(TO_POSTO_ID, posto_idObject); + } + + public Integer getMedida_id() + { + return (Integer) dataHash.get(MEDIDA_ID); + } + + public void setMedida_id(Integer medida_idValue ) + { + dataHash.put(TO_MEDIDA_ID, null); + dataHash.put(MEDIDA_ID, medida_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaData toMedida_id() + throws Exception + { + if( dataHash.get(TO_MEDIDA_ID) == null && getMedida_id() != null ) + { + dataHash.put(TO_MEDIDA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaData.class, new Object[]{ getMedida_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaData) dataHash.get(TO_MEDIDA_ID); + } + + public void setToMedida_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaData medida_idObject ) + { + if( medida_idObject == null ) + { + dataHash.put(MEDIDA_ID, null); + } + else + { + dataHash.put(MEDIDA_ID, medida_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaData.ID )); + } + dataHash.put(TO_MEDIDA_ID, medida_idObject); + } + + public Boolean getIs_plano_actuacao() + { + return (Boolean) get(IS_PLANO_ACTUACAO); + } + + public void setIs_plano_actuacao(Boolean is_plano_actuacaoValue ) + { + this.set(IS_PLANO_ACTUACAO, is_plano_actuacaoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_POSTO_ID.equals( fieldName ) ) + { + value = toPosto_id(); + } + else if( POSTO_ID.equals( fieldName ) ) + { + value = getPosto_id(); + } + else if( MEDIDA_ID.equals( fieldName ) ) + { + value = getMedida_id(); + } + else if( TO_MEDIDA_ID.equals( fieldName ) ) + { + value = toMedida_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_POSTO_ID.equals( fieldName ) ) + { + setToPosto_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData) value ); + } + else if( POSTO_ID.equals( fieldName ) ) + { + setPosto_id( (Integer) value ); + } + else if( MEDIDA_ID.equals( fieldName ) ) + { + setMedida_id( (Integer) value ); + } + else if( TO_MEDIDA_ID.equals( fieldName ) ) + { + setToMedida_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_POSTO_ID) != null ) + { + toPosto_id().save(); + dataHash.put(POSTO_ID, toPosto_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData.ID )); + } + + if( dataHash.get(TO_MEDIDA_ID) != null ) + { + toMedida_id().save(); + dataHash.put(MEDIDA_ID, toMedida_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsRelatorioPostoMedida.class; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoMedidaID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoMedidaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoMedidaID(); + + Object obj; + obj = this.getPosto_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.posto_id = (Integer)obj; + + obj = this.getMedida_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.medida_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaID.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaID.java new file mode 100644 index 00000000..e1987682 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaID.java @@ -0,0 +1,37 @@ +/* +* HsRelatorioPostoMedidaID.java +* +* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import java.io.*; + +import com.evolute.utils.jdo.jpox.JDOIDClass; + +public final class HsRelatorioPostoMedidaID extends JDOIDClass implements Serializable +{ + public Integer posto_id; + public Integer medida_id; + + public HsRelatorioPostoMedidaID() + { + } + + + public Object[] getValue() + { + Object value[] = new Object[ 2 ]; + value[ 0 ] = posto_id; + value[ 1 ] = medida_id; + return value; + } + + public void setValues( Object values[] ) + { + posto_id = (Integer) values[ 0 ]; + medida_id = (Integer) values[ 1 ]; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoRisco.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoRisco.java new file mode 100644 index 00000000..ea04abe0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoRisco.java @@ -0,0 +1,222 @@ +/* +* HsRelatorioPostoRisco.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsRelatorioPostoRisco implements JDOInnerObject +{ + private Integer posto_id; + private Integer risco_id; + private Integer probabilidade; + private Integer severidade; + private Integer valor_qualitativo_id; + private Integer ordem; + + public HsRelatorioPostoRisco() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsRelatorioPostoRiscoDataAuto.POSTO_ID ) + { + return posto_id; + } + else if( fieldName == HsRelatorioPostoRiscoDataAuto.RISCO_ID ) + { + return risco_id; + } + else if( fieldName == HsRelatorioPostoRiscoDataAuto.PROBABILIDADE ) + { + return probabilidade; + } + else if( fieldName == HsRelatorioPostoRiscoDataAuto.SEVERIDADE ) + { + return severidade; + } + else if( fieldName == HsRelatorioPostoRiscoDataAuto.VALOR_QUALITATIVO_ID ) + { + return valor_qualitativo_id; + } + else if( fieldName == HsRelatorioPostoRiscoDataAuto.ORDEM ) + { + return ordem; + } + else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.POSTO_ID ) ) + { + return posto_id; + } + else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.RISCO_ID ) ) + { + return risco_id; + } + else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.PROBABILIDADE ) ) + { + return probabilidade; + } + else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.SEVERIDADE ) ) + { + return severidade; + } + else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.VALOR_QUALITATIVO_ID ) ) + { + return valor_qualitativo_id; + } + else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.ORDEM ) ) + { + return ordem; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsRelatorioPostoRiscoDataAuto.POSTO_ID ) + { + posto_id = ( Integer ) value; + } + else if( fieldName == HsRelatorioPostoRiscoDataAuto.RISCO_ID ) + { + risco_id = ( Integer ) value; + } + else if( fieldName == HsRelatorioPostoRiscoDataAuto.PROBABILIDADE ) + { + probabilidade = ( Integer ) value; + } + else if( fieldName == HsRelatorioPostoRiscoDataAuto.SEVERIDADE ) + { + severidade = ( Integer ) value; + } + else if( fieldName == HsRelatorioPostoRiscoDataAuto.VALOR_QUALITATIVO_ID ) + { + valor_qualitativo_id = ( Integer ) value; + } + else if( fieldName == HsRelatorioPostoRiscoDataAuto.ORDEM ) + { + ordem = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.POSTO_ID ) ) + { + posto_id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.RISCO_ID ) ) + { + risco_id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.PROBABILIDADE ) ) + { + probabilidade = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.SEVERIDADE ) ) + { + severidade = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.VALOR_QUALITATIVO_ID ) ) + { + valor_qualitativo_id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.ORDEM ) ) + { + ordem = ( Integer ) value; + } + } + + public Integer getPosto_id() + { + return posto_id; + } + + public void setPosto_id(Integer posto_idValue ) + { + this.posto_id = posto_idValue; + } + + public Integer getRisco_id() + { + return risco_id; + } + + public void setRisco_id(Integer risco_idValue ) + { + this.risco_id = risco_idValue; + } + + public Integer getProbabilidade() + { + return probabilidade; + } + + public void setProbabilidade(Integer probabilidadeValue ) + { + this.probabilidade = probabilidadeValue; + } + + public Integer getSeveridade() + { + return severidade; + } + + public void setSeveridade(Integer severidadeValue ) + { + this.severidade = severidadeValue; + } + + public Integer getValor_qualitativo_id() + { + return valor_qualitativo_id; + } + + public void setValor_qualitativo_id(Integer valor_qualitativo_idValue ) + { + this.valor_qualitativo_id = valor_qualitativo_idValue; + } + + public Integer getOrdem() + { + return ordem; + } + + public void setOrdem(Integer ordemValue ) + { + this.ordem = ordemValue; + } + + public Class getOuterClass() + { + return HsRelatorioPostoRiscoDataAuto.class; + } + + public HsRelatorioPostoRiscoDataAuto getOuterClassInstance() + { + HsRelatorioPostoRiscoDataAuto outerObj = new HsRelatorioPostoRiscoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoRiscoID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoRiscoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoRiscoID(); + + Object obj; + obj = this.getPosto_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.posto_id = (Integer)obj; + + obj = this.getRisco_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.risco_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoRiscoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoRiscoData.java new file mode 100644 index 00000000..d99b0975 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoRiscoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioPostoRiscoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsRelatorioPostoRiscoData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoRiscoDataAuto +{ + + public HsRelatorioPostoRiscoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoRiscoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoRiscoDataAuto.java new file mode 100644 index 00000000..0f4ccd7d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoRiscoDataAuto.java @@ -0,0 +1,309 @@ +/* +* HsRelatorioPostoRiscoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsRelatorioPostoRiscoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_relatorio_posto_risco"; + + public static final String POSTO_ID = "posto_id"; + public static final String POSTO_ID_FULL = "hs_relatorio_posto_risco.posto_id"; + public static final String TO_POSTO_ID = "to posto_id"; + public static final String RISCO_ID = "risco_id"; + public static final String RISCO_ID_FULL = "hs_relatorio_posto_risco.risco_id"; + public static final String TO_RISCO_ID = "to risco_id"; + public static final String PROBABILIDADE = "probabilidade"; + public static final String PROBABILIDADE_FULL = "hs_relatorio_posto_risco.probabilidade"; + public static final String SEVERIDADE = "severidade"; + public static final String SEVERIDADE_FULL = "hs_relatorio_posto_risco.severidade"; + 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 String TO_VALOR_QUALITATIVO_ID = "to valor_qualitativo_id"; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "hs_relatorio_posto_risco.ordem"; + + public static final String FIELD_NAMES[] = new String[]{ + PROBABILIDADE, SEVERIDADE, VALOR_QUALITATIVO_ID, TO_VALOR_QUALITATIVO_ID, + ORDEM, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + POSTO_ID, RISCO_ID, PROBABILIDADE, SEVERIDADE, VALOR_QUALITATIVO_ID, ORDEM, }; + + private Map dataHash; + + public HsRelatorioPostoRiscoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getPosto_id() + { + return (Integer) dataHash.get(POSTO_ID); + } + + public void setPosto_id(Integer posto_idValue ) + { + dataHash.put(TO_POSTO_ID, null); + dataHash.put(POSTO_ID, posto_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData toPosto_id() + throws Exception + { + if( dataHash.get(TO_POSTO_ID) == null && getPosto_id() != null ) + { + dataHash.put(TO_POSTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData.class, new Object[]{ getPosto_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData) dataHash.get(TO_POSTO_ID); + } + + public void setToPosto_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData posto_idObject ) + { + if( posto_idObject == null ) + { + dataHash.put(POSTO_ID, null); + } + else + { + dataHash.put(POSTO_ID, posto_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData.ID )); + } + dataHash.put(TO_POSTO_ID, posto_idObject); + } + + public Integer getRisco_id() + { + return (Integer) dataHash.get(RISCO_ID); + } + + public void setRisco_id(Integer risco_idValue ) + { + dataHash.put(TO_RISCO_ID, null); + dataHash.put(RISCO_ID, risco_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData toRisco_id() + throws Exception + { + if( dataHash.get(TO_RISCO_ID) == null && getRisco_id() != null ) + { + dataHash.put(TO_RISCO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData.class, new Object[]{ getRisco_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData) dataHash.get(TO_RISCO_ID); + } + + public void setToRisco_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData risco_idObject ) + { + if( risco_idObject == null ) + { + dataHash.put(RISCO_ID, null); + } + else + { + dataHash.put(RISCO_ID, risco_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData.ID )); + } + dataHash.put(TO_RISCO_ID, risco_idObject); + } + + public Integer getProbabilidade() + { + return (Integer) get(PROBABILIDADE); + } + + public void setProbabilidade(Integer probabilidadeValue ) + { + this.set(PROBABILIDADE, probabilidadeValue ); + } + + public Integer getSeveridade() + { + return (Integer) get(SEVERIDADE); + } + + public void setSeveridade(Integer severidadeValue ) + { + this.set(SEVERIDADE, severidadeValue ); + } + + public Integer getValor_qualitativo_id() + { + return (Integer) dataHash.get(VALOR_QUALITATIVO_ID); + } + + public void setValor_qualitativo_id(Integer valor_qualitativo_idValue ) + { + dataHash.put(TO_VALOR_QUALITATIVO_ID, null); + dataHash.put(VALOR_QUALITATIVO_ID, valor_qualitativo_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData toValor_qualitativo_id() + throws Exception + { + if( dataHash.get(TO_VALOR_QUALITATIVO_ID) == null && getValor_qualitativo_id() != null ) + { + dataHash.put(TO_VALOR_QUALITATIVO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData.class, new Object[]{ getValor_qualitativo_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData) dataHash.get(TO_VALOR_QUALITATIVO_ID); + } + + public void setToValor_qualitativo_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData valor_qualitativo_idObject ) + { + if( valor_qualitativo_idObject == null ) + { + dataHash.put(VALOR_QUALITATIVO_ID, null); + } + else + { + dataHash.put(VALOR_QUALITATIVO_ID, valor_qualitativo_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData.ID )); + } + dataHash.put(TO_VALOR_QUALITATIVO_ID, valor_qualitativo_idObject); + } + + public Integer getOrdem() + { + return (Integer) get(ORDEM); + } + + public void setOrdem(Integer ordemValue ) + { + this.set(ORDEM, ordemValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_POSTO_ID.equals( fieldName ) ) + { + value = toPosto_id(); + } + else if( POSTO_ID.equals( fieldName ) ) + { + value = getPosto_id(); + } + else if( TO_VALOR_QUALITATIVO_ID.equals( fieldName ) ) + { + value = toValor_qualitativo_id(); + } + else if( VALOR_QUALITATIVO_ID.equals( fieldName ) ) + { + value = getValor_qualitativo_id(); + } + else if( TO_RISCO_ID.equals( fieldName ) ) + { + value = toRisco_id(); + } + else if( RISCO_ID.equals( fieldName ) ) + { + value = getRisco_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_POSTO_ID.equals( fieldName ) ) + { + setToPosto_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData) value ); + } + else if( POSTO_ID.equals( fieldName ) ) + { + setPosto_id( (Integer) value ); + } + else if( TO_VALOR_QUALITATIVO_ID.equals( fieldName ) ) + { + setToValor_qualitativo_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData) value ); + } + else if( VALOR_QUALITATIVO_ID.equals( fieldName ) ) + { + setValor_qualitativo_id( (Integer) value ); + } + else if( TO_RISCO_ID.equals( fieldName ) ) + { + setToRisco_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData) value ); + } + else if( RISCO_ID.equals( fieldName ) ) + { + setRisco_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_POSTO_ID) != null ) + { + toPosto_id().save(); + dataHash.put(POSTO_ID, toPosto_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData.ID )); + } + + if( dataHash.get(TO_RISCO_ID) != null ) + { + toRisco_id().save(); + dataHash.put(RISCO_ID, toRisco_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData.ID )); + } + + if( dataHash.get(TO_VALOR_QUALITATIVO_ID) != null ) + { + toValor_qualitativo_id().save(); + dataHash.put(VALOR_QUALITATIVO_ID, toValor_qualitativo_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsRelatorioPostoRisco.class; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoRiscoID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoRiscoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoRiscoID(); + + Object obj; + obj = this.getPosto_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.posto_id = (Integer)obj; + + obj = this.getRisco_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.risco_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoRiscoID.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoRiscoID.java new file mode 100644 index 00000000..00c6368d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoRiscoID.java @@ -0,0 +1,37 @@ +/* +* HsRelatorioPostoRiscoID.java +* +* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import java.io.*; + +import com.evolute.utils.jdo.jpox.JDOIDClass; + +public final class HsRelatorioPostoRiscoID extends JDOIDClass implements Serializable +{ + public Integer posto_id; + public Integer risco_id; + + public HsRelatorioPostoRiscoID() + { + } + + + public Object[] getValue() + { + Object value[] = new Object[ 2 ]; + value[ 0 ] = posto_id; + value[ 1 ] = risco_id; + return value; + } + + public void setValues( Object values[] ) + { + posto_id = (Integer) values[ 0 ]; + risco_id = (Integer) values[ 1 ]; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRisco.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRisco.java new file mode 100644 index 00000000..b043988a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRisco.java @@ -0,0 +1,156 @@ +/* +* HsRelatorioRisco.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsRelatorioRisco implements JDOInnerObject +{ + private Integer id; + private Integer relatorio_id; + private String description; + private java.sql.Timestamp deleted_date; + + public HsRelatorioRisco() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsRelatorioRiscoDataAuto.ID ) + { + return id; + } + else if( fieldName == HsRelatorioRiscoDataAuto.RELATORIO_ID ) + { + return relatorio_id; + } + else if( fieldName == HsRelatorioRiscoDataAuto.DESCRIPTION ) + { + return description; + } + else if( fieldName == HsRelatorioRiscoDataAuto.DELETED_DATE ) + { + return deleted_date; + } + else if( fieldName.equals( HsRelatorioRiscoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsRelatorioRiscoDataAuto.RELATORIO_ID ) ) + { + return relatorio_id; + } + else if( fieldName.equals( HsRelatorioRiscoDataAuto.DESCRIPTION ) ) + { + return description; + } + else if( fieldName.equals( HsRelatorioRiscoDataAuto.DELETED_DATE ) ) + { + return deleted_date; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsRelatorioRiscoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsRelatorioRiscoDataAuto.RELATORIO_ID ) + { + relatorio_id = ( Integer ) value; + } + else if( fieldName == HsRelatorioRiscoDataAuto.DESCRIPTION ) + { + description = ( String ) value; + } + else if( fieldName == HsRelatorioRiscoDataAuto.DELETED_DATE ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( HsRelatorioRiscoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioRiscoDataAuto.RELATORIO_ID ) ) + { + relatorio_id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioRiscoDataAuto.DESCRIPTION ) ) + { + description = ( String ) value; + } + else if( fieldName.equals( HsRelatorioRiscoDataAuto.DELETED_DATE ) ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getRelatorio_id() + { + return relatorio_id; + } + + public void setRelatorio_id(Integer relatorio_idValue ) + { + this.relatorio_id = relatorio_idValue; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String descriptionValue ) + { + this.description = descriptionValue; + } + + public java.sql.Timestamp getDeleted_date() + { + return deleted_date; + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.deleted_date = deleted_dateValue; + } + + public Class getOuterClass() + { + return HsRelatorioRiscoDataAuto.class; + } + + public HsRelatorioRiscoDataAuto getOuterClassInstance() + { + HsRelatorioRiscoDataAuto outerObj = new HsRelatorioRiscoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRiscoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRiscoData.java new file mode 100644 index 00000000..df560cc3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRiscoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioRiscoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsRelatorioRiscoData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoDataAuto +{ + + public HsRelatorioRiscoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRiscoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRiscoDataAuto.java new file mode 100644 index 00000000..19c224a8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRiscoDataAuto.java @@ -0,0 +1,178 @@ +/* +* HsRelatorioRiscoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsRelatorioRiscoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_relatorio_risco"; + + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio_risco.id"; + public static final String RELATORIO_ID = "relatorio_id"; + public static final String RELATORIO_ID_FULL = "hs_relatorio_risco.relatorio_id"; + public static final String TO_RELATORIO_ID = "to relatorio_id"; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_relatorio_risco.description"; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_relatorio_risco.deleted_date"; + + public static final String FIELD_NAMES[] = new String[]{ + RELATORIO_ID, TO_RELATORIO_ID, DESCRIPTION, DELETED_DATE, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, RELATORIO_ID, DESCRIPTION, DELETED_DATE, }; + + private Map dataHash; + + public HsRelatorioRiscoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getRelatorio_id() + { + return (Integer) dataHash.get(RELATORIO_ID); + } + + public void setRelatorio_id(Integer relatorio_idValue ) + { + dataHash.put(TO_RELATORIO_ID, null); + dataHash.put(RELATORIO_ID, relatorio_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData toRelatorio_id() + throws Exception + { + if( dataHash.get(TO_RELATORIO_ID) == null && getRelatorio_id() != null ) + { + dataHash.put(TO_RELATORIO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.class, new Object[]{ getRelatorio_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) dataHash.get(TO_RELATORIO_ID); + } + + public void setToRelatorio_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData relatorio_idObject ) + { + if( relatorio_idObject == null ) + { + dataHash.put(RELATORIO_ID, null); + } + else + { + dataHash.put(RELATORIO_ID, relatorio_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID )); + } + dataHash.put(TO_RELATORIO_ID, relatorio_idObject); + } + + public String getDescription() + { + return (String) get(DESCRIPTION); + } + + public void setDescription(String descriptionValue ) + { + this.set(DESCRIPTION, descriptionValue ); + } + + public java.sql.Timestamp getDeleted_date() + { + return (java.sql.Timestamp) get(DELETED_DATE); + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.set(DELETED_DATE, deleted_dateValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( RELATORIO_ID.equals( fieldName ) ) + { + value = getRelatorio_id(); + } + else if( TO_RELATORIO_ID.equals( fieldName ) ) + { + value = toRelatorio_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( RELATORIO_ID.equals( fieldName ) ) + { + setRelatorio_id( (Integer) value ); + } + else if( TO_RELATORIO_ID.equals( fieldName ) ) + { + setToRelatorio_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_RELATORIO_ID) != null ) + { + toRelatorio_id().save(); + dataHash.put(RELATORIO_ID, toRelatorio_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsRelatorioRisco.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRiscoValorQualitativo.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRiscoValorQualitativo.java new file mode 100644 index 00000000..d626f7e8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRiscoValorQualitativo.java @@ -0,0 +1,102 @@ +/* +* HsRelatorioRiscoValorQualitativo.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsRelatorioRiscoValorQualitativo implements JDOInnerObject +{ + private Integer id; + private String description; + + public HsRelatorioRiscoValorQualitativo() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsRelatorioRiscoValorQualitativoDataAuto.ID ) + { + return id; + } + else if( fieldName == HsRelatorioRiscoValorQualitativoDataAuto.DESCRIPTION ) + { + return description; + } + else if( fieldName.equals( HsRelatorioRiscoValorQualitativoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsRelatorioRiscoValorQualitativoDataAuto.DESCRIPTION ) ) + { + return description; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsRelatorioRiscoValorQualitativoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsRelatorioRiscoValorQualitativoDataAuto.DESCRIPTION ) + { + description = ( String ) value; + } + else if( fieldName.equals( HsRelatorioRiscoValorQualitativoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsRelatorioRiscoValorQualitativoDataAuto.DESCRIPTION ) ) + { + description = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String descriptionValue ) + { + this.description = descriptionValue; + } + + public Class getOuterClass() + { + return HsRelatorioRiscoValorQualitativoDataAuto.class; + } + + public HsRelatorioRiscoValorQualitativoDataAuto getOuterClassInstance() + { + HsRelatorioRiscoValorQualitativoDataAuto outerObj = new HsRelatorioRiscoValorQualitativoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRiscoValorQualitativoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRiscoValorQualitativoData.java new file mode 100644 index 00000000..00f70eeb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRiscoValorQualitativoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioRiscoValorQualitativoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsRelatorioRiscoValorQualitativoData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoDataAuto +{ + + public HsRelatorioRiscoValorQualitativoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRiscoValorQualitativoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRiscoValorQualitativoDataAuto.java new file mode 100644 index 00000000..97150c01 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioRiscoValorQualitativoDataAuto.java @@ -0,0 +1,95 @@ +/* +* HsRelatorioRiscoValorQualitativoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsRelatorioRiscoValorQualitativoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_relatorio_risco_valor_qualitativo"; + + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio_risco_valor_qualitativo.id"; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_relatorio_risco_valor_qualitativo.description"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRIPTION, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DESCRIPTION, }; + + private Map dataHash; + + public HsRelatorioRiscoValorQualitativoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getDescription() + { + return (String) get(DESCRIPTION); + } + + public void setDescription(String descriptionValue ) + { + this.set(DESCRIPTION, descriptionValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsRelatorioRiscoValorQualitativo.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRisco.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRisco.java new file mode 100644 index 00000000..1b0ab729 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRisco.java @@ -0,0 +1,156 @@ +/* +* HsRisco.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsRisco implements JDOInnerObject +{ + private Integer id; + private Integer tema_id; + private String description; + private java.sql.Timestamp deleted_date; + + public HsRisco() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsRiscoDataAuto.ID ) + { + return id; + } + else if( fieldName == HsRiscoDataAuto.TEMA_ID ) + { + return tema_id; + } + else if( fieldName == HsRiscoDataAuto.DESCRIPTION ) + { + return description; + } + else if( fieldName == HsRiscoDataAuto.DELETED_DATE ) + { + return deleted_date; + } + else if( fieldName.equals( HsRiscoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsRiscoDataAuto.TEMA_ID ) ) + { + return tema_id; + } + else if( fieldName.equals( HsRiscoDataAuto.DESCRIPTION ) ) + { + return description; + } + else if( fieldName.equals( HsRiscoDataAuto.DELETED_DATE ) ) + { + return deleted_date; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsRiscoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsRiscoDataAuto.TEMA_ID ) + { + tema_id = ( Integer ) value; + } + else if( fieldName == HsRiscoDataAuto.DESCRIPTION ) + { + description = ( String ) value; + } + else if( fieldName == HsRiscoDataAuto.DELETED_DATE ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( HsRiscoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsRiscoDataAuto.TEMA_ID ) ) + { + tema_id = ( Integer ) value; + } + else if( fieldName.equals( HsRiscoDataAuto.DESCRIPTION ) ) + { + description = ( String ) value; + } + else if( fieldName.equals( HsRiscoDataAuto.DELETED_DATE ) ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getTema_id() + { + return tema_id; + } + + public void setTema_id(Integer tema_idValue ) + { + this.tema_id = tema_idValue; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String descriptionValue ) + { + this.description = descriptionValue; + } + + public java.sql.Timestamp getDeleted_date() + { + return deleted_date; + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.deleted_date = deleted_dateValue; + } + + public Class getOuterClass() + { + return HsRiscoDataAuto.class; + } + + public HsRiscoDataAuto getOuterClassInstance() + { + HsRiscoDataAuto outerObj = new HsRiscoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoData.java new file mode 100644 index 00000000..55ce09d7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoData.java @@ -0,0 +1,18 @@ +/* +* HsRiscoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsRiscoData extends com.evolute.siprp.server.db.data.siprp_local3.HsRiscoDataAuto +{ + + public HsRiscoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoDataAuto.java new file mode 100644 index 00000000..eb811187 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoDataAuto.java @@ -0,0 +1,178 @@ +/* +* HsRiscoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsRiscoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_risco"; + + public static final String ID = "id"; + public static final String ID_FULL = "hs_risco.id"; + public static final String TEMA_ID = "tema_id"; + public static final String TEMA_ID_FULL = "hs_risco.tema_id"; + public static final String TO_TEMA_ID = "to tema_id"; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_risco.description"; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_risco.deleted_date"; + + public static final String FIELD_NAMES[] = new String[]{ + TEMA_ID, TO_TEMA_ID, DESCRIPTION, DELETED_DATE, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, TEMA_ID, DESCRIPTION, DELETED_DATE, }; + + private Map dataHash; + + public HsRiscoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getTema_id() + { + return (Integer) dataHash.get(TEMA_ID); + } + + public void setTema_id(Integer tema_idValue ) + { + dataHash.put(TO_TEMA_ID, null); + dataHash.put(TEMA_ID, tema_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRiscoTemaData toTema_id() + throws Exception + { + if( dataHash.get(TO_TEMA_ID) == null && getTema_id() != null ) + { + dataHash.put(TO_TEMA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRiscoTemaData.class, new Object[]{ getTema_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRiscoTemaData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRiscoTemaData) dataHash.get(TO_TEMA_ID); + } + + public void setToTema_id(com.evolute.siprp.server.db.data.siprp_local3.HsRiscoTemaData tema_idObject ) + { + if( tema_idObject == null ) + { + dataHash.put(TEMA_ID, null); + } + else + { + dataHash.put(TEMA_ID, tema_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRiscoTemaData.ID )); + } + dataHash.put(TO_TEMA_ID, tema_idObject); + } + + public String getDescription() + { + return (String) get(DESCRIPTION); + } + + public void setDescription(String descriptionValue ) + { + this.set(DESCRIPTION, descriptionValue ); + } + + public java.sql.Timestamp getDeleted_date() + { + return (java.sql.Timestamp) get(DELETED_DATE); + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.set(DELETED_DATE, deleted_dateValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_TEMA_ID.equals( fieldName ) ) + { + value = toTema_id(); + } + else if( TEMA_ID.equals( fieldName ) ) + { + value = getTema_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_TEMA_ID.equals( fieldName ) ) + { + setToTema_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRiscoTemaData) value ); + } + else if( TEMA_ID.equals( fieldName ) ) + { + setTema_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_TEMA_ID) != null ) + { + toTema_id().save(); + dataHash.put(TEMA_ID, toTema_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRiscoTemaData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsRisco.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoEmpresa.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoEmpresa.java new file mode 100644 index 00000000..f14ce1ad --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoEmpresa.java @@ -0,0 +1,114 @@ +/* +* HsRiscoEmpresa.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsRiscoEmpresa implements JDOInnerObject +{ + private Integer risco_id; + private Integer empresa_id; + + public HsRiscoEmpresa() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsRiscoEmpresaDataAuto.RISCO_ID ) + { + return risco_id; + } + else if( fieldName == HsRiscoEmpresaDataAuto.EMPRESA_ID ) + { + return empresa_id; + } + else if( fieldName.equals( HsRiscoEmpresaDataAuto.RISCO_ID ) ) + { + return risco_id; + } + else if( fieldName.equals( HsRiscoEmpresaDataAuto.EMPRESA_ID ) ) + { + return empresa_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsRiscoEmpresaDataAuto.RISCO_ID ) + { + risco_id = ( Integer ) value; + } + else if( fieldName == HsRiscoEmpresaDataAuto.EMPRESA_ID ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName.equals( HsRiscoEmpresaDataAuto.RISCO_ID ) ) + { + risco_id = ( Integer ) value; + } + else if( fieldName.equals( HsRiscoEmpresaDataAuto.EMPRESA_ID ) ) + { + empresa_id = ( Integer ) value; + } + } + + public Integer getRisco_id() + { + return risco_id; + } + + public void setRisco_id(Integer risco_idValue ) + { + this.risco_id = risco_idValue; + } + + public Integer getEmpresa_id() + { + return empresa_id; + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + this.empresa_id = empresa_idValue; + } + + public Class getOuterClass() + { + return HsRiscoEmpresaDataAuto.class; + } + + public HsRiscoEmpresaDataAuto getOuterClassInstance() + { + HsRiscoEmpresaDataAuto outerObj = new HsRiscoEmpresaDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRiscoEmpresaID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsRiscoEmpresaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsRiscoEmpresaID(); + + Object obj; + obj = this.getRisco_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.risco_id = (Integer)obj; + + obj = this.getEmpresa_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.empresa_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoEmpresaData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoEmpresaData.java new file mode 100644 index 00000000..6553781b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoEmpresaData.java @@ -0,0 +1,18 @@ +/* +* HsRiscoEmpresaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsRiscoEmpresaData extends com.evolute.siprp.server.db.data.siprp_local3.HsRiscoEmpresaDataAuto +{ + + public HsRiscoEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoEmpresaDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoEmpresaDataAuto.java new file mode 100644 index 00000000..453a2c04 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoEmpresaDataAuto.java @@ -0,0 +1,213 @@ +/* +* HsRiscoEmpresaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsRiscoEmpresaDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_risco_empresa"; + + public static final String RISCO_ID = "risco_id"; + public static final String RISCO_ID_FULL = "hs_risco_empresa.risco_id"; + public static final String TO_RISCO_ID = "to risco_id"; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "hs_risco_empresa.empresa_id"; + public static final String TO_EMPRESA_ID = "to empresa_id"; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + RISCO_ID, EMPRESA_ID, }; + + private Map dataHash; + + public HsRiscoEmpresaDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getRisco_id() + { + return (Integer) dataHash.get(RISCO_ID); + } + + public void setRisco_id(Integer risco_idValue ) + { + dataHash.put(TO_RISCO_ID, null); + dataHash.put(RISCO_ID, risco_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData toRisco_id() + throws Exception + { + if( dataHash.get(TO_RISCO_ID) == null && getRisco_id() != null ) + { + dataHash.put(TO_RISCO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData.class, new Object[]{ getRisco_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData) dataHash.get(TO_RISCO_ID); + } + + public void setToRisco_id(com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData risco_idObject ) + { + if( risco_idObject == null ) + { + dataHash.put(RISCO_ID, null); + } + else + { + dataHash.put(RISCO_ID, risco_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData.ID )); + } + dataHash.put(TO_RISCO_ID, risco_idObject); + } + + public Integer getEmpresa_id() + { + return (Integer) dataHash.get(EMPRESA_ID); + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + dataHash.put(TO_EMPRESA_ID, null); + dataHash.put(EMPRESA_ID, empresa_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EmpresasData toEmpresa_id() + throws Exception + { + if( dataHash.get(TO_EMPRESA_ID) == null && getEmpresa_id() != null ) + { + dataHash.put(TO_EMPRESA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.class, new Object[]{ getEmpresa_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) dataHash.get(TO_EMPRESA_ID); + } + + public void setToEmpresa_id(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData empresa_idObject ) + { + if( empresa_idObject == null ) + { + dataHash.put(EMPRESA_ID, null); + } + else + { + dataHash.put(EMPRESA_ID, empresa_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + dataHash.put(TO_EMPRESA_ID, empresa_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_EMPRESA_ID.equals( fieldName ) ) + { + value = toEmpresa_id(); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + value = getEmpresa_id(); + } + else if( TO_RISCO_ID.equals( fieldName ) ) + { + value = toRisco_id(); + } + else if( RISCO_ID.equals( fieldName ) ) + { + value = getRisco_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_EMPRESA_ID.equals( fieldName ) ) + { + setToEmpresa_id( (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) value ); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + setEmpresa_id( (Integer) value ); + } + else if( TO_RISCO_ID.equals( fieldName ) ) + { + setToRisco_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData) value ); + } + else if( RISCO_ID.equals( fieldName ) ) + { + setRisco_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_RISCO_ID) != null ) + { + toRisco_id().save(); + dataHash.put(RISCO_ID, toRisco_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData.ID )); + } + + if( dataHash.get(TO_EMPRESA_ID) != null ) + { + toEmpresa_id().save(); + dataHash.put(EMPRESA_ID, toEmpresa_id().get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsRiscoEmpresa.class; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRiscoEmpresaID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsRiscoEmpresaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsRiscoEmpresaID(); + + Object obj; + obj = this.getRisco_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.risco_id = (Integer)obj; + + obj = this.getEmpresa_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.empresa_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoEmpresaID.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoEmpresaID.java new file mode 100644 index 00000000..df99d74a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoEmpresaID.java @@ -0,0 +1,37 @@ +/* +* HsRiscoEmpresaID.java +* +* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import java.io.*; + +import com.evolute.utils.jdo.jpox.JDOIDClass; + +public final class HsRiscoEmpresaID extends JDOIDClass implements Serializable +{ + public Integer risco_id; + public Integer empresa_id; + + public HsRiscoEmpresaID() + { + } + + + public Object[] getValue() + { + Object value[] = new Object[ 2 ]; + value[ 0 ] = risco_id; + value[ 1 ] = empresa_id; + return value; + } + + public void setValues( Object values[] ) + { + risco_id = (Integer) values[ 0 ]; + empresa_id = (Integer) values[ 1 ]; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoMedida.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoMedida.java new file mode 100644 index 00000000..f8963be9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoMedida.java @@ -0,0 +1,114 @@ +/* +* HsRiscoMedida.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsRiscoMedida implements JDOInnerObject +{ + private Integer risco_id; + private Integer medida_id; + + public HsRiscoMedida() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsRiscoMedidaDataAuto.RISCO_ID ) + { + return risco_id; + } + else if( fieldName == HsRiscoMedidaDataAuto.MEDIDA_ID ) + { + return medida_id; + } + else if( fieldName.equals( HsRiscoMedidaDataAuto.RISCO_ID ) ) + { + return risco_id; + } + else if( fieldName.equals( HsRiscoMedidaDataAuto.MEDIDA_ID ) ) + { + return medida_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsRiscoMedidaDataAuto.RISCO_ID ) + { + risco_id = ( Integer ) value; + } + else if( fieldName == HsRiscoMedidaDataAuto.MEDIDA_ID ) + { + medida_id = ( Integer ) value; + } + else if( fieldName.equals( HsRiscoMedidaDataAuto.RISCO_ID ) ) + { + risco_id = ( Integer ) value; + } + else if( fieldName.equals( HsRiscoMedidaDataAuto.MEDIDA_ID ) ) + { + medida_id = ( Integer ) value; + } + } + + public Integer getRisco_id() + { + return risco_id; + } + + public void setRisco_id(Integer risco_idValue ) + { + this.risco_id = risco_idValue; + } + + public Integer getMedida_id() + { + return medida_id; + } + + public void setMedida_id(Integer medida_idValue ) + { + this.medida_id = medida_idValue; + } + + public Class getOuterClass() + { + return HsRiscoMedidaDataAuto.class; + } + + public HsRiscoMedidaDataAuto getOuterClassInstance() + { + HsRiscoMedidaDataAuto outerObj = new HsRiscoMedidaDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRiscoMedidaID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsRiscoMedidaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsRiscoMedidaID(); + + Object obj; + obj = this.getRisco_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.risco_id = (Integer)obj; + + obj = this.getMedida_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.medida_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoMedidaData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoMedidaData.java new file mode 100644 index 00000000..c686435f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsRiscoMedidaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsRiscoMedidaData extends com.evolute.siprp.server.db.data.siprp_local3.HsRiscoMedidaDataAuto +{ + + public HsRiscoMedidaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoMedidaDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoMedidaDataAuto.java new file mode 100644 index 00000000..640c8bce --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoMedidaDataAuto.java @@ -0,0 +1,213 @@ +/* +* HsRiscoMedidaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsRiscoMedidaDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_risco_medida"; + + public static final String RISCO_ID = "risco_id"; + public static final String RISCO_ID_FULL = "hs_risco_medida.risco_id"; + public static final String TO_RISCO_ID = "to risco_id"; + public static final String MEDIDA_ID = "medida_id"; + public static final String MEDIDA_ID_FULL = "hs_risco_medida.medida_id"; + public static final String TO_MEDIDA_ID = "to medida_id"; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + RISCO_ID, MEDIDA_ID, }; + + private Map dataHash; + + public HsRiscoMedidaDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getRisco_id() + { + return (Integer) dataHash.get(RISCO_ID); + } + + public void setRisco_id(Integer risco_idValue ) + { + dataHash.put(TO_RISCO_ID, null); + dataHash.put(RISCO_ID, risco_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData toRisco_id() + throws Exception + { + if( dataHash.get(TO_RISCO_ID) == null && getRisco_id() != null ) + { + dataHash.put(TO_RISCO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData.class, new Object[]{ getRisco_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData) dataHash.get(TO_RISCO_ID); + } + + public void setToRisco_id(com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData risco_idObject ) + { + if( risco_idObject == null ) + { + dataHash.put(RISCO_ID, null); + } + else + { + dataHash.put(RISCO_ID, risco_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData.ID )); + } + dataHash.put(TO_RISCO_ID, risco_idObject); + } + + public Integer getMedida_id() + { + return (Integer) dataHash.get(MEDIDA_ID); + } + + public void setMedida_id(Integer medida_idValue ) + { + dataHash.put(TO_MEDIDA_ID, null); + dataHash.put(MEDIDA_ID, medida_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData toMedida_id() + throws Exception + { + if( dataHash.get(TO_MEDIDA_ID) == null && getMedida_id() != null ) + { + dataHash.put(TO_MEDIDA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData.class, new Object[]{ getMedida_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData) dataHash.get(TO_MEDIDA_ID); + } + + public void setToMedida_id(com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData medida_idObject ) + { + if( medida_idObject == null ) + { + dataHash.put(MEDIDA_ID, null); + } + else + { + dataHash.put(MEDIDA_ID, medida_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData.ID )); + } + dataHash.put(TO_MEDIDA_ID, medida_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( MEDIDA_ID.equals( fieldName ) ) + { + value = getMedida_id(); + } + else if( TO_RISCO_ID.equals( fieldName ) ) + { + value = toRisco_id(); + } + else if( TO_MEDIDA_ID.equals( fieldName ) ) + { + value = toMedida_id(); + } + else if( RISCO_ID.equals( fieldName ) ) + { + value = getRisco_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( MEDIDA_ID.equals( fieldName ) ) + { + setMedida_id( (Integer) value ); + } + else if( TO_RISCO_ID.equals( fieldName ) ) + { + setToRisco_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData) value ); + } + else if( TO_MEDIDA_ID.equals( fieldName ) ) + { + setToMedida_id( (com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData) value ); + } + else if( RISCO_ID.equals( fieldName ) ) + { + setRisco_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_RISCO_ID) != null ) + { + toRisco_id().save(); + dataHash.put(RISCO_ID, toRisco_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData.ID )); + } + + if( dataHash.get(TO_MEDIDA_ID) != null ) + { + toMedida_id().save(); + dataHash.put(MEDIDA_ID, toMedida_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsRiscoMedida.class; + } + + public com.evolute.siprp.server.db.data.siprp_local3.HsRiscoMedidaID getJDOPrimaryKey() + { + com.evolute.siprp.server.db.data.siprp_local3.HsRiscoMedidaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsRiscoMedidaID(); + + Object obj; + obj = this.getRisco_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.risco_id = (Integer)obj; + + obj = this.getMedida_id(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + id.medida_id = (Integer)obj; + + return id; + + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoMedidaID.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoMedidaID.java new file mode 100644 index 00000000..e0fbab20 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoMedidaID.java @@ -0,0 +1,37 @@ +/* +* HsRiscoMedidaID.java +* +* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import java.io.*; + +import com.evolute.utils.jdo.jpox.JDOIDClass; + +public final class HsRiscoMedidaID extends JDOIDClass implements Serializable +{ + public Integer risco_id; + public Integer medida_id; + + public HsRiscoMedidaID() + { + } + + + public Object[] getValue() + { + Object value[] = new Object[ 2 ]; + value[ 0 ] = risco_id; + value[ 1 ] = medida_id; + return value; + } + + public void setValues( Object values[] ) + { + risco_id = (Integer) values[ 0 ]; + medida_id = (Integer) values[ 1 ]; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoTema.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoTema.java new file mode 100644 index 00000000..85623dbf --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoTema.java @@ -0,0 +1,129 @@ +/* +* HsRiscoTema.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class HsRiscoTema implements JDOInnerObject +{ + private Integer id; + private String description; + private java.sql.Timestamp deleted_date; + + public HsRiscoTema() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == HsRiscoTemaDataAuto.ID ) + { + return id; + } + else if( fieldName == HsRiscoTemaDataAuto.DESCRIPTION ) + { + return description; + } + else if( fieldName == HsRiscoTemaDataAuto.DELETED_DATE ) + { + return deleted_date; + } + else if( fieldName.equals( HsRiscoTemaDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( HsRiscoTemaDataAuto.DESCRIPTION ) ) + { + return description; + } + else if( fieldName.equals( HsRiscoTemaDataAuto.DELETED_DATE ) ) + { + return deleted_date; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == HsRiscoTemaDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == HsRiscoTemaDataAuto.DESCRIPTION ) + { + description = ( String ) value; + } + else if( fieldName == HsRiscoTemaDataAuto.DELETED_DATE ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( HsRiscoTemaDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( HsRiscoTemaDataAuto.DESCRIPTION ) ) + { + description = ( String ) value; + } + else if( fieldName.equals( HsRiscoTemaDataAuto.DELETED_DATE ) ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String descriptionValue ) + { + this.description = descriptionValue; + } + + public java.sql.Timestamp getDeleted_date() + { + return deleted_date; + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.deleted_date = deleted_dateValue; + } + + public Class getOuterClass() + { + return HsRiscoTemaDataAuto.class; + } + + public HsRiscoTemaDataAuto getOuterClassInstance() + { + HsRiscoTemaDataAuto outerObj = new HsRiscoTemaDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoTemaData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoTemaData.java new file mode 100644 index 00000000..4fef3f72 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoTemaData.java @@ -0,0 +1,18 @@ +/* +* HsRiscoTemaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class HsRiscoTemaData extends com.evolute.siprp.server.db.data.siprp_local3.HsRiscoTemaDataAuto +{ + + public HsRiscoTemaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoTemaDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoTemaDataAuto.java new file mode 100644 index 00000000..49b87030 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRiscoTemaDataAuto.java @@ -0,0 +1,107 @@ +/* +* HsRiscoTemaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class HsRiscoTemaDataAuto extends JDOObject +{ + + public static final String TABLENAME = "hs_risco_tema"; + + public static final String ID = "id"; + public static final String ID_FULL = "hs_risco_tema.id"; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_risco_tema.description"; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_risco_tema.deleted_date"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRIPTION, DELETED_DATE, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DESCRIPTION, DELETED_DATE, }; + + private Map dataHash; + + public HsRiscoTemaDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getDescription() + { + return (String) get(DESCRIPTION); + } + + public void setDescription(String descriptionValue ) + { + this.set(DESCRIPTION, descriptionValue ); + } + + public java.sql.Timestamp getDeleted_date() + { + return (java.sql.Timestamp) get(DELETED_DATE); + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.set(DELETED_DATE, deleted_dateValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return HsRiscoTema.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Ids.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Ids.java new file mode 100644 index 00000000..ff1f0f6c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Ids.java @@ -0,0 +1,75 @@ +/* +* Ids.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class Ids implements JDOInnerObject +{ + private Integer id; + + public Ids() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == IdsDataAuto.ID ) + { + return id; + } + else if( fieldName.equals( IdsDataAuto.ID ) ) + { + return id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == IdsDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( IdsDataAuto.ID ) ) + { + id = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Class getOuterClass() + { + return IdsDataAuto.class; + } + + public IdsDataAuto getOuterClassInstance() + { + IdsDataAuto outerObj = new IdsDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/IdsData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/IdsData.java new file mode 100644 index 00000000..b4ea12fc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/IdsData.java @@ -0,0 +1,18 @@ +/* +* IdsDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class IdsData extends com.evolute.siprp.server.db.data.siprp_local3.IdsDataAuto +{ + + public IdsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/IdsDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/IdsDataAuto.java new file mode 100644 index 00000000..43fb0afb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/IdsDataAuto.java @@ -0,0 +1,83 @@ +/* +* IdsDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class IdsDataAuto extends JDOObject +{ + + public static final String TABLENAME = "ids"; + + public static final String ID = "id"; + public static final String ID_FULL = "ids.id"; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, }; + + private Map dataHash; + + public IdsDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Ids.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Image.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Image.java new file mode 100644 index 00000000..d9176ca6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Image.java @@ -0,0 +1,129 @@ +/* +* Image.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class Image implements JDOInnerObject +{ + private Integer id; + private String name; + private byte[] image_data; + + public Image() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == ImageDataAuto.ID ) + { + return id; + } + else if( fieldName == ImageDataAuto.NAME ) + { + return name; + } + else if( fieldName == ImageDataAuto.IMAGE_DATA ) + { + return image_data; + } + else if( fieldName.equals( ImageDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( ImageDataAuto.NAME ) ) + { + return name; + } + else if( fieldName.equals( ImageDataAuto.IMAGE_DATA ) ) + { + return image_data; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == ImageDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == ImageDataAuto.NAME ) + { + name = ( String ) value; + } + else if( fieldName == ImageDataAuto.IMAGE_DATA ) + { + image_data = ( byte[] ) value; + } + else if( fieldName.equals( ImageDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( ImageDataAuto.NAME ) ) + { + name = ( String ) value; + } + else if( fieldName.equals( ImageDataAuto.IMAGE_DATA ) ) + { + image_data = ( byte[] ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getName() + { + return name; + } + + public void setName(String nameValue ) + { + this.name = nameValue; + } + + public byte[] getImage_data() + { + return image_data; + } + + public void setImage_data(byte[] image_dataValue ) + { + this.image_data = image_dataValue; + } + + public Class getOuterClass() + { + return ImageDataAuto.class; + } + + public ImageDataAuto getOuterClassInstance() + { + ImageDataAuto outerObj = new ImageDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ImageData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ImageData.java new file mode 100644 index 00000000..4cea4935 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ImageData.java @@ -0,0 +1,18 @@ +/* +* ImageDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class ImageData extends com.evolute.siprp.server.db.data.siprp_local3.ImageDataAuto +{ + + public ImageData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ImageDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ImageDataAuto.java new file mode 100644 index 00000000..c3a2730c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ImageDataAuto.java @@ -0,0 +1,107 @@ +/* +* ImageDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class ImageDataAuto extends JDOObject +{ + + public static final String TABLENAME = "image"; + + public static final String ID = "id"; + public static final String ID_FULL = "image.id"; + public static final String NAME = "name"; + public static final String NAME_FULL = "image.name"; + public static final String IMAGE_DATA = "image_data"; + public static final String IMAGE_DATA_FULL = "image.image_data"; + + public static final String FIELD_NAMES[] = new String[]{ + NAME, IMAGE_DATA, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, NAME, IMAGE_DATA, }; + + private Map dataHash; + + public ImageDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getName() + { + return (String) get(NAME); + } + + public void setName(String nameValue ) + { + this.set(NAME, nameValue ); + } + + public byte[] getImage_data() + { + return (byte[]) get(IMAGE_DATA); + } + + public void setImage_data(byte[] image_dataValue ) + { + this.set(IMAGE_DATA, image_dataValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Image.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Lembretes.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Lembretes.java new file mode 100644 index 00000000..92adcc19 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Lembretes.java @@ -0,0 +1,507 @@ +/* +* Lembretes.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class Lembretes implements JDOInnerObject +{ + private Integer id; + private Integer tipo_id; + private java.util.Date data; + private String descricao; + private String texto; + private Integer empresa_id; + private Integer estabelecimento_id; + private Integer trabalhador_id; + private Integer marcacao_estabelecimento_id; + private Integer 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 Integer trabalhadores_ecds_datas_id; + private java.sql.Timestamp deleted_date; + + public Lembretes() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == LembretesDataAuto.ID ) + { + return id; + } + else if( fieldName == LembretesDataAuto.TIPO_ID ) + { + return tipo_id; + } + else if( fieldName == LembretesDataAuto.DATA ) + { + return data; + } + else if( fieldName == LembretesDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == LembretesDataAuto.TEXTO ) + { + return texto; + } + else if( fieldName == LembretesDataAuto.EMPRESA_ID ) + { + return empresa_id; + } + else if( fieldName == LembretesDataAuto.ESTABELECIMENTO_ID ) + { + return estabelecimento_id; + } + else if( fieldName == LembretesDataAuto.TRABALHADOR_ID ) + { + return trabalhador_id; + } + else if( fieldName == LembretesDataAuto.MARCACAO_ESTABELECIMENTO_ID ) + { + return marcacao_estabelecimento_id; + } + else if( fieldName == LembretesDataAuto.MARCACAO_TRABALHADOR_ID ) + { + return marcacao_trabalhador_id; + } + else if( fieldName == LembretesDataAuto.ENVIAR_EMAIL ) + { + return enviar_email; + } + else if( fieldName == LembretesDataAuto.PERIODICIDADE_DIAS ) + { + return periodicidade_dias; + } + else if( fieldName == LembretesDataAuto.PERIODICIDADE_MESES ) + { + return periodicidade_meses; + } + else if( fieldName == LembretesDataAuto.ULTIMO_ENVIO ) + { + return ultimo_envio; + } + else if( fieldName == LembretesDataAuto.TRABALHADORES_CONSULTAS_DATAS_ID ) + { + return trabalhadores_consultas_datas_id; + } + else if( fieldName == LembretesDataAuto.TRABALHADORES_ECDS_DATAS_ID ) + { + return trabalhadores_ecds_datas_id; + } + else if( fieldName == LembretesDataAuto.DELETED_DATE ) + { + return deleted_date; + } + else if( fieldName.equals( LembretesDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( LembretesDataAuto.TIPO_ID ) ) + { + return tipo_id; + } + else if( fieldName.equals( LembretesDataAuto.DATA ) ) + { + return data; + } + else if( fieldName.equals( LembretesDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( LembretesDataAuto.TEXTO ) ) + { + return texto; + } + else if( fieldName.equals( LembretesDataAuto.EMPRESA_ID ) ) + { + return empresa_id; + } + else if( fieldName.equals( LembretesDataAuto.ESTABELECIMENTO_ID ) ) + { + return estabelecimento_id; + } + else if( fieldName.equals( LembretesDataAuto.TRABALHADOR_ID ) ) + { + return trabalhador_id; + } + else if( fieldName.equals( LembretesDataAuto.MARCACAO_ESTABELECIMENTO_ID ) ) + { + return marcacao_estabelecimento_id; + } + else if( fieldName.equals( LembretesDataAuto.MARCACAO_TRABALHADOR_ID ) ) + { + return marcacao_trabalhador_id; + } + else if( fieldName.equals( LembretesDataAuto.ENVIAR_EMAIL ) ) + { + return enviar_email; + } + else if( fieldName.equals( LembretesDataAuto.PERIODICIDADE_DIAS ) ) + { + return periodicidade_dias; + } + else if( fieldName.equals( LembretesDataAuto.PERIODICIDADE_MESES ) ) + { + return periodicidade_meses; + } + else if( fieldName.equals( LembretesDataAuto.ULTIMO_ENVIO ) ) + { + return ultimo_envio; + } + else if( fieldName.equals( LembretesDataAuto.TRABALHADORES_CONSULTAS_DATAS_ID ) ) + { + return trabalhadores_consultas_datas_id; + } + else if( fieldName.equals( LembretesDataAuto.TRABALHADORES_ECDS_DATAS_ID ) ) + { + return trabalhadores_ecds_datas_id; + } + else if( fieldName.equals( LembretesDataAuto.DELETED_DATE ) ) + { + return deleted_date; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == LembretesDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == LembretesDataAuto.TIPO_ID ) + { + tipo_id = ( Integer ) value; + } + else if( fieldName == LembretesDataAuto.DATA ) + { + data = ( java.util.Date ) value; + } + else if( fieldName == LembretesDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == LembretesDataAuto.TEXTO ) + { + texto = ( String ) value; + } + else if( fieldName == LembretesDataAuto.EMPRESA_ID ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName == LembretesDataAuto.ESTABELECIMENTO_ID ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName == LembretesDataAuto.TRABALHADOR_ID ) + { + trabalhador_id = ( Integer ) value; + } + else if( fieldName == LembretesDataAuto.MARCACAO_ESTABELECIMENTO_ID ) + { + marcacao_estabelecimento_id = ( Integer ) value; + } + else if( fieldName == LembretesDataAuto.MARCACAO_TRABALHADOR_ID ) + { + marcacao_trabalhador_id = ( Integer ) value; + } + else if( fieldName == LembretesDataAuto.ENVIAR_EMAIL ) + { + enviar_email = ( String ) value; + } + else if( fieldName == LembretesDataAuto.PERIODICIDADE_DIAS ) + { + periodicidade_dias = ( Integer ) value; + } + else if( fieldName == LembretesDataAuto.PERIODICIDADE_MESES ) + { + periodicidade_meses = ( Integer ) value; + } + else if( fieldName == LembretesDataAuto.ULTIMO_ENVIO ) + { + ultimo_envio = ( java.util.Date ) value; + } + else if( fieldName == LembretesDataAuto.TRABALHADORES_CONSULTAS_DATAS_ID ) + { + trabalhadores_consultas_datas_id = ( Integer ) value; + } + else if( fieldName == LembretesDataAuto.TRABALHADORES_ECDS_DATAS_ID ) + { + trabalhadores_ecds_datas_id = ( Integer ) value; + } + else if( fieldName == LembretesDataAuto.DELETED_DATE ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( LembretesDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( LembretesDataAuto.TIPO_ID ) ) + { + tipo_id = ( Integer ) value; + } + else if( fieldName.equals( LembretesDataAuto.DATA ) ) + { + data = ( java.util.Date ) value; + } + else if( fieldName.equals( LembretesDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( LembretesDataAuto.TEXTO ) ) + { + texto = ( String ) value; + } + else if( fieldName.equals( LembretesDataAuto.EMPRESA_ID ) ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName.equals( LembretesDataAuto.ESTABELECIMENTO_ID ) ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName.equals( LembretesDataAuto.TRABALHADOR_ID ) ) + { + trabalhador_id = ( Integer ) value; + } + else if( fieldName.equals( LembretesDataAuto.MARCACAO_ESTABELECIMENTO_ID ) ) + { + marcacao_estabelecimento_id = ( Integer ) value; + } + else if( fieldName.equals( LembretesDataAuto.MARCACAO_TRABALHADOR_ID ) ) + { + marcacao_trabalhador_id = ( Integer ) value; + } + else if( fieldName.equals( LembretesDataAuto.ENVIAR_EMAIL ) ) + { + enviar_email = ( String ) value; + } + else if( fieldName.equals( LembretesDataAuto.PERIODICIDADE_DIAS ) ) + { + periodicidade_dias = ( Integer ) value; + } + else if( fieldName.equals( LembretesDataAuto.PERIODICIDADE_MESES ) ) + { + periodicidade_meses = ( Integer ) value; + } + else if( fieldName.equals( LembretesDataAuto.ULTIMO_ENVIO ) ) + { + ultimo_envio = ( java.util.Date ) value; + } + else if( fieldName.equals( LembretesDataAuto.TRABALHADORES_CONSULTAS_DATAS_ID ) ) + { + trabalhadores_consultas_datas_id = ( Integer ) value; + } + else if( fieldName.equals( LembretesDataAuto.TRABALHADORES_ECDS_DATAS_ID ) ) + { + trabalhadores_ecds_datas_id = ( Integer ) value; + } + else if( fieldName.equals( LembretesDataAuto.DELETED_DATE ) ) + { + deleted_date = ( java.sql.Timestamp ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getTipo_id() + { + return tipo_id; + } + + public void setTipo_id(Integer tipo_idValue ) + { + this.tipo_id = tipo_idValue; + } + + public java.util.Date getData() + { + return data; + } + + public void setData(java.util.Date dataValue ) + { + this.data = dataValue; + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public String getTexto() + { + return texto; + } + + public void setTexto(String textoValue ) + { + this.texto = textoValue; + } + + public Integer getEmpresa_id() + { + return empresa_id; + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + this.empresa_id = empresa_idValue; + } + + public Integer getEstabelecimento_id() + { + return estabelecimento_id; + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + this.estabelecimento_id = estabelecimento_idValue; + } + + public Integer getTrabalhador_id() + { + return trabalhador_id; + } + + public void setTrabalhador_id(Integer trabalhador_idValue ) + { + this.trabalhador_id = trabalhador_idValue; + } + + public Integer getMarcacao_estabelecimento_id() + { + return marcacao_estabelecimento_id; + } + + public void setMarcacao_estabelecimento_id(Integer marcacao_estabelecimento_idValue ) + { + this.marcacao_estabelecimento_id = marcacao_estabelecimento_idValue; + } + + public Integer getMarcacao_trabalhador_id() + { + return marcacao_trabalhador_id; + } + + public void setMarcacao_trabalhador_id(Integer marcacao_trabalhador_idValue ) + { + this.marcacao_trabalhador_id = marcacao_trabalhador_idValue; + } + + public String getEnviar_email() + { + return enviar_email; + } + + public void setEnviar_email(String enviar_emailValue ) + { + this.enviar_email = enviar_emailValue; + } + + public Integer getPeriodicidade_dias() + { + return periodicidade_dias; + } + + public void setPeriodicidade_dias(Integer periodicidade_diasValue ) + { + this.periodicidade_dias = periodicidade_diasValue; + } + + public Integer getPeriodicidade_meses() + { + return periodicidade_meses; + } + + public void setPeriodicidade_meses(Integer periodicidade_mesesValue ) + { + this.periodicidade_meses = periodicidade_mesesValue; + } + + public java.util.Date getUltimo_envio() + { + return ultimo_envio; + } + + public void setUltimo_envio(java.util.Date ultimo_envioValue ) + { + this.ultimo_envio = ultimo_envioValue; + } + + public Integer getTrabalhadores_consultas_datas_id() + { + return trabalhadores_consultas_datas_id; + } + + public void setTrabalhadores_consultas_datas_id(Integer trabalhadores_consultas_datas_idValue ) + { + this.trabalhadores_consultas_datas_id = trabalhadores_consultas_datas_idValue; + } + + public Integer getTrabalhadores_ecds_datas_id() + { + return trabalhadores_ecds_datas_id; + } + + public void setTrabalhadores_ecds_datas_id(Integer trabalhadores_ecds_datas_idValue ) + { + this.trabalhadores_ecds_datas_id = trabalhadores_ecds_datas_idValue; + } + + public java.sql.Timestamp getDeleted_date() + { + return deleted_date; + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.deleted_date = deleted_dateValue; + } + + public Class getOuterClass() + { + return LembretesDataAuto.class; + } + + public LembretesDataAuto getOuterClassInstance() + { + LembretesDataAuto outerObj = new LembretesDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/LembretesData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/LembretesData.java new file mode 100644 index 00000000..a04f8810 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/LembretesData.java @@ -0,0 +1,18 @@ +/* +* LembretesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class LembretesData extends com.evolute.siprp.server.db.data.siprp_local3.LembretesDataAuto +{ + + public LembretesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/LembretesDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/LembretesDataAuto.java new file mode 100644 index 00000000..19dd0dee --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/LembretesDataAuto.java @@ -0,0 +1,673 @@ +/* +* LembretesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class LembretesDataAuto extends JDOObject +{ + + public static final String TABLENAME = "lembretes"; + + public static final String ID = "id"; + public static final String ID_FULL = "lembretes.id"; + public static final String TIPO_ID = "tipo_id"; + public static final String TIPO_ID_FULL = "lembretes.tipo_id"; + public static final String TO_TIPO_ID = "to tipo_id"; + public static final String DATA = "data"; + public static final String DATA_FULL = "lembretes.data"; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "lembretes.descricao"; + public static final String TEXTO = "texto"; + public static final String TEXTO_FULL = "lembretes.texto"; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "lembretes.empresa_id"; + public static final String TO_EMPRESA_ID = "to empresa_id"; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "lembretes.estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id"; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "lembretes.trabalhador_id"; + public static final String TO_TRABALHADOR_ID = "to trabalhador_id"; + 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 String TO_MARCACAO_ESTABELECIMENTO_ID = "to marcacao_estabelecimento_id"; + 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 String TO_MARCACAO_TRABALHADOR_ID = "to marcacao_trabalhador_id"; + public static final String ENVIAR_EMAIL = "enviar_email"; + public static final String ENVIAR_EMAIL_FULL = "lembretes.enviar_email"; + public static final String PERIODICIDADE_DIAS = "periodicidade_dias"; + public static final String PERIODICIDADE_DIAS_FULL = "lembretes.periodicidade_dias"; + public static final String PERIODICIDADE_MESES = "periodicidade_meses"; + public static final String PERIODICIDADE_MESES_FULL = "lembretes.periodicidade_meses"; + public static final String ULTIMO_ENVIO = "ultimo_envio"; + public static final String ULTIMO_ENVIO_FULL = "lembretes.ultimo_envio"; + 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 String TO_TRABALHADORES_CONSULTAS_DATAS_ID = "to trabalhadores_consultas_datas_id"; + 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 String TO_TRABALHADORES_ECDS_DATAS_ID = "to trabalhadores_ecds_datas_id"; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "lembretes.deleted_date"; + + 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, }; + + + protected static final String ALL_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, }; + + private Map dataHash; + + public LembretesDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getTipo_id() + { + return (Integer) dataHash.get(TIPO_ID); + } + + public void setTipo_id(Integer tipo_idValue ) + { + dataHash.put(TO_TIPO_ID, null); + dataHash.put(TIPO_ID, tipo_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.LembretesTiposData toTipo_id() + throws Exception + { + if( dataHash.get(TO_TIPO_ID) == null && getTipo_id() != null ) + { + dataHash.put(TO_TIPO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.LembretesTiposData.class, new Object[]{ getTipo_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.LembretesTiposData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.LembretesTiposData) dataHash.get(TO_TIPO_ID); + } + + public void setToTipo_id(com.evolute.siprp.server.db.data.siprp_local3.LembretesTiposData tipo_idObject ) + { + if( tipo_idObject == null ) + { + dataHash.put(TIPO_ID, null); + } + else + { + dataHash.put(TIPO_ID, tipo_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.LembretesTiposData.ID )); + } + dataHash.put(TO_TIPO_ID, tipo_idObject); + } + + public java.util.Date getData() + { + return (java.util.Date) get(DATA); + } + + public void setData(java.util.Date dataValue ) + { + this.set(DATA, dataValue ); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public String getTexto() + { + return (String) get(TEXTO); + } + + public void setTexto(String textoValue ) + { + this.set(TEXTO, textoValue ); + } + + public Integer getEmpresa_id() + { + return (Integer) dataHash.get(EMPRESA_ID); + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + dataHash.put(TO_EMPRESA_ID, null); + dataHash.put(EMPRESA_ID, empresa_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EmpresasData toEmpresa_id() + throws Exception + { + if( dataHash.get(TO_EMPRESA_ID) == null && getEmpresa_id() != null ) + { + dataHash.put(TO_EMPRESA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.class, new Object[]{ getEmpresa_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) dataHash.get(TO_EMPRESA_ID); + } + + public void setToEmpresa_id(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData empresa_idObject ) + { + if( empresa_idObject == null ) + { + dataHash.put(EMPRESA_ID, null); + } + else + { + dataHash.put(EMPRESA_ID, empresa_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + dataHash.put(TO_EMPRESA_ID, empresa_idObject); + } + + public Integer getEstabelecimento_id() + { + return (Integer) dataHash.get(ESTABELECIMENTO_ID); + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, null); + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id() + throws Exception + { + if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID); + } + + public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject ) + { + if( estabelecimento_idObject == null ) + { + dataHash.put(ESTABELECIMENTO_ID, null); + } + else + { + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject); + } + + public Integer getTrabalhador_id() + { + return (Integer) dataHash.get(TRABALHADOR_ID); + } + + public void setTrabalhador_id(Integer trabalhador_idValue ) + { + dataHash.put(TO_TRABALHADOR_ID, null); + dataHash.put(TRABALHADOR_ID, trabalhador_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData toTrabalhador_id() + throws Exception + { + if( dataHash.get(TO_TRABALHADOR_ID) == null && getTrabalhador_id() != null ) + { + dataHash.put(TO_TRABALHADOR_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData.class, new Object[]{ getTrabalhador_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData) dataHash.get(TO_TRABALHADOR_ID); + } + + public void setToTrabalhador_id(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData trabalhador_idObject ) + { + if( trabalhador_idObject == null ) + { + dataHash.put(TRABALHADOR_ID, null); + } + else + { + dataHash.put(TRABALHADOR_ID, trabalhador_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData.ID )); + } + dataHash.put(TO_TRABALHADOR_ID, trabalhador_idObject); + } + + public Integer getMarcacao_estabelecimento_id() + { + return (Integer) dataHash.get(MARCACAO_ESTABELECIMENTO_ID); + } + + public void setMarcacao_estabelecimento_id(Integer marcacao_estabelecimento_idValue ) + { + dataHash.put(TO_MARCACAO_ESTABELECIMENTO_ID, null); + dataHash.put(MARCACAO_ESTABELECIMENTO_ID, marcacao_estabelecimento_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData toMarcacao_estabelecimento_id() + throws Exception + { + if( dataHash.get(TO_MARCACAO_ESTABELECIMENTO_ID) == null && getMarcacao_estabelecimento_id() != null ) + { + dataHash.put(TO_MARCACAO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData.class, new Object[]{ getMarcacao_estabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData) dataHash.get(TO_MARCACAO_ESTABELECIMENTO_ID); + } + + public void setToMarcacao_estabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData marcacao_estabelecimento_idObject ) + { + if( marcacao_estabelecimento_idObject == null ) + { + dataHash.put(MARCACAO_ESTABELECIMENTO_ID, null); + } + else + { + dataHash.put(MARCACAO_ESTABELECIMENTO_ID, marcacao_estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData.ID )); + } + dataHash.put(TO_MARCACAO_ESTABELECIMENTO_ID, marcacao_estabelecimento_idObject); + } + + public Integer getMarcacao_trabalhador_id() + { + return (Integer) dataHash.get(MARCACAO_TRABALHADOR_ID); + } + + public void setMarcacao_trabalhador_id(Integer marcacao_trabalhador_idValue ) + { + dataHash.put(TO_MARCACAO_TRABALHADOR_ID, null); + dataHash.put(MARCACAO_TRABALHADOR_ID, marcacao_trabalhador_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData toMarcacao_trabalhador_id() + throws Exception + { + if( dataHash.get(TO_MARCACAO_TRABALHADOR_ID) == null && getMarcacao_trabalhador_id() != null ) + { + dataHash.put(TO_MARCACAO_TRABALHADOR_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData.class, new Object[]{ getMarcacao_trabalhador_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData) dataHash.get(TO_MARCACAO_TRABALHADOR_ID); + } + + public void setToMarcacao_trabalhador_id(com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData marcacao_trabalhador_idObject ) + { + if( marcacao_trabalhador_idObject == null ) + { + dataHash.put(MARCACAO_TRABALHADOR_ID, null); + } + else + { + dataHash.put(MARCACAO_TRABALHADOR_ID, marcacao_trabalhador_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData.ID )); + } + dataHash.put(TO_MARCACAO_TRABALHADOR_ID, marcacao_trabalhador_idObject); + } + + public String getEnviar_email() + { + return (String) get(ENVIAR_EMAIL); + } + + public void setEnviar_email(String enviar_emailValue ) + { + this.set(ENVIAR_EMAIL, enviar_emailValue ); + } + + public Integer getPeriodicidade_dias() + { + return (Integer) get(PERIODICIDADE_DIAS); + } + + public void setPeriodicidade_dias(Integer periodicidade_diasValue ) + { + this.set(PERIODICIDADE_DIAS, periodicidade_diasValue ); + } + + public Integer getPeriodicidade_meses() + { + return (Integer) get(PERIODICIDADE_MESES); + } + + public void setPeriodicidade_meses(Integer periodicidade_mesesValue ) + { + this.set(PERIODICIDADE_MESES, periodicidade_mesesValue ); + } + + public java.util.Date getUltimo_envio() + { + return (java.util.Date) get(ULTIMO_ENVIO); + } + + public void setUltimo_envio(java.util.Date ultimo_envioValue ) + { + this.set(ULTIMO_ENVIO, ultimo_envioValue ); + } + + public Integer getTrabalhadores_consultas_datas_id() + { + return (Integer) dataHash.get(TRABALHADORES_CONSULTAS_DATAS_ID); + } + + public void setTrabalhadores_consultas_datas_id(Integer trabalhadores_consultas_datas_idValue ) + { + dataHash.put(TO_TRABALHADORES_CONSULTAS_DATAS_ID, null); + dataHash.put(TRABALHADORES_CONSULTAS_DATAS_ID, trabalhadores_consultas_datas_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData toTrabalhadores_consultas_datas_id() + throws Exception + { + if( dataHash.get(TO_TRABALHADORES_CONSULTAS_DATAS_ID) == null && getTrabalhadores_consultas_datas_id() != null ) + { + dataHash.put(TO_TRABALHADORES_CONSULTAS_DATAS_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData.class, new Object[]{ getTrabalhadores_consultas_datas_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData) dataHash.get(TO_TRABALHADORES_CONSULTAS_DATAS_ID); + } + + public void setToTrabalhadores_consultas_datas_id(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData trabalhadores_consultas_datas_idObject ) + { + if( trabalhadores_consultas_datas_idObject == null ) + { + dataHash.put(TRABALHADORES_CONSULTAS_DATAS_ID, null); + } + else + { + dataHash.put(TRABALHADORES_CONSULTAS_DATAS_ID, trabalhadores_consultas_datas_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData.ID )); + } + dataHash.put(TO_TRABALHADORES_CONSULTAS_DATAS_ID, trabalhadores_consultas_datas_idObject); + } + + public Integer getTrabalhadores_ecds_datas_id() + { + return (Integer) dataHash.get(TRABALHADORES_ECDS_DATAS_ID); + } + + public void setTrabalhadores_ecds_datas_id(Integer trabalhadores_ecds_datas_idValue ) + { + dataHash.put(TO_TRABALHADORES_ECDS_DATAS_ID, null); + dataHash.put(TRABALHADORES_ECDS_DATAS_ID, trabalhadores_ecds_datas_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData toTrabalhadores_ecds_datas_id() + throws Exception + { + if( dataHash.get(TO_TRABALHADORES_ECDS_DATAS_ID) == null && getTrabalhadores_ecds_datas_id() != null ) + { + dataHash.put(TO_TRABALHADORES_ECDS_DATAS_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData.class, new Object[]{ getTrabalhadores_ecds_datas_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData) dataHash.get(TO_TRABALHADORES_ECDS_DATAS_ID); + } + + public void setToTrabalhadores_ecds_datas_id(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData trabalhadores_ecds_datas_idObject ) + { + if( trabalhadores_ecds_datas_idObject == null ) + { + dataHash.put(TRABALHADORES_ECDS_DATAS_ID, null); + } + else + { + dataHash.put(TRABALHADORES_ECDS_DATAS_ID, trabalhadores_ecds_datas_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData.ID )); + } + dataHash.put(TO_TRABALHADORES_ECDS_DATAS_ID, trabalhadores_ecds_datas_idObject); + } + + public java.sql.Timestamp getDeleted_date() + { + return (java.sql.Timestamp) get(DELETED_DATE); + } + + public void setDeleted_date(java.sql.Timestamp deleted_dateValue ) + { + this.set(DELETED_DATE, deleted_dateValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_TRABALHADORES_ECDS_DATAS_ID.equals( fieldName ) ) + { + value = toTrabalhadores_ecds_datas_id(); + } + else if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = getEstabelecimento_id(); + } + else if( TIPO_ID.equals( fieldName ) ) + { + value = getTipo_id(); + } + else if( TRABALHADORES_ECDS_DATAS_ID.equals( fieldName ) ) + { + value = getTrabalhadores_ecds_datas_id(); + } + else if( TO_TRABALHADORES_CONSULTAS_DATAS_ID.equals( fieldName ) ) + { + value = toTrabalhadores_consultas_datas_id(); + } + else if( TO_TRABALHADOR_ID.equals( fieldName ) ) + { + value = toTrabalhador_id(); + } + else if( MARCACAO_TRABALHADOR_ID.equals( fieldName ) ) + { + value = getMarcacao_trabalhador_id(); + } + else if( TRABALHADORES_CONSULTAS_DATAS_ID.equals( fieldName ) ) + { + value = getTrabalhadores_consultas_datas_id(); + } + else if( TO_EMPRESA_ID.equals( fieldName ) ) + { + value = toEmpresa_id(); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + value = getEmpresa_id(); + } + else if( TO_MARCACAO_TRABALHADOR_ID.equals( fieldName ) ) + { + value = toMarcacao_trabalhador_id(); + } + else if( TO_MARCACAO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = toMarcacao_estabelecimento_id(); + } + else if( TRABALHADOR_ID.equals( fieldName ) ) + { + value = getTrabalhador_id(); + } + else if( MARCACAO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = getMarcacao_estabelecimento_id(); + } + else if( TO_TIPO_ID.equals( fieldName ) ) + { + value = toTipo_id(); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = toEstabelecimento_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_TRABALHADORES_ECDS_DATAS_ID.equals( fieldName ) ) + { + setToTrabalhadores_ecds_datas_id( (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData) value ); + } + else if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setEstabelecimento_id( (Integer) value ); + } + else if( TIPO_ID.equals( fieldName ) ) + { + setTipo_id( (Integer) value ); + } + else if( TRABALHADORES_ECDS_DATAS_ID.equals( fieldName ) ) + { + setTrabalhadores_ecds_datas_id( (Integer) value ); + } + else if( TO_TRABALHADORES_CONSULTAS_DATAS_ID.equals( fieldName ) ) + { + setToTrabalhadores_consultas_datas_id( (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData) value ); + } + else if( TO_TRABALHADOR_ID.equals( fieldName ) ) + { + setToTrabalhador_id( (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData) value ); + } + else if( MARCACAO_TRABALHADOR_ID.equals( fieldName ) ) + { + setMarcacao_trabalhador_id( (Integer) value ); + } + else if( TRABALHADORES_CONSULTAS_DATAS_ID.equals( fieldName ) ) + { + setTrabalhadores_consultas_datas_id( (Integer) value ); + } + else if( TO_EMPRESA_ID.equals( fieldName ) ) + { + setToEmpresa_id( (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) value ); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + setEmpresa_id( (Integer) value ); + } + else if( TO_MARCACAO_TRABALHADOR_ID.equals( fieldName ) ) + { + setToMarcacao_trabalhador_id( (com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData) value ); + } + else if( TO_MARCACAO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setToMarcacao_estabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData) value ); + } + else if( TRABALHADOR_ID.equals( fieldName ) ) + { + setTrabalhador_id( (Integer) value ); + } + else if( MARCACAO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setMarcacao_estabelecimento_id( (Integer) value ); + } + else if( TO_TIPO_ID.equals( fieldName ) ) + { + setToTipo_id( (com.evolute.siprp.server.db.data.siprp_local3.LembretesTiposData) value ); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_TIPO_ID) != null ) + { + toTipo_id().save(); + dataHash.put(TIPO_ID, toTipo_id().get( com.evolute.siprp.server.db.data.siprp_local3.LembretesTiposData.ID )); + } + + if( dataHash.get(TO_EMPRESA_ID) != null ) + { + toEmpresa_id().save(); + dataHash.put(EMPRESA_ID, toEmpresa_id().get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + + if( dataHash.get(TO_ESTABELECIMENTO_ID) != null ) + { + toEstabelecimento_id().save(); + dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + + if( dataHash.get(TO_TRABALHADOR_ID) != null ) + { + toTrabalhador_id().save(); + dataHash.put(TRABALHADOR_ID, toTrabalhador_id().get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData.ID )); + } + + if( dataHash.get(TO_MARCACAO_ESTABELECIMENTO_ID) != null ) + { + toMarcacao_estabelecimento_id().save(); + dataHash.put(MARCACAO_ESTABELECIMENTO_ID, toMarcacao_estabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData.ID )); + } + + if( dataHash.get(TO_MARCACAO_TRABALHADOR_ID) != null ) + { + toMarcacao_trabalhador_id().save(); + dataHash.put(MARCACAO_TRABALHADOR_ID, toMarcacao_trabalhador_id().get( com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData.ID )); + } + + if( dataHash.get(TO_TRABALHADORES_CONSULTAS_DATAS_ID) != null ) + { + toTrabalhadores_consultas_datas_id().save(); + dataHash.put(TRABALHADORES_CONSULTAS_DATAS_ID, toTrabalhadores_consultas_datas_id().get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData.ID )); + } + + if( dataHash.get(TO_TRABALHADORES_ECDS_DATAS_ID) != null ) + { + toTrabalhadores_ecds_datas_id().save(); + dataHash.put(TRABALHADORES_ECDS_DATAS_ID, toTrabalhadores_ecds_datas_id().get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Lembretes.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/LembretesTipos.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/LembretesTipos.java new file mode 100644 index 00000000..a01af137 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/LembretesTipos.java @@ -0,0 +1,183 @@ +/* +* LembretesTipos.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class LembretesTipos implements JDOInnerObject +{ + private Integer id; + private String codigo; + private String descricao; + private Integer ordem; + private String activo; + + public LembretesTipos() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == LembretesTiposDataAuto.ID ) + { + return id; + } + else if( fieldName == LembretesTiposDataAuto.CODIGO ) + { + return codigo; + } + else if( fieldName == LembretesTiposDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == LembretesTiposDataAuto.ORDEM ) + { + return ordem; + } + else if( fieldName == LembretesTiposDataAuto.ACTIVO ) + { + return activo; + } + else if( fieldName.equals( LembretesTiposDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( LembretesTiposDataAuto.CODIGO ) ) + { + return codigo; + } + else if( fieldName.equals( LembretesTiposDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( LembretesTiposDataAuto.ORDEM ) ) + { + return ordem; + } + else if( fieldName.equals( LembretesTiposDataAuto.ACTIVO ) ) + { + return activo; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == LembretesTiposDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == LembretesTiposDataAuto.CODIGO ) + { + codigo = ( String ) value; + } + else if( fieldName == LembretesTiposDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == LembretesTiposDataAuto.ORDEM ) + { + ordem = ( Integer ) value; + } + else if( fieldName == LembretesTiposDataAuto.ACTIVO ) + { + activo = ( String ) value; + } + else if( fieldName.equals( LembretesTiposDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( LembretesTiposDataAuto.CODIGO ) ) + { + codigo = ( String ) value; + } + else if( fieldName.equals( LembretesTiposDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( LembretesTiposDataAuto.ORDEM ) ) + { + ordem = ( Integer ) value; + } + else if( fieldName.equals( LembretesTiposDataAuto.ACTIVO ) ) + { + activo = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getCodigo() + { + return codigo; + } + + public void setCodigo(String codigoValue ) + { + this.codigo = codigoValue; + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public Integer getOrdem() + { + return ordem; + } + + public void setOrdem(Integer ordemValue ) + { + this.ordem = ordemValue; + } + + public String getActivo() + { + return activo; + } + + public void setActivo(String activoValue ) + { + this.activo = activoValue; + } + + public Class getOuterClass() + { + return LembretesTiposDataAuto.class; + } + + public LembretesTiposDataAuto getOuterClassInstance() + { + LembretesTiposDataAuto outerObj = new LembretesTiposDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/LembretesTiposData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/LembretesTiposData.java new file mode 100644 index 00000000..50ed5bdc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/LembretesTiposData.java @@ -0,0 +1,18 @@ +/* +* LembretesTiposDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class LembretesTiposData extends com.evolute.siprp.server.db.data.siprp_local3.LembretesTiposDataAuto +{ + + public LembretesTiposData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/LembretesTiposDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/LembretesTiposDataAuto.java new file mode 100644 index 00000000..7b108ea2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/LembretesTiposDataAuto.java @@ -0,0 +1,131 @@ +/* +* LembretesTiposDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class LembretesTiposDataAuto extends JDOObject +{ + + public static final String TABLENAME = "lembretes_tipos"; + + public static final String ID = "id"; + public static final String ID_FULL = "lembretes_tipos.id"; + public static final String CODIGO = "codigo"; + public static final String CODIGO_FULL = "lembretes_tipos.codigo"; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "lembretes_tipos.descricao"; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "lembretes_tipos.ordem"; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "lembretes_tipos.activo"; + + public static final String FIELD_NAMES[] = new String[]{ + CODIGO, DESCRICAO, ORDEM, ACTIVO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, CODIGO, DESCRICAO, ORDEM, ACTIVO, }; + + private Map dataHash; + + public LembretesTiposDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getCodigo() + { + return (String) get(CODIGO); + } + + public void setCodigo(String codigoValue ) + { + this.set(CODIGO, codigoValue ); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public Integer getOrdem() + { + return (Integer) get(ORDEM); + } + + public void setOrdem(Integer ordemValue ) + { + this.set(ORDEM, ordemValue ); + } + + public String getActivo() + { + return (String) get(ACTIVO); + } + + public void setActivo(String activoValue ) + { + this.set(ACTIVO, activoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return LembretesTipos.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEmpresa.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEmpresa.java new file mode 100644 index 00000000..36ef106b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEmpresa.java @@ -0,0 +1,183 @@ +/* +* MarcacoesEmpresa.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class MarcacoesEmpresa implements JDOInnerObject +{ + private Integer id; + private java.util.Date data; + private String texto; + private Integer empresa_id; + private String realizada; + + public MarcacoesEmpresa() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == MarcacoesEmpresaDataAuto.ID ) + { + return id; + } + else if( fieldName == MarcacoesEmpresaDataAuto.DATA ) + { + return data; + } + else if( fieldName == MarcacoesEmpresaDataAuto.TEXTO ) + { + return texto; + } + else if( fieldName == MarcacoesEmpresaDataAuto.EMPRESA_ID ) + { + return empresa_id; + } + else if( fieldName == MarcacoesEmpresaDataAuto.REALIZADA ) + { + return realizada; + } + else if( fieldName.equals( MarcacoesEmpresaDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( MarcacoesEmpresaDataAuto.DATA ) ) + { + return data; + } + else if( fieldName.equals( MarcacoesEmpresaDataAuto.TEXTO ) ) + { + return texto; + } + else if( fieldName.equals( MarcacoesEmpresaDataAuto.EMPRESA_ID ) ) + { + return empresa_id; + } + else if( fieldName.equals( MarcacoesEmpresaDataAuto.REALIZADA ) ) + { + return realizada; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == MarcacoesEmpresaDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == MarcacoesEmpresaDataAuto.DATA ) + { + data = ( java.util.Date ) value; + } + else if( fieldName == MarcacoesEmpresaDataAuto.TEXTO ) + { + texto = ( String ) value; + } + else if( fieldName == MarcacoesEmpresaDataAuto.EMPRESA_ID ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName == MarcacoesEmpresaDataAuto.REALIZADA ) + { + realizada = ( String ) value; + } + else if( fieldName.equals( MarcacoesEmpresaDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesEmpresaDataAuto.DATA ) ) + { + data = ( java.util.Date ) value; + } + else if( fieldName.equals( MarcacoesEmpresaDataAuto.TEXTO ) ) + { + texto = ( String ) value; + } + else if( fieldName.equals( MarcacoesEmpresaDataAuto.EMPRESA_ID ) ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesEmpresaDataAuto.REALIZADA ) ) + { + realizada = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public java.util.Date getData() + { + return data; + } + + public void setData(java.util.Date dataValue ) + { + this.data = dataValue; + } + + public String getTexto() + { + return texto; + } + + public void setTexto(String textoValue ) + { + this.texto = textoValue; + } + + public Integer getEmpresa_id() + { + return empresa_id; + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + this.empresa_id = empresa_idValue; + } + + public String getRealizada() + { + return realizada; + } + + public void setRealizada(String realizadaValue ) + { + this.realizada = realizadaValue; + } + + public Class getOuterClass() + { + return MarcacoesEmpresaDataAuto.class; + } + + public MarcacoesEmpresaDataAuto getOuterClassInstance() + { + MarcacoesEmpresaDataAuto outerObj = new MarcacoesEmpresaDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEmpresaData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEmpresaData.java new file mode 100644 index 00000000..b2baef71 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEmpresaData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesEmpresaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class MarcacoesEmpresaData extends com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEmpresaDataAuto +{ + + public MarcacoesEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEmpresaDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEmpresaDataAuto.java new file mode 100644 index 00000000..4f42d349 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEmpresaDataAuto.java @@ -0,0 +1,190 @@ +/* +* MarcacoesEmpresaDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class MarcacoesEmpresaDataAuto extends JDOObject +{ + + public static final String TABLENAME = "marcacoes_empresa"; + + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_empresa.id"; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_empresa.data"; + public static final String TEXTO = "texto"; + public static final String TEXTO_FULL = "marcacoes_empresa.texto"; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "marcacoes_empresa.empresa_id"; + public static final String TO_EMPRESA_ID = "to empresa_id"; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "marcacoes_empresa.realizada"; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, TEXTO, EMPRESA_ID, TO_EMPRESA_ID, REALIZADA, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DATA, TEXTO, EMPRESA_ID, REALIZADA, }; + + private Map dataHash; + + public MarcacoesEmpresaDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public java.util.Date getData() + { + return (java.util.Date) get(DATA); + } + + public void setData(java.util.Date dataValue ) + { + this.set(DATA, dataValue ); + } + + public String getTexto() + { + return (String) get(TEXTO); + } + + public void setTexto(String textoValue ) + { + this.set(TEXTO, textoValue ); + } + + public Integer getEmpresa_id() + { + return (Integer) dataHash.get(EMPRESA_ID); + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + dataHash.put(TO_EMPRESA_ID, null); + dataHash.put(EMPRESA_ID, empresa_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EmpresasData toEmpresa_id() + throws Exception + { + if( dataHash.get(TO_EMPRESA_ID) == null && getEmpresa_id() != null ) + { + dataHash.put(TO_EMPRESA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.class, new Object[]{ getEmpresa_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) dataHash.get(TO_EMPRESA_ID); + } + + public void setToEmpresa_id(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData empresa_idObject ) + { + if( empresa_idObject == null ) + { + dataHash.put(EMPRESA_ID, null); + } + else + { + dataHash.put(EMPRESA_ID, empresa_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + dataHash.put(TO_EMPRESA_ID, empresa_idObject); + } + + public String getRealizada() + { + return (String) get(REALIZADA); + } + + public void setRealizada(String realizadaValue ) + { + this.set(REALIZADA, realizadaValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_EMPRESA_ID.equals( fieldName ) ) + { + value = toEmpresa_id(); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + value = getEmpresa_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_EMPRESA_ID.equals( fieldName ) ) + { + setToEmpresa_id( (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) value ); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + setEmpresa_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_EMPRESA_ID) != null ) + { + toEmpresa_id().save(); + dataHash.put(EMPRESA_ID, toEmpresa_id().get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return MarcacoesEmpresa.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEstabelecimento.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEstabelecimento.java new file mode 100644 index 00000000..c5a6ff54 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEstabelecimento.java @@ -0,0 +1,291 @@ +/* +* MarcacoesEstabelecimento.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class MarcacoesEstabelecimento implements JDOInnerObject +{ + 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 Integer estado; + private Integer tecnico_hst; + private String observacoes; + + public MarcacoesEstabelecimento() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == MarcacoesEstabelecimentoDataAuto.ID ) + { + return id; + } + else if( fieldName == MarcacoesEstabelecimentoDataAuto.DATA ) + { + return data; + } + else if( fieldName == MarcacoesEstabelecimentoDataAuto.REALIZADA ) + { + return realizada; + } + else if( fieldName == MarcacoesEstabelecimentoDataAuto.DATA_EMAIL ) + { + return data_email; + } + else if( fieldName == MarcacoesEstabelecimentoDataAuto.DATA_RELATORIO ) + { + return data_relatorio; + } + else if( fieldName == MarcacoesEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) + { + return estabelecimento_id; + } + else if( fieldName == MarcacoesEstabelecimentoDataAuto.ESTADO ) + { + return estado; + } + else if( fieldName == MarcacoesEstabelecimentoDataAuto.TECNICO_HST ) + { + return tecnico_hst; + } + else if( fieldName == MarcacoesEstabelecimentoDataAuto.OBSERVACOES ) + { + return observacoes; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.DATA ) ) + { + return data; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.REALIZADA ) ) + { + return realizada; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.DATA_EMAIL ) ) + { + return data_email; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.DATA_RELATORIO ) ) + { + return data_relatorio; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) ) + { + return estabelecimento_id; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.ESTADO ) ) + { + return estado; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.TECNICO_HST ) ) + { + return tecnico_hst; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.OBSERVACOES ) ) + { + return observacoes; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == MarcacoesEstabelecimentoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == MarcacoesEstabelecimentoDataAuto.DATA ) + { + data = ( java.util.Date ) value; + } + else if( fieldName == MarcacoesEstabelecimentoDataAuto.REALIZADA ) + { + realizada = ( String ) value; + } + else if( fieldName == MarcacoesEstabelecimentoDataAuto.DATA_EMAIL ) + { + data_email = ( java.util.Date ) value; + } + else if( fieldName == MarcacoesEstabelecimentoDataAuto.DATA_RELATORIO ) + { + data_relatorio = ( java.util.Date ) value; + } + else if( fieldName == MarcacoesEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName == MarcacoesEstabelecimentoDataAuto.ESTADO ) + { + estado = ( Integer ) value; + } + else if( fieldName == MarcacoesEstabelecimentoDataAuto.TECNICO_HST ) + { + tecnico_hst = ( Integer ) value; + } + else if( fieldName == MarcacoesEstabelecimentoDataAuto.OBSERVACOES ) + { + observacoes = ( String ) value; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.DATA ) ) + { + data = ( java.util.Date ) value; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.REALIZADA ) ) + { + realizada = ( String ) value; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.DATA_EMAIL ) ) + { + data_email = ( java.util.Date ) value; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.DATA_RELATORIO ) ) + { + data_relatorio = ( java.util.Date ) value; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.ESTADO ) ) + { + estado = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.TECNICO_HST ) ) + { + tecnico_hst = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesEstabelecimentoDataAuto.OBSERVACOES ) ) + { + observacoes = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public java.util.Date getData() + { + return data; + } + + public void setData(java.util.Date dataValue ) + { + this.data = dataValue; + } + + public String getRealizada() + { + return realizada; + } + + public void setRealizada(String realizadaValue ) + { + this.realizada = realizadaValue; + } + + public java.util.Date getData_email() + { + return data_email; + } + + public void setData_email(java.util.Date data_emailValue ) + { + this.data_email = data_emailValue; + } + + public java.util.Date getData_relatorio() + { + return data_relatorio; + } + + public void setData_relatorio(java.util.Date data_relatorioValue ) + { + this.data_relatorio = data_relatorioValue; + } + + public Integer getEstabelecimento_id() + { + return estabelecimento_id; + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + this.estabelecimento_id = estabelecimento_idValue; + } + + public Integer getEstado() + { + return estado; + } + + public void setEstado(Integer estadoValue ) + { + this.estado = estadoValue; + } + + public Integer getTecnico_hst() + { + return tecnico_hst; + } + + public void setTecnico_hst(Integer tecnico_hstValue ) + { + this.tecnico_hst = tecnico_hstValue; + } + + public String getObservacoes() + { + return observacoes; + } + + public void setObservacoes(String observacoesValue ) + { + this.observacoes = observacoesValue; + } + + public Class getOuterClass() + { + return MarcacoesEstabelecimentoDataAuto.class; + } + + public MarcacoesEstabelecimentoDataAuto getOuterClassInstance() + { + MarcacoesEstabelecimentoDataAuto outerObj = new MarcacoesEstabelecimentoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEstabelecimentoData.java new file mode 100644 index 00000000..a9adc304 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesEstabelecimentoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class MarcacoesEstabelecimentoData extends com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoDataAuto +{ + + public MarcacoesEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEstabelecimentoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEstabelecimentoDataAuto.java new file mode 100644 index 00000000..e98ecbe7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesEstabelecimentoDataAuto.java @@ -0,0 +1,287 @@ +/* +* MarcacoesEstabelecimentoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class MarcacoesEstabelecimentoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "marcacoes_estabelecimento"; + + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_estabelecimento.id"; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_estabelecimento.data"; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "marcacoes_estabelecimento.realizada"; + public static final String DATA_EMAIL = "data_email"; + public static final String DATA_EMAIL_FULL = "marcacoes_estabelecimento.data_email"; + public static final String DATA_RELATORIO = "data_relatorio"; + public static final String DATA_RELATORIO_FULL = "marcacoes_estabelecimento.data_relatorio"; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "marcacoes_estabelecimento.estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id"; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "marcacoes_estabelecimento.estado"; + public static final String TECNICO_HST = "tecnico_hst"; + public static final String TECNICO_HST_FULL = "marcacoes_estabelecimento.tecnico_hst"; + public static final String TO_TECNICO_HST = "to tecnico_hst"; + public static final String OBSERVACOES = "observacoes"; + public static final String OBSERVACOES_FULL = "marcacoes_estabelecimento.observacoes"; + + 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, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO_ID, ESTADO, + TECNICO_HST, OBSERVACOES, }; + + private Map dataHash; + + public MarcacoesEstabelecimentoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public java.util.Date getData() + { + return (java.util.Date) get(DATA); + } + + public void setData(java.util.Date dataValue ) + { + this.set(DATA, dataValue ); + } + + public String getRealizada() + { + return (String) get(REALIZADA); + } + + public void setRealizada(String realizadaValue ) + { + this.set(REALIZADA, realizadaValue ); + } + + public java.util.Date getData_email() + { + return (java.util.Date) get(DATA_EMAIL); + } + + public void setData_email(java.util.Date data_emailValue ) + { + this.set(DATA_EMAIL, data_emailValue ); + } + + public java.util.Date getData_relatorio() + { + return (java.util.Date) get(DATA_RELATORIO); + } + + public void setData_relatorio(java.util.Date data_relatorioValue ) + { + this.set(DATA_RELATORIO, data_relatorioValue ); + } + + public Integer getEstabelecimento_id() + { + return (Integer) dataHash.get(ESTABELECIMENTO_ID); + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, null); + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id() + throws Exception + { + if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID); + } + + public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject ) + { + if( estabelecimento_idObject == null ) + { + dataHash.put(ESTABELECIMENTO_ID, null); + } + else + { + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject); + } + + public Integer getEstado() + { + return (Integer) get(ESTADO); + } + + public void setEstado(Integer estadoValue ) + { + this.set(ESTADO, estadoValue ); + } + + public Integer getTecnico_hst() + { + return (Integer) dataHash.get(TECNICO_HST); + } + + public void setTecnico_hst(Integer tecnico_hstValue ) + { + dataHash.put(TO_TECNICO_HST, null); + dataHash.put(TECNICO_HST, tecnico_hstValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTecnicosHstData toTecnico_hst() + throws Exception + { + if( dataHash.get(TO_TECNICO_HST) == null && getTecnico_hst() != null ) + { + dataHash.put(TO_TECNICO_HST, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTecnicosHstData.class, new Object[]{ getTecnico_hst() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTecnicosHstData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTecnicosHstData) dataHash.get(TO_TECNICO_HST); + } + + public void setToTecnico_hst(com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTecnicosHstData tecnico_hstObject ) + { + if( tecnico_hstObject == null ) + { + dataHash.put(TECNICO_HST, null); + } + else + { + dataHash.put(TECNICO_HST, tecnico_hstObject.get( com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTecnicosHstData.ID )); + } + dataHash.put(TO_TECNICO_HST, tecnico_hstObject); + } + + public String getObservacoes() + { + return (String) get(OBSERVACOES); + } + + public void setObservacoes(String observacoesValue ) + { + this.set(OBSERVACOES, observacoesValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_TECNICO_HST.equals( fieldName ) ) + { + value = toTecnico_hst(); + } + else if( TECNICO_HST.equals( fieldName ) ) + { + value = getTecnico_hst(); + } + else if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = getEstabelecimento_id(); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = toEstabelecimento_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_TECNICO_HST.equals( fieldName ) ) + { + setToTecnico_hst( (com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTecnicosHstData) value ); + } + else if( TECNICO_HST.equals( fieldName ) ) + { + setTecnico_hst( (Integer) value ); + } + else if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setEstabelecimento_id( (Integer) value ); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_ESTABELECIMENTO_ID) != null ) + { + toEstabelecimento_id().save(); + dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + + if( dataHash.get(TO_TECNICO_HST) != null ) + { + toTecnico_hst().save(); + dataHash.put(TECNICO_HST, toTecnico_hst().get( com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTecnicosHstData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return MarcacoesEstabelecimento.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesGruposRealizados.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesGruposRealizados.java new file mode 100644 index 00000000..45f62a1d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesGruposRealizados.java @@ -0,0 +1,156 @@ +/* +* MarcacoesGruposRealizados.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class MarcacoesGruposRealizados implements JDOInnerObject +{ + private Integer id; + private Integer marcacao_trabalhador_id; + private Integer grupo_protocolo_id; + private Integer marcacoes_trabalhador_estado_id; + + public MarcacoesGruposRealizados() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == MarcacoesGruposRealizadosDataAuto.ID ) + { + return id; + } + else if( fieldName == MarcacoesGruposRealizadosDataAuto.MARCACAO_TRABALHADOR_ID ) + { + return marcacao_trabalhador_id; + } + else if( fieldName == MarcacoesGruposRealizadosDataAuto.GRUPO_PROTOCOLO_ID ) + { + return grupo_protocolo_id; + } + else if( fieldName == MarcacoesGruposRealizadosDataAuto.MARCACOES_TRABALHADOR_ESTADO_ID ) + { + return marcacoes_trabalhador_estado_id; + } + else if( fieldName.equals( MarcacoesGruposRealizadosDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( MarcacoesGruposRealizadosDataAuto.MARCACAO_TRABALHADOR_ID ) ) + { + return marcacao_trabalhador_id; + } + else if( fieldName.equals( MarcacoesGruposRealizadosDataAuto.GRUPO_PROTOCOLO_ID ) ) + { + return grupo_protocolo_id; + } + else if( fieldName.equals( MarcacoesGruposRealizadosDataAuto.MARCACOES_TRABALHADOR_ESTADO_ID ) ) + { + return marcacoes_trabalhador_estado_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == MarcacoesGruposRealizadosDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == MarcacoesGruposRealizadosDataAuto.MARCACAO_TRABALHADOR_ID ) + { + marcacao_trabalhador_id = ( Integer ) value; + } + else if( fieldName == MarcacoesGruposRealizadosDataAuto.GRUPO_PROTOCOLO_ID ) + { + grupo_protocolo_id = ( Integer ) value; + } + else if( fieldName == MarcacoesGruposRealizadosDataAuto.MARCACOES_TRABALHADOR_ESTADO_ID ) + { + marcacoes_trabalhador_estado_id = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesGruposRealizadosDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesGruposRealizadosDataAuto.MARCACAO_TRABALHADOR_ID ) ) + { + marcacao_trabalhador_id = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesGruposRealizadosDataAuto.GRUPO_PROTOCOLO_ID ) ) + { + grupo_protocolo_id = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesGruposRealizadosDataAuto.MARCACOES_TRABALHADOR_ESTADO_ID ) ) + { + marcacoes_trabalhador_estado_id = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getMarcacao_trabalhador_id() + { + return marcacao_trabalhador_id; + } + + public void setMarcacao_trabalhador_id(Integer marcacao_trabalhador_idValue ) + { + this.marcacao_trabalhador_id = marcacao_trabalhador_idValue; + } + + public Integer getGrupo_protocolo_id() + { + return grupo_protocolo_id; + } + + public void setGrupo_protocolo_id(Integer grupo_protocolo_idValue ) + { + this.grupo_protocolo_id = grupo_protocolo_idValue; + } + + public Integer getMarcacoes_trabalhador_estado_id() + { + return marcacoes_trabalhador_estado_id; + } + + public void setMarcacoes_trabalhador_estado_id(Integer marcacoes_trabalhador_estado_idValue ) + { + this.marcacoes_trabalhador_estado_id = marcacoes_trabalhador_estado_idValue; + } + + public Class getOuterClass() + { + return MarcacoesGruposRealizadosDataAuto.class; + } + + public MarcacoesGruposRealizadosDataAuto getOuterClassInstance() + { + MarcacoesGruposRealizadosDataAuto outerObj = new MarcacoesGruposRealizadosDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesGruposRealizadosData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesGruposRealizadosData.java new file mode 100644 index 00000000..7c605aed --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesGruposRealizadosData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesGruposRealizadosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class MarcacoesGruposRealizadosData extends com.evolute.siprp.server.db.data.siprp_local3.MarcacoesGruposRealizadosDataAuto +{ + + public MarcacoesGruposRealizadosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesGruposRealizadosDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesGruposRealizadosDataAuto.java new file mode 100644 index 00000000..2c0dd934 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesGruposRealizadosDataAuto.java @@ -0,0 +1,275 @@ +/* +* MarcacoesGruposRealizadosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class MarcacoesGruposRealizadosDataAuto extends JDOObject +{ + + public static final String TABLENAME = "marcacoes_grupos_realizados"; + + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_grupos_realizados.id"; + 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 String TO_MARCACAO_TRABALHADOR_ID = "to marcacao_trabalhador_id"; + 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 String TO_GRUPO_PROTOCOLO_ID = "to grupo_protocolo_id"; + 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 String TO_MARCACOES_TRABALHADOR_ESTADO_ID = "to marcacoes_trabalhador_estado_id"; + + 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, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, MARCACAO_TRABALHADOR_ID, GRUPO_PROTOCOLO_ID, + MARCACOES_TRABALHADOR_ESTADO_ID, }; + + private Map dataHash; + + public MarcacoesGruposRealizadosDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getMarcacao_trabalhador_id() + { + return (Integer) dataHash.get(MARCACAO_TRABALHADOR_ID); + } + + public void setMarcacao_trabalhador_id(Integer marcacao_trabalhador_idValue ) + { + dataHash.put(TO_MARCACAO_TRABALHADOR_ID, null); + dataHash.put(MARCACAO_TRABALHADOR_ID, marcacao_trabalhador_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData toMarcacao_trabalhador_id() + throws Exception + { + if( dataHash.get(TO_MARCACAO_TRABALHADOR_ID) == null && getMarcacao_trabalhador_id() != null ) + { + dataHash.put(TO_MARCACAO_TRABALHADOR_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData.class, new Object[]{ getMarcacao_trabalhador_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData) dataHash.get(TO_MARCACAO_TRABALHADOR_ID); + } + + public void setToMarcacao_trabalhador_id(com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData marcacao_trabalhador_idObject ) + { + if( marcacao_trabalhador_idObject == null ) + { + dataHash.put(MARCACAO_TRABALHADOR_ID, null); + } + else + { + dataHash.put(MARCACAO_TRABALHADOR_ID, marcacao_trabalhador_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData.ID )); + } + dataHash.put(TO_MARCACAO_TRABALHADOR_ID, marcacao_trabalhador_idObject); + } + + public Integer getGrupo_protocolo_id() + { + return (Integer) dataHash.get(GRUPO_PROTOCOLO_ID); + } + + public void setGrupo_protocolo_id(Integer grupo_protocolo_idValue ) + { + dataHash.put(TO_GRUPO_PROTOCOLO_ID, null); + dataHash.put(GRUPO_PROTOCOLO_ID, grupo_protocolo_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData toGrupo_protocolo_id() + throws Exception + { + if( dataHash.get(TO_GRUPO_PROTOCOLO_ID) == null && getGrupo_protocolo_id() != null ) + { + dataHash.put(TO_GRUPO_PROTOCOLO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData.class, new Object[]{ getGrupo_protocolo_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData) dataHash.get(TO_GRUPO_PROTOCOLO_ID); + } + + public void setToGrupo_protocolo_id(com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData grupo_protocolo_idObject ) + { + if( grupo_protocolo_idObject == null ) + { + dataHash.put(GRUPO_PROTOCOLO_ID, null); + } + else + { + dataHash.put(GRUPO_PROTOCOLO_ID, grupo_protocolo_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData.ID )); + } + dataHash.put(TO_GRUPO_PROTOCOLO_ID, grupo_protocolo_idObject); + } + + public Integer getMarcacoes_trabalhador_estado_id() + { + return (Integer) dataHash.get(MARCACOES_TRABALHADOR_ESTADO_ID); + } + + public void setMarcacoes_trabalhador_estado_id(Integer marcacoes_trabalhador_estado_idValue ) + { + dataHash.put(TO_MARCACOES_TRABALHADOR_ESTADO_ID, null); + dataHash.put(MARCACOES_TRABALHADOR_ESTADO_ID, marcacoes_trabalhador_estado_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorEstadosData toMarcacoes_trabalhador_estado_id() + throws Exception + { + if( dataHash.get(TO_MARCACOES_TRABALHADOR_ESTADO_ID) == null && getMarcacoes_trabalhador_estado_id() != null ) + { + dataHash.put(TO_MARCACOES_TRABALHADOR_ESTADO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorEstadosData.class, new Object[]{ getMarcacoes_trabalhador_estado_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorEstadosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorEstadosData) dataHash.get(TO_MARCACOES_TRABALHADOR_ESTADO_ID); + } + + public void setToMarcacoes_trabalhador_estado_id(com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorEstadosData marcacoes_trabalhador_estado_idObject ) + { + if( marcacoes_trabalhador_estado_idObject == null ) + { + dataHash.put(MARCACOES_TRABALHADOR_ESTADO_ID, null); + } + else + { + dataHash.put(MARCACOES_TRABALHADOR_ESTADO_ID, marcacoes_trabalhador_estado_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorEstadosData.ID )); + } + dataHash.put(TO_MARCACOES_TRABALHADOR_ESTADO_ID, marcacoes_trabalhador_estado_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_GRUPO_PROTOCOLO_ID.equals( fieldName ) ) + { + value = toGrupo_protocolo_id(); + } + else if( MARCACAO_TRABALHADOR_ID.equals( fieldName ) ) + { + value = getMarcacao_trabalhador_id(); + } + else if( MARCACOES_TRABALHADOR_ESTADO_ID.equals( fieldName ) ) + { + value = getMarcacoes_trabalhador_estado_id(); + } + else if( GRUPO_PROTOCOLO_ID.equals( fieldName ) ) + { + value = getGrupo_protocolo_id(); + } + else if( TO_MARCACAO_TRABALHADOR_ID.equals( fieldName ) ) + { + value = toMarcacao_trabalhador_id(); + } + else if( TO_MARCACOES_TRABALHADOR_ESTADO_ID.equals( fieldName ) ) + { + value = toMarcacoes_trabalhador_estado_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_GRUPO_PROTOCOLO_ID.equals( fieldName ) ) + { + setToGrupo_protocolo_id( (com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData) value ); + } + else if( MARCACAO_TRABALHADOR_ID.equals( fieldName ) ) + { + setMarcacao_trabalhador_id( (Integer) value ); + } + else if( MARCACOES_TRABALHADOR_ESTADO_ID.equals( fieldName ) ) + { + setMarcacoes_trabalhador_estado_id( (Integer) value ); + } + else if( GRUPO_PROTOCOLO_ID.equals( fieldName ) ) + { + setGrupo_protocolo_id( (Integer) value ); + } + else if( TO_MARCACAO_TRABALHADOR_ID.equals( fieldName ) ) + { + setToMarcacao_trabalhador_id( (com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData) value ); + } + else if( TO_MARCACOES_TRABALHADOR_ESTADO_ID.equals( fieldName ) ) + { + setToMarcacoes_trabalhador_estado_id( (com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorEstadosData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_MARCACAO_TRABALHADOR_ID) != null ) + { + toMarcacao_trabalhador_id().save(); + dataHash.put(MARCACAO_TRABALHADOR_ID, toMarcacao_trabalhador_id().get( com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData.ID )); + } + + if( dataHash.get(TO_GRUPO_PROTOCOLO_ID) != null ) + { + toGrupo_protocolo_id().save(); + dataHash.put(GRUPO_PROTOCOLO_ID, toGrupo_protocolo_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData.ID )); + } + + if( dataHash.get(TO_MARCACOES_TRABALHADOR_ESTADO_ID) != null ) + { + toMarcacoes_trabalhador_estado_id().save(); + dataHash.put(MARCACOES_TRABALHADOR_ESTADO_ID, toMarcacoes_trabalhador_estado_id().get( com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorEstadosData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return MarcacoesGruposRealizados.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTecnicosHst.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTecnicosHst.java new file mode 100644 index 00000000..2576cf30 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTecnicosHst.java @@ -0,0 +1,291 @@ +/* +* MarcacoesTecnicosHst.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class MarcacoesTecnicosHst implements JDOInnerObject +{ + 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; + + public MarcacoesTecnicosHst() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == MarcacoesTecnicosHstDataAuto.ID ) + { + return id; + } + else if( fieldName == MarcacoesTecnicosHstDataAuto.NOME ) + { + return nome; + } + else if( fieldName == MarcacoesTecnicosHstDataAuto.NOME_PLAIN ) + { + return nome_plain; + } + else if( fieldName == MarcacoesTecnicosHstDataAuto.INICIAIS ) + { + return iniciais; + } + else if( fieldName == MarcacoesTecnicosHstDataAuto.IDENTIFICADOR ) + { + return identificador; + } + else if( fieldName == MarcacoesTecnicosHstDataAuto.INACTIVO ) + { + return inactivo; + } + else if( fieldName == MarcacoesTecnicosHstDataAuto.CAP ) + { + return cap; + } + else if( fieldName == MarcacoesTecnicosHstDataAuto.FORMACAO ) + { + return formacao; + } + else if( fieldName == MarcacoesTecnicosHstDataAuto.ASSINATURA ) + { + return assinatura; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.NOME ) ) + { + return nome; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.NOME_PLAIN ) ) + { + return nome_plain; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.INICIAIS ) ) + { + return iniciais; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.IDENTIFICADOR ) ) + { + return identificador; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.INACTIVO ) ) + { + return inactivo; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.CAP ) ) + { + return cap; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.FORMACAO ) ) + { + return formacao; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.ASSINATURA ) ) + { + return assinatura; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == MarcacoesTecnicosHstDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == MarcacoesTecnicosHstDataAuto.NOME ) + { + nome = ( String ) value; + } + else if( fieldName == MarcacoesTecnicosHstDataAuto.NOME_PLAIN ) + { + nome_plain = ( String ) value; + } + else if( fieldName == MarcacoesTecnicosHstDataAuto.INICIAIS ) + { + iniciais = ( String ) value; + } + else if( fieldName == MarcacoesTecnicosHstDataAuto.IDENTIFICADOR ) + { + identificador = ( Integer ) value; + } + else if( fieldName == MarcacoesTecnicosHstDataAuto.INACTIVO ) + { + inactivo = ( String ) value; + } + else if( fieldName == MarcacoesTecnicosHstDataAuto.CAP ) + { + cap = ( String ) value; + } + else if( fieldName == MarcacoesTecnicosHstDataAuto.FORMACAO ) + { + formacao = ( String ) value; + } + else if( fieldName == MarcacoesTecnicosHstDataAuto.ASSINATURA ) + { + assinatura = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.NOME ) ) + { + nome = ( String ) value; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.NOME_PLAIN ) ) + { + nome_plain = ( String ) value; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.INICIAIS ) ) + { + iniciais = ( String ) value; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.IDENTIFICADOR ) ) + { + identificador = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.INACTIVO ) ) + { + inactivo = ( String ) value; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.CAP ) ) + { + cap = ( String ) value; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.FORMACAO ) ) + { + formacao = ( String ) value; + } + else if( fieldName.equals( MarcacoesTecnicosHstDataAuto.ASSINATURA ) ) + { + assinatura = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getNome() + { + return nome; + } + + public void setNome(String nomeValue ) + { + this.nome = nomeValue; + } + + public String getNome_plain() + { + return nome_plain; + } + + public void setNome_plain(String nome_plainValue ) + { + this.nome_plain = nome_plainValue; + } + + public String getIniciais() + { + return iniciais; + } + + public void setIniciais(String iniciaisValue ) + { + this.iniciais = iniciaisValue; + } + + public Integer getIdentificador() + { + return identificador; + } + + public void setIdentificador(Integer identificadorValue ) + { + this.identificador = identificadorValue; + } + + public String getInactivo() + { + return inactivo; + } + + public void setInactivo(String inactivoValue ) + { + this.inactivo = inactivoValue; + } + + public String getCap() + { + return cap; + } + + public void setCap(String capValue ) + { + this.cap = capValue; + } + + public String getFormacao() + { + return formacao; + } + + public void setFormacao(String formacaoValue ) + { + this.formacao = formacaoValue; + } + + public Integer getAssinatura() + { + return assinatura; + } + + public void setAssinatura(Integer assinaturaValue ) + { + this.assinatura = assinaturaValue; + } + + public Class getOuterClass() + { + return MarcacoesTecnicosHstDataAuto.class; + } + + public MarcacoesTecnicosHstDataAuto getOuterClassInstance() + { + MarcacoesTecnicosHstDataAuto outerObj = new MarcacoesTecnicosHstDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTecnicosHstData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTecnicosHstData.java new file mode 100644 index 00000000..2064652e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTecnicosHstData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesTecnicosHstDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class MarcacoesTecnicosHstData extends com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTecnicosHstDataAuto +{ + + public MarcacoesTecnicosHstData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTecnicosHstDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTecnicosHstDataAuto.java new file mode 100644 index 00000000..42125218 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTecnicosHstDataAuto.java @@ -0,0 +1,239 @@ +/* +* MarcacoesTecnicosHstDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class MarcacoesTecnicosHstDataAuto extends JDOObject +{ + + public static final String TABLENAME = "marcacoes_tecnicos_hst"; + + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_tecnicos_hst.id"; + public static final String NOME = "nome"; + public static final String NOME_FULL = "marcacoes_tecnicos_hst.nome"; + public static final String NOME_PLAIN = "nome_plain"; + public static final String NOME_PLAIN_FULL = "marcacoes_tecnicos_hst.nome_plain"; + public static final String INICIAIS = "iniciais"; + public static final String INICIAIS_FULL = "marcacoes_tecnicos_hst.iniciais"; + public static final String IDENTIFICADOR = "identificador"; + public static final String IDENTIFICADOR_FULL = "marcacoes_tecnicos_hst.identificador"; + public static final String INACTIVO = "inactivo"; + public static final String INACTIVO_FULL = "marcacoes_tecnicos_hst.inactivo"; + public static final String CAP = "cap"; + public static final String CAP_FULL = "marcacoes_tecnicos_hst.cap"; + public static final String FORMACAO = "formacao"; + public static final String FORMACAO_FULL = "marcacoes_tecnicos_hst.formacao"; + public static final String ASSINATURA = "assinatura"; + public static final String ASSINATURA_FULL = "marcacoes_tecnicos_hst.assinatura"; + public static final String TO_ASSINATURA = "to assinatura"; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, NOME_PLAIN, INICIAIS, IDENTIFICADOR, INACTIVO, CAP, FORMACAO, ASSINATURA, + TO_ASSINATURA, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, NOME, NOME_PLAIN, INICIAIS, IDENTIFICADOR, INACTIVO, CAP, FORMACAO, ASSINATURA, }; + + private Map dataHash; + + public MarcacoesTecnicosHstDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getNome() + { + return (String) get(NOME); + } + + public void setNome(String nomeValue ) + { + this.set(NOME, nomeValue ); + } + + public String getNome_plain() + { + return (String) get(NOME_PLAIN); + } + + public void setNome_plain(String nome_plainValue ) + { + this.set(NOME_PLAIN, nome_plainValue ); + } + + public String getIniciais() + { + return (String) get(INICIAIS); + } + + public void setIniciais(String iniciaisValue ) + { + this.set(INICIAIS, iniciaisValue ); + } + + public Integer getIdentificador() + { + return (Integer) get(IDENTIFICADOR); + } + + public void setIdentificador(Integer identificadorValue ) + { + this.set(IDENTIFICADOR, identificadorValue ); + } + + public String getInactivo() + { + return (String) get(INACTIVO); + } + + public void setInactivo(String inactivoValue ) + { + this.set(INACTIVO, inactivoValue ); + } + + public String getCap() + { + return (String) get(CAP); + } + + public void setCap(String capValue ) + { + this.set(CAP, capValue ); + } + + public String getFormacao() + { + return (String) get(FORMACAO); + } + + public void setFormacao(String formacaoValue ) + { + this.set(FORMACAO, formacaoValue ); + } + + public Integer getAssinatura() + { + return (Integer) dataHash.get(ASSINATURA); + } + + public void setAssinatura(Integer assinaturaValue ) + { + dataHash.put(TO_ASSINATURA, null); + dataHash.put(ASSINATURA, assinaturaValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.ImageData toAssinatura() + throws Exception + { + if( dataHash.get(TO_ASSINATURA) == null && getAssinatura() != null ) + { + dataHash.put(TO_ASSINATURA, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.ImageData.class, new Object[]{ getAssinatura() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.ImageData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.ImageData) dataHash.get(TO_ASSINATURA); + } + + public void setToAssinatura(com.evolute.siprp.server.db.data.siprp_local3.ImageData assinaturaObject ) + { + if( assinaturaObject == null ) + { + dataHash.put(ASSINATURA, null); + } + else + { + dataHash.put(ASSINATURA, assinaturaObject.get( com.evolute.siprp.server.db.data.siprp_local3.ImageData.ID )); + } + dataHash.put(TO_ASSINATURA, assinaturaObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_ASSINATURA.equals( fieldName ) ) + { + value = toAssinatura(); + } + else if( ASSINATURA.equals( fieldName ) ) + { + value = getAssinatura(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_ASSINATURA.equals( fieldName ) ) + { + setToAssinatura( (com.evolute.siprp.server.db.data.siprp_local3.ImageData) value ); + } + else if( ASSINATURA.equals( fieldName ) ) + { + setAssinatura( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_ASSINATURA) != null ) + { + toAssinatura().save(); + dataHash.put(ASSINATURA, toAssinatura().get( com.evolute.siprp.server.db.data.siprp_local3.ImageData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return MarcacoesTecnicosHst.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhador.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhador.java new file mode 100644 index 00000000..9906bf74 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhador.java @@ -0,0 +1,345 @@ +/* +* MarcacoesTrabalhador.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class MarcacoesTrabalhador implements JDOInnerObject +{ + 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 Integer motivo; + private Integer estado; + private String observacoes; + private Integer prestador_id; + + public MarcacoesTrabalhador() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == MarcacoesTrabalhadorDataAuto.ID ) + { + return id; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.DATA ) + { + return data; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.REALIZADA ) + { + return realizada; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.DATA_EMAIL ) + { + return data_email; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.DATA_RELATORIO ) + { + return data_relatorio; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.TIPO ) + { + return tipo; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.TRABALHADOR_ID ) + { + return trabalhador_id; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.MOTIVO ) + { + return motivo; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.ESTADO ) + { + return estado; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.OBSERVACOES ) + { + return observacoes; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.PRESTADOR_ID ) + { + return prestador_id; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.DATA ) ) + { + return data; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.REALIZADA ) ) + { + return realizada; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.DATA_EMAIL ) ) + { + return data_email; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.DATA_RELATORIO ) ) + { + return data_relatorio; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.TIPO ) ) + { + return tipo; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.TRABALHADOR_ID ) ) + { + return trabalhador_id; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.MOTIVO ) ) + { + return motivo; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.ESTADO ) ) + { + return estado; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.OBSERVACOES ) ) + { + return observacoes; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.PRESTADOR_ID ) ) + { + return prestador_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == MarcacoesTrabalhadorDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.DATA ) + { + data = ( java.util.Date ) value; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.REALIZADA ) + { + realizada = ( String ) value; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.DATA_EMAIL ) + { + data_email = ( java.util.Date ) value; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.DATA_RELATORIO ) + { + data_relatorio = ( java.util.Date ) value; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.TIPO ) + { + tipo = ( Integer ) value; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.TRABALHADOR_ID ) + { + trabalhador_id = ( Integer ) value; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.MOTIVO ) + { + motivo = ( Integer ) value; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.ESTADO ) + { + estado = ( Integer ) value; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.OBSERVACOES ) + { + observacoes = ( String ) value; + } + else if( fieldName == MarcacoesTrabalhadorDataAuto.PRESTADOR_ID ) + { + prestador_id = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.DATA ) ) + { + data = ( java.util.Date ) value; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.REALIZADA ) ) + { + realizada = ( String ) value; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.DATA_EMAIL ) ) + { + data_email = ( java.util.Date ) value; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.DATA_RELATORIO ) ) + { + data_relatorio = ( java.util.Date ) value; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.TIPO ) ) + { + tipo = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.TRABALHADOR_ID ) ) + { + trabalhador_id = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.MOTIVO ) ) + { + motivo = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.ESTADO ) ) + { + estado = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.OBSERVACOES ) ) + { + observacoes = ( String ) value; + } + else if( fieldName.equals( MarcacoesTrabalhadorDataAuto.PRESTADOR_ID ) ) + { + prestador_id = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public java.util.Date getData() + { + return data; + } + + public void setData(java.util.Date dataValue ) + { + this.data = dataValue; + } + + public String getRealizada() + { + return realizada; + } + + public void setRealizada(String realizadaValue ) + { + this.realizada = realizadaValue; + } + + public java.util.Date getData_email() + { + return data_email; + } + + public void setData_email(java.util.Date data_emailValue ) + { + this.data_email = data_emailValue; + } + + public java.util.Date getData_relatorio() + { + return data_relatorio; + } + + public void setData_relatorio(java.util.Date data_relatorioValue ) + { + this.data_relatorio = data_relatorioValue; + } + + public Integer getTipo() + { + return tipo; + } + + public void setTipo(Integer tipoValue ) + { + this.tipo = tipoValue; + } + + public Integer getTrabalhador_id() + { + return trabalhador_id; + } + + public void setTrabalhador_id(Integer trabalhador_idValue ) + { + this.trabalhador_id = trabalhador_idValue; + } + + public Integer getMotivo() + { + return motivo; + } + + public void setMotivo(Integer motivoValue ) + { + this.motivo = motivoValue; + } + + public Integer getEstado() + { + return estado; + } + + public void setEstado(Integer estadoValue ) + { + this.estado = estadoValue; + } + + public String getObservacoes() + { + return observacoes; + } + + public void setObservacoes(String observacoesValue ) + { + this.observacoes = observacoesValue; + } + + public Integer getPrestador_id() + { + return prestador_id; + } + + public void setPrestador_id(Integer prestador_idValue ) + { + this.prestador_id = prestador_idValue; + } + + public Class getOuterClass() + { + return MarcacoesTrabalhadorDataAuto.class; + } + + public MarcacoesTrabalhadorDataAuto getOuterClassInstance() + { + MarcacoesTrabalhadorDataAuto outerObj = new MarcacoesTrabalhadorDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhadorData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhadorData.java new file mode 100644 index 00000000..f86c7f29 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhadorData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesTrabalhadorDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class MarcacoesTrabalhadorData extends com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorDataAuto +{ + + public MarcacoesTrabalhadorData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhadorDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhadorDataAuto.java new file mode 100644 index 00000000..78cbc569 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhadorDataAuto.java @@ -0,0 +1,264 @@ +/* +* MarcacoesTrabalhadorDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class MarcacoesTrabalhadorDataAuto extends JDOObject +{ + + public static final String TABLENAME = "marcacoes_trabalhador"; + + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_trabalhador.id"; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_trabalhador.data"; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "marcacoes_trabalhador.realizada"; + public static final String DATA_EMAIL = "data_email"; + public static final String DATA_EMAIL_FULL = "marcacoes_trabalhador.data_email"; + public static final String DATA_RELATORIO = "data_relatorio"; + public static final String DATA_RELATORIO_FULL = "marcacoes_trabalhador.data_relatorio"; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "marcacoes_trabalhador.tipo"; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "marcacoes_trabalhador.trabalhador_id"; + public static final String MOTIVO = "motivo"; + public static final String MOTIVO_FULL = "marcacoes_trabalhador.motivo"; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "marcacoes_trabalhador.estado"; + public static final String OBSERVACOES = "observacoes"; + public static final String OBSERVACOES_FULL = "marcacoes_trabalhador.observacoes"; + public static final String PRESTADOR_ID = "prestador_id"; + public static final String PRESTADOR_ID_FULL = "marcacoes_trabalhador.prestador_id"; + public static final String TO_PRESTADOR_ID = "to prestador_id"; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR_ID, MOTIVO, ESTADO, + OBSERVACOES, PRESTADOR_ID, TO_PRESTADOR_ID, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR_ID, MOTIVO, ESTADO, + OBSERVACOES, PRESTADOR_ID, }; + + private Map dataHash; + + public MarcacoesTrabalhadorDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public java.util.Date getData() + { + return (java.util.Date) get(DATA); + } + + public void setData(java.util.Date dataValue ) + { + this.set(DATA, dataValue ); + } + + public String getRealizada() + { + return (String) get(REALIZADA); + } + + public void setRealizada(String realizadaValue ) + { + this.set(REALIZADA, realizadaValue ); + } + + public java.util.Date getData_email() + { + return (java.util.Date) get(DATA_EMAIL); + } + + public void setData_email(java.util.Date data_emailValue ) + { + this.set(DATA_EMAIL, data_emailValue ); + } + + public java.util.Date getData_relatorio() + { + return (java.util.Date) get(DATA_RELATORIO); + } + + public void setData_relatorio(java.util.Date data_relatorioValue ) + { + this.set(DATA_RELATORIO, data_relatorioValue ); + } + + public Integer getTipo() + { + return (Integer) get(TIPO); + } + + public void setTipo(Integer tipoValue ) + { + this.set(TIPO, tipoValue ); + } + + public Integer getTrabalhador_id() + { + return (Integer) get(TRABALHADOR_ID); + } + + public void setTrabalhador_id(Integer trabalhador_idValue ) + { + this.set(TRABALHADOR_ID, trabalhador_idValue ); + } + + public Integer getMotivo() + { + return (Integer) get(MOTIVO); + } + + public void setMotivo(Integer motivoValue ) + { + this.set(MOTIVO, motivoValue ); + } + + public Integer getEstado() + { + return (Integer) get(ESTADO); + } + + public void setEstado(Integer estadoValue ) + { + this.set(ESTADO, estadoValue ); + } + + public String getObservacoes() + { + return (String) get(OBSERVACOES); + } + + public void setObservacoes(String observacoesValue ) + { + this.set(OBSERVACOES, observacoesValue ); + } + + public Integer getPrestador_id() + { + return (Integer) dataHash.get(PRESTADOR_ID); + } + + public void setPrestador_id(Integer prestador_idValue ) + { + dataHash.put(TO_PRESTADOR_ID, null); + dataHash.put(PRESTADOR_ID, prestador_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData toPrestador_id() + throws Exception + { + if( dataHash.get(TO_PRESTADOR_ID) == null && getPrestador_id() != null ) + { + dataHash.put(TO_PRESTADOR_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.class, new Object[]{ getPrestador_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) dataHash.get(TO_PRESTADOR_ID); + } + + public void setToPrestador_id(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData prestador_idObject ) + { + if( prestador_idObject == null ) + { + dataHash.put(PRESTADOR_ID, null); + } + else + { + dataHash.put(PRESTADOR_ID, prestador_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + dataHash.put(TO_PRESTADOR_ID, prestador_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_PRESTADOR_ID.equals( fieldName ) ) + { + value = toPrestador_id(); + } + else if( PRESTADOR_ID.equals( fieldName ) ) + { + value = getPrestador_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_PRESTADOR_ID.equals( fieldName ) ) + { + setToPrestador_id( (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) value ); + } + else if( PRESTADOR_ID.equals( fieldName ) ) + { + setPrestador_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_PRESTADOR_ID) != null ) + { + toPrestador_id().save(); + dataHash.put(PRESTADOR_ID, toPrestador_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return MarcacoesTrabalhador.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhadorEstados.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhadorEstados.java new file mode 100644 index 00000000..20b97980 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhadorEstados.java @@ -0,0 +1,183 @@ +/* +* MarcacoesTrabalhadorEstados.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class MarcacoesTrabalhadorEstados implements JDOInnerObject +{ + private Integer id; + private java.util.Date data; + private Integer estado; + private Integer marcacao_id; + private Integer prestador_id; + + public MarcacoesTrabalhadorEstados() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == MarcacoesTrabalhadorEstadosDataAuto.ID ) + { + return id; + } + else if( fieldName == MarcacoesTrabalhadorEstadosDataAuto.DATA ) + { + return data; + } + else if( fieldName == MarcacoesTrabalhadorEstadosDataAuto.ESTADO ) + { + return estado; + } + else if( fieldName == MarcacoesTrabalhadorEstadosDataAuto.MARCACAO_ID ) + { + return marcacao_id; + } + else if( fieldName == MarcacoesTrabalhadorEstadosDataAuto.PRESTADOR_ID ) + { + return prestador_id; + } + else if( fieldName.equals( MarcacoesTrabalhadorEstadosDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( MarcacoesTrabalhadorEstadosDataAuto.DATA ) ) + { + return data; + } + else if( fieldName.equals( MarcacoesTrabalhadorEstadosDataAuto.ESTADO ) ) + { + return estado; + } + else if( fieldName.equals( MarcacoesTrabalhadorEstadosDataAuto.MARCACAO_ID ) ) + { + return marcacao_id; + } + else if( fieldName.equals( MarcacoesTrabalhadorEstadosDataAuto.PRESTADOR_ID ) ) + { + return prestador_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == MarcacoesTrabalhadorEstadosDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == MarcacoesTrabalhadorEstadosDataAuto.DATA ) + { + data = ( java.util.Date ) value; + } + else if( fieldName == MarcacoesTrabalhadorEstadosDataAuto.ESTADO ) + { + estado = ( Integer ) value; + } + else if( fieldName == MarcacoesTrabalhadorEstadosDataAuto.MARCACAO_ID ) + { + marcacao_id = ( Integer ) value; + } + else if( fieldName == MarcacoesTrabalhadorEstadosDataAuto.PRESTADOR_ID ) + { + prestador_id = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesTrabalhadorEstadosDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesTrabalhadorEstadosDataAuto.DATA ) ) + { + data = ( java.util.Date ) value; + } + else if( fieldName.equals( MarcacoesTrabalhadorEstadosDataAuto.ESTADO ) ) + { + estado = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesTrabalhadorEstadosDataAuto.MARCACAO_ID ) ) + { + marcacao_id = ( Integer ) value; + } + else if( fieldName.equals( MarcacoesTrabalhadorEstadosDataAuto.PRESTADOR_ID ) ) + { + prestador_id = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public java.util.Date getData() + { + return data; + } + + public void setData(java.util.Date dataValue ) + { + this.data = dataValue; + } + + public Integer getEstado() + { + return estado; + } + + public void setEstado(Integer estadoValue ) + { + this.estado = estadoValue; + } + + public Integer getMarcacao_id() + { + return marcacao_id; + } + + public void setMarcacao_id(Integer marcacao_idValue ) + { + this.marcacao_id = marcacao_idValue; + } + + public Integer getPrestador_id() + { + return prestador_id; + } + + public void setPrestador_id(Integer prestador_idValue ) + { + this.prestador_id = prestador_idValue; + } + + public Class getOuterClass() + { + return MarcacoesTrabalhadorEstadosDataAuto.class; + } + + public MarcacoesTrabalhadorEstadosDataAuto getOuterClassInstance() + { + MarcacoesTrabalhadorEstadosDataAuto outerObj = new MarcacoesTrabalhadorEstadosDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhadorEstadosData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhadorEstadosData.java new file mode 100644 index 00000000..0a9157c1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhadorEstadosData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesTrabalhadorEstadosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class MarcacoesTrabalhadorEstadosData extends com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorEstadosDataAuto +{ + + public MarcacoesTrabalhadorEstadosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhadorEstadosDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhadorEstadosDataAuto.java new file mode 100644 index 00000000..21ef871a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MarcacoesTrabalhadorEstadosDataAuto.java @@ -0,0 +1,237 @@ +/* +* MarcacoesTrabalhadorEstadosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class MarcacoesTrabalhadorEstadosDataAuto extends JDOObject +{ + + public static final String TABLENAME = "marcacoes_trabalhador_estados"; + + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_trabalhador_estados.id"; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_trabalhador_estados.data"; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "marcacoes_trabalhador_estados.estado"; + public static final String MARCACAO_ID = "marcacao_id"; + public static final String MARCACAO_ID_FULL = "marcacoes_trabalhador_estados.marcacao_id"; + public static final String TO_MARCACAO_ID = "to marcacao_id"; + public static final String PRESTADOR_ID = "prestador_id"; + public static final String PRESTADOR_ID_FULL = "marcacoes_trabalhador_estados.prestador_id"; + public static final String TO_PRESTADOR_ID = "to prestador_id"; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, ESTADO, MARCACAO_ID, TO_MARCACAO_ID, PRESTADOR_ID, TO_PRESTADOR_ID, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DATA, ESTADO, MARCACAO_ID, PRESTADOR_ID, }; + + private Map dataHash; + + public MarcacoesTrabalhadorEstadosDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public java.util.Date getData() + { + return (java.util.Date) get(DATA); + } + + public void setData(java.util.Date dataValue ) + { + this.set(DATA, dataValue ); + } + + public Integer getEstado() + { + return (Integer) get(ESTADO); + } + + public void setEstado(Integer estadoValue ) + { + this.set(ESTADO, estadoValue ); + } + + public Integer getMarcacao_id() + { + return (Integer) dataHash.get(MARCACAO_ID); + } + + public void setMarcacao_id(Integer marcacao_idValue ) + { + dataHash.put(TO_MARCACAO_ID, null); + dataHash.put(MARCACAO_ID, marcacao_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData toMarcacao_id() + throws Exception + { + if( dataHash.get(TO_MARCACAO_ID) == null && getMarcacao_id() != null ) + { + dataHash.put(TO_MARCACAO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData.class, new Object[]{ getMarcacao_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData) dataHash.get(TO_MARCACAO_ID); + } + + public void setToMarcacao_id(com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData marcacao_idObject ) + { + if( marcacao_idObject == null ) + { + dataHash.put(MARCACAO_ID, null); + } + else + { + dataHash.put(MARCACAO_ID, marcacao_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData.ID )); + } + dataHash.put(TO_MARCACAO_ID, marcacao_idObject); + } + + public Integer getPrestador_id() + { + return (Integer) dataHash.get(PRESTADOR_ID); + } + + public void setPrestador_id(Integer prestador_idValue ) + { + dataHash.put(TO_PRESTADOR_ID, null); + dataHash.put(PRESTADOR_ID, prestador_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData toPrestador_id() + throws Exception + { + if( dataHash.get(TO_PRESTADOR_ID) == null && getPrestador_id() != null ) + { + dataHash.put(TO_PRESTADOR_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.class, new Object[]{ getPrestador_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) dataHash.get(TO_PRESTADOR_ID); + } + + public void setToPrestador_id(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData prestador_idObject ) + { + if( prestador_idObject == null ) + { + dataHash.put(PRESTADOR_ID, null); + } + else + { + dataHash.put(PRESTADOR_ID, prestador_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + dataHash.put(TO_PRESTADOR_ID, prestador_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_PRESTADOR_ID.equals( fieldName ) ) + { + value = toPrestador_id(); + } + else if( TO_MARCACAO_ID.equals( fieldName ) ) + { + value = toMarcacao_id(); + } + else if( PRESTADOR_ID.equals( fieldName ) ) + { + value = getPrestador_id(); + } + else if( MARCACAO_ID.equals( fieldName ) ) + { + value = getMarcacao_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_PRESTADOR_ID.equals( fieldName ) ) + { + setToPrestador_id( (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) value ); + } + else if( TO_MARCACAO_ID.equals( fieldName ) ) + { + setToMarcacao_id( (com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData) value ); + } + else if( PRESTADOR_ID.equals( fieldName ) ) + { + setPrestador_id( (Integer) value ); + } + else if( MARCACAO_ID.equals( fieldName ) ) + { + setMarcacao_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_MARCACAO_ID) != null ) + { + toMarcacao_id().save(); + dataHash.put(MARCACAO_ID, toMarcacao_id().get( com.evolute.siprp.server.db.data.siprp_local3.MarcacoesTrabalhadorData.ID )); + } + + if( dataHash.get(TO_PRESTADOR_ID) != null ) + { + toPrestador_id().save(); + dataHash.put(PRESTADOR_ID, toPrestador_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return MarcacoesTrabalhadorEstados.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Medicos.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Medicos.java new file mode 100644 index 00000000..c90b5f4e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Medicos.java @@ -0,0 +1,156 @@ +/* +* Medicos.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class Medicos implements JDOInnerObject +{ + private Integer id; + private String nome; + private String numero_cedula; + private String inactivo; + + public Medicos() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == MedicosDataAuto.ID ) + { + return id; + } + else if( fieldName == MedicosDataAuto.NOME ) + { + return nome; + } + else if( fieldName == MedicosDataAuto.NUMERO_CEDULA ) + { + return numero_cedula; + } + else if( fieldName == MedicosDataAuto.INACTIVO ) + { + return inactivo; + } + else if( fieldName.equals( MedicosDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( MedicosDataAuto.NOME ) ) + { + return nome; + } + else if( fieldName.equals( MedicosDataAuto.NUMERO_CEDULA ) ) + { + return numero_cedula; + } + else if( fieldName.equals( MedicosDataAuto.INACTIVO ) ) + { + return inactivo; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == MedicosDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == MedicosDataAuto.NOME ) + { + nome = ( String ) value; + } + else if( fieldName == MedicosDataAuto.NUMERO_CEDULA ) + { + numero_cedula = ( String ) value; + } + else if( fieldName == MedicosDataAuto.INACTIVO ) + { + inactivo = ( String ) value; + } + else if( fieldName.equals( MedicosDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( MedicosDataAuto.NOME ) ) + { + nome = ( String ) value; + } + else if( fieldName.equals( MedicosDataAuto.NUMERO_CEDULA ) ) + { + numero_cedula = ( String ) value; + } + else if( fieldName.equals( MedicosDataAuto.INACTIVO ) ) + { + inactivo = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getNome() + { + return nome; + } + + public void setNome(String nomeValue ) + { + this.nome = nomeValue; + } + + public String getNumero_cedula() + { + return numero_cedula; + } + + public void setNumero_cedula(String numero_cedulaValue ) + { + this.numero_cedula = numero_cedulaValue; + } + + public String getInactivo() + { + return inactivo; + } + + public void setInactivo(String inactivoValue ) + { + this.inactivo = inactivoValue; + } + + public Class getOuterClass() + { + return MedicosDataAuto.class; + } + + public MedicosDataAuto getOuterClassInstance() + { + MedicosDataAuto outerObj = new MedicosDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MedicosData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MedicosData.java new file mode 100644 index 00000000..63adb179 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MedicosData.java @@ -0,0 +1,18 @@ +/* +* MedicosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class MedicosData extends com.evolute.siprp.server.db.data.siprp_local3.MedicosDataAuto +{ + + public MedicosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MedicosDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MedicosDataAuto.java new file mode 100644 index 00000000..93e01609 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/MedicosDataAuto.java @@ -0,0 +1,119 @@ +/* +* MedicosDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class MedicosDataAuto extends JDOObject +{ + + public static final String TABLENAME = "medicos"; + + public static final String ID = "id"; + public static final String ID_FULL = "medicos.id"; + public static final String NOME = "nome"; + public static final String NOME_FULL = "medicos.nome"; + public static final String NUMERO_CEDULA = "numero_cedula"; + public static final String NUMERO_CEDULA_FULL = "medicos.numero_cedula"; + public static final String INACTIVO = "inactivo"; + public static final String INACTIVO_FULL = "medicos.inactivo"; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, NUMERO_CEDULA, INACTIVO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, NOME, NUMERO_CEDULA, INACTIVO, }; + + private Map dataHash; + + public MedicosDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getNome() + { + return (String) get(NOME); + } + + public void setNome(String nomeValue ) + { + this.set(NOME, nomeValue ); + } + + public String getNumero_cedula() + { + return (String) get(NUMERO_CEDULA); + } + + public void setNumero_cedula(String numero_cedulaValue ) + { + this.set(NUMERO_CEDULA, numero_cedulaValue ); + } + + public String getInactivo() + { + return (String) get(INACTIVO); + } + + public void setInactivo(String inactivoValue ) + { + this.set(INACTIVO, inactivoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Medicos.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Prestadores.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Prestadores.java new file mode 100644 index 00000000..aa99dcb6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Prestadores.java @@ -0,0 +1,399 @@ +/* +* Prestadores.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class 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 == PrestadoresDataAuto.ID ) + { + return id; + } + else if( fieldName == PrestadoresDataAuto.NOME ) + { + return nome; + } + else if( fieldName == PrestadoresDataAuto.NOME_PLAIN ) + { + return nome_plain; + } + else if( fieldName == PrestadoresDataAuto.MORADA ) + { + return morada; + } + else if( fieldName == PrestadoresDataAuto.CODIGO_POSTAL ) + { + return codigo_postal; + } + else if( fieldName == PrestadoresDataAuto.LOCALIDADE ) + { + return localidade; + } + else if( fieldName == PrestadoresDataAuto.LOCALIDADE_CP ) + { + return localidade_cp; + } + else if( fieldName == PrestadoresDataAuto.CONTACTO_ID ) + { + return contacto_id; + } + else if( fieldName == PrestadoresDataAuto.ACTIVO ) + { + return activo; + } + else if( fieldName == PrestadoresDataAuto.FAZ_CONSULTAS ) + { + return faz_consultas; + } + else if( fieldName == PrestadoresDataAuto.FAZ_ECDS ) + { + return faz_ecds; + } + else if( fieldName == PrestadoresDataAuto.CONTRIBUINTE ) + { + return contribuinte; + } + else if( fieldName == PrestadoresDataAuto.OBSERVACOES ) + { + return observacoes; + } + else if( fieldName.equals( PrestadoresDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( PrestadoresDataAuto.NOME ) ) + { + return nome; + } + else if( fieldName.equals( PrestadoresDataAuto.NOME_PLAIN ) ) + { + return nome_plain; + } + else if( fieldName.equals( PrestadoresDataAuto.MORADA ) ) + { + return morada; + } + else if( fieldName.equals( PrestadoresDataAuto.CODIGO_POSTAL ) ) + { + return codigo_postal; + } + else if( fieldName.equals( PrestadoresDataAuto.LOCALIDADE ) ) + { + return localidade; + } + else if( fieldName.equals( PrestadoresDataAuto.LOCALIDADE_CP ) ) + { + return localidade_cp; + } + else if( fieldName.equals( PrestadoresDataAuto.CONTACTO_ID ) ) + { + return contacto_id; + } + else if( fieldName.equals( PrestadoresDataAuto.ACTIVO ) ) + { + return activo; + } + else if( fieldName.equals( PrestadoresDataAuto.FAZ_CONSULTAS ) ) + { + return faz_consultas; + } + else if( fieldName.equals( PrestadoresDataAuto.FAZ_ECDS ) ) + { + return faz_ecds; + } + else if( fieldName.equals( PrestadoresDataAuto.CONTRIBUINTE ) ) + { + return contribuinte; + } + else if( fieldName.equals( PrestadoresDataAuto.OBSERVACOES ) ) + { + return observacoes; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == PrestadoresDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == PrestadoresDataAuto.NOME ) + { + nome = ( String ) value; + } + else if( fieldName == PrestadoresDataAuto.NOME_PLAIN ) + { + nome_plain = ( String ) value; + } + else if( fieldName == PrestadoresDataAuto.MORADA ) + { + morada = ( String ) value; + } + else if( fieldName == PrestadoresDataAuto.CODIGO_POSTAL ) + { + codigo_postal = ( String ) value; + } + else if( fieldName == PrestadoresDataAuto.LOCALIDADE ) + { + localidade = ( String ) value; + } + else if( fieldName == PrestadoresDataAuto.LOCALIDADE_CP ) + { + localidade_cp = ( String ) value; + } + else if( fieldName == PrestadoresDataAuto.CONTACTO_ID ) + { + contacto_id = ( Integer ) value; + } + else if( fieldName == PrestadoresDataAuto.ACTIVO ) + { + activo = ( String ) value; + } + else if( fieldName == PrestadoresDataAuto.FAZ_CONSULTAS ) + { + faz_consultas = ( String ) value; + } + else if( fieldName == PrestadoresDataAuto.FAZ_ECDS ) + { + faz_ecds = ( String ) value; + } + else if( fieldName == PrestadoresDataAuto.CONTRIBUINTE ) + { + contribuinte = ( String ) value; + } + else if( fieldName == PrestadoresDataAuto.OBSERVACOES ) + { + observacoes = ( String ) value; + } + else if( fieldName.equals( PrestadoresDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( PrestadoresDataAuto.NOME ) ) + { + nome = ( String ) value; + } + else if( fieldName.equals( PrestadoresDataAuto.NOME_PLAIN ) ) + { + nome_plain = ( String ) value; + } + else if( fieldName.equals( PrestadoresDataAuto.MORADA ) ) + { + morada = ( String ) value; + } + else if( fieldName.equals( PrestadoresDataAuto.CODIGO_POSTAL ) ) + { + codigo_postal = ( String ) value; + } + else if( fieldName.equals( PrestadoresDataAuto.LOCALIDADE ) ) + { + localidade = ( String ) value; + } + else if( fieldName.equals( PrestadoresDataAuto.LOCALIDADE_CP ) ) + { + localidade_cp = ( String ) value; + } + else if( fieldName.equals( PrestadoresDataAuto.CONTACTO_ID ) ) + { + contacto_id = ( Integer ) value; + } + else if( fieldName.equals( PrestadoresDataAuto.ACTIVO ) ) + { + activo = ( String ) value; + } + else if( fieldName.equals( PrestadoresDataAuto.FAZ_CONSULTAS ) ) + { + faz_consultas = ( String ) value; + } + else if( fieldName.equals( PrestadoresDataAuto.FAZ_ECDS ) ) + { + faz_ecds = ( String ) value; + } + else if( fieldName.equals( PrestadoresDataAuto.CONTRIBUINTE ) ) + { + contribuinte = ( String ) value; + } + else if( fieldName.equals( PrestadoresDataAuto.OBSERVACOES ) ) + { + observacoes = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getNome() + { + return nome; + } + + public void setNome(String nomeValue ) + { + this.nome = nomeValue; + } + + public String getNome_plain() + { + return nome_plain; + } + + public void setNome_plain(String nome_plainValue ) + { + this.nome_plain = nome_plainValue; + } + + public String getMorada() + { + return morada; + } + + public void setMorada(String moradaValue ) + { + this.morada = moradaValue; + } + + public String getCodigo_postal() + { + return codigo_postal; + } + + public void setCodigo_postal(String codigo_postalValue ) + { + this.codigo_postal = codigo_postalValue; + } + + public String getLocalidade() + { + return localidade; + } + + public void setLocalidade(String localidadeValue ) + { + this.localidade = localidadeValue; + } + + public String getLocalidade_cp() + { + return localidade_cp; + } + + public void setLocalidade_cp(String localidade_cpValue ) + { + this.localidade_cp = localidade_cpValue; + } + + public Integer getContacto_id() + { + return contacto_id; + } + + public void setContacto_id(Integer contacto_idValue ) + { + this.contacto_id = contacto_idValue; + } + + public String getActivo() + { + return activo; + } + + public void setActivo(String activoValue ) + { + this.activo = activoValue; + } + + public String getFaz_consultas() + { + return faz_consultas; + } + + public void setFaz_consultas(String faz_consultasValue ) + { + this.faz_consultas = faz_consultasValue; + } + + public String getFaz_ecds() + { + return faz_ecds; + } + + public void setFaz_ecds(String faz_ecdsValue ) + { + this.faz_ecds = faz_ecdsValue; + } + + public String getContribuinte() + { + return contribuinte; + } + + public void setContribuinte(String contribuinteValue ) + { + this.contribuinte = contribuinteValue; + } + + public String getObservacoes() + { + return observacoes; + } + + public void setObservacoes(String observacoesValue ) + { + this.observacoes = observacoesValue; + } + + public Class getOuterClass() + { + return PrestadoresDataAuto.class; + } + + public PrestadoresDataAuto getOuterClassInstance() + { + PrestadoresDataAuto outerObj = new PrestadoresDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrestadoresData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrestadoresData.java new file mode 100644 index 00000000..2b355493 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrestadoresData.java @@ -0,0 +1,18 @@ +/* +* PrestadoresDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class PrestadoresData extends com.evolute.siprp.server.db.data.siprp_local3.PrestadoresDataAuto +{ + + public PrestadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrestadoresDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrestadoresDataAuto.java new file mode 100644 index 00000000..5f09b037 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrestadoresDataAuto.java @@ -0,0 +1,288 @@ +/* +* PrestadoresDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class PrestadoresDataAuto extends JDOObject +{ + + public static final String TABLENAME = "prestadores"; + + public static final String ID = "id"; + public static final String ID_FULL = "prestadores.id"; + public static final String NOME = "nome"; + public static final String NOME_FULL = "prestadores.nome"; + public static final String NOME_PLAIN = "nome_plain"; + public static final String NOME_PLAIN_FULL = "prestadores.nome_plain"; + public static final String MORADA = "morada"; + public static final String MORADA_FULL = "prestadores.morada"; + public static final String CODIGO_POSTAL = "codigo_postal"; + public static final String CODIGO_POSTAL_FULL = "prestadores.codigo_postal"; + public static final String LOCALIDADE = "localidade"; + public static final String LOCALIDADE_FULL = "prestadores.localidade"; + public static final String LOCALIDADE_CP = "localidade_cp"; + public static final String LOCALIDADE_CP_FULL = "prestadores.localidade_cp"; + public static final String CONTACTO_ID = "contacto_id"; + public static final String CONTACTO_ID_FULL = "prestadores.contacto_id"; + public static final String TO_CONTACTO_ID = "to contacto_id"; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "prestadores.activo"; + public static final String FAZ_CONSULTAS = "faz_consultas"; + public static final String FAZ_CONSULTAS_FULL = "prestadores.faz_consultas"; + public static final String FAZ_ECDS = "faz_ecds"; + public static final String FAZ_ECDS_FULL = "prestadores.faz_ecds"; + public static final String CONTRIBUINTE = "contribuinte"; + public static final String CONTRIBUINTE_FULL = "prestadores.contribuinte"; + public static final String OBSERVACOES = "observacoes"; + public static final String OBSERVACOES_FULL = "prestadores.observacoes"; + + 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, }; + + + 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 Map dataHash; + + public PrestadoresDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getNome() + { + return (String) get(NOME); + } + + public void setNome(String nomeValue ) + { + this.set(NOME, nomeValue ); + } + + public String getNome_plain() + { + return (String) get(NOME_PLAIN); + } + + public void setNome_plain(String nome_plainValue ) + { + this.set(NOME_PLAIN, nome_plainValue ); + } + + public String getMorada() + { + return (String) get(MORADA); + } + + public void setMorada(String moradaValue ) + { + this.set(MORADA, moradaValue ); + } + + public String getCodigo_postal() + { + return (String) get(CODIGO_POSTAL); + } + + public void setCodigo_postal(String codigo_postalValue ) + { + this.set(CODIGO_POSTAL, codigo_postalValue ); + } + + public String getLocalidade() + { + return (String) get(LOCALIDADE); + } + + public void setLocalidade(String localidadeValue ) + { + this.set(LOCALIDADE, localidadeValue ); + } + + public String getLocalidade_cp() + { + return (String) get(LOCALIDADE_CP); + } + + public void setLocalidade_cp(String localidade_cpValue ) + { + this.set(LOCALIDADE_CP, localidade_cpValue ); + } + + public Integer getContacto_id() + { + return (Integer) dataHash.get(CONTACTO_ID); + } + + public void setContacto_id(Integer contacto_idValue ) + { + dataHash.put(TO_CONTACTO_ID, null); + dataHash.put(CONTACTO_ID, contacto_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.ContactosData toContacto_id() + throws Exception + { + if( dataHash.get(TO_CONTACTO_ID) == null && getContacto_id() != null ) + { + dataHash.put(TO_CONTACTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.ContactosData.class, new Object[]{ getContacto_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.ContactosData) dataHash.get(TO_CONTACTO_ID); + } + + public void setToContacto_id(com.evolute.siprp.server.db.data.siprp_local3.ContactosData contacto_idObject ) + { + if( contacto_idObject == null ) + { + dataHash.put(CONTACTO_ID, null); + } + else + { + dataHash.put(CONTACTO_ID, contacto_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID )); + } + dataHash.put(TO_CONTACTO_ID, contacto_idObject); + } + + public String getActivo() + { + return (String) get(ACTIVO); + } + + public void setActivo(String activoValue ) + { + this.set(ACTIVO, activoValue ); + } + + public String getFaz_consultas() + { + return (String) get(FAZ_CONSULTAS); + } + + public void setFaz_consultas(String faz_consultasValue ) + { + this.set(FAZ_CONSULTAS, faz_consultasValue ); + } + + public String getFaz_ecds() + { + return (String) get(FAZ_ECDS); + } + + public void setFaz_ecds(String faz_ecdsValue ) + { + this.set(FAZ_ECDS, faz_ecdsValue ); + } + + public String getContribuinte() + { + return (String) get(CONTRIBUINTE); + } + + public void setContribuinte(String contribuinteValue ) + { + this.set(CONTRIBUINTE, contribuinteValue ); + } + + public String getObservacoes() + { + return (String) get(OBSERVACOES); + } + + public void setObservacoes(String observacoesValue ) + { + this.set(OBSERVACOES, observacoesValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( CONTACTO_ID.equals( fieldName ) ) + { + value = getContacto_id(); + } + else if( TO_CONTACTO_ID.equals( fieldName ) ) + { + value = toContacto_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( CONTACTO_ID.equals( fieldName ) ) + { + setContacto_id( (Integer) value ); + } + else if( TO_CONTACTO_ID.equals( fieldName ) ) + { + setToContacto_id( (com.evolute.siprp.server.db.data.siprp_local3.ContactosData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_CONTACTO_ID) != null ) + { + toContacto_id().save(); + dataHash.put(CONTACTO_ID, toContacto_id().get( com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Prestadores.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrestadoresGruposProtocolo.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrestadoresGruposProtocolo.java new file mode 100644 index 00000000..e90dd764 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrestadoresGruposProtocolo.java @@ -0,0 +1,129 @@ +/* +* PrestadoresGruposProtocolo.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class PrestadoresGruposProtocolo implements JDOInnerObject +{ + private Integer id; + private Integer prestador_id; + private Integer grupo_protocolo_id; + + public PrestadoresGruposProtocolo() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == PrestadoresGruposProtocoloDataAuto.ID ) + { + return id; + } + else if( fieldName == PrestadoresGruposProtocoloDataAuto.PRESTADOR_ID ) + { + return prestador_id; + } + else if( fieldName == PrestadoresGruposProtocoloDataAuto.GRUPO_PROTOCOLO_ID ) + { + return grupo_protocolo_id; + } + else if( fieldName.equals( PrestadoresGruposProtocoloDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( PrestadoresGruposProtocoloDataAuto.PRESTADOR_ID ) ) + { + return prestador_id; + } + else if( fieldName.equals( PrestadoresGruposProtocoloDataAuto.GRUPO_PROTOCOLO_ID ) ) + { + return grupo_protocolo_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == PrestadoresGruposProtocoloDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == PrestadoresGruposProtocoloDataAuto.PRESTADOR_ID ) + { + prestador_id = ( Integer ) value; + } + else if( fieldName == PrestadoresGruposProtocoloDataAuto.GRUPO_PROTOCOLO_ID ) + { + grupo_protocolo_id = ( Integer ) value; + } + else if( fieldName.equals( PrestadoresGruposProtocoloDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( PrestadoresGruposProtocoloDataAuto.PRESTADOR_ID ) ) + { + prestador_id = ( Integer ) value; + } + else if( fieldName.equals( PrestadoresGruposProtocoloDataAuto.GRUPO_PROTOCOLO_ID ) ) + { + grupo_protocolo_id = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getPrestador_id() + { + return prestador_id; + } + + public void setPrestador_id(Integer prestador_idValue ) + { + this.prestador_id = prestador_idValue; + } + + public Integer getGrupo_protocolo_id() + { + return grupo_protocolo_id; + } + + public void setGrupo_protocolo_id(Integer grupo_protocolo_idValue ) + { + this.grupo_protocolo_id = grupo_protocolo_idValue; + } + + public Class getOuterClass() + { + return PrestadoresGruposProtocoloDataAuto.class; + } + + public PrestadoresGruposProtocoloDataAuto getOuterClassInstance() + { + PrestadoresGruposProtocoloDataAuto outerObj = new PrestadoresGruposProtocoloDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrestadoresGruposProtocoloData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrestadoresGruposProtocoloData.java new file mode 100644 index 00000000..0fbe0698 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrestadoresGruposProtocoloData.java @@ -0,0 +1,18 @@ +/* +* PrestadoresGruposProtocoloDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class PrestadoresGruposProtocoloData extends com.evolute.siprp.server.db.data.siprp_local3.PrestadoresGruposProtocoloDataAuto +{ + + public PrestadoresGruposProtocoloData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrestadoresGruposProtocoloDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrestadoresGruposProtocoloDataAuto.java new file mode 100644 index 00000000..43c2f0fd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrestadoresGruposProtocoloDataAuto.java @@ -0,0 +1,213 @@ +/* +* PrestadoresGruposProtocoloDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class PrestadoresGruposProtocoloDataAuto extends JDOObject +{ + + public static final String TABLENAME = "prestadores_grupos_protocolo"; + + public static final String ID = "id"; + public static final String ID_FULL = "prestadores_grupos_protocolo.id"; + public static final String PRESTADOR_ID = "prestador_id"; + public static final String PRESTADOR_ID_FULL = "prestadores_grupos_protocolo.prestador_id"; + public static final String TO_PRESTADOR_ID = "to prestador_id"; + 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 String TO_GRUPO_PROTOCOLO_ID = "to grupo_protocolo_id"; + + public static final String FIELD_NAMES[] = new String[]{ + PRESTADOR_ID, TO_PRESTADOR_ID, GRUPO_PROTOCOLO_ID, TO_GRUPO_PROTOCOLO_ID, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, PRESTADOR_ID, GRUPO_PROTOCOLO_ID, }; + + private Map dataHash; + + public PrestadoresGruposProtocoloDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getPrestador_id() + { + return (Integer) dataHash.get(PRESTADOR_ID); + } + + public void setPrestador_id(Integer prestador_idValue ) + { + dataHash.put(TO_PRESTADOR_ID, null); + dataHash.put(PRESTADOR_ID, prestador_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData toPrestador_id() + throws Exception + { + if( dataHash.get(TO_PRESTADOR_ID) == null && getPrestador_id() != null ) + { + dataHash.put(TO_PRESTADOR_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.class, new Object[]{ getPrestador_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) dataHash.get(TO_PRESTADOR_ID); + } + + public void setToPrestador_id(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData prestador_idObject ) + { + if( prestador_idObject == null ) + { + dataHash.put(PRESTADOR_ID, null); + } + else + { + dataHash.put(PRESTADOR_ID, prestador_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + dataHash.put(TO_PRESTADOR_ID, prestador_idObject); + } + + public Integer getGrupo_protocolo_id() + { + return (Integer) dataHash.get(GRUPO_PROTOCOLO_ID); + } + + public void setGrupo_protocolo_id(Integer grupo_protocolo_idValue ) + { + dataHash.put(TO_GRUPO_PROTOCOLO_ID, null); + dataHash.put(GRUPO_PROTOCOLO_ID, grupo_protocolo_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData toGrupo_protocolo_id() + throws Exception + { + if( dataHash.get(TO_GRUPO_PROTOCOLO_ID) == null && getGrupo_protocolo_id() != null ) + { + dataHash.put(TO_GRUPO_PROTOCOLO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData.class, new Object[]{ getGrupo_protocolo_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData) dataHash.get(TO_GRUPO_PROTOCOLO_ID); + } + + public void setToGrupo_protocolo_id(com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData grupo_protocolo_idObject ) + { + if( grupo_protocolo_idObject == null ) + { + dataHash.put(GRUPO_PROTOCOLO_ID, null); + } + else + { + dataHash.put(GRUPO_PROTOCOLO_ID, grupo_protocolo_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData.ID )); + } + dataHash.put(TO_GRUPO_PROTOCOLO_ID, grupo_protocolo_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_PRESTADOR_ID.equals( fieldName ) ) + { + value = toPrestador_id(); + } + else if( TO_GRUPO_PROTOCOLO_ID.equals( fieldName ) ) + { + value = toGrupo_protocolo_id(); + } + else if( PRESTADOR_ID.equals( fieldName ) ) + { + value = getPrestador_id(); + } + else if( GRUPO_PROTOCOLO_ID.equals( fieldName ) ) + { + value = getGrupo_protocolo_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_PRESTADOR_ID.equals( fieldName ) ) + { + setToPrestador_id( (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) value ); + } + else if( TO_GRUPO_PROTOCOLO_ID.equals( fieldName ) ) + { + setToGrupo_protocolo_id( (com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData) value ); + } + else if( PRESTADOR_ID.equals( fieldName ) ) + { + setPrestador_id( (Integer) value ); + } + else if( GRUPO_PROTOCOLO_ID.equals( fieldName ) ) + { + setGrupo_protocolo_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_PRESTADOR_ID) != null ) + { + toPrestador_id().save(); + dataHash.put(PRESTADOR_ID, toPrestador_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + + if( dataHash.get(TO_GRUPO_PROTOCOLO_ID) != null ) + { + toGrupo_protocolo_id().save(); + dataHash.put(GRUPO_PROTOCOLO_ID, toGrupo_protocolo_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return PrestadoresGruposProtocolo.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtElementosProtocolo.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtElementosProtocolo.java new file mode 100644 index 00000000..60c44e84 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtElementosProtocolo.java @@ -0,0 +1,156 @@ +/* +* PrtElementosProtocolo.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class PrtElementosProtocolo implements JDOInnerObject +{ + private Integer id; + private Integer tipo_elemento_protocolo_id; + private Integer empresa_id; + private Integer numero_perfil; + + public PrtElementosProtocolo() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == PrtElementosProtocoloDataAuto.ID ) + { + return id; + } + else if( fieldName == PrtElementosProtocoloDataAuto.TIPO_ELEMENTO_PROTOCOLO_ID ) + { + return tipo_elemento_protocolo_id; + } + else if( fieldName == PrtElementosProtocoloDataAuto.EMPRESA_ID ) + { + return empresa_id; + } + else if( fieldName == PrtElementosProtocoloDataAuto.NUMERO_PERFIL ) + { + return numero_perfil; + } + else if( fieldName.equals( PrtElementosProtocoloDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( PrtElementosProtocoloDataAuto.TIPO_ELEMENTO_PROTOCOLO_ID ) ) + { + return tipo_elemento_protocolo_id; + } + else if( fieldName.equals( PrtElementosProtocoloDataAuto.EMPRESA_ID ) ) + { + return empresa_id; + } + else if( fieldName.equals( PrtElementosProtocoloDataAuto.NUMERO_PERFIL ) ) + { + return numero_perfil; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == PrtElementosProtocoloDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == PrtElementosProtocoloDataAuto.TIPO_ELEMENTO_PROTOCOLO_ID ) + { + tipo_elemento_protocolo_id = ( Integer ) value; + } + else if( fieldName == PrtElementosProtocoloDataAuto.EMPRESA_ID ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName == PrtElementosProtocoloDataAuto.NUMERO_PERFIL ) + { + numero_perfil = ( Integer ) value; + } + else if( fieldName.equals( PrtElementosProtocoloDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( PrtElementosProtocoloDataAuto.TIPO_ELEMENTO_PROTOCOLO_ID ) ) + { + tipo_elemento_protocolo_id = ( Integer ) value; + } + else if( fieldName.equals( PrtElementosProtocoloDataAuto.EMPRESA_ID ) ) + { + empresa_id = ( Integer ) value; + } + else if( fieldName.equals( PrtElementosProtocoloDataAuto.NUMERO_PERFIL ) ) + { + numero_perfil = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getTipo_elemento_protocolo_id() + { + return tipo_elemento_protocolo_id; + } + + public void setTipo_elemento_protocolo_id(Integer tipo_elemento_protocolo_idValue ) + { + this.tipo_elemento_protocolo_id = tipo_elemento_protocolo_idValue; + } + + public Integer getEmpresa_id() + { + return empresa_id; + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + this.empresa_id = empresa_idValue; + } + + public Integer getNumero_perfil() + { + return numero_perfil; + } + + public void setNumero_perfil(Integer numero_perfilValue ) + { + this.numero_perfil = numero_perfilValue; + } + + public Class getOuterClass() + { + return PrtElementosProtocoloDataAuto.class; + } + + public PrtElementosProtocoloDataAuto getOuterClassInstance() + { + PrtElementosProtocoloDataAuto outerObj = new PrtElementosProtocoloDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtElementosProtocoloData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtElementosProtocoloData.java new file mode 100644 index 00000000..65546aa6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtElementosProtocoloData.java @@ -0,0 +1,18 @@ +/* +* PrtElementosProtocoloDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class PrtElementosProtocoloData extends com.evolute.siprp.server.db.data.siprp_local3.PrtElementosProtocoloDataAuto +{ + + public PrtElementosProtocoloData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtElementosProtocoloDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtElementosProtocoloDataAuto.java new file mode 100644 index 00000000..f359651d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtElementosProtocoloDataAuto.java @@ -0,0 +1,226 @@ +/* +* PrtElementosProtocoloDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class PrtElementosProtocoloDataAuto extends JDOObject +{ + + public static final String TABLENAME = "prt_elementos_protocolo"; + + public static final String ID = "id"; + public static final String ID_FULL = "prt_elementos_protocolo.id"; + 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 String TO_TIPO_ELEMENTO_PROTOCOLO_ID = "to tipo_elemento_protocolo_id"; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "prt_elementos_protocolo.empresa_id"; + public static final String TO_EMPRESA_ID = "to empresa_id"; + public static final String NUMERO_PERFIL = "numero_perfil"; + public static final String NUMERO_PERFIL_FULL = "prt_elementos_protocolo.numero_perfil"; + + public static final String FIELD_NAMES[] = new String[]{ + TIPO_ELEMENTO_PROTOCOLO_ID, TO_TIPO_ELEMENTO_PROTOCOLO_ID, EMPRESA_ID, + TO_EMPRESA_ID, NUMERO_PERFIL, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, TIPO_ELEMENTO_PROTOCOLO_ID, EMPRESA_ID, NUMERO_PERFIL, }; + + private Map dataHash; + + public PrtElementosProtocoloDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getTipo_elemento_protocolo_id() + { + return (Integer) dataHash.get(TIPO_ELEMENTO_PROTOCOLO_ID); + } + + public void setTipo_elemento_protocolo_id(Integer tipo_elemento_protocolo_idValue ) + { + dataHash.put(TO_TIPO_ELEMENTO_PROTOCOLO_ID, null); + dataHash.put(TIPO_ELEMENTO_PROTOCOLO_ID, tipo_elemento_protocolo_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloData toTipo_elemento_protocolo_id() + throws Exception + { + if( dataHash.get(TO_TIPO_ELEMENTO_PROTOCOLO_ID) == null && getTipo_elemento_protocolo_id() != null ) + { + dataHash.put(TO_TIPO_ELEMENTO_PROTOCOLO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloData.class, new Object[]{ getTipo_elemento_protocolo_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloData) dataHash.get(TO_TIPO_ELEMENTO_PROTOCOLO_ID); + } + + public void setToTipo_elemento_protocolo_id(com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloData tipo_elemento_protocolo_idObject ) + { + if( tipo_elemento_protocolo_idObject == null ) + { + dataHash.put(TIPO_ELEMENTO_PROTOCOLO_ID, null); + } + else + { + dataHash.put(TIPO_ELEMENTO_PROTOCOLO_ID, tipo_elemento_protocolo_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloData.ID )); + } + dataHash.put(TO_TIPO_ELEMENTO_PROTOCOLO_ID, tipo_elemento_protocolo_idObject); + } + + public Integer getEmpresa_id() + { + return (Integer) dataHash.get(EMPRESA_ID); + } + + public void setEmpresa_id(Integer empresa_idValue ) + { + dataHash.put(TO_EMPRESA_ID, null); + dataHash.put(EMPRESA_ID, empresa_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EmpresasData toEmpresa_id() + throws Exception + { + if( dataHash.get(TO_EMPRESA_ID) == null && getEmpresa_id() != null ) + { + dataHash.put(TO_EMPRESA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.class, new Object[]{ getEmpresa_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) dataHash.get(TO_EMPRESA_ID); + } + + public void setToEmpresa_id(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData empresa_idObject ) + { + if( empresa_idObject == null ) + { + dataHash.put(EMPRESA_ID, null); + } + else + { + dataHash.put(EMPRESA_ID, empresa_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + dataHash.put(TO_EMPRESA_ID, empresa_idObject); + } + + public Integer getNumero_perfil() + { + return (Integer) get(NUMERO_PERFIL); + } + + public void setNumero_perfil(Integer numero_perfilValue ) + { + this.set(NUMERO_PERFIL, numero_perfilValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_EMPRESA_ID.equals( fieldName ) ) + { + value = toEmpresa_id(); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + value = getEmpresa_id(); + } + else if( TO_TIPO_ELEMENTO_PROTOCOLO_ID.equals( fieldName ) ) + { + value = toTipo_elemento_protocolo_id(); + } + else if( TIPO_ELEMENTO_PROTOCOLO_ID.equals( fieldName ) ) + { + value = getTipo_elemento_protocolo_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_EMPRESA_ID.equals( fieldName ) ) + { + setToEmpresa_id( (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) value ); + } + else if( EMPRESA_ID.equals( fieldName ) ) + { + setEmpresa_id( (Integer) value ); + } + else if( TO_TIPO_ELEMENTO_PROTOCOLO_ID.equals( fieldName ) ) + { + setToTipo_elemento_protocolo_id( (com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloData) value ); + } + else if( TIPO_ELEMENTO_PROTOCOLO_ID.equals( fieldName ) ) + { + setTipo_elemento_protocolo_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_TIPO_ELEMENTO_PROTOCOLO_ID) != null ) + { + toTipo_elemento_protocolo_id().save(); + dataHash.put(TIPO_ELEMENTO_PROTOCOLO_ID, toTipo_elemento_protocolo_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloData.ID )); + } + + if( dataHash.get(TO_EMPRESA_ID) != null ) + { + toEmpresa_id().save(); + dataHash.put(EMPRESA_ID, toEmpresa_id().get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return PrtElementosProtocolo.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtGruposProtocolo.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtGruposProtocolo.java new file mode 100644 index 00000000..eca6062a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtGruposProtocolo.java @@ -0,0 +1,210 @@ +/* +* PrtGruposProtocolo.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class PrtGruposProtocolo implements JDOInnerObject +{ + private Integer id; + private String descricao; + private String descricao_plain; + private String grupo_real; + private Integer ordem; + private Integer analisador_id; + + public PrtGruposProtocolo() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == PrtGruposProtocoloDataAuto.ID ) + { + return id; + } + else if( fieldName == PrtGruposProtocoloDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == PrtGruposProtocoloDataAuto.DESCRICAO_PLAIN ) + { + return descricao_plain; + } + else if( fieldName == PrtGruposProtocoloDataAuto.GRUPO_REAL ) + { + return grupo_real; + } + else if( fieldName == PrtGruposProtocoloDataAuto.ORDEM ) + { + return ordem; + } + else if( fieldName == PrtGruposProtocoloDataAuto.ANALISADOR_ID ) + { + return analisador_id; + } + else if( fieldName.equals( PrtGruposProtocoloDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( PrtGruposProtocoloDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( PrtGruposProtocoloDataAuto.DESCRICAO_PLAIN ) ) + { + return descricao_plain; + } + else if( fieldName.equals( PrtGruposProtocoloDataAuto.GRUPO_REAL ) ) + { + return grupo_real; + } + else if( fieldName.equals( PrtGruposProtocoloDataAuto.ORDEM ) ) + { + return ordem; + } + else if( fieldName.equals( PrtGruposProtocoloDataAuto.ANALISADOR_ID ) ) + { + return analisador_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == PrtGruposProtocoloDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == PrtGruposProtocoloDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == PrtGruposProtocoloDataAuto.DESCRICAO_PLAIN ) + { + descricao_plain = ( String ) value; + } + else if( fieldName == PrtGruposProtocoloDataAuto.GRUPO_REAL ) + { + grupo_real = ( String ) value; + } + else if( fieldName == PrtGruposProtocoloDataAuto.ORDEM ) + { + ordem = ( Integer ) value; + } + else if( fieldName == PrtGruposProtocoloDataAuto.ANALISADOR_ID ) + { + analisador_id = ( Integer ) value; + } + else if( fieldName.equals( PrtGruposProtocoloDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( PrtGruposProtocoloDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( PrtGruposProtocoloDataAuto.DESCRICAO_PLAIN ) ) + { + descricao_plain = ( String ) value; + } + else if( fieldName.equals( PrtGruposProtocoloDataAuto.GRUPO_REAL ) ) + { + grupo_real = ( String ) value; + } + else if( fieldName.equals( PrtGruposProtocoloDataAuto.ORDEM ) ) + { + ordem = ( Integer ) value; + } + else if( fieldName.equals( PrtGruposProtocoloDataAuto.ANALISADOR_ID ) ) + { + analisador_id = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public String getDescricao_plain() + { + return descricao_plain; + } + + public void setDescricao_plain(String descricao_plainValue ) + { + this.descricao_plain = descricao_plainValue; + } + + public String getGrupo_real() + { + return grupo_real; + } + + public void setGrupo_real(String grupo_realValue ) + { + this.grupo_real = grupo_realValue; + } + + public Integer getOrdem() + { + return ordem; + } + + public void setOrdem(Integer ordemValue ) + { + this.ordem = ordemValue; + } + + public Integer getAnalisador_id() + { + return analisador_id; + } + + public void setAnalisador_id(Integer analisador_idValue ) + { + this.analisador_id = analisador_idValue; + } + + public Class getOuterClass() + { + return PrtGruposProtocoloDataAuto.class; + } + + public PrtGruposProtocoloDataAuto getOuterClassInstance() + { + PrtGruposProtocoloDataAuto outerObj = new PrtGruposProtocoloDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtGruposProtocoloData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtGruposProtocoloData.java new file mode 100644 index 00000000..b075f667 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtGruposProtocoloData.java @@ -0,0 +1,18 @@ +/* +* PrtGruposProtocoloDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class PrtGruposProtocoloData extends com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloDataAuto +{ + + public PrtGruposProtocoloData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtGruposProtocoloDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtGruposProtocoloDataAuto.java new file mode 100644 index 00000000..5153a05e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtGruposProtocoloDataAuto.java @@ -0,0 +1,202 @@ +/* +* PrtGruposProtocoloDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class PrtGruposProtocoloDataAuto extends JDOObject +{ + + public static final String TABLENAME = "prt_grupos_protocolo"; + + public static final String ID = "id"; + public static final String ID_FULL = "prt_grupos_protocolo.id"; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "prt_grupos_protocolo.descricao"; + public static final String DESCRICAO_PLAIN = "descricao_plain"; + public static final String DESCRICAO_PLAIN_FULL = "prt_grupos_protocolo.descricao_plain"; + public static final String GRUPO_REAL = "grupo_real"; + public static final String GRUPO_REAL_FULL = "prt_grupos_protocolo.grupo_real"; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "prt_grupos_protocolo.ordem"; + public static final String ANALISADOR_ID = "analisador_id"; + public static final String ANALISADOR_ID_FULL = "prt_grupos_protocolo.analisador_id"; + public static final String TO_ANALISADOR_ID = "to analisador_id"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, DESCRICAO_PLAIN, GRUPO_REAL, ORDEM, ANALISADOR_ID, TO_ANALISADOR_ID, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, DESCRICAO_PLAIN, GRUPO_REAL, ORDEM, ANALISADOR_ID, }; + + private Map dataHash; + + public PrtGruposProtocoloDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public String getDescricao_plain() + { + return (String) get(DESCRICAO_PLAIN); + } + + public void setDescricao_plain(String descricao_plainValue ) + { + this.set(DESCRICAO_PLAIN, descricao_plainValue ); + } + + public String getGrupo_real() + { + return (String) get(GRUPO_REAL); + } + + public void setGrupo_real(String grupo_realValue ) + { + this.set(GRUPO_REAL, grupo_realValue ); + } + + public Integer getOrdem() + { + return (Integer) get(ORDEM); + } + + public void setOrdem(Integer ordemValue ) + { + this.set(ORDEM, ordemValue ); + } + + public Integer getAnalisador_id() + { + return (Integer) dataHash.get(ANALISADOR_ID); + } + + public void setAnalisador_id(Integer analisador_idValue ) + { + dataHash.put(TO_ANALISADOR_ID, null); + dataHash.put(ANALISADOR_ID, analisador_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData toAnalisador_id() + throws Exception + { + if( dataHash.get(TO_ANALISADOR_ID) == null && getAnalisador_id() != null ) + { + dataHash.put(TO_ANALISADOR_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.class, new Object[]{ getAnalisador_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) dataHash.get(TO_ANALISADOR_ID); + } + + public void setToAnalisador_id(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData analisador_idObject ) + { + if( analisador_idObject == null ) + { + dataHash.put(ANALISADOR_ID, null); + } + else + { + dataHash.put(ANALISADOR_ID, analisador_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + dataHash.put(TO_ANALISADOR_ID, analisador_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( ANALISADOR_ID.equals( fieldName ) ) + { + value = getAnalisador_id(); + } + else if( TO_ANALISADOR_ID.equals( fieldName ) ) + { + value = toAnalisador_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( ANALISADOR_ID.equals( fieldName ) ) + { + setAnalisador_id( (Integer) value ); + } + else if( TO_ANALISADOR_ID.equals( fieldName ) ) + { + setToAnalisador_id( (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_ANALISADOR_ID) != null ) + { + toAnalisador_id().save(); + dataHash.put(ANALISADOR_ID, toAnalisador_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return PrtGruposProtocolo.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtTiposElementosProtocolo.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtTiposElementosProtocolo.java new file mode 100644 index 00000000..4ca19310 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtTiposElementosProtocolo.java @@ -0,0 +1,183 @@ +/* +* PrtTiposElementosProtocolo.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class PrtTiposElementosProtocolo implements JDOInnerObject +{ + private Integer id; + private String descricao_plain; + private String descricao; + private Integer grupo_protocolo_id; + private Integer ordem; + + public PrtTiposElementosProtocolo() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == PrtTiposElementosProtocoloDataAuto.ID ) + { + return id; + } + else if( fieldName == PrtTiposElementosProtocoloDataAuto.DESCRICAO_PLAIN ) + { + return descricao_plain; + } + else if( fieldName == PrtTiposElementosProtocoloDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName == PrtTiposElementosProtocoloDataAuto.GRUPO_PROTOCOLO_ID ) + { + return grupo_protocolo_id; + } + else if( fieldName == PrtTiposElementosProtocoloDataAuto.ORDEM ) + { + return ordem; + } + else if( fieldName.equals( PrtTiposElementosProtocoloDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( PrtTiposElementosProtocoloDataAuto.DESCRICAO_PLAIN ) ) + { + return descricao_plain; + } + else if( fieldName.equals( PrtTiposElementosProtocoloDataAuto.DESCRICAO ) ) + { + return descricao; + } + else if( fieldName.equals( PrtTiposElementosProtocoloDataAuto.GRUPO_PROTOCOLO_ID ) ) + { + return grupo_protocolo_id; + } + else if( fieldName.equals( PrtTiposElementosProtocoloDataAuto.ORDEM ) ) + { + return ordem; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == PrtTiposElementosProtocoloDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == PrtTiposElementosProtocoloDataAuto.DESCRICAO_PLAIN ) + { + descricao_plain = ( String ) value; + } + else if( fieldName == PrtTiposElementosProtocoloDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName == PrtTiposElementosProtocoloDataAuto.GRUPO_PROTOCOLO_ID ) + { + grupo_protocolo_id = ( Integer ) value; + } + else if( fieldName == PrtTiposElementosProtocoloDataAuto.ORDEM ) + { + ordem = ( Integer ) value; + } + else if( fieldName.equals( PrtTiposElementosProtocoloDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( PrtTiposElementosProtocoloDataAuto.DESCRICAO_PLAIN ) ) + { + descricao_plain = ( String ) value; + } + else if( fieldName.equals( PrtTiposElementosProtocoloDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( PrtTiposElementosProtocoloDataAuto.GRUPO_PROTOCOLO_ID ) ) + { + grupo_protocolo_id = ( Integer ) value; + } + else if( fieldName.equals( PrtTiposElementosProtocoloDataAuto.ORDEM ) ) + { + ordem = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getDescricao_plain() + { + return descricao_plain; + } + + public void setDescricao_plain(String descricao_plainValue ) + { + this.descricao_plain = descricao_plainValue; + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public Integer getGrupo_protocolo_id() + { + return grupo_protocolo_id; + } + + public void setGrupo_protocolo_id(Integer grupo_protocolo_idValue ) + { + this.grupo_protocolo_id = grupo_protocolo_idValue; + } + + public Integer getOrdem() + { + return ordem; + } + + public void setOrdem(Integer ordemValue ) + { + this.ordem = ordemValue; + } + + public Class getOuterClass() + { + return PrtTiposElementosProtocoloDataAuto.class; + } + + public PrtTiposElementosProtocoloDataAuto getOuterClassInstance() + { + PrtTiposElementosProtocoloDataAuto outerObj = new PrtTiposElementosProtocoloDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtTiposElementosProtocoloData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtTiposElementosProtocoloData.java new file mode 100644 index 00000000..9c5b91d8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtTiposElementosProtocoloData.java @@ -0,0 +1,18 @@ +/* +* PrtTiposElementosProtocoloDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class PrtTiposElementosProtocoloData extends com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloDataAuto +{ + + public PrtTiposElementosProtocoloData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtTiposElementosProtocoloDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtTiposElementosProtocoloDataAuto.java new file mode 100644 index 00000000..27b210ac --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/PrtTiposElementosProtocoloDataAuto.java @@ -0,0 +1,190 @@ +/* +* PrtTiposElementosProtocoloDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class PrtTiposElementosProtocoloDataAuto extends JDOObject +{ + + public static final String TABLENAME = "prt_tipos_elementos_protocolo"; + + public static final String ID = "id"; + public static final String ID_FULL = "prt_tipos_elementos_protocolo.id"; + public static final String DESCRICAO_PLAIN = "descricao_plain"; + public static final String DESCRICAO_PLAIN_FULL = "prt_tipos_elementos_protocolo.descricao_plain"; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "prt_tipos_elementos_protocolo.descricao"; + 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 String TO_GRUPO_PROTOCOLO_ID = "to grupo_protocolo_id"; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "prt_tipos_elementos_protocolo.ordem"; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO_PLAIN, DESCRICAO, GRUPO_PROTOCOLO_ID, TO_GRUPO_PROTOCOLO_ID, ORDEM, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO_PLAIN, DESCRICAO, GRUPO_PROTOCOLO_ID, ORDEM, }; + + private Map dataHash; + + public PrtTiposElementosProtocoloDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getDescricao_plain() + { + return (String) get(DESCRICAO_PLAIN); + } + + public void setDescricao_plain(String descricao_plainValue ) + { + this.set(DESCRICAO_PLAIN, descricao_plainValue ); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + public Integer getGrupo_protocolo_id() + { + return (Integer) dataHash.get(GRUPO_PROTOCOLO_ID); + } + + public void setGrupo_protocolo_id(Integer grupo_protocolo_idValue ) + { + dataHash.put(TO_GRUPO_PROTOCOLO_ID, null); + dataHash.put(GRUPO_PROTOCOLO_ID, grupo_protocolo_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData toGrupo_protocolo_id() + throws Exception + { + if( dataHash.get(TO_GRUPO_PROTOCOLO_ID) == null && getGrupo_protocolo_id() != null ) + { + dataHash.put(TO_GRUPO_PROTOCOLO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData.class, new Object[]{ getGrupo_protocolo_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData) dataHash.get(TO_GRUPO_PROTOCOLO_ID); + } + + public void setToGrupo_protocolo_id(com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData grupo_protocolo_idObject ) + { + if( grupo_protocolo_idObject == null ) + { + dataHash.put(GRUPO_PROTOCOLO_ID, null); + } + else + { + dataHash.put(GRUPO_PROTOCOLO_ID, grupo_protocolo_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData.ID )); + } + dataHash.put(TO_GRUPO_PROTOCOLO_ID, grupo_protocolo_idObject); + } + + public Integer getOrdem() + { + return (Integer) get(ORDEM); + } + + public void setOrdem(Integer ordemValue ) + { + this.set(ORDEM, ordemValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_GRUPO_PROTOCOLO_ID.equals( fieldName ) ) + { + value = toGrupo_protocolo_id(); + } + else if( GRUPO_PROTOCOLO_ID.equals( fieldName ) ) + { + value = getGrupo_protocolo_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_GRUPO_PROTOCOLO_ID.equals( fieldName ) ) + { + setToGrupo_protocolo_id( (com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData) value ); + } + else if( GRUPO_PROTOCOLO_ID.equals( fieldName ) ) + { + setGrupo_protocolo_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_GRUPO_PROTOCOLO_ID) != null ) + { + toGrupo_protocolo_id().save(); + dataHash.put(GRUPO_PROTOCOLO_ID, toGrupo_protocolo_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return PrtTiposElementosProtocolo.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TiposExamesComp.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TiposExamesComp.java new file mode 100644 index 00000000..df1c82a3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TiposExamesComp.java @@ -0,0 +1,129 @@ +/* +* TiposExamesComp.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class TiposExamesComp implements JDOInnerObject +{ + private Integer id; + private Integer ordem; + private String descricao; + + public TiposExamesComp() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == TiposExamesCompDataAuto.ID ) + { + return id; + } + else if( fieldName == TiposExamesCompDataAuto.ORDEM ) + { + return ordem; + } + else if( fieldName == TiposExamesCompDataAuto.DESCRICAO ) + { + return descricao; + } + else if( fieldName.equals( TiposExamesCompDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( TiposExamesCompDataAuto.ORDEM ) ) + { + return ordem; + } + else if( fieldName.equals( TiposExamesCompDataAuto.DESCRICAO ) ) + { + return descricao; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == TiposExamesCompDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == TiposExamesCompDataAuto.ORDEM ) + { + ordem = ( Integer ) value; + } + else if( fieldName == TiposExamesCompDataAuto.DESCRICAO ) + { + descricao = ( String ) value; + } + else if( fieldName.equals( TiposExamesCompDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( TiposExamesCompDataAuto.ORDEM ) ) + { + ordem = ( Integer ) value; + } + else if( fieldName.equals( TiposExamesCompDataAuto.DESCRICAO ) ) + { + descricao = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getOrdem() + { + return ordem; + } + + public void setOrdem(Integer ordemValue ) + { + this.ordem = ordemValue; + } + + public String getDescricao() + { + return descricao; + } + + public void setDescricao(String descricaoValue ) + { + this.descricao = descricaoValue; + } + + public Class getOuterClass() + { + return TiposExamesCompDataAuto.class; + } + + public TiposExamesCompDataAuto getOuterClassInstance() + { + TiposExamesCompDataAuto outerObj = new TiposExamesCompDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TiposExamesCompData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TiposExamesCompData.java new file mode 100644 index 00000000..42cf3d41 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TiposExamesCompData.java @@ -0,0 +1,18 @@ +/* +* TiposExamesCompDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class TiposExamesCompData extends com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompDataAuto +{ + + public TiposExamesCompData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TiposExamesCompDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TiposExamesCompDataAuto.java new file mode 100644 index 00000000..2b340361 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TiposExamesCompDataAuto.java @@ -0,0 +1,107 @@ +/* +* TiposExamesCompDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class TiposExamesCompDataAuto extends JDOObject +{ + + public static final String TABLENAME = "tipos_exames_comp"; + + public static final String ID = "id"; + public static final String ID_FULL = "tipos_exames_comp.id"; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "tipos_exames_comp.ordem"; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "tipos_exames_comp.descricao"; + + public static final String FIELD_NAMES[] = new String[]{ + ORDEM, DESCRICAO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, ORDEM, DESCRICAO, }; + + private Map dataHash; + + public TiposExamesCompDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getOrdem() + { + return (Integer) get(ORDEM); + } + + public void setOrdem(Integer ordemValue ) + { + this.set(ORDEM, ordemValue ); + } + + public String getDescricao() + { + return (String) get(DESCRICAO); + } + + public void setDescricao(String descricaoValue ) + { + this.set(DESCRICAO, descricaoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return TiposExamesComp.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Trabalhadores.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Trabalhadores.java new file mode 100644 index 00000000..6cac4452 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Trabalhadores.java @@ -0,0 +1,588 @@ +/* +* Trabalhadores.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class Trabalhadores implements JDOInnerObject +{ + 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 java.util.Date data_demissao; + private String observacoes_gestao; + private Integer perfil; + private java.sql.Timestamp actualizacao; + private String nome_plain; + private String bi; + + public Trabalhadores() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == TrabalhadoresDataAuto.ID ) + { + return id; + } + else if( fieldName == TrabalhadoresDataAuto.NOME ) + { + return nome; + } + else if( fieldName == TrabalhadoresDataAuto.SEXO ) + { + return sexo; + } + else if( fieldName == TrabalhadoresDataAuto.DATA_NASCIMENTO ) + { + return data_nascimento; + } + else if( fieldName == TrabalhadoresDataAuto.NACIONALIDADE ) + { + return nacionalidade; + } + else if( fieldName == TrabalhadoresDataAuto.NUMERO_MECANOGRAFICO ) + { + return numero_mecanografico; + } + else if( fieldName == TrabalhadoresDataAuto.DATA_ADMISSAO ) + { + return data_admissao; + } + else if( fieldName == TrabalhadoresDataAuto.CATEGORIA ) + { + return categoria; + } + else if( fieldName == TrabalhadoresDataAuto.LOCAL_TRABALHO ) + { + return local_trabalho; + } + else if( fieldName == TrabalhadoresDataAuto.FUNCAO_PROPOSTA ) + { + return funcao_proposta; + } + else if( fieldName == TrabalhadoresDataAuto.DATA_ADMISSAO_FUNCAO ) + { + return data_admissao_funcao; + } + else if( fieldName == TrabalhadoresDataAuto.OBSERVACOES ) + { + return observacoes; + } + else if( fieldName == TrabalhadoresDataAuto.INACTIVO ) + { + return inactivo; + } + else if( fieldName == TrabalhadoresDataAuto.ESTABELECIMENTO_ID ) + { + return estabelecimento_id; + } + else if( fieldName == TrabalhadoresDataAuto.DATA_DEMISSAO ) + { + return data_demissao; + } + else if( fieldName == TrabalhadoresDataAuto.OBSERVACOES_GESTAO ) + { + return observacoes_gestao; + } + else if( fieldName == TrabalhadoresDataAuto.PERFIL ) + { + return perfil; + } + else if( fieldName == TrabalhadoresDataAuto.ACTUALIZACAO ) + { + return actualizacao; + } + else if( fieldName == TrabalhadoresDataAuto.NOME_PLAIN ) + { + return nome_plain; + } + else if( fieldName == TrabalhadoresDataAuto.BI ) + { + return bi; + } + else if( fieldName.equals( TrabalhadoresDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( TrabalhadoresDataAuto.NOME ) ) + { + return nome; + } + else if( fieldName.equals( TrabalhadoresDataAuto.SEXO ) ) + { + return sexo; + } + else if( fieldName.equals( TrabalhadoresDataAuto.DATA_NASCIMENTO ) ) + { + return data_nascimento; + } + else if( fieldName.equals( TrabalhadoresDataAuto.NACIONALIDADE ) ) + { + return nacionalidade; + } + else if( fieldName.equals( TrabalhadoresDataAuto.NUMERO_MECANOGRAFICO ) ) + { + return numero_mecanografico; + } + else if( fieldName.equals( TrabalhadoresDataAuto.DATA_ADMISSAO ) ) + { + return data_admissao; + } + else if( fieldName.equals( TrabalhadoresDataAuto.CATEGORIA ) ) + { + return categoria; + } + else if( fieldName.equals( TrabalhadoresDataAuto.LOCAL_TRABALHO ) ) + { + return local_trabalho; + } + else if( fieldName.equals( TrabalhadoresDataAuto.FUNCAO_PROPOSTA ) ) + { + return funcao_proposta; + } + else if( fieldName.equals( TrabalhadoresDataAuto.DATA_ADMISSAO_FUNCAO ) ) + { + return data_admissao_funcao; + } + else if( fieldName.equals( TrabalhadoresDataAuto.OBSERVACOES ) ) + { + return observacoes; + } + else if( fieldName.equals( TrabalhadoresDataAuto.INACTIVO ) ) + { + return inactivo; + } + else if( fieldName.equals( TrabalhadoresDataAuto.ESTABELECIMENTO_ID ) ) + { + return estabelecimento_id; + } + else if( fieldName.equals( TrabalhadoresDataAuto.DATA_DEMISSAO ) ) + { + return data_demissao; + } + else if( fieldName.equals( TrabalhadoresDataAuto.OBSERVACOES_GESTAO ) ) + { + return observacoes_gestao; + } + else if( fieldName.equals( TrabalhadoresDataAuto.PERFIL ) ) + { + return perfil; + } + else if( fieldName.equals( TrabalhadoresDataAuto.ACTUALIZACAO ) ) + { + return actualizacao; + } + else if( fieldName.equals( TrabalhadoresDataAuto.NOME_PLAIN ) ) + { + return nome_plain; + } + else if( fieldName.equals( TrabalhadoresDataAuto.BI ) ) + { + return bi; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == TrabalhadoresDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresDataAuto.NOME ) + { + nome = ( String ) value; + } + else if( fieldName == TrabalhadoresDataAuto.SEXO ) + { + sexo = ( String ) value; + } + else if( fieldName == TrabalhadoresDataAuto.DATA_NASCIMENTO ) + { + data_nascimento = ( java.util.Date ) value; + } + else if( fieldName == TrabalhadoresDataAuto.NACIONALIDADE ) + { + nacionalidade = ( String ) value; + } + else if( fieldName == TrabalhadoresDataAuto.NUMERO_MECANOGRAFICO ) + { + numero_mecanografico = ( String ) value; + } + else if( fieldName == TrabalhadoresDataAuto.DATA_ADMISSAO ) + { + data_admissao = ( java.util.Date ) value; + } + else if( fieldName == TrabalhadoresDataAuto.CATEGORIA ) + { + categoria = ( String ) value; + } + else if( fieldName == TrabalhadoresDataAuto.LOCAL_TRABALHO ) + { + local_trabalho = ( String ) value; + } + else if( fieldName == TrabalhadoresDataAuto.FUNCAO_PROPOSTA ) + { + funcao_proposta = ( String ) value; + } + else if( fieldName == TrabalhadoresDataAuto.DATA_ADMISSAO_FUNCAO ) + { + data_admissao_funcao = ( java.util.Date ) value; + } + else if( fieldName == TrabalhadoresDataAuto.OBSERVACOES ) + { + observacoes = ( String ) value; + } + else if( fieldName == TrabalhadoresDataAuto.INACTIVO ) + { + inactivo = ( String ) value; + } + else if( fieldName == TrabalhadoresDataAuto.ESTABELECIMENTO_ID ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresDataAuto.DATA_DEMISSAO ) + { + data_demissao = ( java.util.Date ) value; + } + else if( fieldName == TrabalhadoresDataAuto.OBSERVACOES_GESTAO ) + { + observacoes_gestao = ( String ) value; + } + else if( fieldName == TrabalhadoresDataAuto.PERFIL ) + { + perfil = ( Integer ) value; + } + else if( fieldName == TrabalhadoresDataAuto.ACTUALIZACAO ) + { + actualizacao = ( java.sql.Timestamp ) value; + } + else if( fieldName == TrabalhadoresDataAuto.NOME_PLAIN ) + { + nome_plain = ( String ) value; + } + else if( fieldName == TrabalhadoresDataAuto.BI ) + { + bi = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.NOME ) ) + { + nome = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.SEXO ) ) + { + sexo = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.DATA_NASCIMENTO ) ) + { + data_nascimento = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.NACIONALIDADE ) ) + { + nacionalidade = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.NUMERO_MECANOGRAFICO ) ) + { + numero_mecanografico = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.DATA_ADMISSAO ) ) + { + data_admissao = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.CATEGORIA ) ) + { + categoria = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.LOCAL_TRABALHO ) ) + { + local_trabalho = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.FUNCAO_PROPOSTA ) ) + { + funcao_proposta = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.DATA_ADMISSAO_FUNCAO ) ) + { + data_admissao_funcao = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.OBSERVACOES ) ) + { + observacoes = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.INACTIVO ) ) + { + inactivo = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.ESTABELECIMENTO_ID ) ) + { + estabelecimento_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.DATA_DEMISSAO ) ) + { + data_demissao = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.OBSERVACOES_GESTAO ) ) + { + observacoes_gestao = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.PERFIL ) ) + { + perfil = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.ACTUALIZACAO ) ) + { + actualizacao = ( java.sql.Timestamp ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.NOME_PLAIN ) ) + { + nome_plain = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresDataAuto.BI ) ) + { + bi = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public String getNome() + { + return nome; + } + + public void setNome(String nomeValue ) + { + this.nome = nomeValue; + } + + public String getSexo() + { + return sexo; + } + + public void setSexo(String sexoValue ) + { + this.sexo = sexoValue; + } + + public java.util.Date getData_nascimento() + { + return data_nascimento; + } + + public void setData_nascimento(java.util.Date data_nascimentoValue ) + { + this.data_nascimento = data_nascimentoValue; + } + + public String getNacionalidade() + { + return nacionalidade; + } + + public void setNacionalidade(String nacionalidadeValue ) + { + this.nacionalidade = nacionalidadeValue; + } + + public String getNumero_mecanografico() + { + return numero_mecanografico; + } + + public void setNumero_mecanografico(String numero_mecanograficoValue ) + { + this.numero_mecanografico = numero_mecanograficoValue; + } + + public java.util.Date getData_admissao() + { + return data_admissao; + } + + public void setData_admissao(java.util.Date data_admissaoValue ) + { + this.data_admissao = data_admissaoValue; + } + + public String getCategoria() + { + return categoria; + } + + public void setCategoria(String categoriaValue ) + { + this.categoria = categoriaValue; + } + + public String getLocal_trabalho() + { + return local_trabalho; + } + + public void setLocal_trabalho(String local_trabalhoValue ) + { + this.local_trabalho = local_trabalhoValue; + } + + public String getFuncao_proposta() + { + return funcao_proposta; + } + + public void setFuncao_proposta(String funcao_propostaValue ) + { + this.funcao_proposta = funcao_propostaValue; + } + + public java.util.Date getData_admissao_funcao() + { + return data_admissao_funcao; + } + + public void setData_admissao_funcao(java.util.Date data_admissao_funcaoValue ) + { + this.data_admissao_funcao = data_admissao_funcaoValue; + } + + public String getObservacoes() + { + return observacoes; + } + + public void setObservacoes(String observacoesValue ) + { + this.observacoes = observacoesValue; + } + + public String getInactivo() + { + return inactivo; + } + + public void setInactivo(String inactivoValue ) + { + this.inactivo = inactivoValue; + } + + public Integer getEstabelecimento_id() + { + return estabelecimento_id; + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + this.estabelecimento_id = estabelecimento_idValue; + } + + public java.util.Date getData_demissao() + { + return data_demissao; + } + + public void setData_demissao(java.util.Date data_demissaoValue ) + { + this.data_demissao = data_demissaoValue; + } + + public String getObservacoes_gestao() + { + return observacoes_gestao; + } + + public void setObservacoes_gestao(String observacoes_gestaoValue ) + { + this.observacoes_gestao = observacoes_gestaoValue; + } + + public Integer getPerfil() + { + return perfil; + } + + public void setPerfil(Integer perfilValue ) + { + this.perfil = perfilValue; + } + + public java.sql.Timestamp getActualizacao() + { + return actualizacao; + } + + public void setActualizacao(java.sql.Timestamp actualizacaoValue ) + { + this.actualizacao = actualizacaoValue; + } + + public String getNome_plain() + { + return nome_plain; + } + + public void setNome_plain(String nome_plainValue ) + { + this.nome_plain = nome_plainValue; + } + + public String getBi() + { + return bi; + } + + public void setBi(String biValue ) + { + this.bi = biValue; + } + + public Class getOuterClass() + { + return TrabalhadoresDataAuto.class; + } + + public TrabalhadoresDataAuto getOuterClassInstance() + { + TrabalhadoresDataAuto outerObj = new TrabalhadoresDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultas.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultas.java new file mode 100644 index 00000000..5a6f955e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultas.java @@ -0,0 +1,210 @@ +/* +* TrabalhadoresConsultas.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class TrabalhadoresConsultas implements JDOInnerObject +{ + private Integer id; + private Integer trabalhador_id; + private java.util.Date data; + private Integer estado; + private Integer prestador_id; + private Integer processo_id; + + public TrabalhadoresConsultas() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == TrabalhadoresConsultasDataAuto.ID ) + { + return id; + } + else if( fieldName == TrabalhadoresConsultasDataAuto.TRABALHADOR_ID ) + { + return trabalhador_id; + } + else if( fieldName == TrabalhadoresConsultasDataAuto.DATA ) + { + return data; + } + else if( fieldName == TrabalhadoresConsultasDataAuto.ESTADO ) + { + return estado; + } + else if( fieldName == TrabalhadoresConsultasDataAuto.PRESTADOR_ID ) + { + return prestador_id; + } + else if( fieldName == TrabalhadoresConsultasDataAuto.PROCESSO_ID ) + { + return processo_id; + } + else if( fieldName.equals( TrabalhadoresConsultasDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( TrabalhadoresConsultasDataAuto.TRABALHADOR_ID ) ) + { + return trabalhador_id; + } + else if( fieldName.equals( TrabalhadoresConsultasDataAuto.DATA ) ) + { + return data; + } + else if( fieldName.equals( TrabalhadoresConsultasDataAuto.ESTADO ) ) + { + return estado; + } + else if( fieldName.equals( TrabalhadoresConsultasDataAuto.PRESTADOR_ID ) ) + { + return prestador_id; + } + else if( fieldName.equals( TrabalhadoresConsultasDataAuto.PROCESSO_ID ) ) + { + return processo_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == TrabalhadoresConsultasDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresConsultasDataAuto.TRABALHADOR_ID ) + { + trabalhador_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresConsultasDataAuto.DATA ) + { + data = ( java.util.Date ) value; + } + else if( fieldName == TrabalhadoresConsultasDataAuto.ESTADO ) + { + estado = ( Integer ) value; + } + else if( fieldName == TrabalhadoresConsultasDataAuto.PRESTADOR_ID ) + { + prestador_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresConsultasDataAuto.PROCESSO_ID ) + { + processo_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDataAuto.TRABALHADOR_ID ) ) + { + trabalhador_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDataAuto.DATA ) ) + { + data = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDataAuto.ESTADO ) ) + { + estado = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDataAuto.PRESTADOR_ID ) ) + { + prestador_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDataAuto.PROCESSO_ID ) ) + { + processo_id = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getTrabalhador_id() + { + return trabalhador_id; + } + + public void setTrabalhador_id(Integer trabalhador_idValue ) + { + this.trabalhador_id = trabalhador_idValue; + } + + public java.util.Date getData() + { + return data; + } + + public void setData(java.util.Date dataValue ) + { + this.data = dataValue; + } + + public Integer getEstado() + { + return estado; + } + + public void setEstado(Integer estadoValue ) + { + this.estado = estadoValue; + } + + public Integer getPrestador_id() + { + return prestador_id; + } + + public void setPrestador_id(Integer prestador_idValue ) + { + this.prestador_id = prestador_idValue; + } + + public Integer getProcesso_id() + { + return processo_id; + } + + public void setProcesso_id(Integer processo_idValue ) + { + this.processo_id = processo_idValue; + } + + public Class getOuterClass() + { + return TrabalhadoresConsultasDataAuto.class; + } + + public TrabalhadoresConsultasDataAuto getOuterClassInstance() + { + TrabalhadoresConsultasDataAuto outerObj = new TrabalhadoresConsultasDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasData.java new file mode 100644 index 00000000..94f2718e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresConsultasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class TrabalhadoresConsultasData extends com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDataAuto +{ + + public TrabalhadoresConsultasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDataAuto.java new file mode 100644 index 00000000..19e2916f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDataAuto.java @@ -0,0 +1,297 @@ +/* +* TrabalhadoresConsultasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class TrabalhadoresConsultasDataAuto extends JDOObject +{ + + public static final String TABLENAME = "trabalhadores_consultas"; + + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_consultas.id"; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "trabalhadores_consultas.trabalhador_id"; + public static final String TO_TRABALHADOR_ID = "to trabalhador_id"; + public static final String DATA = "data"; + public static final String DATA_FULL = "trabalhadores_consultas.data"; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "trabalhadores_consultas.estado"; + public static final String PRESTADOR_ID = "prestador_id"; + public static final String PRESTADOR_ID_FULL = "trabalhadores_consultas.prestador_id"; + public static final String TO_PRESTADOR_ID = "to prestador_id"; + public static final String PROCESSO_ID = "processo_id"; + public static final String PROCESSO_ID_FULL = "trabalhadores_consultas.processo_id"; + public static final String TO_PROCESSO_ID = "to processo_id"; + + 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, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, TRABALHADOR_ID, DATA, ESTADO, PRESTADOR_ID, PROCESSO_ID, }; + + private Map dataHash; + + public TrabalhadoresConsultasDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getTrabalhador_id() + { + return (Integer) dataHash.get(TRABALHADOR_ID); + } + + public void setTrabalhador_id(Integer trabalhador_idValue ) + { + dataHash.put(TO_TRABALHADOR_ID, null); + dataHash.put(TRABALHADOR_ID, trabalhador_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData toTrabalhador_id() + throws Exception + { + if( dataHash.get(TO_TRABALHADOR_ID) == null && getTrabalhador_id() != null ) + { + dataHash.put(TO_TRABALHADOR_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData.class, new Object[]{ getTrabalhador_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData) dataHash.get(TO_TRABALHADOR_ID); + } + + public void setToTrabalhador_id(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData trabalhador_idObject ) + { + if( trabalhador_idObject == null ) + { + dataHash.put(TRABALHADOR_ID, null); + } + else + { + dataHash.put(TRABALHADOR_ID, trabalhador_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData.ID )); + } + dataHash.put(TO_TRABALHADOR_ID, trabalhador_idObject); + } + + public java.util.Date getData() + { + return (java.util.Date) get(DATA); + } + + public void setData(java.util.Date dataValue ) + { + this.set(DATA, dataValue ); + } + + public Integer getEstado() + { + return (Integer) get(ESTADO); + } + + public void setEstado(Integer estadoValue ) + { + this.set(ESTADO, estadoValue ); + } + + public Integer getPrestador_id() + { + return (Integer) dataHash.get(PRESTADOR_ID); + } + + public void setPrestador_id(Integer prestador_idValue ) + { + dataHash.put(TO_PRESTADOR_ID, null); + dataHash.put(PRESTADOR_ID, prestador_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData toPrestador_id() + throws Exception + { + if( dataHash.get(TO_PRESTADOR_ID) == null && getPrestador_id() != null ) + { + dataHash.put(TO_PRESTADOR_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.class, new Object[]{ getPrestador_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) dataHash.get(TO_PRESTADOR_ID); + } + + public void setToPrestador_id(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData prestador_idObject ) + { + if( prestador_idObject == null ) + { + dataHash.put(PRESTADOR_ID, null); + } + else + { + dataHash.put(PRESTADOR_ID, prestador_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + dataHash.put(TO_PRESTADOR_ID, prestador_idObject); + } + + public Integer getProcesso_id() + { + return (Integer) dataHash.get(PROCESSO_ID); + } + + public void setProcesso_id(Integer processo_idValue ) + { + dataHash.put(TO_PROCESSO_ID, null); + dataHash.put(PROCESSO_ID, processo_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData toProcesso_id() + throws Exception + { + if( dataHash.get(TO_PROCESSO_ID) == null && getProcesso_id() != null ) + { + dataHash.put(TO_PROCESSO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData.class, new Object[]{ getProcesso_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData) dataHash.get(TO_PROCESSO_ID); + } + + public void setToProcesso_id(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData processo_idObject ) + { + if( processo_idObject == null ) + { + dataHash.put(PROCESSO_ID, null); + } + else + { + dataHash.put(PROCESSO_ID, processo_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData.ID )); + } + dataHash.put(TO_PROCESSO_ID, processo_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_PRESTADOR_ID.equals( fieldName ) ) + { + value = toPrestador_id(); + } + else if( PROCESSO_ID.equals( fieldName ) ) + { + value = getProcesso_id(); + } + else if( TO_TRABALHADOR_ID.equals( fieldName ) ) + { + value = toTrabalhador_id(); + } + else if( PRESTADOR_ID.equals( fieldName ) ) + { + value = getPrestador_id(); + } + else if( TO_PROCESSO_ID.equals( fieldName ) ) + { + value = toProcesso_id(); + } + else if( TRABALHADOR_ID.equals( fieldName ) ) + { + value = getTrabalhador_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_PRESTADOR_ID.equals( fieldName ) ) + { + setToPrestador_id( (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) value ); + } + else if( PROCESSO_ID.equals( fieldName ) ) + { + setProcesso_id( (Integer) value ); + } + else if( TO_TRABALHADOR_ID.equals( fieldName ) ) + { + setToTrabalhador_id( (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData) value ); + } + else if( PRESTADOR_ID.equals( fieldName ) ) + { + setPrestador_id( (Integer) value ); + } + else if( TO_PROCESSO_ID.equals( fieldName ) ) + { + setToProcesso_id( (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData) value ); + } + else if( TRABALHADOR_ID.equals( fieldName ) ) + { + setTrabalhador_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_TRABALHADOR_ID) != null ) + { + toTrabalhador_id().save(); + dataHash.put(TRABALHADOR_ID, toTrabalhador_id().get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData.ID )); + } + + if( dataHash.get(TO_PRESTADOR_ID) != null ) + { + toPrestador_id().save(); + dataHash.put(PRESTADOR_ID, toPrestador_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + + if( dataHash.get(TO_PROCESSO_ID) != null ) + { + toProcesso_id().save(); + dataHash.put(PROCESSO_ID, toProcesso_id().get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return TrabalhadoresConsultas.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatas.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatas.java new file mode 100644 index 00000000..236f14ac --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatas.java @@ -0,0 +1,183 @@ +/* +* TrabalhadoresConsultasDatas.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class TrabalhadoresConsultasDatas implements JDOInnerObject +{ + private Integer id; + private java.util.Date data; + private Integer trabalhadores_consultas_id; + private Integer estado; + private Integer prestador_id; + + public TrabalhadoresConsultasDatas() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == TrabalhadoresConsultasDatasDataAuto.ID ) + { + return id; + } + else if( fieldName == TrabalhadoresConsultasDatasDataAuto.DATA ) + { + return data; + } + else if( fieldName == TrabalhadoresConsultasDatasDataAuto.TRABALHADORES_CONSULTAS_ID ) + { + return trabalhadores_consultas_id; + } + else if( fieldName == TrabalhadoresConsultasDatasDataAuto.ESTADO ) + { + return estado; + } + else if( fieldName == TrabalhadoresConsultasDatasDataAuto.PRESTADOR_ID ) + { + return prestador_id; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasDataAuto.DATA ) ) + { + return data; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasDataAuto.TRABALHADORES_CONSULTAS_ID ) ) + { + return trabalhadores_consultas_id; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasDataAuto.ESTADO ) ) + { + return estado; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasDataAuto.PRESTADOR_ID ) ) + { + return prestador_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == TrabalhadoresConsultasDatasDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresConsultasDatasDataAuto.DATA ) + { + data = ( java.util.Date ) value; + } + else if( fieldName == TrabalhadoresConsultasDatasDataAuto.TRABALHADORES_CONSULTAS_ID ) + { + trabalhadores_consultas_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresConsultasDatasDataAuto.ESTADO ) + { + estado = ( Integer ) value; + } + else if( fieldName == TrabalhadoresConsultasDatasDataAuto.PRESTADOR_ID ) + { + prestador_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasDataAuto.DATA ) ) + { + data = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasDataAuto.TRABALHADORES_CONSULTAS_ID ) ) + { + trabalhadores_consultas_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasDataAuto.ESTADO ) ) + { + estado = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasDataAuto.PRESTADOR_ID ) ) + { + prestador_id = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public java.util.Date getData() + { + return data; + } + + public void setData(java.util.Date dataValue ) + { + this.data = dataValue; + } + + public Integer getTrabalhadores_consultas_id() + { + return trabalhadores_consultas_id; + } + + public void setTrabalhadores_consultas_id(Integer trabalhadores_consultas_idValue ) + { + this.trabalhadores_consultas_id = trabalhadores_consultas_idValue; + } + + public Integer getEstado() + { + return estado; + } + + public void setEstado(Integer estadoValue ) + { + this.estado = estadoValue; + } + + public Integer getPrestador_id() + { + return prestador_id; + } + + public void setPrestador_id(Integer prestador_idValue ) + { + this.prestador_id = prestador_idValue; + } + + public Class getOuterClass() + { + return TrabalhadoresConsultasDatasDataAuto.class; + } + + public TrabalhadoresConsultasDatasDataAuto getOuterClassInstance() + { + TrabalhadoresConsultasDatasDataAuto outerObj = new TrabalhadoresConsultasDatasDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasData.java new file mode 100644 index 00000000..931d00ca --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresConsultasDatasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class TrabalhadoresConsultasDatasData extends com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasDataAuto +{ + + public TrabalhadoresConsultasDatasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasDataAuto.java new file mode 100644 index 00000000..809ab7ae --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasDataAuto.java @@ -0,0 +1,238 @@ +/* +* TrabalhadoresConsultasDatasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class TrabalhadoresConsultasDatasDataAuto extends JDOObject +{ + + public static final String TABLENAME = "trabalhadores_consultas_datas"; + + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_consultas_datas.id"; + public static final String DATA = "data"; + public static final String DATA_FULL = "trabalhadores_consultas_datas.data"; + 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 String TO_TRABALHADORES_CONSULTAS_ID = "to trabalhadores_consultas_id"; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "trabalhadores_consultas_datas.estado"; + public static final String PRESTADOR_ID = "prestador_id"; + public static final String PRESTADOR_ID_FULL = "trabalhadores_consultas_datas.prestador_id"; + public static final String TO_PRESTADOR_ID = "to prestador_id"; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, TRABALHADORES_CONSULTAS_ID, TO_TRABALHADORES_CONSULTAS_ID, ESTADO, + PRESTADOR_ID, TO_PRESTADOR_ID, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DATA, TRABALHADORES_CONSULTAS_ID, ESTADO, PRESTADOR_ID, }; + + private Map dataHash; + + public TrabalhadoresConsultasDatasDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public java.util.Date getData() + { + return (java.util.Date) get(DATA); + } + + public void setData(java.util.Date dataValue ) + { + this.set(DATA, dataValue ); + } + + public Integer getTrabalhadores_consultas_id() + { + return (Integer) dataHash.get(TRABALHADORES_CONSULTAS_ID); + } + + public void setTrabalhadores_consultas_id(Integer trabalhadores_consultas_idValue ) + { + dataHash.put(TO_TRABALHADORES_CONSULTAS_ID, null); + dataHash.put(TRABALHADORES_CONSULTAS_ID, trabalhadores_consultas_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasData toTrabalhadores_consultas_id() + throws Exception + { + if( dataHash.get(TO_TRABALHADORES_CONSULTAS_ID) == null && getTrabalhadores_consultas_id() != null ) + { + dataHash.put(TO_TRABALHADORES_CONSULTAS_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasData.class, new Object[]{ getTrabalhadores_consultas_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasData) dataHash.get(TO_TRABALHADORES_CONSULTAS_ID); + } + + public void setToTrabalhadores_consultas_id(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasData trabalhadores_consultas_idObject ) + { + if( trabalhadores_consultas_idObject == null ) + { + dataHash.put(TRABALHADORES_CONSULTAS_ID, null); + } + else + { + dataHash.put(TRABALHADORES_CONSULTAS_ID, trabalhadores_consultas_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasData.ID )); + } + dataHash.put(TO_TRABALHADORES_CONSULTAS_ID, trabalhadores_consultas_idObject); + } + + public Integer getEstado() + { + return (Integer) get(ESTADO); + } + + public void setEstado(Integer estadoValue ) + { + this.set(ESTADO, estadoValue ); + } + + public Integer getPrestador_id() + { + return (Integer) dataHash.get(PRESTADOR_ID); + } + + public void setPrestador_id(Integer prestador_idValue ) + { + dataHash.put(TO_PRESTADOR_ID, null); + dataHash.put(PRESTADOR_ID, prestador_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData toPrestador_id() + throws Exception + { + if( dataHash.get(TO_PRESTADOR_ID) == null && getPrestador_id() != null ) + { + dataHash.put(TO_PRESTADOR_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.class, new Object[]{ getPrestador_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) dataHash.get(TO_PRESTADOR_ID); + } + + public void setToPrestador_id(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData prestador_idObject ) + { + if( prestador_idObject == null ) + { + dataHash.put(PRESTADOR_ID, null); + } + else + { + dataHash.put(PRESTADOR_ID, prestador_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + dataHash.put(TO_PRESTADOR_ID, prestador_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_PRESTADOR_ID.equals( fieldName ) ) + { + value = toPrestador_id(); + } + else if( PRESTADOR_ID.equals( fieldName ) ) + { + value = getPrestador_id(); + } + else if( TRABALHADORES_CONSULTAS_ID.equals( fieldName ) ) + { + value = getTrabalhadores_consultas_id(); + } + else if( TO_TRABALHADORES_CONSULTAS_ID.equals( fieldName ) ) + { + value = toTrabalhadores_consultas_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_PRESTADOR_ID.equals( fieldName ) ) + { + setToPrestador_id( (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) value ); + } + else if( PRESTADOR_ID.equals( fieldName ) ) + { + setPrestador_id( (Integer) value ); + } + else if( TRABALHADORES_CONSULTAS_ID.equals( fieldName ) ) + { + setTrabalhadores_consultas_id( (Integer) value ); + } + else if( TO_TRABALHADORES_CONSULTAS_ID.equals( fieldName ) ) + { + setToTrabalhadores_consultas_id( (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_TRABALHADORES_CONSULTAS_ID) != null ) + { + toTrabalhadores_consultas_id().save(); + dataHash.put(TRABALHADORES_CONSULTAS_ID, toTrabalhadores_consultas_id().get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasData.ID )); + } + + if( dataHash.get(TO_PRESTADOR_ID) != null ) + { + toPrestador_id().save(); + dataHash.put(PRESTADOR_ID, toPrestador_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return TrabalhadoresConsultasDatas.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasEmails.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasEmails.java new file mode 100644 index 00000000..ce6f5f28 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasEmails.java @@ -0,0 +1,210 @@ +/* +* TrabalhadoresConsultasDatasEmails.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class TrabalhadoresConsultasDatasEmails implements JDOInnerObject +{ + private Integer id; + private Integer trabalhadores_consultas_datas_id; + private String destination; + private java.util.Date data; + private String subject; + private String body; + + public TrabalhadoresConsultasDatasEmails() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == TrabalhadoresConsultasDatasEmailsDataAuto.ID ) + { + return id; + } + else if( fieldName == TrabalhadoresConsultasDatasEmailsDataAuto.TRABALHADORES_CONSULTAS_DATAS_ID ) + { + return trabalhadores_consultas_datas_id; + } + else if( fieldName == TrabalhadoresConsultasDatasEmailsDataAuto.DESTINATION ) + { + return destination; + } + else if( fieldName == TrabalhadoresConsultasDatasEmailsDataAuto.DATA ) + { + return data; + } + else if( fieldName == TrabalhadoresConsultasDatasEmailsDataAuto.SUBJECT ) + { + return subject; + } + else if( fieldName == TrabalhadoresConsultasDatasEmailsDataAuto.BODY ) + { + return body; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsDataAuto.TRABALHADORES_CONSULTAS_DATAS_ID ) ) + { + return trabalhadores_consultas_datas_id; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsDataAuto.DESTINATION ) ) + { + return destination; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsDataAuto.DATA ) ) + { + return data; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsDataAuto.SUBJECT ) ) + { + return subject; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsDataAuto.BODY ) ) + { + return body; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == TrabalhadoresConsultasDatasEmailsDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresConsultasDatasEmailsDataAuto.TRABALHADORES_CONSULTAS_DATAS_ID ) + { + trabalhadores_consultas_datas_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresConsultasDatasEmailsDataAuto.DESTINATION ) + { + destination = ( String ) value; + } + else if( fieldName == TrabalhadoresConsultasDatasEmailsDataAuto.DATA ) + { + data = ( java.util.Date ) value; + } + else if( fieldName == TrabalhadoresConsultasDatasEmailsDataAuto.SUBJECT ) + { + subject = ( String ) value; + } + else if( fieldName == TrabalhadoresConsultasDatasEmailsDataAuto.BODY ) + { + body = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsDataAuto.TRABALHADORES_CONSULTAS_DATAS_ID ) ) + { + trabalhadores_consultas_datas_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsDataAuto.DESTINATION ) ) + { + destination = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsDataAuto.DATA ) ) + { + data = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsDataAuto.SUBJECT ) ) + { + subject = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsDataAuto.BODY ) ) + { + body = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getTrabalhadores_consultas_datas_id() + { + return trabalhadores_consultas_datas_id; + } + + public void setTrabalhadores_consultas_datas_id(Integer trabalhadores_consultas_datas_idValue ) + { + this.trabalhadores_consultas_datas_id = trabalhadores_consultas_datas_idValue; + } + + public String getDestination() + { + return destination; + } + + public void setDestination(String destinationValue ) + { + this.destination = destinationValue; + } + + public java.util.Date getData() + { + return data; + } + + public void setData(java.util.Date dataValue ) + { + this.data = dataValue; + } + + public String getSubject() + { + return subject; + } + + public void setSubject(String subjectValue ) + { + this.subject = subjectValue; + } + + public String getBody() + { + return body; + } + + public void setBody(String bodyValue ) + { + this.body = bodyValue; + } + + public Class getOuterClass() + { + return TrabalhadoresConsultasDatasEmailsDataAuto.class; + } + + public TrabalhadoresConsultasDatasEmailsDataAuto getOuterClassInstance() + { + TrabalhadoresConsultasDatasEmailsDataAuto outerObj = new TrabalhadoresConsultasDatasEmailsDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasEmailsData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasEmailsData.java new file mode 100644 index 00000000..be4de22a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasEmailsData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresConsultasDatasEmailsDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class TrabalhadoresConsultasDatasEmailsData extends com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasEmailsDataAuto +{ + + public TrabalhadoresConsultasDatasEmailsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasEmailsDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasEmailsDataAuto.java new file mode 100644 index 00000000..ce63d238 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasEmailsDataAuto.java @@ -0,0 +1,203 @@ +/* +* TrabalhadoresConsultasDatasEmailsDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class TrabalhadoresConsultasDatasEmailsDataAuto extends JDOObject +{ + + public static final String TABLENAME = "trabalhadores_consultas_datas_emails"; + + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_consultas_datas_emails.id"; + 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 String TO_TRABALHADORES_CONSULTAS_DATAS_ID = "to trabalhadores_consultas_datas_id"; + public static final String DESTINATION = "destination"; + public static final String DESTINATION_FULL = "trabalhadores_consultas_datas_emails.destination"; + public static final String DATA = "data"; + public static final String DATA_FULL = "trabalhadores_consultas_datas_emails.data"; + public static final String SUBJECT = "subject"; + public static final String SUBJECT_FULL = "trabalhadores_consultas_datas_emails.subject"; + public static final String BODY = "body"; + public static final String BODY_FULL = "trabalhadores_consultas_datas_emails.body"; + + public static final String FIELD_NAMES[] = new String[]{ + TRABALHADORES_CONSULTAS_DATAS_ID, TO_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 Map dataHash; + + public TrabalhadoresConsultasDatasEmailsDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getTrabalhadores_consultas_datas_id() + { + return (Integer) dataHash.get(TRABALHADORES_CONSULTAS_DATAS_ID); + } + + public void setTrabalhadores_consultas_datas_id(Integer trabalhadores_consultas_datas_idValue ) + { + dataHash.put(TO_TRABALHADORES_CONSULTAS_DATAS_ID, null); + dataHash.put(TRABALHADORES_CONSULTAS_DATAS_ID, trabalhadores_consultas_datas_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData toTrabalhadores_consultas_datas_id() + throws Exception + { + if( dataHash.get(TO_TRABALHADORES_CONSULTAS_DATAS_ID) == null && getTrabalhadores_consultas_datas_id() != null ) + { + dataHash.put(TO_TRABALHADORES_CONSULTAS_DATAS_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData.class, new Object[]{ getTrabalhadores_consultas_datas_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData) dataHash.get(TO_TRABALHADORES_CONSULTAS_DATAS_ID); + } + + public void setToTrabalhadores_consultas_datas_id(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData trabalhadores_consultas_datas_idObject ) + { + if( trabalhadores_consultas_datas_idObject == null ) + { + dataHash.put(TRABALHADORES_CONSULTAS_DATAS_ID, null); + } + else + { + dataHash.put(TRABALHADORES_CONSULTAS_DATAS_ID, trabalhadores_consultas_datas_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData.ID )); + } + dataHash.put(TO_TRABALHADORES_CONSULTAS_DATAS_ID, trabalhadores_consultas_datas_idObject); + } + + public String getDestination() + { + return (String) get(DESTINATION); + } + + public void setDestination(String destinationValue ) + { + this.set(DESTINATION, destinationValue ); + } + + public java.util.Date getData() + { + return (java.util.Date) get(DATA); + } + + public void setData(java.util.Date dataValue ) + { + this.set(DATA, dataValue ); + } + + public String getSubject() + { + return (String) get(SUBJECT); + } + + public void setSubject(String subjectValue ) + { + this.set(SUBJECT, subjectValue ); + } + + public String getBody() + { + return (String) get(BODY); + } + + public void setBody(String bodyValue ) + { + this.set(BODY, bodyValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_TRABALHADORES_CONSULTAS_DATAS_ID.equals( fieldName ) ) + { + value = toTrabalhadores_consultas_datas_id(); + } + else if( TRABALHADORES_CONSULTAS_DATAS_ID.equals( fieldName ) ) + { + value = getTrabalhadores_consultas_datas_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_TRABALHADORES_CONSULTAS_DATAS_ID.equals( fieldName ) ) + { + setToTrabalhadores_consultas_datas_id( (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData) value ); + } + else if( TRABALHADORES_CONSULTAS_DATAS_ID.equals( fieldName ) ) + { + setTrabalhadores_consultas_datas_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_TRABALHADORES_CONSULTAS_DATAS_ID) != null ) + { + toTrabalhadores_consultas_datas_id().save(); + dataHash.put(TRABALHADORES_CONSULTAS_DATAS_ID, toTrabalhadores_consultas_datas_id().get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return TrabalhadoresConsultasDatasEmails.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasObservacoes.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasObservacoes.java new file mode 100644 index 00000000..c6f1241e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasObservacoes.java @@ -0,0 +1,129 @@ +/* +* TrabalhadoresConsultasDatasObservacoes.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class TrabalhadoresConsultasDatasObservacoes implements JDOInnerObject +{ + private Integer id; + private Integer trabalhadores_consultas_datas_id; + private String observacao; + + public TrabalhadoresConsultasDatasObservacoes() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == TrabalhadoresConsultasDatasObservacoesDataAuto.ID ) + { + return id; + } + else if( fieldName == TrabalhadoresConsultasDatasObservacoesDataAuto.TRABALHADORES_CONSULTAS_DATAS_ID ) + { + return trabalhadores_consultas_datas_id; + } + else if( fieldName == TrabalhadoresConsultasDatasObservacoesDataAuto.OBSERVACAO ) + { + return observacao; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasObservacoesDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasObservacoesDataAuto.TRABALHADORES_CONSULTAS_DATAS_ID ) ) + { + return trabalhadores_consultas_datas_id; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasObservacoesDataAuto.OBSERVACAO ) ) + { + return observacao; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == TrabalhadoresConsultasDatasObservacoesDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresConsultasDatasObservacoesDataAuto.TRABALHADORES_CONSULTAS_DATAS_ID ) + { + trabalhadores_consultas_datas_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresConsultasDatasObservacoesDataAuto.OBSERVACAO ) + { + observacao = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasObservacoesDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasObservacoesDataAuto.TRABALHADORES_CONSULTAS_DATAS_ID ) ) + { + trabalhadores_consultas_datas_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresConsultasDatasObservacoesDataAuto.OBSERVACAO ) ) + { + observacao = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getTrabalhadores_consultas_datas_id() + { + return trabalhadores_consultas_datas_id; + } + + public void setTrabalhadores_consultas_datas_id(Integer trabalhadores_consultas_datas_idValue ) + { + this.trabalhadores_consultas_datas_id = trabalhadores_consultas_datas_idValue; + } + + public String getObservacao() + { + return observacao; + } + + public void setObservacao(String observacaoValue ) + { + this.observacao = observacaoValue; + } + + public Class getOuterClass() + { + return TrabalhadoresConsultasDatasObservacoesDataAuto.class; + } + + public TrabalhadoresConsultasDatasObservacoesDataAuto getOuterClassInstance() + { + TrabalhadoresConsultasDatasObservacoesDataAuto outerObj = new TrabalhadoresConsultasDatasObservacoesDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasObservacoesData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasObservacoesData.java new file mode 100644 index 00000000..6ef9f6c7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasObservacoesData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresConsultasDatasObservacoesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class TrabalhadoresConsultasDatasObservacoesData extends com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasObservacoesDataAuto +{ + + public TrabalhadoresConsultasDatasObservacoesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasObservacoesDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasObservacoesDataAuto.java new file mode 100644 index 00000000..821b1a1c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresConsultasDatasObservacoesDataAuto.java @@ -0,0 +1,167 @@ +/* +* TrabalhadoresConsultasDatasObservacoesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class TrabalhadoresConsultasDatasObservacoesDataAuto extends JDOObject +{ + + public static final String TABLENAME = "trabalhadores_consultas_datas_observacoes"; + + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_consultas_datas_observacoes.id"; + 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 String TO_TRABALHADORES_CONSULTAS_DATAS_ID = "to trabalhadores_consultas_datas_id"; + public static final String OBSERVACAO = "observacao"; + public static final String OBSERVACAO_FULL = "trabalhadores_consultas_datas_observacoes.observacao"; + + public static final String FIELD_NAMES[] = new String[]{ + TRABALHADORES_CONSULTAS_DATAS_ID, TO_TRABALHADORES_CONSULTAS_DATAS_ID, + OBSERVACAO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, TRABALHADORES_CONSULTAS_DATAS_ID, OBSERVACAO, }; + + private Map dataHash; + + public TrabalhadoresConsultasDatasObservacoesDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getTrabalhadores_consultas_datas_id() + { + return (Integer) dataHash.get(TRABALHADORES_CONSULTAS_DATAS_ID); + } + + public void setTrabalhadores_consultas_datas_id(Integer trabalhadores_consultas_datas_idValue ) + { + dataHash.put(TO_TRABALHADORES_CONSULTAS_DATAS_ID, null); + dataHash.put(TRABALHADORES_CONSULTAS_DATAS_ID, trabalhadores_consultas_datas_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData toTrabalhadores_consultas_datas_id() + throws Exception + { + if( dataHash.get(TO_TRABALHADORES_CONSULTAS_DATAS_ID) == null && getTrabalhadores_consultas_datas_id() != null ) + { + dataHash.put(TO_TRABALHADORES_CONSULTAS_DATAS_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData.class, new Object[]{ getTrabalhadores_consultas_datas_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData) dataHash.get(TO_TRABALHADORES_CONSULTAS_DATAS_ID); + } + + public void setToTrabalhadores_consultas_datas_id(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData trabalhadores_consultas_datas_idObject ) + { + if( trabalhadores_consultas_datas_idObject == null ) + { + dataHash.put(TRABALHADORES_CONSULTAS_DATAS_ID, null); + } + else + { + dataHash.put(TRABALHADORES_CONSULTAS_DATAS_ID, trabalhadores_consultas_datas_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData.ID )); + } + dataHash.put(TO_TRABALHADORES_CONSULTAS_DATAS_ID, trabalhadores_consultas_datas_idObject); + } + + public String getObservacao() + { + return (String) get(OBSERVACAO); + } + + public void setObservacao(String observacaoValue ) + { + this.set(OBSERVACAO, observacaoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_TRABALHADORES_CONSULTAS_DATAS_ID.equals( fieldName ) ) + { + value = toTrabalhadores_consultas_datas_id(); + } + else if( TRABALHADORES_CONSULTAS_DATAS_ID.equals( fieldName ) ) + { + value = getTrabalhadores_consultas_datas_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_TRABALHADORES_CONSULTAS_DATAS_ID.equals( fieldName ) ) + { + setToTrabalhadores_consultas_datas_id( (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData) value ); + } + else if( TRABALHADORES_CONSULTAS_DATAS_ID.equals( fieldName ) ) + { + setTrabalhadores_consultas_datas_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_TRABALHADORES_CONSULTAS_DATAS_ID) != null ) + { + toTrabalhadores_consultas_datas_id().save(); + dataHash.put(TRABALHADORES_CONSULTAS_DATAS_ID, toTrabalhadores_consultas_datas_id().get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresConsultasDatasData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return TrabalhadoresConsultasDatasObservacoes.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresData.java new file mode 100644 index 00000000..246726bf --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class TrabalhadoresData extends com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresDataAuto +{ + + public TrabalhadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresDataAuto.java new file mode 100644 index 00000000..8aab5192 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresDataAuto.java @@ -0,0 +1,376 @@ +/* +* TrabalhadoresDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class TrabalhadoresDataAuto extends JDOObject +{ + + public static final String TABLENAME = "trabalhadores"; + + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores.id"; + public static final String NOME = "nome"; + public static final String NOME_FULL = "trabalhadores.nome"; + public static final String SEXO = "sexo"; + public static final String SEXO_FULL = "trabalhadores.sexo"; + public static final String DATA_NASCIMENTO = "data_nascimento"; + public static final String DATA_NASCIMENTO_FULL = "trabalhadores.data_nascimento"; + public static final String NACIONALIDADE = "nacionalidade"; + public static final String NACIONALIDADE_FULL = "trabalhadores.nacionalidade"; + public static final String NUMERO_MECANOGRAFICO = "numero_mecanografico"; + public static final String NUMERO_MECANOGRAFICO_FULL = "trabalhadores.numero_mecanografico"; + public static final String DATA_ADMISSAO = "data_admissao"; + public static final String DATA_ADMISSAO_FULL = "trabalhadores.data_admissao"; + public static final String CATEGORIA = "categoria"; + public static final String CATEGORIA_FULL = "trabalhadores.categoria"; + public static final String LOCAL_TRABALHO = "local_trabalho"; + public static final String LOCAL_TRABALHO_FULL = "trabalhadores.local_trabalho"; + public static final String FUNCAO_PROPOSTA = "funcao_proposta"; + public static final String FUNCAO_PROPOSTA_FULL = "trabalhadores.funcao_proposta"; + 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 String OBSERVACOES = "observacoes"; + public static final String OBSERVACOES_FULL = "trabalhadores.observacoes"; + public static final String INACTIVO = "inactivo"; + public static final String INACTIVO_FULL = "trabalhadores.inactivo"; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "trabalhadores.estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id"; + public static final String DATA_DEMISSAO = "data_demissao"; + public static final String DATA_DEMISSAO_FULL = "trabalhadores.data_demissao"; + public static final String OBSERVACOES_GESTAO = "observacoes_gestao"; + public static final String OBSERVACOES_GESTAO_FULL = "trabalhadores.observacoes_gestao"; + public static final String PERFIL = "perfil"; + public static final String PERFIL_FULL = "trabalhadores.perfil"; + public static final String ACTUALIZACAO = "actualizacao"; + public static final String ACTUALIZACAO_FULL = "trabalhadores.actualizacao"; + public static final String NOME_PLAIN = "nome_plain"; + public static final String NOME_PLAIN_FULL = "trabalhadores.nome_plain"; + public static final String BI = "bi"; + public static final String BI_FULL = "trabalhadores.bi"; + + 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, }; + + + protected static final String ALL_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, }; + + private Map dataHash; + + public TrabalhadoresDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public String getNome() + { + return (String) get(NOME); + } + + public void setNome(String nomeValue ) + { + this.set(NOME, nomeValue ); + } + + public String getSexo() + { + return (String) get(SEXO); + } + + public void setSexo(String sexoValue ) + { + this.set(SEXO, sexoValue ); + } + + public java.util.Date getData_nascimento() + { + return (java.util.Date) get(DATA_NASCIMENTO); + } + + public void setData_nascimento(java.util.Date data_nascimentoValue ) + { + this.set(DATA_NASCIMENTO, data_nascimentoValue ); + } + + public String getNacionalidade() + { + return (String) get(NACIONALIDADE); + } + + public void setNacionalidade(String nacionalidadeValue ) + { + this.set(NACIONALIDADE, nacionalidadeValue ); + } + + public String getNumero_mecanografico() + { + return (String) get(NUMERO_MECANOGRAFICO); + } + + public void setNumero_mecanografico(String numero_mecanograficoValue ) + { + this.set(NUMERO_MECANOGRAFICO, numero_mecanograficoValue ); + } + + public java.util.Date getData_admissao() + { + return (java.util.Date) get(DATA_ADMISSAO); + } + + public void setData_admissao(java.util.Date data_admissaoValue ) + { + this.set(DATA_ADMISSAO, data_admissaoValue ); + } + + public String getCategoria() + { + return (String) get(CATEGORIA); + } + + public void setCategoria(String categoriaValue ) + { + this.set(CATEGORIA, categoriaValue ); + } + + public String getLocal_trabalho() + { + return (String) get(LOCAL_TRABALHO); + } + + public void setLocal_trabalho(String local_trabalhoValue ) + { + this.set(LOCAL_TRABALHO, local_trabalhoValue ); + } + + public String getFuncao_proposta() + { + return (String) get(FUNCAO_PROPOSTA); + } + + public void setFuncao_proposta(String funcao_propostaValue ) + { + this.set(FUNCAO_PROPOSTA, funcao_propostaValue ); + } + + public java.util.Date getData_admissao_funcao() + { + return (java.util.Date) get(DATA_ADMISSAO_FUNCAO); + } + + public void setData_admissao_funcao(java.util.Date data_admissao_funcaoValue ) + { + this.set(DATA_ADMISSAO_FUNCAO, data_admissao_funcaoValue ); + } + + public String getObservacoes() + { + return (String) get(OBSERVACOES); + } + + public void setObservacoes(String observacoesValue ) + { + this.set(OBSERVACOES, observacoesValue ); + } + + public String getInactivo() + { + return (String) get(INACTIVO); + } + + public void setInactivo(String inactivoValue ) + { + this.set(INACTIVO, inactivoValue ); + } + + public Integer getEstabelecimento_id() + { + return (Integer) dataHash.get(ESTABELECIMENTO_ID); + } + + public void setEstabelecimento_id(Integer estabelecimento_idValue ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, null); + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id() + throws Exception + { + if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null ) + { + dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID); + } + + public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject ) + { + if( estabelecimento_idObject == null ) + { + dataHash.put(ESTABELECIMENTO_ID, null); + } + else + { + dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject); + } + + public java.util.Date getData_demissao() + { + return (java.util.Date) get(DATA_DEMISSAO); + } + + public void setData_demissao(java.util.Date data_demissaoValue ) + { + this.set(DATA_DEMISSAO, data_demissaoValue ); + } + + public String getObservacoes_gestao() + { + return (String) get(OBSERVACOES_GESTAO); + } + + public void setObservacoes_gestao(String observacoes_gestaoValue ) + { + this.set(OBSERVACOES_GESTAO, observacoes_gestaoValue ); + } + + public Integer getPerfil() + { + return (Integer) get(PERFIL); + } + + public void setPerfil(Integer perfilValue ) + { + this.set(PERFIL, perfilValue ); + } + + public java.sql.Timestamp getActualizacao() + { + return (java.sql.Timestamp) get(ACTUALIZACAO); + } + + public void setActualizacao(java.sql.Timestamp actualizacaoValue ) + { + this.set(ACTUALIZACAO, actualizacaoValue ); + } + + public String getNome_plain() + { + return (String) get(NOME_PLAIN); + } + + public void setNome_plain(String nome_plainValue ) + { + this.set(NOME_PLAIN, nome_plainValue ); + } + + public String getBi() + { + return (String) get(BI); + } + + public void setBi(String biValue ) + { + this.set(BI, biValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = getEstabelecimento_id(); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + value = toEstabelecimento_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setEstabelecimento_id( (Integer) value ); + } + else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) ) + { + setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_ESTABELECIMENTO_ID) != null ) + { + toEstabelecimento_id().save(); + dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Trabalhadores.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcd.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcd.java new file mode 100644 index 00000000..b1ededc2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcd.java @@ -0,0 +1,291 @@ +/* +* TrabalhadoresEcd.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class 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; + private java.util.Date data_envio; + private java.util.Date data_recepcao; + + public TrabalhadoresEcd() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == TrabalhadoresEcdDataAuto.ID ) + { + return id; + } + else if( fieldName == TrabalhadoresEcdDataAuto.ECD_ID ) + { + return ecd_id; + } + else if( fieldName == TrabalhadoresEcdDataAuto.ECD_OFICIAL_ID ) + { + return ecd_oficial_id; + } + else if( fieldName == TrabalhadoresEcdDataAuto.ESTADO ) + { + return estado; + } + else if( fieldName == TrabalhadoresEcdDataAuto.TRABALHADORES_ECDS_DATAS_ID ) + { + return trabalhadores_ecds_datas_id; + } + else if( fieldName == TrabalhadoresEcdDataAuto.ENVIADO ) + { + return enviado; + } + else if( fieldName == TrabalhadoresEcdDataAuto.ANALISADOR_ID ) + { + return analisador_id; + } + else if( fieldName == TrabalhadoresEcdDataAuto.DATA_ENVIO ) + { + return data_envio; + } + else if( fieldName == TrabalhadoresEcdDataAuto.DATA_RECEPCAO ) + { + return data_recepcao; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.ECD_ID ) ) + { + return ecd_id; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.ECD_OFICIAL_ID ) ) + { + return ecd_oficial_id; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.ESTADO ) ) + { + return estado; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.TRABALHADORES_ECDS_DATAS_ID ) ) + { + return trabalhadores_ecds_datas_id; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.ENVIADO ) ) + { + return enviado; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.ANALISADOR_ID ) ) + { + return analisador_id; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.DATA_ENVIO ) ) + { + return data_envio; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.DATA_RECEPCAO ) ) + { + return data_recepcao; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == TrabalhadoresEcdDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdDataAuto.ECD_ID ) + { + ecd_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdDataAuto.ECD_OFICIAL_ID ) + { + ecd_oficial_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdDataAuto.ESTADO ) + { + estado = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdDataAuto.TRABALHADORES_ECDS_DATAS_ID ) + { + trabalhadores_ecds_datas_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdDataAuto.ENVIADO ) + { + enviado = ( String ) value; + } + else if( fieldName == TrabalhadoresEcdDataAuto.ANALISADOR_ID ) + { + analisador_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdDataAuto.DATA_ENVIO ) + { + data_envio = ( java.util.Date ) value; + } + else if( fieldName == TrabalhadoresEcdDataAuto.DATA_RECEPCAO ) + { + data_recepcao = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.ECD_ID ) ) + { + ecd_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.ECD_OFICIAL_ID ) ) + { + ecd_oficial_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.ESTADO ) ) + { + estado = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.TRABALHADORES_ECDS_DATAS_ID ) ) + { + trabalhadores_ecds_datas_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.ENVIADO ) ) + { + enviado = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.ANALISADOR_ID ) ) + { + analisador_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.DATA_ENVIO ) ) + { + data_envio = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresEcdDataAuto.DATA_RECEPCAO ) ) + { + data_recepcao = ( java.util.Date ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getEcd_id() + { + return ecd_id; + } + + public void setEcd_id(Integer ecd_idValue ) + { + this.ecd_id = ecd_idValue; + } + + public Integer getEcd_oficial_id() + { + return ecd_oficial_id; + } + + public void setEcd_oficial_id(Integer ecd_oficial_idValue ) + { + this.ecd_oficial_id = ecd_oficial_idValue; + } + + public Integer getEstado() + { + return estado; + } + + public void setEstado(Integer estadoValue ) + { + this.estado = estadoValue; + } + + public Integer getTrabalhadores_ecds_datas_id() + { + return trabalhadores_ecds_datas_id; + } + + public void setTrabalhadores_ecds_datas_id(Integer trabalhadores_ecds_datas_idValue ) + { + this.trabalhadores_ecds_datas_id = trabalhadores_ecds_datas_idValue; + } + + public String getEnviado() + { + return enviado; + } + + public void setEnviado(String enviadoValue ) + { + this.enviado = enviadoValue; + } + + public Integer getAnalisador_id() + { + return analisador_id; + } + + public void setAnalisador_id(Integer analisador_idValue ) + { + this.analisador_id = analisador_idValue; + } + + public java.util.Date getData_envio() + { + return data_envio; + } + + public void setData_envio(java.util.Date data_envioValue ) + { + this.data_envio = data_envioValue; + } + + public java.util.Date getData_recepcao() + { + return data_recepcao; + } + + public void setData_recepcao(java.util.Date data_recepcaoValue ) + { + this.data_recepcao = data_recepcaoValue; + } + + public Class getOuterClass() + { + return TrabalhadoresEcdDataAuto.class; + } + + public TrabalhadoresEcdDataAuto getOuterClassInstance() + { + TrabalhadoresEcdDataAuto outerObj = new TrabalhadoresEcdDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdData.java new file mode 100644 index 00000000..b4b06e0c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class TrabalhadoresEcdData extends com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdDataAuto +{ + + public TrabalhadoresEcdData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdDataAuto.java new file mode 100644 index 00000000..403848cb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdDataAuto.java @@ -0,0 +1,382 @@ +/* +* TrabalhadoresEcdDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class TrabalhadoresEcdDataAuto extends JDOObject +{ + + public static final String TABLENAME = "trabalhadores_ecd"; + + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_ecd.id"; + public static final String ECD_ID = "ecd_id"; + public static final String ECD_ID_FULL = "trabalhadores_ecd.ecd_id"; + public static final String TO_ECD_ID = "to ecd_id"; + 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 String TO_ECD_OFICIAL_ID = "to ecd_oficial_id"; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "trabalhadores_ecd.estado"; + 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 String TO_TRABALHADORES_ECDS_DATAS_ID = "to trabalhadores_ecds_datas_id"; + public static final String ENVIADO = "enviado"; + public static final String ENVIADO_FULL = "trabalhadores_ecd.enviado"; + public static final String ANALISADOR_ID = "analisador_id"; + public static final String ANALISADOR_ID_FULL = "trabalhadores_ecd.analisador_id"; + public static final String TO_ANALISADOR_ID = "to analisador_id"; + public static final String DATA_ENVIO = "data_envio"; + public static final String DATA_ENVIO_FULL = "trabalhadores_ecd.data_envio"; + public static final String DATA_RECEPCAO = "data_recepcao"; + public static final String DATA_RECEPCAO_FULL = "trabalhadores_ecd.data_recepcao"; + + 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, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, ECD_ID, ECD_OFICIAL_ID, ESTADO, TRABALHADORES_ECDS_DATAS_ID, ENVIADO, + ANALISADOR_ID, DATA_ENVIO, DATA_RECEPCAO, }; + + private Map dataHash; + + public TrabalhadoresEcdDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getEcd_id() + { + return (Integer) dataHash.get(ECD_ID); + } + + public void setEcd_id(Integer ecd_idValue ) + { + dataHash.put(TO_ECD_ID, null); + dataHash.put(ECD_ID, ecd_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloData toEcd_id() + throws Exception + { + if( dataHash.get(TO_ECD_ID) == null && getEcd_id() != null ) + { + dataHash.put(TO_ECD_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloData.class, new Object[]{ getEcd_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloData) dataHash.get(TO_ECD_ID); + } + + public void setToEcd_id(com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloData ecd_idObject ) + { + if( ecd_idObject == null ) + { + dataHash.put(ECD_ID, null); + } + else + { + dataHash.put(ECD_ID, ecd_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloData.ID )); + } + dataHash.put(TO_ECD_ID, ecd_idObject); + } + + public Integer getEcd_oficial_id() + { + return (Integer) dataHash.get(ECD_OFICIAL_ID); + } + + public void setEcd_oficial_id(Integer ecd_oficial_idValue ) + { + dataHash.put(TO_ECD_OFICIAL_ID, null); + dataHash.put(ECD_OFICIAL_ID, ecd_oficial_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.EcdOficialData toEcd_oficial_id() + throws Exception + { + if( dataHash.get(TO_ECD_OFICIAL_ID) == null && getEcd_oficial_id() != null ) + { + dataHash.put(TO_ECD_OFICIAL_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EcdOficialData.class, new Object[]{ getEcd_oficial_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EcdOficialData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.EcdOficialData) dataHash.get(TO_ECD_OFICIAL_ID); + } + + public void setToEcd_oficial_id(com.evolute.siprp.server.db.data.siprp_local3.EcdOficialData ecd_oficial_idObject ) + { + if( ecd_oficial_idObject == null ) + { + dataHash.put(ECD_OFICIAL_ID, null); + } + else + { + dataHash.put(ECD_OFICIAL_ID, ecd_oficial_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EcdOficialData.ID )); + } + dataHash.put(TO_ECD_OFICIAL_ID, ecd_oficial_idObject); + } + + public Integer getEstado() + { + return (Integer) get(ESTADO); + } + + public void setEstado(Integer estadoValue ) + { + this.set(ESTADO, estadoValue ); + } + + public Integer getTrabalhadores_ecds_datas_id() + { + return (Integer) dataHash.get(TRABALHADORES_ECDS_DATAS_ID); + } + + public void setTrabalhadores_ecds_datas_id(Integer trabalhadores_ecds_datas_idValue ) + { + dataHash.put(TO_TRABALHADORES_ECDS_DATAS_ID, null); + dataHash.put(TRABALHADORES_ECDS_DATAS_ID, trabalhadores_ecds_datas_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData toTrabalhadores_ecds_datas_id() + throws Exception + { + if( dataHash.get(TO_TRABALHADORES_ECDS_DATAS_ID) == null && getTrabalhadores_ecds_datas_id() != null ) + { + dataHash.put(TO_TRABALHADORES_ECDS_DATAS_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData.class, new Object[]{ getTrabalhadores_ecds_datas_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData) dataHash.get(TO_TRABALHADORES_ECDS_DATAS_ID); + } + + public void setToTrabalhadores_ecds_datas_id(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData trabalhadores_ecds_datas_idObject ) + { + if( trabalhadores_ecds_datas_idObject == null ) + { + dataHash.put(TRABALHADORES_ECDS_DATAS_ID, null); + } + else + { + dataHash.put(TRABALHADORES_ECDS_DATAS_ID, trabalhadores_ecds_datas_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData.ID )); + } + dataHash.put(TO_TRABALHADORES_ECDS_DATAS_ID, trabalhadores_ecds_datas_idObject); + } + + public String getEnviado() + { + return (String) get(ENVIADO); + } + + public void setEnviado(String enviadoValue ) + { + this.set(ENVIADO, enviadoValue ); + } + + public Integer getAnalisador_id() + { + return (Integer) dataHash.get(ANALISADOR_ID); + } + + public void setAnalisador_id(Integer analisador_idValue ) + { + dataHash.put(TO_ANALISADOR_ID, null); + dataHash.put(ANALISADOR_ID, analisador_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData toAnalisador_id() + throws Exception + { + if( dataHash.get(TO_ANALISADOR_ID) == null && getAnalisador_id() != null ) + { + dataHash.put(TO_ANALISADOR_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.class, new Object[]{ getAnalisador_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) dataHash.get(TO_ANALISADOR_ID); + } + + public void setToAnalisador_id(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData analisador_idObject ) + { + if( analisador_idObject == null ) + { + dataHash.put(ANALISADOR_ID, null); + } + else + { + dataHash.put(ANALISADOR_ID, analisador_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + dataHash.put(TO_ANALISADOR_ID, analisador_idObject); + } + + public java.util.Date getData_envio() + { + return (java.util.Date) get(DATA_ENVIO); + } + + public void setData_envio(java.util.Date data_envioValue ) + { + this.set(DATA_ENVIO, data_envioValue ); + } + + public java.util.Date getData_recepcao() + { + return (java.util.Date) get(DATA_RECEPCAO); + } + + public void setData_recepcao(java.util.Date data_recepcaoValue ) + { + this.set(DATA_RECEPCAO, data_recepcaoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( ECD_OFICIAL_ID.equals( fieldName ) ) + { + value = getEcd_oficial_id(); + } + else if( TO_TRABALHADORES_ECDS_DATAS_ID.equals( fieldName ) ) + { + value = toTrabalhadores_ecds_datas_id(); + } + else if( ECD_ID.equals( fieldName ) ) + { + value = getEcd_id(); + } + else if( TO_ECD_ID.equals( fieldName ) ) + { + value = toEcd_id(); + } + else if( TRABALHADORES_ECDS_DATAS_ID.equals( fieldName ) ) + { + value = getTrabalhadores_ecds_datas_id(); + } + else if( TO_ECD_OFICIAL_ID.equals( fieldName ) ) + { + value = toEcd_oficial_id(); + } + else if( ANALISADOR_ID.equals( fieldName ) ) + { + value = getAnalisador_id(); + } + else if( TO_ANALISADOR_ID.equals( fieldName ) ) + { + value = toAnalisador_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( ECD_OFICIAL_ID.equals( fieldName ) ) + { + setEcd_oficial_id( (Integer) value ); + } + else if( TO_TRABALHADORES_ECDS_DATAS_ID.equals( fieldName ) ) + { + setToTrabalhadores_ecds_datas_id( (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData) value ); + } + else if( ECD_ID.equals( fieldName ) ) + { + setEcd_id( (Integer) value ); + } + else if( TO_ECD_ID.equals( fieldName ) ) + { + setToEcd_id( (com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloData) value ); + } + else if( TRABALHADORES_ECDS_DATAS_ID.equals( fieldName ) ) + { + setTrabalhadores_ecds_datas_id( (Integer) value ); + } + else if( TO_ECD_OFICIAL_ID.equals( fieldName ) ) + { + setToEcd_oficial_id( (com.evolute.siprp.server.db.data.siprp_local3.EcdOficialData) value ); + } + else if( ANALISADOR_ID.equals( fieldName ) ) + { + setAnalisador_id( (Integer) value ); + } + else if( TO_ANALISADOR_ID.equals( fieldName ) ) + { + setToAnalisador_id( (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_ECD_ID) != null ) + { + toEcd_id().save(); + dataHash.put(ECD_ID, toEcd_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrtTiposElementosProtocoloData.ID )); + } + + if( dataHash.get(TO_ECD_OFICIAL_ID) != null ) + { + toEcd_oficial_id().save(); + dataHash.put(ECD_OFICIAL_ID, toEcd_oficial_id().get( com.evolute.siprp.server.db.data.siprp_local3.EcdOficialData.ID )); + } + + if( dataHash.get(TO_TRABALHADORES_ECDS_DATAS_ID) != null ) + { + toTrabalhadores_ecds_datas_id().save(); + dataHash.put(TRABALHADORES_ECDS_DATAS_ID, toTrabalhadores_ecds_datas_id().get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData.ID )); + } + + if( dataHash.get(TO_ANALISADOR_ID) != null ) + { + toAnalisador_id().save(); + dataHash.put(ANALISADOR_ID, toAnalisador_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return TrabalhadoresEcd.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcds.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcds.java new file mode 100644 index 00000000..d101f69e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcds.java @@ -0,0 +1,183 @@ +/* +* TrabalhadoresEcds.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class TrabalhadoresEcds implements JDOInnerObject +{ + private Integer id; + private Integer trabalhador_id; + private Integer estado; + private java.util.Date data; + private Integer processo_id; + + public TrabalhadoresEcds() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == TrabalhadoresEcdsDataAuto.ID ) + { + return id; + } + else if( fieldName == TrabalhadoresEcdsDataAuto.TRABALHADOR_ID ) + { + return trabalhador_id; + } + else if( fieldName == TrabalhadoresEcdsDataAuto.ESTADO ) + { + return estado; + } + else if( fieldName == TrabalhadoresEcdsDataAuto.DATA ) + { + return data; + } + else if( fieldName == TrabalhadoresEcdsDataAuto.PROCESSO_ID ) + { + return processo_id; + } + else if( fieldName.equals( TrabalhadoresEcdsDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( TrabalhadoresEcdsDataAuto.TRABALHADOR_ID ) ) + { + return trabalhador_id; + } + else if( fieldName.equals( TrabalhadoresEcdsDataAuto.ESTADO ) ) + { + return estado; + } + else if( fieldName.equals( TrabalhadoresEcdsDataAuto.DATA ) ) + { + return data; + } + else if( fieldName.equals( TrabalhadoresEcdsDataAuto.PROCESSO_ID ) ) + { + return processo_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == TrabalhadoresEcdsDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdsDataAuto.TRABALHADOR_ID ) + { + trabalhador_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdsDataAuto.ESTADO ) + { + estado = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdsDataAuto.DATA ) + { + data = ( java.util.Date ) value; + } + else if( fieldName == TrabalhadoresEcdsDataAuto.PROCESSO_ID ) + { + processo_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDataAuto.TRABALHADOR_ID ) ) + { + trabalhador_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDataAuto.ESTADO ) ) + { + estado = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDataAuto.DATA ) ) + { + data = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDataAuto.PROCESSO_ID ) ) + { + processo_id = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getTrabalhador_id() + { + return trabalhador_id; + } + + public void setTrabalhador_id(Integer trabalhador_idValue ) + { + this.trabalhador_id = trabalhador_idValue; + } + + public Integer getEstado() + { + return estado; + } + + public void setEstado(Integer estadoValue ) + { + this.estado = estadoValue; + } + + public java.util.Date getData() + { + return data; + } + + public void setData(java.util.Date dataValue ) + { + this.data = dataValue; + } + + public Integer getProcesso_id() + { + return processo_id; + } + + public void setProcesso_id(Integer processo_idValue ) + { + this.processo_id = processo_idValue; + } + + public Class getOuterClass() + { + return TrabalhadoresEcdsDataAuto.class; + } + + public TrabalhadoresEcdsDataAuto getOuterClassInstance() + { + TrabalhadoresEcdsDataAuto outerObj = new TrabalhadoresEcdsDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsAnalise.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsAnalise.java new file mode 100644 index 00000000..fe5df3bc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsAnalise.java @@ -0,0 +1,156 @@ +/* +* TrabalhadoresEcdsAnalise.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class TrabalhadoresEcdsAnalise implements JDOInnerObject +{ + private Integer id; + private java.util.Date data; + private Integer prestador_id; + private Integer grupo_ecds_id; + + public TrabalhadoresEcdsAnalise() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == TrabalhadoresEcdsAnaliseDataAuto.ID ) + { + return id; + } + else if( fieldName == TrabalhadoresEcdsAnaliseDataAuto.DATA ) + { + return data; + } + else if( fieldName == TrabalhadoresEcdsAnaliseDataAuto.PRESTADOR_ID ) + { + return prestador_id; + } + else if( fieldName == TrabalhadoresEcdsAnaliseDataAuto.GRUPO_ECDS_ID ) + { + return grupo_ecds_id; + } + else if( fieldName.equals( TrabalhadoresEcdsAnaliseDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( TrabalhadoresEcdsAnaliseDataAuto.DATA ) ) + { + return data; + } + else if( fieldName.equals( TrabalhadoresEcdsAnaliseDataAuto.PRESTADOR_ID ) ) + { + return prestador_id; + } + else if( fieldName.equals( TrabalhadoresEcdsAnaliseDataAuto.GRUPO_ECDS_ID ) ) + { + return grupo_ecds_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == TrabalhadoresEcdsAnaliseDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdsAnaliseDataAuto.DATA ) + { + data = ( java.util.Date ) value; + } + else if( fieldName == TrabalhadoresEcdsAnaliseDataAuto.PRESTADOR_ID ) + { + prestador_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdsAnaliseDataAuto.GRUPO_ECDS_ID ) + { + grupo_ecds_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsAnaliseDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsAnaliseDataAuto.DATA ) ) + { + data = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsAnaliseDataAuto.PRESTADOR_ID ) ) + { + prestador_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsAnaliseDataAuto.GRUPO_ECDS_ID ) ) + { + grupo_ecds_id = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public java.util.Date getData() + { + return data; + } + + public void setData(java.util.Date dataValue ) + { + this.data = dataValue; + } + + public Integer getPrestador_id() + { + return prestador_id; + } + + public void setPrestador_id(Integer prestador_idValue ) + { + this.prestador_id = prestador_idValue; + } + + public Integer getGrupo_ecds_id() + { + return grupo_ecds_id; + } + + public void setGrupo_ecds_id(Integer grupo_ecds_idValue ) + { + this.grupo_ecds_id = grupo_ecds_idValue; + } + + public Class getOuterClass() + { + return TrabalhadoresEcdsAnaliseDataAuto.class; + } + + public TrabalhadoresEcdsAnaliseDataAuto getOuterClassInstance() + { + TrabalhadoresEcdsAnaliseDataAuto outerObj = new TrabalhadoresEcdsAnaliseDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsAnaliseData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsAnaliseData.java new file mode 100644 index 00000000..ab22f4a9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsAnaliseData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsAnaliseDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class TrabalhadoresEcdsAnaliseData extends com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsAnaliseDataAuto +{ + + public TrabalhadoresEcdsAnaliseData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsAnaliseDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsAnaliseDataAuto.java new file mode 100644 index 00000000..addc7ef5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsAnaliseDataAuto.java @@ -0,0 +1,225 @@ +/* +* TrabalhadoresEcdsAnaliseDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class TrabalhadoresEcdsAnaliseDataAuto extends JDOObject +{ + + public static final String TABLENAME = "trabalhadores_ecds_analise"; + + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_ecds_analise.id"; + public static final String DATA = "data"; + public static final String DATA_FULL = "trabalhadores_ecds_analise.data"; + public static final String PRESTADOR_ID = "prestador_id"; + public static final String PRESTADOR_ID_FULL = "trabalhadores_ecds_analise.prestador_id"; + public static final String TO_PRESTADOR_ID = "to prestador_id"; + 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 String TO_GRUPO_ECDS_ID = "to grupo_ecds_id"; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, PRESTADOR_ID, TO_PRESTADOR_ID, GRUPO_ECDS_ID, TO_GRUPO_ECDS_ID, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, DATA, PRESTADOR_ID, GRUPO_ECDS_ID, }; + + private Map dataHash; + + public TrabalhadoresEcdsAnaliseDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public java.util.Date getData() + { + return (java.util.Date) get(DATA); + } + + public void setData(java.util.Date dataValue ) + { + this.set(DATA, dataValue ); + } + + public Integer getPrestador_id() + { + return (Integer) dataHash.get(PRESTADOR_ID); + } + + public void setPrestador_id(Integer prestador_idValue ) + { + dataHash.put(TO_PRESTADOR_ID, null); + dataHash.put(PRESTADOR_ID, prestador_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData toPrestador_id() + throws Exception + { + if( dataHash.get(TO_PRESTADOR_ID) == null && getPrestador_id() != null ) + { + dataHash.put(TO_PRESTADOR_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.class, new Object[]{ getPrestador_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) dataHash.get(TO_PRESTADOR_ID); + } + + public void setToPrestador_id(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData prestador_idObject ) + { + if( prestador_idObject == null ) + { + dataHash.put(PRESTADOR_ID, null); + } + else + { + dataHash.put(PRESTADOR_ID, prestador_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + dataHash.put(TO_PRESTADOR_ID, prestador_idObject); + } + + public Integer getGrupo_ecds_id() + { + return (Integer) dataHash.get(GRUPO_ECDS_ID); + } + + public void setGrupo_ecds_id(Integer grupo_ecds_idValue ) + { + dataHash.put(TO_GRUPO_ECDS_ID, null); + dataHash.put(GRUPO_ECDS_ID, grupo_ecds_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData toGrupo_ecds_id() + throws Exception + { + if( dataHash.get(TO_GRUPO_ECDS_ID) == null && getGrupo_ecds_id() != null ) + { + dataHash.put(TO_GRUPO_ECDS_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData.class, new Object[]{ getGrupo_ecds_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData) dataHash.get(TO_GRUPO_ECDS_ID); + } + + public void setToGrupo_ecds_id(com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData grupo_ecds_idObject ) + { + if( grupo_ecds_idObject == null ) + { + dataHash.put(GRUPO_ECDS_ID, null); + } + else + { + dataHash.put(GRUPO_ECDS_ID, grupo_ecds_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData.ID )); + } + dataHash.put(TO_GRUPO_ECDS_ID, grupo_ecds_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_PRESTADOR_ID.equals( fieldName ) ) + { + value = toPrestador_id(); + } + else if( TO_GRUPO_ECDS_ID.equals( fieldName ) ) + { + value = toGrupo_ecds_id(); + } + else if( GRUPO_ECDS_ID.equals( fieldName ) ) + { + value = getGrupo_ecds_id(); + } + else if( PRESTADOR_ID.equals( fieldName ) ) + { + value = getPrestador_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_PRESTADOR_ID.equals( fieldName ) ) + { + setToPrestador_id( (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) value ); + } + else if( TO_GRUPO_ECDS_ID.equals( fieldName ) ) + { + setToGrupo_ecds_id( (com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData) value ); + } + else if( GRUPO_ECDS_ID.equals( fieldName ) ) + { + setGrupo_ecds_id( (Integer) value ); + } + else if( PRESTADOR_ID.equals( fieldName ) ) + { + setPrestador_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_PRESTADOR_ID) != null ) + { + toPrestador_id().save(); + dataHash.put(PRESTADOR_ID, toPrestador_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + + if( dataHash.get(TO_GRUPO_ECDS_ID) != null ) + { + toGrupo_ecds_id().save(); + dataHash.put(GRUPO_ECDS_ID, toGrupo_ecds_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrtGruposProtocoloData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return TrabalhadoresEcdsAnalise.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsData.java new file mode 100644 index 00000000..49ff0612 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class TrabalhadoresEcdsData extends com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDataAuto +{ + + public TrabalhadoresEcdsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDataAuto.java new file mode 100644 index 00000000..2c247d98 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDataAuto.java @@ -0,0 +1,237 @@ +/* +* TrabalhadoresEcdsDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class TrabalhadoresEcdsDataAuto extends JDOObject +{ + + public static final String TABLENAME = "trabalhadores_ecds"; + + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_ecds.id"; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "trabalhadores_ecds.trabalhador_id"; + public static final String TO_TRABALHADOR_ID = "to trabalhador_id"; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "trabalhadores_ecds.estado"; + public static final String DATA = "data"; + public static final String DATA_FULL = "trabalhadores_ecds.data"; + public static final String PROCESSO_ID = "processo_id"; + public static final String PROCESSO_ID_FULL = "trabalhadores_ecds.processo_id"; + public static final String TO_PROCESSO_ID = "to processo_id"; + + public static final String FIELD_NAMES[] = new String[]{ + TRABALHADOR_ID, TO_TRABALHADOR_ID, ESTADO, DATA, PROCESSO_ID, TO_PROCESSO_ID, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, TRABALHADOR_ID, ESTADO, DATA, PROCESSO_ID, }; + + private Map dataHash; + + public TrabalhadoresEcdsDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getTrabalhador_id() + { + return (Integer) dataHash.get(TRABALHADOR_ID); + } + + public void setTrabalhador_id(Integer trabalhador_idValue ) + { + dataHash.put(TO_TRABALHADOR_ID, null); + dataHash.put(TRABALHADOR_ID, trabalhador_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData toTrabalhador_id() + throws Exception + { + if( dataHash.get(TO_TRABALHADOR_ID) == null && getTrabalhador_id() != null ) + { + dataHash.put(TO_TRABALHADOR_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData.class, new Object[]{ getTrabalhador_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData) dataHash.get(TO_TRABALHADOR_ID); + } + + public void setToTrabalhador_id(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData trabalhador_idObject ) + { + if( trabalhador_idObject == null ) + { + dataHash.put(TRABALHADOR_ID, null); + } + else + { + dataHash.put(TRABALHADOR_ID, trabalhador_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData.ID )); + } + dataHash.put(TO_TRABALHADOR_ID, trabalhador_idObject); + } + + public Integer getEstado() + { + return (Integer) get(ESTADO); + } + + public void setEstado(Integer estadoValue ) + { + this.set(ESTADO, estadoValue ); + } + + public java.util.Date getData() + { + return (java.util.Date) get(DATA); + } + + public void setData(java.util.Date dataValue ) + { + this.set(DATA, dataValue ); + } + + public Integer getProcesso_id() + { + return (Integer) dataHash.get(PROCESSO_ID); + } + + public void setProcesso_id(Integer processo_idValue ) + { + dataHash.put(TO_PROCESSO_ID, null); + dataHash.put(PROCESSO_ID, processo_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData toProcesso_id() + throws Exception + { + if( dataHash.get(TO_PROCESSO_ID) == null && getProcesso_id() != null ) + { + dataHash.put(TO_PROCESSO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData.class, new Object[]{ getProcesso_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData) dataHash.get(TO_PROCESSO_ID); + } + + public void setToProcesso_id(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData processo_idObject ) + { + if( processo_idObject == null ) + { + dataHash.put(PROCESSO_ID, null); + } + else + { + dataHash.put(PROCESSO_ID, processo_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData.ID )); + } + dataHash.put(TO_PROCESSO_ID, processo_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( PROCESSO_ID.equals( fieldName ) ) + { + value = getProcesso_id(); + } + else if( TO_TRABALHADOR_ID.equals( fieldName ) ) + { + value = toTrabalhador_id(); + } + else if( TO_PROCESSO_ID.equals( fieldName ) ) + { + value = toProcesso_id(); + } + else if( TRABALHADOR_ID.equals( fieldName ) ) + { + value = getTrabalhador_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( PROCESSO_ID.equals( fieldName ) ) + { + setProcesso_id( (Integer) value ); + } + else if( TO_TRABALHADOR_ID.equals( fieldName ) ) + { + setToTrabalhador_id( (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData) value ); + } + else if( TO_PROCESSO_ID.equals( fieldName ) ) + { + setToProcesso_id( (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData) value ); + } + else if( TRABALHADOR_ID.equals( fieldName ) ) + { + setTrabalhador_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_TRABALHADOR_ID) != null ) + { + toTrabalhador_id().save(); + dataHash.put(TRABALHADOR_ID, toTrabalhador_id().get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData.ID )); + } + + if( dataHash.get(TO_PROCESSO_ID) != null ) + { + toProcesso_id().save(); + dataHash.put(PROCESSO_ID, toProcesso_id().get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return TrabalhadoresEcds.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatas.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatas.java new file mode 100644 index 00000000..b1da8372 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatas.java @@ -0,0 +1,264 @@ +/* +* TrabalhadoresEcdsDatas.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class TrabalhadoresEcdsDatas implements JDOInnerObject +{ + private Integer id; + private Integer trabalhadores_ecds_id; + private java.util.Date data; + private Integer estado; + private Integer prestador_id; + private Integer analisador_id; + private java.util.Date data_envio; + private java.util.Date data_recepcao; + + public TrabalhadoresEcdsDatas() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == TrabalhadoresEcdsDatasDataAuto.ID ) + { + return id; + } + else if( fieldName == TrabalhadoresEcdsDatasDataAuto.TRABALHADORES_ECDS_ID ) + { + return trabalhadores_ecds_id; + } + else if( fieldName == TrabalhadoresEcdsDatasDataAuto.DATA ) + { + return data; + } + else if( fieldName == TrabalhadoresEcdsDatasDataAuto.ESTADO ) + { + return estado; + } + else if( fieldName == TrabalhadoresEcdsDatasDataAuto.PRESTADOR_ID ) + { + return prestador_id; + } + else if( fieldName == TrabalhadoresEcdsDatasDataAuto.ANALISADOR_ID ) + { + return analisador_id; + } + else if( fieldName == TrabalhadoresEcdsDatasDataAuto.DATA_ENVIO ) + { + return data_envio; + } + else if( fieldName == TrabalhadoresEcdsDatasDataAuto.DATA_RECEPCAO ) + { + return data_recepcao; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasDataAuto.TRABALHADORES_ECDS_ID ) ) + { + return trabalhadores_ecds_id; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasDataAuto.DATA ) ) + { + return data; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasDataAuto.ESTADO ) ) + { + return estado; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasDataAuto.PRESTADOR_ID ) ) + { + return prestador_id; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasDataAuto.ANALISADOR_ID ) ) + { + return analisador_id; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasDataAuto.DATA_ENVIO ) ) + { + return data_envio; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasDataAuto.DATA_RECEPCAO ) ) + { + return data_recepcao; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == TrabalhadoresEcdsDatasDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdsDatasDataAuto.TRABALHADORES_ECDS_ID ) + { + trabalhadores_ecds_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdsDatasDataAuto.DATA ) + { + data = ( java.util.Date ) value; + } + else if( fieldName == TrabalhadoresEcdsDatasDataAuto.ESTADO ) + { + estado = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdsDatasDataAuto.PRESTADOR_ID ) + { + prestador_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdsDatasDataAuto.ANALISADOR_ID ) + { + analisador_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdsDatasDataAuto.DATA_ENVIO ) + { + data_envio = ( java.util.Date ) value; + } + else if( fieldName == TrabalhadoresEcdsDatasDataAuto.DATA_RECEPCAO ) + { + data_recepcao = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasDataAuto.TRABALHADORES_ECDS_ID ) ) + { + trabalhadores_ecds_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasDataAuto.DATA ) ) + { + data = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasDataAuto.ESTADO ) ) + { + estado = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasDataAuto.PRESTADOR_ID ) ) + { + prestador_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasDataAuto.ANALISADOR_ID ) ) + { + analisador_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasDataAuto.DATA_ENVIO ) ) + { + data_envio = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasDataAuto.DATA_RECEPCAO ) ) + { + data_recepcao = ( java.util.Date ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getTrabalhadores_ecds_id() + { + return trabalhadores_ecds_id; + } + + public void setTrabalhadores_ecds_id(Integer trabalhadores_ecds_idValue ) + { + this.trabalhadores_ecds_id = trabalhadores_ecds_idValue; + } + + public java.util.Date getData() + { + return data; + } + + public void setData(java.util.Date dataValue ) + { + this.data = dataValue; + } + + public Integer getEstado() + { + return estado; + } + + public void setEstado(Integer estadoValue ) + { + this.estado = estadoValue; + } + + public Integer getPrestador_id() + { + return prestador_id; + } + + public void setPrestador_id(Integer prestador_idValue ) + { + this.prestador_id = prestador_idValue; + } + + public Integer getAnalisador_id() + { + return analisador_id; + } + + public void setAnalisador_id(Integer analisador_idValue ) + { + this.analisador_id = analisador_idValue; + } + + public java.util.Date getData_envio() + { + return data_envio; + } + + public void setData_envio(java.util.Date data_envioValue ) + { + this.data_envio = data_envioValue; + } + + public java.util.Date getData_recepcao() + { + return data_recepcao; + } + + public void setData_recepcao(java.util.Date data_recepcaoValue ) + { + this.data_recepcao = data_recepcaoValue; + } + + public Class getOuterClass() + { + return TrabalhadoresEcdsDatasDataAuto.class; + } + + public TrabalhadoresEcdsDatasDataAuto getOuterClassInstance() + { + TrabalhadoresEcdsDatasDataAuto outerObj = new TrabalhadoresEcdsDatasDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasData.java new file mode 100644 index 00000000..abb4cb1a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsDatasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class TrabalhadoresEcdsDatasData extends com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasDataAuto +{ + + public TrabalhadoresEcdsDatasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasDataAuto.java new file mode 100644 index 00000000..ed256936 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasDataAuto.java @@ -0,0 +1,322 @@ +/* +* TrabalhadoresEcdsDatasDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class TrabalhadoresEcdsDatasDataAuto extends JDOObject +{ + + public static final String TABLENAME = "trabalhadores_ecds_datas"; + + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_ecds_datas.id"; + 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 String TO_TRABALHADORES_ECDS_ID = "to trabalhadores_ecds_id"; + public static final String DATA = "data"; + public static final String DATA_FULL = "trabalhadores_ecds_datas.data"; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "trabalhadores_ecds_datas.estado"; + public static final String PRESTADOR_ID = "prestador_id"; + public static final String PRESTADOR_ID_FULL = "trabalhadores_ecds_datas.prestador_id"; + public static final String TO_PRESTADOR_ID = "to prestador_id"; + public static final String ANALISADOR_ID = "analisador_id"; + public static final String ANALISADOR_ID_FULL = "trabalhadores_ecds_datas.analisador_id"; + public static final String TO_ANALISADOR_ID = "to analisador_id"; + public static final String DATA_ENVIO = "data_envio"; + public static final String DATA_ENVIO_FULL = "trabalhadores_ecds_datas.data_envio"; + public static final String DATA_RECEPCAO = "data_recepcao"; + public static final String DATA_RECEPCAO_FULL = "trabalhadores_ecds_datas.data_recepcao"; + + 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, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, TRABALHADORES_ECDS_ID, DATA, ESTADO, PRESTADOR_ID, ANALISADOR_ID, DATA_ENVIO, + DATA_RECEPCAO, }; + + private Map dataHash; + + public TrabalhadoresEcdsDatasDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getTrabalhadores_ecds_id() + { + return (Integer) dataHash.get(TRABALHADORES_ECDS_ID); + } + + public void setTrabalhadores_ecds_id(Integer trabalhadores_ecds_idValue ) + { + dataHash.put(TO_TRABALHADORES_ECDS_ID, null); + dataHash.put(TRABALHADORES_ECDS_ID, trabalhadores_ecds_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsData toTrabalhadores_ecds_id() + throws Exception + { + if( dataHash.get(TO_TRABALHADORES_ECDS_ID) == null && getTrabalhadores_ecds_id() != null ) + { + dataHash.put(TO_TRABALHADORES_ECDS_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsData.class, new Object[]{ getTrabalhadores_ecds_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsData) dataHash.get(TO_TRABALHADORES_ECDS_ID); + } + + public void setToTrabalhadores_ecds_id(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsData trabalhadores_ecds_idObject ) + { + if( trabalhadores_ecds_idObject == null ) + { + dataHash.put(TRABALHADORES_ECDS_ID, null); + } + else + { + dataHash.put(TRABALHADORES_ECDS_ID, trabalhadores_ecds_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsData.ID )); + } + dataHash.put(TO_TRABALHADORES_ECDS_ID, trabalhadores_ecds_idObject); + } + + public java.util.Date getData() + { + return (java.util.Date) get(DATA); + } + + public void setData(java.util.Date dataValue ) + { + this.set(DATA, dataValue ); + } + + public Integer getEstado() + { + return (Integer) get(ESTADO); + } + + public void setEstado(Integer estadoValue ) + { + this.set(ESTADO, estadoValue ); + } + + public Integer getPrestador_id() + { + return (Integer) dataHash.get(PRESTADOR_ID); + } + + public void setPrestador_id(Integer prestador_idValue ) + { + dataHash.put(TO_PRESTADOR_ID, null); + dataHash.put(PRESTADOR_ID, prestador_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData toPrestador_id() + throws Exception + { + if( dataHash.get(TO_PRESTADOR_ID) == null && getPrestador_id() != null ) + { + dataHash.put(TO_PRESTADOR_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.class, new Object[]{ getPrestador_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) dataHash.get(TO_PRESTADOR_ID); + } + + public void setToPrestador_id(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData prestador_idObject ) + { + if( prestador_idObject == null ) + { + dataHash.put(PRESTADOR_ID, null); + } + else + { + dataHash.put(PRESTADOR_ID, prestador_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + dataHash.put(TO_PRESTADOR_ID, prestador_idObject); + } + + public Integer getAnalisador_id() + { + return (Integer) dataHash.get(ANALISADOR_ID); + } + + public void setAnalisador_id(Integer analisador_idValue ) + { + dataHash.put(TO_ANALISADOR_ID, null); + dataHash.put(ANALISADOR_ID, analisador_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData toAnalisador_id() + throws Exception + { + if( dataHash.get(TO_ANALISADOR_ID) == null && getAnalisador_id() != null ) + { + dataHash.put(TO_ANALISADOR_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.class, new Object[]{ getAnalisador_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) dataHash.get(TO_ANALISADOR_ID); + } + + public void setToAnalisador_id(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData analisador_idObject ) + { + if( analisador_idObject == null ) + { + dataHash.put(ANALISADOR_ID, null); + } + else + { + dataHash.put(ANALISADOR_ID, analisador_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + dataHash.put(TO_ANALISADOR_ID, analisador_idObject); + } + + public java.util.Date getData_envio() + { + return (java.util.Date) get(DATA_ENVIO); + } + + public void setData_envio(java.util.Date data_envioValue ) + { + this.set(DATA_ENVIO, data_envioValue ); + } + + public java.util.Date getData_recepcao() + { + return (java.util.Date) get(DATA_RECEPCAO); + } + + public void setData_recepcao(java.util.Date data_recepcaoValue ) + { + this.set(DATA_RECEPCAO, data_recepcaoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_PRESTADOR_ID.equals( fieldName ) ) + { + value = toPrestador_id(); + } + else if( TO_TRABALHADORES_ECDS_ID.equals( fieldName ) ) + { + value = toTrabalhadores_ecds_id(); + } + else if( PRESTADOR_ID.equals( fieldName ) ) + { + value = getPrestador_id(); + } + else if( TRABALHADORES_ECDS_ID.equals( fieldName ) ) + { + value = getTrabalhadores_ecds_id(); + } + else if( ANALISADOR_ID.equals( fieldName ) ) + { + value = getAnalisador_id(); + } + else if( TO_ANALISADOR_ID.equals( fieldName ) ) + { + value = toAnalisador_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_PRESTADOR_ID.equals( fieldName ) ) + { + setToPrestador_id( (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) value ); + } + else if( TO_TRABALHADORES_ECDS_ID.equals( fieldName ) ) + { + setToTrabalhadores_ecds_id( (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsData) value ); + } + else if( PRESTADOR_ID.equals( fieldName ) ) + { + setPrestador_id( (Integer) value ); + } + else if( TRABALHADORES_ECDS_ID.equals( fieldName ) ) + { + setTrabalhadores_ecds_id( (Integer) value ); + } + else if( ANALISADOR_ID.equals( fieldName ) ) + { + setAnalisador_id( (Integer) value ); + } + else if( TO_ANALISADOR_ID.equals( fieldName ) ) + { + setToAnalisador_id( (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_TRABALHADORES_ECDS_ID) != null ) + { + toTrabalhadores_ecds_id().save(); + dataHash.put(TRABALHADORES_ECDS_ID, toTrabalhadores_ecds_id().get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsData.ID )); + } + + if( dataHash.get(TO_PRESTADOR_ID) != null ) + { + toPrestador_id().save(); + dataHash.put(PRESTADOR_ID, toPrestador_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + + if( dataHash.get(TO_ANALISADOR_ID) != null ) + { + toAnalisador_id().save(); + dataHash.put(ANALISADOR_ID, toAnalisador_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return TrabalhadoresEcdsDatas.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasEmails.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasEmails.java new file mode 100644 index 00000000..7bb286bf --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasEmails.java @@ -0,0 +1,210 @@ +/* +* TrabalhadoresEcdsDatasEmails.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class TrabalhadoresEcdsDatasEmails implements JDOInnerObject +{ + private Integer id; + private Integer trabalhadores_ecds_datas_id; + private String destination; + private java.util.Date data; + private String subject; + private String body; + + public TrabalhadoresEcdsDatasEmails() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == TrabalhadoresEcdsDatasEmailsDataAuto.ID ) + { + return id; + } + else if( fieldName == TrabalhadoresEcdsDatasEmailsDataAuto.TRABALHADORES_ECDS_DATAS_ID ) + { + return trabalhadores_ecds_datas_id; + } + else if( fieldName == TrabalhadoresEcdsDatasEmailsDataAuto.DESTINATION ) + { + return destination; + } + else if( fieldName == TrabalhadoresEcdsDatasEmailsDataAuto.DATA ) + { + return data; + } + else if( fieldName == TrabalhadoresEcdsDatasEmailsDataAuto.SUBJECT ) + { + return subject; + } + else if( fieldName == TrabalhadoresEcdsDatasEmailsDataAuto.BODY ) + { + return body; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsDataAuto.TRABALHADORES_ECDS_DATAS_ID ) ) + { + return trabalhadores_ecds_datas_id; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsDataAuto.DESTINATION ) ) + { + return destination; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsDataAuto.DATA ) ) + { + return data; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsDataAuto.SUBJECT ) ) + { + return subject; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsDataAuto.BODY ) ) + { + return body; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == TrabalhadoresEcdsDatasEmailsDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdsDatasEmailsDataAuto.TRABALHADORES_ECDS_DATAS_ID ) + { + trabalhadores_ecds_datas_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdsDatasEmailsDataAuto.DESTINATION ) + { + destination = ( String ) value; + } + else if( fieldName == TrabalhadoresEcdsDatasEmailsDataAuto.DATA ) + { + data = ( java.util.Date ) value; + } + else if( fieldName == TrabalhadoresEcdsDatasEmailsDataAuto.SUBJECT ) + { + subject = ( String ) value; + } + else if( fieldName == TrabalhadoresEcdsDatasEmailsDataAuto.BODY ) + { + body = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsDataAuto.TRABALHADORES_ECDS_DATAS_ID ) ) + { + trabalhadores_ecds_datas_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsDataAuto.DESTINATION ) ) + { + destination = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsDataAuto.DATA ) ) + { + data = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsDataAuto.SUBJECT ) ) + { + subject = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsDataAuto.BODY ) ) + { + body = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getTrabalhadores_ecds_datas_id() + { + return trabalhadores_ecds_datas_id; + } + + public void setTrabalhadores_ecds_datas_id(Integer trabalhadores_ecds_datas_idValue ) + { + this.trabalhadores_ecds_datas_id = trabalhadores_ecds_datas_idValue; + } + + public String getDestination() + { + return destination; + } + + public void setDestination(String destinationValue ) + { + this.destination = destinationValue; + } + + public java.util.Date getData() + { + return data; + } + + public void setData(java.util.Date dataValue ) + { + this.data = dataValue; + } + + public String getSubject() + { + return subject; + } + + public void setSubject(String subjectValue ) + { + this.subject = subjectValue; + } + + public String getBody() + { + return body; + } + + public void setBody(String bodyValue ) + { + this.body = bodyValue; + } + + public Class getOuterClass() + { + return TrabalhadoresEcdsDatasEmailsDataAuto.class; + } + + public TrabalhadoresEcdsDatasEmailsDataAuto getOuterClassInstance() + { + TrabalhadoresEcdsDatasEmailsDataAuto outerObj = new TrabalhadoresEcdsDatasEmailsDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasEmailsData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasEmailsData.java new file mode 100644 index 00000000..0e10bfc0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasEmailsData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsDatasEmailsDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class TrabalhadoresEcdsDatasEmailsData extends com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasEmailsDataAuto +{ + + public TrabalhadoresEcdsDatasEmailsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasEmailsDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasEmailsDataAuto.java new file mode 100644 index 00000000..13e870b7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasEmailsDataAuto.java @@ -0,0 +1,203 @@ +/* +* TrabalhadoresEcdsDatasEmailsDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class TrabalhadoresEcdsDatasEmailsDataAuto extends JDOObject +{ + + public static final String TABLENAME = "trabalhadores_ecds_datas_emails"; + + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_ecds_datas_emails.id"; + 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 String TO_TRABALHADORES_ECDS_DATAS_ID = "to trabalhadores_ecds_datas_id"; + public static final String DESTINATION = "destination"; + public static final String DESTINATION_FULL = "trabalhadores_ecds_datas_emails.destination"; + public static final String DATA = "data"; + public static final String DATA_FULL = "trabalhadores_ecds_datas_emails.data"; + public static final String SUBJECT = "subject"; + public static final String SUBJECT_FULL = "trabalhadores_ecds_datas_emails.subject"; + public static final String BODY = "body"; + public static final String BODY_FULL = "trabalhadores_ecds_datas_emails.body"; + + public static final String FIELD_NAMES[] = new String[]{ + TRABALHADORES_ECDS_DATAS_ID, TO_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 Map dataHash; + + public TrabalhadoresEcdsDatasEmailsDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getTrabalhadores_ecds_datas_id() + { + return (Integer) dataHash.get(TRABALHADORES_ECDS_DATAS_ID); + } + + public void setTrabalhadores_ecds_datas_id(Integer trabalhadores_ecds_datas_idValue ) + { + dataHash.put(TO_TRABALHADORES_ECDS_DATAS_ID, null); + dataHash.put(TRABALHADORES_ECDS_DATAS_ID, trabalhadores_ecds_datas_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData toTrabalhadores_ecds_datas_id() + throws Exception + { + if( dataHash.get(TO_TRABALHADORES_ECDS_DATAS_ID) == null && getTrabalhadores_ecds_datas_id() != null ) + { + dataHash.put(TO_TRABALHADORES_ECDS_DATAS_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData.class, new Object[]{ getTrabalhadores_ecds_datas_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData) dataHash.get(TO_TRABALHADORES_ECDS_DATAS_ID); + } + + public void setToTrabalhadores_ecds_datas_id(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData trabalhadores_ecds_datas_idObject ) + { + if( trabalhadores_ecds_datas_idObject == null ) + { + dataHash.put(TRABALHADORES_ECDS_DATAS_ID, null); + } + else + { + dataHash.put(TRABALHADORES_ECDS_DATAS_ID, trabalhadores_ecds_datas_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData.ID )); + } + dataHash.put(TO_TRABALHADORES_ECDS_DATAS_ID, trabalhadores_ecds_datas_idObject); + } + + public String getDestination() + { + return (String) get(DESTINATION); + } + + public void setDestination(String destinationValue ) + { + this.set(DESTINATION, destinationValue ); + } + + public java.util.Date getData() + { + return (java.util.Date) get(DATA); + } + + public void setData(java.util.Date dataValue ) + { + this.set(DATA, dataValue ); + } + + public String getSubject() + { + return (String) get(SUBJECT); + } + + public void setSubject(String subjectValue ) + { + this.set(SUBJECT, subjectValue ); + } + + public String getBody() + { + return (String) get(BODY); + } + + public void setBody(String bodyValue ) + { + this.set(BODY, bodyValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_TRABALHADORES_ECDS_DATAS_ID.equals( fieldName ) ) + { + value = toTrabalhadores_ecds_datas_id(); + } + else if( TRABALHADORES_ECDS_DATAS_ID.equals( fieldName ) ) + { + value = getTrabalhadores_ecds_datas_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_TRABALHADORES_ECDS_DATAS_ID.equals( fieldName ) ) + { + setToTrabalhadores_ecds_datas_id( (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData) value ); + } + else if( TRABALHADORES_ECDS_DATAS_ID.equals( fieldName ) ) + { + setTrabalhadores_ecds_datas_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_TRABALHADORES_ECDS_DATAS_ID) != null ) + { + toTrabalhadores_ecds_datas_id().save(); + dataHash.put(TRABALHADORES_ECDS_DATAS_ID, toTrabalhadores_ecds_datas_id().get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return TrabalhadoresEcdsDatasEmails.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasObservacoes.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasObservacoes.java new file mode 100644 index 00000000..30c7f236 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasObservacoes.java @@ -0,0 +1,129 @@ +/* +* TrabalhadoresEcdsDatasObservacoes.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class TrabalhadoresEcdsDatasObservacoes implements JDOInnerObject +{ + private Integer id; + private Integer trabalhadores_ecds_datas_id; + private String observacao; + + public TrabalhadoresEcdsDatasObservacoes() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == TrabalhadoresEcdsDatasObservacoesDataAuto.ID ) + { + return id; + } + else if( fieldName == TrabalhadoresEcdsDatasObservacoesDataAuto.TRABALHADORES_ECDS_DATAS_ID ) + { + return trabalhadores_ecds_datas_id; + } + else if( fieldName == TrabalhadoresEcdsDatasObservacoesDataAuto.OBSERVACAO ) + { + return observacao; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasObservacoesDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasObservacoesDataAuto.TRABALHADORES_ECDS_DATAS_ID ) ) + { + return trabalhadores_ecds_datas_id; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasObservacoesDataAuto.OBSERVACAO ) ) + { + return observacao; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == TrabalhadoresEcdsDatasObservacoesDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdsDatasObservacoesDataAuto.TRABALHADORES_ECDS_DATAS_ID ) + { + trabalhadores_ecds_datas_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresEcdsDatasObservacoesDataAuto.OBSERVACAO ) + { + observacao = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasObservacoesDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasObservacoesDataAuto.TRABALHADORES_ECDS_DATAS_ID ) ) + { + trabalhadores_ecds_datas_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresEcdsDatasObservacoesDataAuto.OBSERVACAO ) ) + { + observacao = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getTrabalhadores_ecds_datas_id() + { + return trabalhadores_ecds_datas_id; + } + + public void setTrabalhadores_ecds_datas_id(Integer trabalhadores_ecds_datas_idValue ) + { + this.trabalhadores_ecds_datas_id = trabalhadores_ecds_datas_idValue; + } + + public String getObservacao() + { + return observacao; + } + + public void setObservacao(String observacaoValue ) + { + this.observacao = observacaoValue; + } + + public Class getOuterClass() + { + return TrabalhadoresEcdsDatasObservacoesDataAuto.class; + } + + public TrabalhadoresEcdsDatasObservacoesDataAuto getOuterClassInstance() + { + TrabalhadoresEcdsDatasObservacoesDataAuto outerObj = new TrabalhadoresEcdsDatasObservacoesDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasObservacoesData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasObservacoesData.java new file mode 100644 index 00000000..46c9dbf2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasObservacoesData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsDatasObservacoesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class TrabalhadoresEcdsDatasObservacoesData extends com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasObservacoesDataAuto +{ + + public TrabalhadoresEcdsDatasObservacoesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasObservacoesDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasObservacoesDataAuto.java new file mode 100644 index 00000000..2ec2503e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresEcdsDatasObservacoesDataAuto.java @@ -0,0 +1,166 @@ +/* +* TrabalhadoresEcdsDatasObservacoesDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class TrabalhadoresEcdsDatasObservacoesDataAuto extends JDOObject +{ + + public static final String TABLENAME = "trabalhadores_ecds_datas_observacoes"; + + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_ecds_datas_observacoes.id"; + 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 String TO_TRABALHADORES_ECDS_DATAS_ID = "to trabalhadores_ecds_datas_id"; + public static final String OBSERVACAO = "observacao"; + public static final String OBSERVACAO_FULL = "trabalhadores_ecds_datas_observacoes.observacao"; + + public static final String FIELD_NAMES[] = new String[]{ + TRABALHADORES_ECDS_DATAS_ID, TO_TRABALHADORES_ECDS_DATAS_ID, OBSERVACAO, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, TRABALHADORES_ECDS_DATAS_ID, OBSERVACAO, }; + + private Map dataHash; + + public TrabalhadoresEcdsDatasObservacoesDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getTrabalhadores_ecds_datas_id() + { + return (Integer) dataHash.get(TRABALHADORES_ECDS_DATAS_ID); + } + + public void setTrabalhadores_ecds_datas_id(Integer trabalhadores_ecds_datas_idValue ) + { + dataHash.put(TO_TRABALHADORES_ECDS_DATAS_ID, null); + dataHash.put(TRABALHADORES_ECDS_DATAS_ID, trabalhadores_ecds_datas_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData toTrabalhadores_ecds_datas_id() + throws Exception + { + if( dataHash.get(TO_TRABALHADORES_ECDS_DATAS_ID) == null && getTrabalhadores_ecds_datas_id() != null ) + { + dataHash.put(TO_TRABALHADORES_ECDS_DATAS_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData.class, new Object[]{ getTrabalhadores_ecds_datas_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData) dataHash.get(TO_TRABALHADORES_ECDS_DATAS_ID); + } + + public void setToTrabalhadores_ecds_datas_id(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData trabalhadores_ecds_datas_idObject ) + { + if( trabalhadores_ecds_datas_idObject == null ) + { + dataHash.put(TRABALHADORES_ECDS_DATAS_ID, null); + } + else + { + dataHash.put(TRABALHADORES_ECDS_DATAS_ID, trabalhadores_ecds_datas_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData.ID )); + } + dataHash.put(TO_TRABALHADORES_ECDS_DATAS_ID, trabalhadores_ecds_datas_idObject); + } + + public String getObservacao() + { + return (String) get(OBSERVACAO); + } + + public void setObservacao(String observacaoValue ) + { + this.set(OBSERVACAO, observacaoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_TRABALHADORES_ECDS_DATAS_ID.equals( fieldName ) ) + { + value = toTrabalhadores_ecds_datas_id(); + } + else if( TRABALHADORES_ECDS_DATAS_ID.equals( fieldName ) ) + { + value = getTrabalhadores_ecds_datas_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_TRABALHADORES_ECDS_DATAS_ID.equals( fieldName ) ) + { + setToTrabalhadores_ecds_datas_id( (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData) value ); + } + else if( TRABALHADORES_ECDS_DATAS_ID.equals( fieldName ) ) + { + setTrabalhadores_ecds_datas_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_TRABALHADORES_ECDS_DATAS_ID) != null ) + { + toTrabalhadores_ecds_datas_id().save(); + dataHash.put(TRABALHADORES_ECDS_DATAS_ID, toTrabalhadores_ecds_datas_id().get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresEcdsDatasData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return TrabalhadoresEcdsDatasObservacoes.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresFichasAptidao.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresFichasAptidao.java new file mode 100644 index 00000000..d29befeb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresFichasAptidao.java @@ -0,0 +1,129 @@ +/* +* TrabalhadoresFichasAptidao.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class TrabalhadoresFichasAptidao implements JDOInnerObject +{ + private Integer id; + private Integer processo_id; + private Integer exame_id; + + public TrabalhadoresFichasAptidao() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == TrabalhadoresFichasAptidaoDataAuto.ID ) + { + return id; + } + else if( fieldName == TrabalhadoresFichasAptidaoDataAuto.PROCESSO_ID ) + { + return processo_id; + } + else if( fieldName == TrabalhadoresFichasAptidaoDataAuto.EXAME_ID ) + { + return exame_id; + } + else if( fieldName.equals( TrabalhadoresFichasAptidaoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( TrabalhadoresFichasAptidaoDataAuto.PROCESSO_ID ) ) + { + return processo_id; + } + else if( fieldName.equals( TrabalhadoresFichasAptidaoDataAuto.EXAME_ID ) ) + { + return exame_id; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == TrabalhadoresFichasAptidaoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresFichasAptidaoDataAuto.PROCESSO_ID ) + { + processo_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresFichasAptidaoDataAuto.EXAME_ID ) + { + exame_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresFichasAptidaoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresFichasAptidaoDataAuto.PROCESSO_ID ) ) + { + processo_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresFichasAptidaoDataAuto.EXAME_ID ) ) + { + exame_id = ( Integer ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getProcesso_id() + { + return processo_id; + } + + public void setProcesso_id(Integer processo_idValue ) + { + this.processo_id = processo_idValue; + } + + public Integer getExame_id() + { + return exame_id; + } + + public void setExame_id(Integer exame_idValue ) + { + this.exame_id = exame_idValue; + } + + public Class getOuterClass() + { + return TrabalhadoresFichasAptidaoDataAuto.class; + } + + public TrabalhadoresFichasAptidaoDataAuto getOuterClassInstance() + { + TrabalhadoresFichasAptidaoDataAuto outerObj = new TrabalhadoresFichasAptidaoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresFichasAptidaoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresFichasAptidaoData.java new file mode 100644 index 00000000..b6e38bc3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresFichasAptidaoData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresFichasAptidaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class TrabalhadoresFichasAptidaoData extends com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresFichasAptidaoDataAuto +{ + + public TrabalhadoresFichasAptidaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresFichasAptidaoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresFichasAptidaoDataAuto.java new file mode 100644 index 00000000..154bcaa3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresFichasAptidaoDataAuto.java @@ -0,0 +1,213 @@ +/* +* TrabalhadoresFichasAptidaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class TrabalhadoresFichasAptidaoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "trabalhadores_fichas_aptidao"; + + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_fichas_aptidao.id"; + public static final String PROCESSO_ID = "processo_id"; + public static final String PROCESSO_ID_FULL = "trabalhadores_fichas_aptidao.processo_id"; + public static final String TO_PROCESSO_ID = "to processo_id"; + public static final String EXAME_ID = "exame_id"; + public static final String EXAME_ID_FULL = "trabalhadores_fichas_aptidao.exame_id"; + public static final String TO_EXAME_ID = "to exame_id"; + + public static final String FIELD_NAMES[] = new String[]{ + PROCESSO_ID, TO_PROCESSO_ID, EXAME_ID, TO_EXAME_ID, }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + ID, PROCESSO_ID, EXAME_ID, }; + + private Map dataHash; + + public TrabalhadoresFichasAptidaoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getProcesso_id() + { + return (Integer) dataHash.get(PROCESSO_ID); + } + + public void setProcesso_id(Integer processo_idValue ) + { + dataHash.put(TO_PROCESSO_ID, null); + dataHash.put(PROCESSO_ID, processo_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData toProcesso_id() + throws Exception + { + if( dataHash.get(TO_PROCESSO_ID) == null && getProcesso_id() != null ) + { + dataHash.put(TO_PROCESSO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData.class, new Object[]{ getProcesso_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData) dataHash.get(TO_PROCESSO_ID); + } + + public void setToProcesso_id(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData processo_idObject ) + { + if( processo_idObject == null ) + { + dataHash.put(PROCESSO_ID, null); + } + else + { + dataHash.put(PROCESSO_ID, processo_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData.ID )); + } + dataHash.put(TO_PROCESSO_ID, processo_idObject); + } + + public Integer getExame_id() + { + return (Integer) dataHash.get(EXAME_ID); + } + + public void setExame_id(Integer exame_idValue ) + { + dataHash.put(TO_EXAME_ID, null); + dataHash.put(EXAME_ID, exame_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.ExamesData toExame_id() + throws Exception + { + if( dataHash.get(TO_EXAME_ID) == null && getExame_id() != null ) + { + dataHash.put(TO_EXAME_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.ExamesData.class, new Object[]{ getExame_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.ExamesData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.ExamesData) dataHash.get(TO_EXAME_ID); + } + + public void setToExame_id(com.evolute.siprp.server.db.data.siprp_local3.ExamesData exame_idObject ) + { + if( exame_idObject == null ) + { + dataHash.put(EXAME_ID, null); + } + else + { + dataHash.put(EXAME_ID, exame_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.ExamesData.ID )); + } + dataHash.put(TO_EXAME_ID, exame_idObject); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( EXAME_ID.equals( fieldName ) ) + { + value = getExame_id(); + } + else if( TO_EXAME_ID.equals( fieldName ) ) + { + value = toExame_id(); + } + else if( PROCESSO_ID.equals( fieldName ) ) + { + value = getProcesso_id(); + } + else if( TO_PROCESSO_ID.equals( fieldName ) ) + { + value = toProcesso_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( EXAME_ID.equals( fieldName ) ) + { + setExame_id( (Integer) value ); + } + else if( TO_EXAME_ID.equals( fieldName ) ) + { + setToExame_id( (com.evolute.siprp.server.db.data.siprp_local3.ExamesData) value ); + } + else if( PROCESSO_ID.equals( fieldName ) ) + { + setProcesso_id( (Integer) value ); + } + else if( TO_PROCESSO_ID.equals( fieldName ) ) + { + setToProcesso_id( (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_PROCESSO_ID) != null ) + { + toProcesso_id().save(); + dataHash.put(PROCESSO_ID, toProcesso_id().get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoData.ID )); + } + + if( dataHash.get(TO_EXAME_ID) != null ) + { + toExame_id().save(); + dataHash.put(EXAME_ID, toExame_id().get( com.evolute.siprp.server.db.data.siprp_local3.ExamesData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return TrabalhadoresFichasAptidao.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresProcesso.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresProcesso.java new file mode 100644 index 00000000..0b5bafce --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresProcesso.java @@ -0,0 +1,264 @@ +/* +* TrabalhadoresProcesso.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class TrabalhadoresProcesso implements JDOInnerObject +{ + private Integer id; + private Integer 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; + + public TrabalhadoresProcesso() + { + } + + public Object getField( String fieldName ) + { + if( fieldName == TrabalhadoresProcessoDataAuto.ID ) + { + return id; + } + else if( fieldName == TrabalhadoresProcessoDataAuto.TRABALHADOR_ID ) + { + return trabalhador_id; + } + else if( fieldName == TrabalhadoresProcessoDataAuto.ESTADO ) + { + return estado; + } + else if( fieldName == TrabalhadoresProcessoDataAuto.DATA_INICIO ) + { + return data_inicio; + } + else if( fieldName == TrabalhadoresProcessoDataAuto.DATA_FIM ) + { + return data_fim; + } + else if( fieldName == TrabalhadoresProcessoDataAuto.MOTIVO ) + { + return motivo; + } + else if( fieldName == TrabalhadoresProcessoDataAuto.SUB_MOTIVO ) + { + return sub_motivo; + } + else if( fieldName == TrabalhadoresProcessoDataAuto.ACTIVO ) + { + return activo; + } + else if( fieldName.equals( TrabalhadoresProcessoDataAuto.ID ) ) + { + return id; + } + else if( fieldName.equals( TrabalhadoresProcessoDataAuto.TRABALHADOR_ID ) ) + { + return trabalhador_id; + } + else if( fieldName.equals( TrabalhadoresProcessoDataAuto.ESTADO ) ) + { + return estado; + } + else if( fieldName.equals( TrabalhadoresProcessoDataAuto.DATA_INICIO ) ) + { + return data_inicio; + } + else if( fieldName.equals( TrabalhadoresProcessoDataAuto.DATA_FIM ) ) + { + return data_fim; + } + else if( fieldName.equals( TrabalhadoresProcessoDataAuto.MOTIVO ) ) + { + return motivo; + } + else if( fieldName.equals( TrabalhadoresProcessoDataAuto.SUB_MOTIVO ) ) + { + return sub_motivo; + } + else if( fieldName.equals( TrabalhadoresProcessoDataAuto.ACTIVO ) ) + { + return activo; + } + return null; + } + + public void setField( String fieldName, Object value ) + { + if( fieldName == TrabalhadoresProcessoDataAuto.ID ) + { + id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresProcessoDataAuto.TRABALHADOR_ID ) + { + trabalhador_id = ( Integer ) value; + } + else if( fieldName == TrabalhadoresProcessoDataAuto.ESTADO ) + { + estado = ( String ) value; + } + else if( fieldName == TrabalhadoresProcessoDataAuto.DATA_INICIO ) + { + data_inicio = ( java.util.Date ) value; + } + else if( fieldName == TrabalhadoresProcessoDataAuto.DATA_FIM ) + { + data_fim = ( java.util.Date ) value; + } + else if( fieldName == TrabalhadoresProcessoDataAuto.MOTIVO ) + { + motivo = ( Integer ) value; + } + else if( fieldName == TrabalhadoresProcessoDataAuto.SUB_MOTIVO ) + { + sub_motivo = ( Integer ) value; + } + else if( fieldName == TrabalhadoresProcessoDataAuto.ACTIVO ) + { + activo = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresProcessoDataAuto.ID ) ) + { + id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresProcessoDataAuto.TRABALHADOR_ID ) ) + { + trabalhador_id = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresProcessoDataAuto.ESTADO ) ) + { + estado = ( String ) value; + } + else if( fieldName.equals( TrabalhadoresProcessoDataAuto.DATA_INICIO ) ) + { + data_inicio = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresProcessoDataAuto.DATA_FIM ) ) + { + data_fim = ( java.util.Date ) value; + } + else if( fieldName.equals( TrabalhadoresProcessoDataAuto.MOTIVO ) ) + { + motivo = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresProcessoDataAuto.SUB_MOTIVO ) ) + { + sub_motivo = ( Integer ) value; + } + else if( fieldName.equals( TrabalhadoresProcessoDataAuto.ACTIVO ) ) + { + activo = ( String ) value; + } + } + + public Integer getId() + { + return id; + } + + public void setId(Integer idValue ) + { + this.id = idValue; + } + + public Integer getTrabalhador_id() + { + return trabalhador_id; + } + + public void setTrabalhador_id(Integer trabalhador_idValue ) + { + this.trabalhador_id = trabalhador_idValue; + } + + public String getEstado() + { + return estado; + } + + public void setEstado(String estadoValue ) + { + this.estado = estadoValue; + } + + public java.util.Date getData_inicio() + { + return data_inicio; + } + + public void setData_inicio(java.util.Date data_inicioValue ) + { + this.data_inicio = data_inicioValue; + } + + public java.util.Date getData_fim() + { + return data_fim; + } + + public void setData_fim(java.util.Date data_fimValue ) + { + this.data_fim = data_fimValue; + } + + public Integer getMotivo() + { + return motivo; + } + + public void setMotivo(Integer motivoValue ) + { + this.motivo = motivoValue; + } + + public Integer getSub_motivo() + { + return sub_motivo; + } + + public void setSub_motivo(Integer sub_motivoValue ) + { + this.sub_motivo = sub_motivoValue; + } + + public String getActivo() + { + return activo; + } + + public void setActivo(String activoValue ) + { + this.activo = activoValue; + } + + public Class getOuterClass() + { + return TrabalhadoresProcessoDataAuto.class; + } + + public TrabalhadoresProcessoDataAuto getOuterClassInstance() + { + TrabalhadoresProcessoDataAuto outerObj = new TrabalhadoresProcessoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresProcessoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresProcessoData.java new file mode 100644 index 00000000..b8dae785 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresProcessoData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresProcessoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class TrabalhadoresProcessoData extends com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresProcessoDataAuto +{ + + public TrabalhadoresProcessoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresProcessoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresProcessoDataAuto.java new file mode 100644 index 00000000..b1e393af --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/TrabalhadoresProcessoDataAuto.java @@ -0,0 +1,227 @@ +/* +* TrabalhadoresProcessoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class TrabalhadoresProcessoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "trabalhadores_processo"; + + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_processo.id"; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "trabalhadores_processo.trabalhador_id"; + public static final String TO_TRABALHADOR_ID = "to trabalhador_id"; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "trabalhadores_processo.estado"; + public static final String DATA_INICIO = "data_inicio"; + public static final String DATA_INICIO_FULL = "trabalhadores_processo.data_inicio"; + public static final String DATA_FIM = "data_fim"; + public static final String DATA_FIM_FULL = "trabalhadores_processo.data_fim"; + public static final String MOTIVO = "motivo"; + public static final String MOTIVO_FULL = "trabalhadores_processo.motivo"; + public static final String SUB_MOTIVO = "sub_motivo"; + public static final String SUB_MOTIVO_FULL = "trabalhadores_processo.sub_motivo"; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "trabalhadores_processo.activo"; + + public static final String FIELD_NAMES[] = new String[]{ + TRABALHADOR_ID, TO_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 Map dataHash; + + public TrabalhadoresProcessoDataAuto() + { + dataHash = new HashMap(); + } + + public Integer getId() + { + return (Integer) get(ID); + } + + public void setId(Integer idValue ) + { + this.set(ID, idValue ); + } + + public Integer getTrabalhador_id() + { + return (Integer) dataHash.get(TRABALHADOR_ID); + } + + public void setTrabalhador_id(Integer trabalhador_idValue ) + { + dataHash.put(TO_TRABALHADOR_ID, null); + dataHash.put(TRABALHADOR_ID, trabalhador_idValue ); + } + + public com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData toTrabalhador_id() + throws Exception + { + if( dataHash.get(TO_TRABALHADOR_ID) == null && getTrabalhador_id() != null ) + { + dataHash.put(TO_TRABALHADOR_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData.class, new Object[]{ getTrabalhador_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData.ID })); + } + return (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData) dataHash.get(TO_TRABALHADOR_ID); + } + + public void setToTrabalhador_id(com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData trabalhador_idObject ) + { + if( trabalhador_idObject == null ) + { + dataHash.put(TRABALHADOR_ID, null); + } + else + { + dataHash.put(TRABALHADOR_ID, trabalhador_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData.ID )); + } + dataHash.put(TO_TRABALHADOR_ID, trabalhador_idObject); + } + + public String getEstado() + { + return (String) get(ESTADO); + } + + public void setEstado(String estadoValue ) + { + this.set(ESTADO, estadoValue ); + } + + public java.util.Date getData_inicio() + { + return (java.util.Date) get(DATA_INICIO); + } + + public void setData_inicio(java.util.Date data_inicioValue ) + { + this.set(DATA_INICIO, data_inicioValue ); + } + + public java.util.Date getData_fim() + { + return (java.util.Date) get(DATA_FIM); + } + + public void setData_fim(java.util.Date data_fimValue ) + { + this.set(DATA_FIM, data_fimValue ); + } + + public Integer getMotivo() + { + return (Integer) get(MOTIVO); + } + + public void setMotivo(Integer motivoValue ) + { + this.set(MOTIVO, motivoValue ); + } + + public Integer getSub_motivo() + { + return (Integer) get(SUB_MOTIVO); + } + + public void setSub_motivo(Integer sub_motivoValue ) + { + this.set(SUB_MOTIVO, sub_motivoValue ); + } + + public String getActivo() + { + return (String) get(ACTIVO); + } + + public void setActivo(String activoValue ) + { + this.set(ACTIVO, activoValue ); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + if( TO_TRABALHADOR_ID.equals( fieldName ) ) + { + value = toTrabalhador_id(); + } + else if( TRABALHADOR_ID.equals( fieldName ) ) + { + value = getTrabalhador_id(); + } + else + { + value = dataHash.get( fieldName ); + } + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + if( TO_TRABALHADOR_ID.equals( fieldName ) ) + { + setToTrabalhador_id( (com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData) value ); + } + else if( TRABALHADOR_ID.equals( fieldName ) ) + { + setTrabalhador_id( (Integer) value ); + } + else + { + dataHash.put( fieldName, value ); + } + } + + public void save() + throws Exception + { + if( dataHash.get(TO_TRABALHADOR_ID) != null ) + { + toTrabalhador_id().save(); + dataHash.put(TRABALHADOR_ID, toTrabalhador_id().get( com.evolute.siprp.server.db.data.siprp_local3.TrabalhadoresData.ID )); + } + + super.save(); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return TrabalhadoresProcesso.class; + } + + public Integer getJDOPrimaryKey() + { + Object obj = this.getId(); + if(obj instanceof JDOObject){ + obj = ((JDOObject) obj).getInnerObject(); + } + return (Integer) obj; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Versao.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Versao.java new file mode 100644 index 00000000..7546c595 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Versao.java @@ -0,0 +1,44 @@ +/* +* Versao.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class Versao implements JDOInnerObject +{ + + public Versao() + { + } + + public Object getField( String fieldName ) + { + return null; + } + + public void setField( String fieldName, Object value ) + { + } + + public Class getOuterClass() + { + return VersaoDataAuto.class; + } + + public VersaoDataAuto getOuterClassInstance() + { + VersaoDataAuto outerObj = new VersaoDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Object getJDOPrimaryKey() + { + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/VersaoData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/VersaoData.java new file mode 100644 index 00000000..e0b34a1b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/VersaoData.java @@ -0,0 +1,18 @@ +/* +* VersaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class VersaoData extends com.evolute.siprp.server.db.data.siprp_local3.VersaoDataAuto +{ + + public VersaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/VersaoDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/VersaoDataAuto.java new file mode 100644 index 00000000..061a6016 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/VersaoDataAuto.java @@ -0,0 +1,67 @@ +/* +* VersaoDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class VersaoDataAuto extends JDOObject +{ + + public static final String TABLENAME = "versao"; + + + public static final String FIELD_NAMES[] = new String[]{ + }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + }; + + private Map dataHash; + + public VersaoDataAuto() + { + dataHash = new HashMap(); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Versao.class; + } + + public Object getJDOPrimaryKey() + { + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Version.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Version.java new file mode 100644 index 00000000..58df9226 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Version.java @@ -0,0 +1,44 @@ +/* +* Version.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; + +public final class Version implements JDOInnerObject +{ + + public Version() + { + } + + public Object getField( String fieldName ) + { + return null; + } + + public void setField( String fieldName, Object value ) + { + } + + public Class getOuterClass() + { + return VersionDataAuto.class; + } + + public VersionDataAuto getOuterClassInstance() + { + VersionDataAuto outerObj = new VersionDataAuto(); + outerObj.setInnerObject(this); + return outerObj; + } + + public Object getJDOPrimaryKey() + { + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/VersionData.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/VersionData.java new file mode 100644 index 00000000..1858af61 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/VersionData.java @@ -0,0 +1,18 @@ +/* +* VersionDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Edit at will +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + + +public final class VersionData extends com.evolute.siprp.server.db.data.siprp_local3.VersionDataAuto +{ + + public VersionData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/VersionDataAuto.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/VersionDataAuto.java new file mode 100644 index 00000000..8d8e4a33 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/VersionDataAuto.java @@ -0,0 +1,67 @@ +/* +* VersionDataAuto.java +* +* Generated by com.evutils.codegen.JDOObjectGenerator +* +* Use but DON'T TOUCH +*/ +package com.evolute.siprp.server.db.data.siprp_local3; + +import com.evolute.utils.jdo.*; +import java.util.HashMap; +import java.util.Map; + +class VersionDataAuto extends JDOObject +{ + + public static final String TABLENAME = "version"; + + + public static final String FIELD_NAMES[] = new String[]{ + }; + + + protected static final String ALL_FIELD_NAMES[] = new String[]{ + }; + + private Map dataHash; + + public VersionDataAuto() + { + dataHash = new HashMap(); + } + + protected Object innerGet( String fieldName ) + throws Exception + { + Object value = null; + value = dataHash.get( fieldName ); + return value; + } + + protected void innerSet( String fieldName, Object value ) + throws Exception + { + dataHash.put( fieldName, value ); + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + protected String []getAllFieldNames() + { + return ALL_FIELD_NAMES; + } + + public Class getInnerClass() + { + return Version.class; + } + + public Object getJDOPrimaryKey() + { + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/package.jdo b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/package.jdo new file mode 100644 index 00000000..66d97264 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/package.jdo @@ -0,0 +1,2272 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoLogic.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoLogic.java new file mode 100644 index 00000000..d30ed7af --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoLogic.java @@ -0,0 +1,193 @@ +package com.evolute.siprp.server.logic.AnaliseAcidentesTrabalho; + +import java.util.Date; +import java.util.Vector; + +import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.AnaliseAcidentesTrabalhoService; +import com.evolute.siprp.client.panels.utils.AppConstants; +import com.evolute.siprp.client.panels.utils.permissoes.RolesConstants; +import com.evolute.siprp.client.vo.ActualTableRow; +import com.evolute.siprp.client.vo.Utilizador; +import com.evolute.siprp.server.logic.AnaliseAcidentesTrabalho.actual.ActualTableDataProvider; +import com.evolute.siprp.server.logic.AnaliseAcidentesTrabalho.seguimento.SeguimentoTableDataProvider; +import com.evolute.utils.arrays.Virtual2DArray; + +public class AnaliseAcidentesTrabalhoLogic implements AnaliseAcidentesTrabalhoService +{ + + private ActualTableDataProvider actualProvider = null; + private SeguimentoTableDataProvider seguimentoProvider = null; + + + public AnaliseAcidentesTrabalhoLogic() + { + try + { + actualProvider = ActualTableDataProvider.getProvider(); + seguimentoProvider = SeguimentoTableDataProvider.getProvider(); + } + catch ( Exception e ) + { + e.printStackTrace(); + } + } + + + public String getFase( int estado ) + { + String fase = null; + + if ( estado == AppConstants.ESTADO_SEG ) + { + fase = "FASE 1 - SEG - ABERTURA"; + } + else if ( estado == AppConstants.ESTADO_RH1 ) + { + fase = "FASE 2 - RH - ACOMPANHAMENTO"; + } + else if ( estado == AppConstants.ESTADO_HS ) + { + fase = "FASE 3 - SIPRP - RECOMENDA\u00C7\u00D5ES"; + } + else if ( estado == AppConstants.ESTADO_RH2 ) + { + fase = "FASE 4 - RH - MEDIDAS + LES\u00C3O"; + } + else if ( estado == AppConstants.ESTADO_CONSOLIDACAO ) + { + fase = "FASE 5 - SIPRP - CONSOLIDA\u00C7\u00C3O"; + } + else if ( estado == AppConstants.ESTADO_ASSINATURA_SEG ) + { + fase = "FASE 6 - SEG - VERIFICA\u00C7\u00C3O SEG."; + } + else if ( estado == AppConstants.ESTADO_ASSINATURA_RH ) + { + fase = "FASE 7 - RH - VERIFICA\u00C7\u00C3O RH"; + } + else if ( estado == AppConstants.ESTADO_FECHAR ) + { + fase = "FASE 8 - SIPRP - CONCLUS\u00C3O"; + } + + return fase; + } + + + @Override + public Vector< ActualTableRow > getActualTableData( Utilizador userLogged ) + { + Vector< ActualTableRow > result = null; + + try + { + int userType = userLogged.getTipo_utilizador().intValue(); + Virtual2DArray array = null; + + if ( userType == RolesConstants.TIPO_SEGURANCA ) + { + array = actualProvider.getAnalisesActuaisSeguranca( userLogged.getEstabelecimento_id(), userLogged.getResponsavel_loja() ); + } + else if ( userType == RolesConstants.TIPO_RECURSOS_HUMANOS ) + { + array = actualProvider.getAnalisesActuaisRH( userLogged.getEstabelecimento_id(), userLogged.getResponsavel_loja() ); + } + else if ( userType == RolesConstants.TIPO_HIGIENE_SEGURANCA ) + { + array = actualProvider.getAnalisesActuaisHS(); + } + + result = fillVector( array ); + } + catch ( Exception e ) + { + e.printStackTrace(); + } + + return result; + } + + + @Override + public Vector< ActualTableRow > getSeguimentoTableData( Utilizador userLogged ) + { + Vector< ActualTableRow > result = null; + + try + { + int userType = userLogged.getTipo_utilizador().intValue(); + Virtual2DArray array = null; + + if ( userType == RolesConstants.TIPO_DIRECTOR_GERAL_RECURSOS_HUMANOS + || userType == RolesConstants.TIPO_DIRECTOR_SIPRP ) + { + array = seguimentoProvider.getAnalisesSeguimento_DirGeralRH(); + } + else if ( userType == RolesConstants.TIPO_GESTOR ) + { + if ( userLogged.getEstabelecimento_id() == null ) + { + array = seguimentoProvider.getAnalisesSeguimento_DirGeralRH(); + } + else + { + array = seguimentoProvider.getAnalisesSeguimentoByEstabelecimentoID( userLogged.getEstabelecimento_id() ); + } + } + else if ( userType == RolesConstants.TIPO_HIGIENE_SEGURANCA ) + { + array = seguimentoProvider.getAnalisesSeguimento_HS(); + } + + result = fillVector( array ); + } + catch ( Exception e ) + { + e.printStackTrace(); + } + + return result; + } + + + /** + * fills vector with 'actual' or 'seguimento' data ... + * + * @param array + * @return + */ + private Vector< ActualTableRow > fillVector( Virtual2DArray array ) + { + Vector< ActualTableRow > result = null; + + if ( array != null ) + { + result = new Vector< ActualTableRow >(); + for ( int i = 0; i < array.columnLength(); i++ ) + { + Integer anaID = ( Integer ) array.get( i, 0 ); + Date dataAcidente = ( Date ) array.get( i, 1 ); + Date dataAbertura = ( Date ) array.get( i, 2 ); + String analiseNr = ( String ) array.get( i, 3 ); + String nrPOR = ( String ) array.get( i, 4 ); + String nomeTrabalhador = ( String ) array.get( i, 5 ); + Integer estado = ( Integer ) array.get( i, 6 ); + + ActualTableRow row = new ActualTableRow(); + row.setId( anaID ); + row.setDataAcidente( dataAcidente ); + row.setDataAbertura( dataAbertura ); + row.setNrAcidente( analiseNr ); + row.setPOR( nrPOR ); + row.setNomeAcidentado( nomeTrabalhador ); + row.setEstado( estado ); + row.setFase( getFase( estado ) ); + + result.add( row ); + } + } + + return result; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoServiceImpl.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoServiceImpl.java new file mode 100644 index 00000000..fd7b0f24 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoServiceImpl.java @@ -0,0 +1,42 @@ +package com.evolute.siprp.server.logic.AnaliseAcidentesTrabalho; + +import java.util.Vector; + +import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.AnaliseAcidentesTrabalhoService; +import com.evolute.siprp.client.vo.ActualTableRow; +import com.evolute.siprp.client.vo.Utilizador; +import com.google.gwt.user.server.rpc.RemoteServiceServlet; + +public class AnaliseAcidentesTrabalhoServiceImpl extends RemoteServiceServlet implements AnaliseAcidentesTrabalhoService +{ + private static final long serialVersionUID = -8785113866553581244L; + + private AnaliseAcidentesTrabalhoLogic logic; + + private void initLogic() + { + if ( logic == null ) + { + logic = new AnaliseAcidentesTrabalhoLogic(); + } + } + + + @Override + public Vector< ActualTableRow > getActualTableData( Utilizador userLogged ) + { + initLogic(); + + return logic.getActualTableData( userLogged ); + } + + @Override + public Vector< ActualTableRow > getSeguimentoTableData( Utilizador userLogged ) + { + initLogic(); + + return logic.getSeguimentoTableData( userLogged ); + } + + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/AnaliseAcidentesTrabalho/actual/ActualTableDataProvider.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/AnaliseAcidentesTrabalho/actual/ActualTableDataProvider.java new file mode 100644 index 00000000..aa406c3c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/AnaliseAcidentesTrabalho/actual/ActualTableDataProvider.java @@ -0,0 +1,155 @@ +package com.evolute.siprp.server.logic.AnaliseAcidentesTrabalho.actual; + +import com.evolute.siprp.client.panels.utils.AppConstants; +import com.evolute.siprp.server.db.InitDB; +import com.evolute.siprp.server.db.data.siprp.AcidentadosData; +import com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData; +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.jdo.JDOProvider; +import com.evolute.utils.sql.Expression; +import com.evolute.utils.sql.Field; +import com.evolute.utils.sql.Select; +import com.evolute.utils.sql.Select2; + +public class ActualTableDataProvider +{ + private static ActualTableDataProvider instance = null; + + private final Executer EXECUTER; + private final JDOProvider JDO_PROVIDER; + + private ActualTableDataProvider() throws Exception + { + InitDB.init(); + + DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); + EXECUTER = dbm.getSharedExecuter( this ); + JDO_PROVIDER = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + } + + + public static ActualTableDataProvider getProvider() throws Exception + { + if ( instance == null ) + { + instance = new ActualTableDataProvider(); + } + return instance; + } + + + + public Virtual2DArray getAnalisesActuaisSeguranca( Integer estabelecimento_id, Boolean responsavel_loja ) + throws Exception + { + Expression whereExpression = new Field( AnalisesAcidentesData.ESTADO_FULL ).isEqual( AppConstants.ESTADO_SEG ).or( + new Field( AnalisesAcidentesData.AVERIGUACAO_POSTERIOR_FULL ).isEqual( "y" ).and( + new Field( AnalisesAcidentesData.AVERIGUACAO_OBS_FULL ).isEqual( "" ) + ) + ); + if ( responsavel_loja ) + { + whereExpression = whereExpression.or( + new Field( AnalisesAcidentesData.ESTADO_FULL ).isEqual( AppConstants.ESTADO_ASSINATURA_SEG ) + ); + } + Select query = new Select2( + new String[] { AnalisesAcidentesData.TABLENAME, AcidentadosData.TABLENAME }, + new Integer[] { Select2.JOIN_INNER }, + new Expression[] { + new Field( AnalisesAcidentesData.ACIDENTADO_ID_FULL ).isEqual( new Field( AcidentadosData.ID_FULL ) ) + }, + new String[] { + AnalisesAcidentesData.ID_FULL, AnalisesAcidentesData.DATA_ACIDENTE_FULL, AnalisesAcidentesData.DATA_INICIO_PROCESSO_FULL, + AnalisesAcidentesData.ANALISE_NR_FULL, AcidentadosData.NUMERO_MECANOGRAFICO_FULL, AcidentadosData.NOME_FULL, + AnalisesAcidentesData.ESTADO_FULL + }, + new Field( AnalisesAcidentesData.APAGADA_FULL ).isEqual( "n" ).and( + new Field( AnalisesAcidentesData.ESTABELECIMENTO_ID_FULL ).isEqual( estabelecimento_id ).and( + whereExpression + ) + ), + new String[] { AnalisesAcidentesData.ANALISE_NR_FULL }, + null, + null, + null + ); + System.out.println( "\n" + query.toString() ); + + return EXECUTER.executeQuery( query ); + } + + public Virtual2DArray getAnalisesActuaisRH( Integer estabelecimento_id, Boolean responsavel_loja ) + throws Exception + { + Expression whereExpression = new Field( AnalisesAcidentesData.ESTADO_FULL ).isEqual( AppConstants.ESTADO_RH1 ).or( + new Field( AnalisesAcidentesData.ESTADO_FULL ).isEqual( AppConstants.ESTADO_RH2 ) + ); + if ( responsavel_loja ) + { + whereExpression = whereExpression.or( + new Field( AnalisesAcidentesData.ESTADO_FULL ).isEqual( AppConstants.ESTADO_ASSINATURA_RH ) + ); + } + + Select query = new Select2( + new String[] { AnalisesAcidentesData.TABLENAME, AcidentadosData.TABLENAME }, + new Integer[] { Select2.JOIN_INNER }, + new Expression[] { + new Field( AnalisesAcidentesData.ACIDENTADO_ID_FULL ).isEqual( new Field( AcidentadosData.ID_FULL ) ) + }, + new String[] { + AnalisesAcidentesData.ID_FULL, AnalisesAcidentesData.DATA_ACIDENTE_FULL, AnalisesAcidentesData.DATA_INICIO_PROCESSO_FULL, + AnalisesAcidentesData.ANALISE_NR_FULL, AcidentadosData.NUMERO_MECANOGRAFICO_FULL, AcidentadosData.NOME_FULL, + AnalisesAcidentesData.ESTADO_FULL + }, + new Field( AnalisesAcidentesData.APAGADA_FULL ).isEqual( "n" ).and( + new Field( AnalisesAcidentesData.ESTABELECIMENTO_ID_FULL ).isEqual( estabelecimento_id ).and( + whereExpression + ) + ), + new String[] { AnalisesAcidentesData.ANALISE_NR_FULL }, + null, + null, + null + ); + System.out.println( "\n" + query.toString() ); + + return EXECUTER.executeQuery( query ); + } + + public Virtual2DArray getAnalisesActuaisHS() + throws Exception + { + Select query = new Select2( + new String[] { AnalisesAcidentesData.TABLENAME, AcidentadosData.TABLENAME }, + new Integer[] { Select2.JOIN_INNER }, + new Expression[] { + new Field( AnalisesAcidentesData.ACIDENTADO_ID_FULL ).isEqual( new Field( AcidentadosData.ID_FULL ) ) + }, + new String[] { + AnalisesAcidentesData.ID_FULL, AnalisesAcidentesData.DATA_ACIDENTE_FULL, AnalisesAcidentesData.DATA_INICIO_PROCESSO_FULL, + AnalisesAcidentesData.ANALISE_NR_FULL, AcidentadosData.NUMERO_MECANOGRAFICO_FULL, AcidentadosData.NOME_FULL, + AnalisesAcidentesData.ESTADO_FULL + }, + new Field( AnalisesAcidentesData.APAGADA_FULL ).isEqual( "n" ).and( + new Field( AnalisesAcidentesData.ESTADO_FULL ).isEqual( AppConstants.ESTADO_HS ).or( + new Field( AnalisesAcidentesData.ESTADO_FULL ).isEqual( AppConstants.ESTADO_FECHAR ).or( + new Field( AnalisesAcidentesData.ESTADO_FULL ).isEqual( AppConstants.ESTADO_CONSOLIDACAO ) + ) + ) + ), + new String[] { AnalisesAcidentesData.ANALISE_NR_FULL }, + null, + null, + null + ); + System.out.println( "\n" + query.toString() ); + + return EXECUTER.executeQuery( query ); + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/AnaliseAcidentesTrabalho/seguimento/SeguimentoTableDataProvider.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/AnaliseAcidentesTrabalho/seguimento/SeguimentoTableDataProvider.java new file mode 100644 index 00000000..feee4e4d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/AnaliseAcidentesTrabalho/seguimento/SeguimentoTableDataProvider.java @@ -0,0 +1,201 @@ +package com.evolute.siprp.server.logic.AnaliseAcidentesTrabalho.seguimento; + +import com.evolute.siprp.client.panels.utils.AppConstants; +import com.evolute.siprp.server.db.InitDB; +import com.evolute.siprp.server.db.data.siprp.AcidentadosData; +import com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData; +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.jdo.JDOProvider; +import com.evolute.utils.sql.Expression; +import com.evolute.utils.sql.Field; +import com.evolute.utils.sql.Select; +import com.evolute.utils.sql.Select2; + +public class SeguimentoTableDataProvider +{ + + private static SeguimentoTableDataProvider instance = null; + + private final Executer EXECUTER; + private final JDOProvider JDO_PROVIDER; + + private SeguimentoTableDataProvider() throws Exception + { + InitDB.init(); + + DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); + EXECUTER = dbm.getSharedExecuter( this ); + JDO_PROVIDER = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + } + + + public static SeguimentoTableDataProvider getProvider() throws Exception + { + if ( instance == null ) + { + instance = new SeguimentoTableDataProvider(); + } + return instance; + } + + + /** + * director geral RH e director siprp + * + * @return + * @throws Exception + */ + public Virtual2DArray getAnalisesSeguimento_DirGeralRH() throws Exception + { + Select query = new Select2( + new String[] { AnalisesAcidentesData.TABLENAME, AcidentadosData.TABLENAME }, + new Integer[] { Select2.JOIN_INNER }, + new Expression[] { + new Field( AnalisesAcidentesData.ACIDENTADO_ID_FULL ).isEqual( new Field( AcidentadosData.ID_FULL ) ) + }, + new String[] { + AnalisesAcidentesData.ID_FULL, AnalisesAcidentesData.DATA_ACIDENTE_FULL, AnalisesAcidentesData.DATA_INICIO_PROCESSO_FULL, + AnalisesAcidentesData.ANALISE_NR_FULL, AcidentadosData.NUMERO_MECANOGRAFICO_FULL, AcidentadosData.NOME_FULL, + AnalisesAcidentesData.ESTADO_FULL + }, + new Field( AnalisesAcidentesData.ESTADO_FULL ).isLess( AppConstants.ESTADO_CONCLUIDO ).and( + new Field( AnalisesAcidentesData.APAGADA_FULL ).isEqual( "n" ) + ), + new String[] { AnalisesAcidentesData.ANALISE_NR_FULL }, + null, + null, + null + ); + + return EXECUTER.executeQuery( query ); + } + + public Virtual2DArray getAnalisesSeguimentoByEstabelecimentoID( Integer estabelecimento_id ) throws Exception + { + Select query = new Select2( + new String[] { AnalisesAcidentesData.TABLENAME, AcidentadosData.TABLENAME }, + new Integer[] { Select2.JOIN_INNER }, + new Expression[] { + new Field( AnalisesAcidentesData.ACIDENTADO_ID_FULL ).isEqual( new Field( AcidentadosData.ID_FULL ) ) + }, + new String[] { + AnalisesAcidentesData.ID_FULL, AnalisesAcidentesData.DATA_ACIDENTE_FULL, AnalisesAcidentesData.DATA_INICIO_PROCESSO_FULL, + AnalisesAcidentesData.ANALISE_NR_FULL, AcidentadosData.NUMERO_MECANOGRAFICO_FULL, AcidentadosData.NOME_FULL, + AnalisesAcidentesData.ESTADO_FULL + }, + new Field( AnalisesAcidentesData.ESTADO_FULL ).isLess( AppConstants.ESTADO_CONCLUIDO ).and( + new Field( AnalisesAcidentesData.APAGADA_FULL ).isEqual( "n" ).and( + new Field( AnalisesAcidentesData.ESTABELECIMENTO_ID_FULL ).isEqual( estabelecimento_id ) + ) + ), + new String[] { AnalisesAcidentesData.ANALISE_NR_FULL }, + null, + null, + null + ); + + return EXECUTER.executeQuery( query ); + } + + public Virtual2DArray getAnalisesSeguimento_HS() throws Exception + { + /* + SELECT * + FROM analises_acidentes + WHERE + (estado < Global.ESTADO_HS OR (estado > Global.ESTADO_HS AND estado < Global.ESTADO_CONSOLIDACAO ) + OR (estado > Global.ESTADO_CONSOLIDACAO AND estado < Global.ESTADO_FECHAR )) + AND apagada = 'n' + ORDER BY analise_nr + */ + + Select query = new Select2( + new String[] { AnalisesAcidentesData.TABLENAME, AcidentadosData.TABLENAME }, + new Integer[] { Select2.JOIN_INNER }, + new Expression[] { + new Field( AnalisesAcidentesData.ACIDENTADO_ID_FULL ).isEqual( new Field( AcidentadosData.ID_FULL ) ) + }, + new String[] { + AnalisesAcidentesData.ID_FULL, AnalisesAcidentesData.DATA_ACIDENTE_FULL, AnalisesAcidentesData.DATA_INICIO_PROCESSO_FULL, + AnalisesAcidentesData.ANALISE_NR_FULL, AcidentadosData.NUMERO_MECANOGRAFICO_FULL, AcidentadosData.NOME_FULL, + AnalisesAcidentesData.ESTADO_FULL + }, + new Field( AnalisesAcidentesData.APAGADA_FULL ).isEqual( "n" ).and( + new Field( AnalisesAcidentesData.ESTADO_FULL ).isLess( AppConstants.ESTADO_HS ).or( + new Field( AnalisesAcidentesData.ESTADO_FULL ).isGreater( AppConstants.ESTADO_HS ).and( + new Field( AnalisesAcidentesData.ESTADO_FULL ).isLess( AppConstants.ESTADO_CONSOLIDACAO ) + ) + ).or( + new Field( AnalisesAcidentesData.ESTADO_FULL ).isGreater( AppConstants.ESTADO_CONSOLIDACAO ).and( + new Field( AnalisesAcidentesData.ESTADO_FULL ).isLess( AppConstants.ESTADO_FECHAR ) + ) + ) + ), + new String[] { AnalisesAcidentesData.ANALISE_NR_FULL }, + null, + null, + null + ); + System.out.println( "\n" + query.toString() ); + + return EXECUTER.executeQuery( query ); + } + +// public Virtual2DArray getAnalisesSeguimento_Medico( Integer estabelecimento_id ) throws Exception +// { +// /* +// SELECT * +// FROM analises_acidentes +// WHERE +// estado < 5 OR (estado = 6 AND estado_assinatura <> 2) +// OR (estado = 6 AND estado_assinatura = 2 AND ass_med = 'y') +// OR (estado > 6 AND estado < 9) +// AND estabelecimento_id = estabelecimento_id +// AND apagada = 'n' +// ORDER BY analise_nr +// */ +// +// Select query = new Select2( +// new String[] { AnalisesAcidentesData.TABLENAME, AcidentadosData.TABLENAME }, +// new Integer[] { Select2.JOIN_INNER }, +// new Expression[] { +// new Field( AnalisesAcidentesData.ACIDENTADO_ID_FULL ).isEqual( new Field( AcidentadosData.ID_FULL ) ) +// }, +// new String[] { +// AnalisesAcidentesData.ID_FULL, AnalisesAcidentesData.DATA_ACIDENTE_FULL, AnalisesAcidentesData.DATA_INICIO_PROCESSO_FULL, +// AnalisesAcidentesData.ANALISE_NR_FULL, AcidentadosData.NUMERO_MECANOGRAFICO_FULL, AcidentadosData.NOME_FULL, +// AnalisesAcidentesData.ESTADO_FULL +// }, +// new Field( AnalisesAcidentesData.APAGADA_FULL ).isEqual( "n" ).and( +// new Field( AnalisesAcidentesData.ESTABELECIMENTO_ID_FULL ).isEqual( estabelecimento_id ).and( +// new Field( AnalisesAcidentesData.ESTADO_FULL ).isLess( 5 ).or( +// new Field( AnalisesAcidentesData.ESTADO_FULL ).isEqual( 6 ).and( +// new Field( AnalisesAcidentesData.ESTADO_ASSINATURA_FULL ).isDifferent( 2 ) +// ) +// ).or( +// new Field( AnalisesAcidentesData.ESTADO_FULL ).isEqual( 6 ).and( +// new Field( AnalisesAcidentesData.ESTADO_ASSINATURA_FULL ).isEqual( 2 ).and( +// new Field( AnalisesAcidentesData.ASS_MED_FULL ).isEqual( "y" ) +// ) +// ) +// ).or( +// new Field( AnalisesAcidentesData.ESTADO_FULL ).isGreater( 6 ).and( +// new Field( AnalisesAcidentesData.ESTADO_FULL ).isLess( 9 ) +// ) +// ) +// ) +// ), +// new String[] { AnalisesAcidentesData.ANALISE_NR_FULL }, +// null, +// null, +// null +// ); +// System.out.println( "\n" + query.toString() ); +// +// return EXECUTER.executeQuery( query ); +// } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/login/LoginDataProvider.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/login/LoginDataProvider.java new file mode 100644 index 00000000..f5260079 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/login/LoginDataProvider.java @@ -0,0 +1,100 @@ +package com.evolute.siprp.server.logic.login; + +import com.evolute.siprp.client.vo.Utilizador; +import com.evolute.siprp.server.db.InitDB; +import com.evolute.siprp.server.db.data.siprp.UtilizadoresData; +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.jdo.JDOProvider; +import com.evolute.utils.sql.Expression; +import com.evolute.utils.sql.Field; +import com.evolute.utils.sql.Select; +import com.evolute.utils.sql.Select2; + +public class LoginDataProvider +{ + + private static LoginDataProvider instance = null; + + private final Executer EXECUTER; + private final JDOProvider JDO_PROVIDER; + + + private LoginDataProvider() throws Exception + { + System.out.println( "-- InitDB.init()" ); + InitDB.init(); + + DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); + EXECUTER = dbm.getSharedExecuter( this ); + JDO_PROVIDER = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + } + + + public static LoginDataProvider getProvider() throws Exception + { + if ( instance == null ) + { + instance = new LoginDataProvider(); + } + return instance; + } + + + public Utilizador loadUtilizadorByID( Integer userID ) + throws Exception + { + Utilizador user = null; + + UtilizadoresData usersData = JDO_PROVIDER.load( UtilizadoresData.class, userID ); + if ( usersData != null ) + { + user = new Utilizador(); + user.setUserID( usersData.getId() ); + user.setUsername( usersData.getLogin() ); + user.setEmail( usersData.getEmail() ); + user.setNome( usersData.getNome() ); + user.setData_password( usersData.getData_password() ); + user.setPrimeiro_login( usersData.getPrimeiro_login().equals( "y" ) ); + user.setTipo_utilizador( usersData.getTipo() ); + user.setResponsavel_loja( usersData.getResponsavel_loja().equals( "y" ) ); + user.setEstabelecimento_id( usersData.getEstabelecimento_id() ); + } + + return user; + } + + /** + * + * @param username + * @param password + * @return id, login, email, tipo, nome, primeiro_login, data_password + * @throws Exception + */ + public Virtual2DArray getUtilizador( String username, String password ) throws Exception + { + //id, login, email, tipo, nome, primeiro_login, data_password + + Select query = new Select2( + new String[] { UtilizadoresData.TABLENAME }, + new Integer[] {}, + new Expression[] {}, + new String[] { + UtilizadoresData.ID_FULL, UtilizadoresData.LOGIN_FULL, UtilizadoresData.EMAIL_FULL, + UtilizadoresData.TIPO_FULL, UtilizadoresData.NOME_FULL, UtilizadoresData.PRIMEIRO_LOGIN_FULL, + UtilizadoresData.DATA_PASSWORD_FULL, UtilizadoresData.RESPONSAVEL_LOJA_FULL, UtilizadoresData.ESTABELECIMENTO_ID_FULL + }, + new Field( UtilizadoresData.LOGIN_FULL ).isEqual( username ).and( + new Field( UtilizadoresData.PASSWORD_FULL ).isEqual( password ) + ), + null, + null, + null, + null + ); + + return EXECUTER.executeQuery( query ); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/login/LoginLogic.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/login/LoginLogic.java new file mode 100644 index 00000000..f0775f61 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/login/LoginLogic.java @@ -0,0 +1,57 @@ +package com.evolute.siprp.server.logic.login; + +import java.util.Date; + +import com.evolute.siprp.client.panels.index.login.LoginService; +import com.evolute.siprp.client.vo.Utilizador; +import com.evolute.utils.arrays.Virtual2DArray; + +public class LoginLogic implements LoginService +{ + + private LoginDataProvider loginProvider; + + public LoginLogic() + { + try + { + loginProvider = LoginDataProvider.getProvider(); + } + catch ( Exception e ) + { + e.printStackTrace(); + } + } + + + @Override + public Utilizador doLogin( String username, String password ) + { + Utilizador rUser = null; + + try + { + Virtual2DArray users = loginProvider.getUtilizador( username, password ); + if ( users.columnLength() == 1 ) + { + rUser = new Utilizador(); + rUser.setUserID( ( Integer ) users.get( 0, 0 ) ); + rUser.setUsername( ( String ) users.get( 0, 1 ) ); + rUser.setEmail( ( String ) users.get( 0, 2 ) ); + rUser.setTipo_utilizador( ( Integer ) users.get( 0, 3 ) ); + rUser.setNome( ( String ) users.get( 0, 4 ) ); + rUser.setPrimeiro_login( (( String ) users.get( 0, 5 )).equals( "y" ) ); + rUser.setData_password( ( Date ) users.get( 0, 6 ) ); + rUser.setResponsavel_loja( (( String ) users.get( 0, 7 )).equals( "y" ) ); + rUser.setEstabelecimento_id( ( Integer ) users.get( 0, 8 ) ); + } + } + catch ( Exception e ) + { + e.printStackTrace(); + } + + return rUser; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/login/LoginServiceImpl.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/login/LoginServiceImpl.java new file mode 100644 index 00000000..8607f2a8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/login/LoginServiceImpl.java @@ -0,0 +1,23 @@ +package com.evolute.siprp.server.logic.login; + +import com.evolute.siprp.client.panels.index.login.LoginService; +import com.evolute.siprp.client.vo.Utilizador; +import com.google.gwt.user.server.rpc.RemoteServiceServlet; + +public class LoginServiceImpl extends RemoteServiceServlet implements LoginService +{ + private static final long serialVersionUID = -950404179998079707L; + + private LoginLogic logic = null; + + @Override + public Utilizador doLogin( String username, String password ) + { + if ( logic == null ) + { + logic = new LoginLogic(); + } + + return logic.doLogin( username, password ); + } +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/recover_pwd/RecoverDataProvider.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/recover_pwd/RecoverDataProvider.java new file mode 100644 index 00000000..b3af10b2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/recover_pwd/RecoverDataProvider.java @@ -0,0 +1,38 @@ +package com.evolute.siprp.server.logic.recover_pwd; + +import com.evolute.siprp.server.db.InitDB; +import com.evolute.utils.Singleton; +import com.evolute.utils.db.DBManager; +import com.evolute.utils.db.Executer; +import com.evolute.utils.jdo.JDOProvider; + +public class RecoverDataProvider +{ + private static RecoverDataProvider instance = null; + + private final Executer EXECUTER; + private final JDOProvider JDO_PROVIDER; + + + private RecoverDataProvider() throws Exception + { + System.out.println( "-- InitDB.init()" ); + InitDB.init(); + + DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); + EXECUTER = dbm.getSharedExecuter( this ); + JDO_PROVIDER = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + } + + + public static RecoverDataProvider getProvider() throws Exception + { + if ( instance == null ) + { + instance = new RecoverDataProvider(); + } + return instance; + } + + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/recover_pwd/RecoverLogic.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/recover_pwd/RecoverLogic.java new file mode 100644 index 00000000..c021d011 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/recover_pwd/RecoverLogic.java @@ -0,0 +1,20 @@ +package com.evolute.siprp.server.logic.recover_pwd; + +public class RecoverLogic +{ + private RecoverDataProvider recoverProvider; + + public RecoverLogic() + { + try + { + recoverProvider = RecoverDataProvider.getProvider(); + } + catch ( Exception e ) + { + e.printStackTrace(); + } + } + + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/recover_pwd/RecoverServiceImpl.java b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/recover_pwd/RecoverServiceImpl.java new file mode 100644 index 00000000..23a378a1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/src/com/evolute/siprp/server/logic/recover_pwd/RecoverServiceImpl.java @@ -0,0 +1,25 @@ +package com.evolute.siprp.server.logic.recover_pwd; + +import com.evolute.siprp.client.panels.index.recover_pwd.RecoverService; +import com.google.gwt.user.server.rpc.RemoteServiceServlet; + +public class RecoverServiceImpl extends RemoteServiceServlet implements RecoverService +{ + private static final long serialVersionUID = -1868918536296790646L; + + private RecoverLogic recoverLogic = null; + + @Override + public String recoverPWD( String username, String email ) + { + if ( recoverLogic == null ) + { + recoverLogic = new RecoverLogic(); + } + + return "RECOVERING PWD..."; + } + + + +} diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/GestaoSHST.html b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/GestaoSHST.html new file mode 100644 index 00000000..378b01bc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/GestaoSHST.html @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + SIPRP - Gestão SHST + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/c3p0-0.9.1.2.jar b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/c3p0-0.9.1.2.jar new file mode 100644 index 00000000..0f42d60e Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/c3p0-0.9.1.2.jar differ diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/datanucleus-connectionpool-1.0.2.jar b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/datanucleus-connectionpool-1.0.2.jar new file mode 100644 index 00000000..dc7770b0 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/datanucleus-connectionpool-1.0.2.jar differ diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/datanucleus-core-1.1.5.jar b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/datanucleus-core-1.1.5.jar new file mode 100644 index 00000000..caac70e9 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/datanucleus-core-1.1.5.jar differ diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/datanucleus-java5-1.0.3.jar b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/datanucleus-java5-1.0.3.jar new file mode 100644 index 00000000..c4e07e65 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/datanucleus-java5-1.0.3.jar differ diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/datanucleus-rdbms-1.1.5.jar b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/datanucleus-rdbms-1.1.5.jar new file mode 100644 index 00000000..531693cc Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/datanucleus-rdbms-1.1.5.jar differ diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/evolute.jar b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/evolute.jar new file mode 100644 index 00000000..52b2c276 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/evolute.jar differ diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/gwt-servlet.jar b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/gwt-servlet.jar new file mode 100644 index 00000000..7403d781 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/gwt-servlet.jar differ diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/jdo2-api-2.3-eb.jar b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/jdo2-api-2.3-eb.jar new file mode 100644 index 00000000..ee1597ed Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/jdo2-api-2.3-eb.jar differ diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/postgresql-8.4-701.jdbc3.jar b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/postgresql-8.4-701.jdbc3.jar new file mode 100644 index 00000000..c64b709e Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/lib/postgresql-8.4-701.jdbc3.jar differ diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/web.xml b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/web.xml new file mode 100644 index 00000000..318f3b6c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/WEB-INF/web.xml @@ -0,0 +1,41 @@ + + + + + + + + loginServlet + com.evolute.siprp.server.logic.login.LoginServiceImpl + + + loginServlet + /gestaoshst/loginService + + + + recoverServlet + com.evolute.siprp.server.logic.recover_pwd.RecoverServiceImpl + + + recoverServlet + /gestaoshst/recoverService + + + + aatServlet + com.evolute.siprp.server.logic.AnaliseAcidentesTrabalho.AnaliseAcidentesTrabalhoServiceImpl + + + aatServlet + /gestaoshst/aatService + + + + + GestaoSHST.html + + + diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/4219B3A1733D0EC54B4663A77B9340DB.gwt.rpc b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/4219B3A1733D0EC54B4663A77B9340DB.gwt.rpc new file mode 100644 index 00000000..4d8383e7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/4219B3A1733D0EC54B4663A77B9340DB.gwt.rpc @@ -0,0 +1,15 @@ +com.evolute.siprp.client.panels.index.login.LoginService, false, false, false, false, _, 169399566 +com.evolute.siprp.client.vo.Utilizador, true, true, false, false, com.evolute.siprp.client.vo.Utilizador/746657206, 746657206 +com.google.gwt.i18n.client.impl.DateRecord, true, true, false, false, com.google.gwt.i18n.client.impl.DateRecord/112389920, 112389920 +com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException, true, true, true, true, com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException/3936916533, 3936916533 +java.lang.Boolean, true, true, false, false, java.lang.Boolean/476441737, 476441737 +java.lang.Exception, true, false, true, false, java.lang.Exception/1920171873, 1920171873 +java.lang.Integer, true, true, false, false, java.lang.Integer/3438268394, 3438268394 +java.lang.Number, true, false, false, false, java.lang.Number/300033342, 300033342 +java.lang.RuntimeException, true, false, true, false, java.lang.RuntimeException/515124647, 515124647 +java.lang.String, true, true, true, true, java.lang.String/2004016611, 2004016611 +java.lang.Throwable, true, false, true, false, java.lang.Throwable/2953622131, 2953622131 +java.sql.Date, true, true, false, false, java.sql.Date/3996530531, 3996530531 +java.sql.Time, true, true, false, false, java.sql.Time/831929183, 831929183 +java.sql.Timestamp, true, true, false, false, java.sql.Timestamp/1769758459, 1769758459 +java.util.Date, true, true, false, false, java.util.Date/1659716317, 1659716317 diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/5095A8AA70D559CD7F9F5C3C627245CC.gwt.rpc b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/5095A8AA70D559CD7F9F5C3C627245CC.gwt.rpc new file mode 100644 index 00000000..9867e55d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/5095A8AA70D559CD7F9F5C3C627245CC.gwt.rpc @@ -0,0 +1,18 @@ +com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.actual.ActualTableService, false, false, false, false, _, 3616117345 +com.evolute.siprp.client.vo.ActualTableRow, true, true, false, false, com.evolute.siprp.client.vo.ActualTableRow/2706092442, 2706092442 +com.evolute.siprp.client.vo.Utilizador, false, false, true, true, com.evolute.siprp.client.vo.Utilizador/1525161409, 1525161409 +com.google.gwt.i18n.client.impl.DateRecord, true, true, true, true, com.google.gwt.i18n.client.impl.DateRecord/112389920, 112389920 +com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException, true, true, true, true, com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException/3936916533, 3936916533 +java.lang.Boolean, false, false, true, true, java.lang.Boolean/476441737, 476441737 +java.lang.Exception, true, false, true, false, java.lang.Exception/1920171873, 1920171873 +java.lang.Integer, true, true, true, true, java.lang.Integer/3438268394, 3438268394 +java.lang.Number, true, false, true, false, java.lang.Number/300033342, 300033342 +java.lang.RuntimeException, true, false, true, false, java.lang.RuntimeException/515124647, 515124647 +java.lang.String, true, true, true, true, java.lang.String/2004016611, 2004016611 +java.lang.Throwable, true, false, true, false, java.lang.Throwable/2953622131, 2953622131 +java.sql.Date, true, true, true, true, java.sql.Date/3996530531, 3996530531 +java.sql.Time, true, true, true, true, java.sql.Time/831929183, 831929183 +java.sql.Timestamp, true, true, true, true, java.sql.Timestamp/1769758459, 1769758459 +java.util.Date, true, true, true, true, java.util.Date/1659716317, 1659716317 +java.util.Stack, true, true, false, false, java.util.Stack/1031431137, 1031431137 +java.util.Vector, true, true, false, false, java.util.Vector/3125574444, 3125574444 diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/66B58610AC8FE0AF961E16F687F1CCCD.gwt.rpc b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/66B58610AC8FE0AF961E16F687F1CCCD.gwt.rpc new file mode 100644 index 00000000..bb60140c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/66B58610AC8FE0AF961E16F687F1CCCD.gwt.rpc @@ -0,0 +1,18 @@ +com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.actual.ActualTableService, false, false, false, false, _, 3616117345 +com.evolute.siprp.client.vo.ActualTableRow, true, true, false, false, com.evolute.siprp.client.vo.ActualTableRow/3536573623, 3536573623 +com.evolute.siprp.client.vo.Utilizador, false, false, true, true, com.evolute.siprp.client.vo.Utilizador/746657206, 746657206 +com.google.gwt.i18n.client.impl.DateRecord, true, true, true, true, com.google.gwt.i18n.client.impl.DateRecord/112389920, 112389920 +com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException, true, true, true, true, com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException/3936916533, 3936916533 +java.lang.Boolean, false, false, true, true, java.lang.Boolean/476441737, 476441737 +java.lang.Exception, true, false, true, false, java.lang.Exception/1920171873, 1920171873 +java.lang.Integer, false, false, true, true, java.lang.Integer/3438268394, 3438268394 +java.lang.Number, false, false, true, false, java.lang.Number/300033342, 300033342 +java.lang.RuntimeException, true, false, true, false, java.lang.RuntimeException/515124647, 515124647 +java.lang.String, true, true, true, true, java.lang.String/2004016611, 2004016611 +java.lang.Throwable, true, false, true, false, java.lang.Throwable/2953622131, 2953622131 +java.sql.Date, true, true, true, true, java.sql.Date/3996530531, 3996530531 +java.sql.Time, true, true, true, true, java.sql.Time/831929183, 831929183 +java.sql.Timestamp, true, true, true, true, java.sql.Timestamp/1769758459, 1769758459 +java.util.Date, true, true, true, true, java.util.Date/1659716317, 1659716317 +java.util.Stack, true, true, false, false, java.util.Stack/1031431137, 1031431137 +java.util.Vector, true, true, false, false, java.util.Vector/3125574444, 3125574444 diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/75169062F30CD22F885BEE830D67F983.gwt.rpc b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/75169062F30CD22F885BEE830D67F983.gwt.rpc new file mode 100644 index 00000000..93118900 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/75169062F30CD22F885BEE830D67F983.gwt.rpc @@ -0,0 +1,9 @@ +com.evolute.siprp.client.panels.index.login.LoginService, false, false, false, false, _, 169399566 +com.evolute.siprp.client.vo.Utilizador, true, true, false, false, com.evolute.siprp.client.vo.Utilizador/3153137530, 3153137530 +com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException, true, true, true, true, com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException/3936916533, 3936916533 +java.lang.Exception, true, false, true, false, java.lang.Exception/1920171873, 1920171873 +java.lang.Integer, true, true, false, false, java.lang.Integer/3438268394, 3438268394 +java.lang.Number, true, false, false, false, java.lang.Number/300033342, 300033342 +java.lang.RuntimeException, true, false, true, false, java.lang.RuntimeException/515124647, 515124647 +java.lang.String, true, true, true, true, java.lang.String/2004016611, 2004016611 +java.lang.Throwable, true, false, true, false, java.lang.Throwable/2953622131, 2953622131 diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/A7EEACAFA774B1BED367E6016B2EEC82.gwt.rpc b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/A7EEACAFA774B1BED367E6016B2EEC82.gwt.rpc new file mode 100644 index 00000000..bc733cdf --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/A7EEACAFA774B1BED367E6016B2EEC82.gwt.rpc @@ -0,0 +1,18 @@ +com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.actual.ActualTableService, false, false, false, false, _, 3616117345 +com.evolute.siprp.client.vo.ActualTableRow, true, true, false, false, com.evolute.siprp.client.vo.ActualTableRow/1540647138, 1540647138 +com.evolute.siprp.client.vo.Utilizador, false, false, true, true, com.evolute.siprp.client.vo.Utilizador/1525161409, 1525161409 +com.google.gwt.i18n.client.impl.DateRecord, true, true, true, true, com.google.gwt.i18n.client.impl.DateRecord/112389920, 112389920 +com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException, true, true, true, true, com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException/3936916533, 3936916533 +java.lang.Boolean, false, false, true, true, java.lang.Boolean/476441737, 476441737 +java.lang.Exception, true, false, true, false, java.lang.Exception/1920171873, 1920171873 +java.lang.Integer, true, true, true, true, java.lang.Integer/3438268394, 3438268394 +java.lang.Number, true, false, true, false, java.lang.Number/300033342, 300033342 +java.lang.RuntimeException, true, false, true, false, java.lang.RuntimeException/515124647, 515124647 +java.lang.String, true, true, true, true, java.lang.String/2004016611, 2004016611 +java.lang.Throwable, true, false, true, false, java.lang.Throwable/2953622131, 2953622131 +java.sql.Date, true, true, true, true, java.sql.Date/3996530531, 3996530531 +java.sql.Time, true, true, true, true, java.sql.Time/831929183, 831929183 +java.sql.Timestamp, true, true, true, true, java.sql.Timestamp/1769758459, 1769758459 +java.util.Date, true, true, true, true, java.util.Date/1659716317, 1659716317 +java.util.Stack, true, true, false, false, java.util.Stack/1031431137, 1031431137 +java.util.Vector, true, true, false, false, java.util.Vector/3125574444, 3125574444 diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/BFD25B17A1FC17E59D0C4584559BA44D.gwt.rpc b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/BFD25B17A1FC17E59D0C4584559BA44D.gwt.rpc new file mode 100644 index 00000000..5d987c16 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/BFD25B17A1FC17E59D0C4584559BA44D.gwt.rpc @@ -0,0 +1,9 @@ +com.evolute.siprp.client.panels.index.login.LoginService, false, false, false, false, _, 169399566 +com.evolute.siprp.client.vo.Utilizador, true, true, false, false, com.evolute.siprp.client.vo.Utilizador/2052945588, 2052945588 +com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException, true, true, true, true, com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException/3936916533, 3936916533 +java.lang.Exception, true, false, true, false, java.lang.Exception/1920171873, 1920171873 +java.lang.Integer, true, true, false, false, java.lang.Integer/3438268394, 3438268394 +java.lang.Number, true, false, false, false, java.lang.Number/300033342, 300033342 +java.lang.RuntimeException, true, false, true, false, java.lang.RuntimeException/515124647, 515124647 +java.lang.String, true, true, true, true, java.lang.String/2004016611, 2004016611 +java.lang.Throwable, true, false, true, false, java.lang.Throwable/2953622131, 2953622131 diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/D1336EDB1EDC2380AEBD5AD169B06026.gwt.rpc b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/D1336EDB1EDC2380AEBD5AD169B06026.gwt.rpc new file mode 100644 index 00000000..92b41ae1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/D1336EDB1EDC2380AEBD5AD169B06026.gwt.rpc @@ -0,0 +1,18 @@ +com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.AnaliseAcidentesTrabalhoService, false, false, false, false, _, 1007557103 +com.evolute.siprp.client.vo.ActualTableRow, true, true, false, false, com.evolute.siprp.client.vo.ActualTableRow/1540647138, 1540647138 +com.evolute.siprp.client.vo.Utilizador, false, false, true, true, com.evolute.siprp.client.vo.Utilizador/1525161409, 1525161409 +com.google.gwt.i18n.client.impl.DateRecord, true, true, true, true, com.google.gwt.i18n.client.impl.DateRecord/112389920, 112389920 +com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException, true, true, true, true, com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException/3936916533, 3936916533 +java.lang.Boolean, false, false, true, true, java.lang.Boolean/476441737, 476441737 +java.lang.Exception, true, false, true, false, java.lang.Exception/1920171873, 1920171873 +java.lang.Integer, true, true, true, true, java.lang.Integer/3438268394, 3438268394 +java.lang.Number, true, false, true, false, java.lang.Number/300033342, 300033342 +java.lang.RuntimeException, true, false, true, false, java.lang.RuntimeException/515124647, 515124647 +java.lang.String, true, true, true, true, java.lang.String/2004016611, 2004016611 +java.lang.Throwable, true, false, true, false, java.lang.Throwable/2953622131, 2953622131 +java.sql.Date, true, true, true, true, java.sql.Date/3996530531, 3996530531 +java.sql.Time, true, true, true, true, java.sql.Time/831929183, 831929183 +java.sql.Timestamp, true, true, true, true, java.sql.Timestamp/1769758459, 1769758459 +java.util.Date, true, true, true, true, java.util.Date/1659716317, 1659716317 +java.util.Stack, true, true, false, false, java.util.Stack/1031431137, 1031431137 +java.util.Vector, true, true, false, false, java.util.Vector/3125574444, 3125574444 diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/D889F5BC27A3E71EDE373796E636F5BD.gwt.rpc b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/D889F5BC27A3E71EDE373796E636F5BD.gwt.rpc new file mode 100644 index 00000000..a90d4d69 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/D889F5BC27A3E71EDE373796E636F5BD.gwt.rpc @@ -0,0 +1,15 @@ +com.evolute.siprp.client.panels.index.login.LoginService, false, false, false, false, _, 169399566 +com.evolute.siprp.client.vo.Utilizador, true, true, false, false, com.evolute.siprp.client.vo.Utilizador/1525161409, 1525161409 +com.google.gwt.i18n.client.impl.DateRecord, true, true, false, false, com.google.gwt.i18n.client.impl.DateRecord/112389920, 112389920 +com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException, true, true, true, true, com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException/3936916533, 3936916533 +java.lang.Boolean, true, true, false, false, java.lang.Boolean/476441737, 476441737 +java.lang.Exception, true, false, true, false, java.lang.Exception/1920171873, 1920171873 +java.lang.Integer, true, true, false, false, java.lang.Integer/3438268394, 3438268394 +java.lang.Number, true, false, false, false, java.lang.Number/300033342, 300033342 +java.lang.RuntimeException, true, false, true, false, java.lang.RuntimeException/515124647, 515124647 +java.lang.String, true, true, true, true, java.lang.String/2004016611, 2004016611 +java.lang.Throwable, true, false, true, false, java.lang.Throwable/2953622131, 2953622131 +java.sql.Date, true, true, false, false, java.sql.Date/3996530531, 3996530531 +java.sql.Time, true, true, false, false, java.sql.Time/831929183, 831929183 +java.sql.Timestamp, true, true, false, false, java.sql.Timestamp/1769758459, 1769758459 +java.util.Date, true, true, false, false, java.util.Date/1659716317, 1659716317 diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/FFACA86B833A137B1CFBFE4003EC1D8A.gwt.rpc b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/FFACA86B833A137B1CFBFE4003EC1D8A.gwt.rpc new file mode 100644 index 00000000..5b8deb3c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/FFACA86B833A137B1CFBFE4003EC1D8A.gwt.rpc @@ -0,0 +1,6 @@ +com.evolute.siprp.client.panels.index.recover_pwd.RecoverService, false, false, false, false, _, 3357099797 +com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException, true, true, true, true, com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException/3936916533, 3936916533 +java.lang.Exception, true, false, true, false, java.lang.Exception/1920171873, 1920171873 +java.lang.RuntimeException, true, false, true, false, java.lang.RuntimeException/515124647, 515124647 +java.lang.String, true, true, true, true, java.lang.String/2004016611, 2004016611 +java.lang.Throwable, true, false, true, false, java.lang.Throwable/2953622131, 2953622131 diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/GestaoSHST.css b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/GestaoSHST.css new file mode 100644 index 00000000..5838e564 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/GestaoSHST.css @@ -0,0 +1,89 @@ +/** Add css rules here for your application. */ + +body { + color: #000; + background-color: #BBD400; + margin: 0px; +} + +body, th, td, p, div, span, input, button, select, textarea, form, b, strong, i, u, h1, h2, h3, h4, h5, h6, dl, dd, dt, ul, li, ol, option, optgroup, a { + font-family: sans-serif; + font-size: 12px; +} + +a, a:visited { + color: #035899; + text-decoration: none; +} + +a:hover { + color: #035899; + text-decoration: underline; + cursor: pointer; +} + +.alignCenterText { + text-align: center; +} + +.alignCenter { + margin-left: auto; + margin-right: auto; +} +.alignLeft { + float: left; +} +.alignRight { + float: right; +} + +.font12 { + font-size: 12px; +} +.font14 { + font-size: 14px; +} +.font16 { + font-size: 16px; +} +.font18 { + font-size: 18px; +} + +.indexTable { + border: 1px solid #000000; + width: 432px; + padding: 5px; +} + +.lblBold { + font-weight: bold; +} + +.inputBox { + width: 220px; + height: 24px; +} + +.inputBoxRec { + width: 432px; + height: 24px; +} + +.button { + width: 120px; + height: 24px; + cursor: pointer; +} + +.indexDiv { + width: 100%; + margin-top: 300px; +} + +.mainDiv { + width: 80%; + margin-left: auto; + margin-right: auto; +} + diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/clear.cache.gif b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/clear.cache.gif new file mode 100644 index 00000000..e565824a Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/clear.cache.gif differ diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/gestaoshst.nocache.js b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/gestaoshst.nocache.js new file mode 100644 index 00000000..8d0f1ac2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/gestaoshst.nocache.js @@ -0,0 +1,10 @@ +function gestaoshst(){var M='',nb='" for "gwt:onLoadErrorFn"',lb='" for "gwt:onPropertyErrorFn"',Y='"><\/script>',$='#',Gb='.cache.html',ab='/',Pb=' + +This html file is for hosted mode support. + diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/images/SIPRP_logo_small.jpg b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/images/SIPRP_logo_small.jpg new file mode 100644 index 00000000..240f2358 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/images/SIPRP_logo_small.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/images/logo_empresa32.jpg b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/images/logo_empresa32.jpg new file mode 100644 index 00000000..2c5be6df Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/images/logo_empresa32.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/images/logo_evolute_small.png b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/images/logo_evolute_small.png new file mode 100644 index 00000000..0198da2b Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/GestaoSHST/war/gestaoshst/images/logo_evolute_small.png differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/build.xml b/tags/Site antigo e SIPRPSoft/PlanosActuacao/build.xml new file mode 100644 index 00000000..053291e2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/build.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + Builds, tests, and runs the project PlanosActuacao. + + + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/activation.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/activation.jar new file mode 100644 index 00000000..589b6749 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/activation.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/ashwood-2.0.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/ashwood-2.0.jar new file mode 100644 index 00000000..55fcc9b1 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/ashwood-2.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/avalon-framework-4.2.0.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/avalon-framework-4.2.0.jar new file mode 100644 index 00000000..b1aa6d7c Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/avalon-framework-4.2.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/batik-all-1.7.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/batik-all-1.7.jar new file mode 100644 index 00000000..58932858 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/batik-all-1.7.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/commons-collections-3.1.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/commons-collections-3.1.jar new file mode 100644 index 00000000..41e230fe Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/commons-collections-3.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/commons-io-1.4.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/commons-io-1.4.jar new file mode 100644 index 00000000..133dc6cb Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/commons-io-1.4.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/commons-lang-2.1.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/commons-lang-2.1.jar new file mode 100644 index 00000000..87b80ab5 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/commons-lang-2.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/commons-logging-1.1.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/commons-logging-1.1.jar new file mode 100644 index 00000000..2ff9bbd9 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/commons-logging-1.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/cursos.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/cursos.jar new file mode 100644 index 00000000..86796607 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/cursos.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/evologger.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/evologger.jar new file mode 100644 index 00000000..3e28ca8c Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/evologger.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/evolute.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/evolute.jar new file mode 100644 index 00000000..b7b415fa Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/evolute.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/fop.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/fop.jar new file mode 100644 index 00000000..24419bcf Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/fop.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/jai_imageio.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/jai_imageio.jar new file mode 100644 index 00000000..359551eb Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/jai_imageio.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/jdbcappender.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/jdbcappender.jar new file mode 100644 index 00000000..fe9d3e67 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/jdbcappender.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/jdom.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/jdom.jar new file mode 100644 index 00000000..288e64cb Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/jdom.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/log4j-1.2.15.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/log4j-1.2.15.jar new file mode 100644 index 00000000..c930a6ab Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/log4j-1.2.15.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/mail.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/mail.jar new file mode 100644 index 00000000..59543774 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/mail.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/postgresql-8.4-701.jdbc4.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/postgresql-8.4-701.jdbc4.jar new file mode 100644 index 00000000..e21beec5 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/postgresql-8.4-701.jdbc4.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/serializer-2.7.0.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/serializer-2.7.0.jar new file mode 100644 index 00000000..7cd80696 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/serializer-2.7.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/shst.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/shst.jar new file mode 100644 index 00000000..24fdaa22 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/shst.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/xalan-2.7.0.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/xalan-2.7.0.jar new file mode 100644 index 00000000..979ee761 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/xalan-2.7.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/xercesImpl-2.7.1.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/xercesImpl-2.7.1.jar new file mode 100644 index 00000000..eac75ae8 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/xercesImpl-2.7.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/xml-apis-1.3.04.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/xml-apis-1.3.04.jar new file mode 100644 index 00000000..d42c0ea6 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/xml-apis-1.3.04.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/xml-apis-ext-1.3.04.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/xml-apis-ext-1.3.04.jar new file mode 100644 index 00000000..a7869d68 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/xml-apis-ext-1.3.04.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/xmlgraphics-commons-1.3.1.jar b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/xmlgraphics-commons-1.3.1.jar new file mode 100644 index 00000000..81a485dc Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/lib/xmlgraphics-commons-1.3.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/ant-deploy.xml b/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/ant-deploy.xml new file mode 100644 index 00000000..a6f1480c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/ant-deploy.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/build-impl.xml b/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/build-impl.xml new file mode 100644 index 00000000..b8b91f7b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/build-impl.xml @@ -0,0 +1,903 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set build.web.dir + Must set build.generated.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.war + +The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file) +or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +The libs.CopyLibs.classpath property is not set up. +This property must point to +org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part +of NetBeans IDE installation and is usually located at +<netbeans_installation>/java<version>/ant/extra folder. +Either open the project in the IDE and make sure CopyLibs library +exists or setup the property manually. For example like this: + ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.jsp.includes + + + + + + + + + + + + + + + + + + + + + + + Must select a file in the IDE or set jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. + + + Launching ${browse.url} + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/faces-config.NavData b/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/faces-config.NavData new file mode 100644 index 00000000..365f6c28 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/faces-config.NavData @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/genfiles.properties b/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/genfiles.properties new file mode 100644 index 00000000..7946d2a1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=a4c2779c +build.xml.script.CRC32=50b8b881 +build.xml.stylesheet.CRC32=c0ebde35@1.15.2.1 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=a4c2779c +nbproject/build-impl.xml.script.CRC32=34b43bcc +nbproject/build-impl.xml.stylesheet.CRC32=8ab4467e@1.15.2.1 diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/private/private.properties b/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/private/private.properties new file mode 100644 index 00000000..69a1b979 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/private/private.properties @@ -0,0 +1,12 @@ +auxiliary.org-netbeans-modules-web-client-tools-api.clientdebug=false +auxiliary.org-netbeans-modules-web-client-tools-api.dialogShowDebugPanel=false +auxiliary.org-netbeans-modules-web-client-tools-api.FIREFOX=true +auxiliary.org-netbeans-modules-web-client-tools-api.INTERNET_5f_EXPLORER=false +auxiliary.org-netbeans-modules-web-client-tools-api.serverdebug=true +deploy.ant.properties.file=/home/dneves/.netbeans/6.7/tomcat60.properties +j2ee.platform.classpath=/usr/local/apache-tomcat-6.0.18/lib/catalina.jar:/usr/local/apache-tomcat-6.0.18/lib/catalina-tribes.jar:/usr/local/apache-tomcat-6.0.18/lib/jasper.jar:/usr/local/apache-tomcat-6.0.18/lib/tomcat-coyote.jar:/usr/local/apache-tomcat-6.0.18/lib/annotations-api.jar:/usr/local/apache-tomcat-6.0.18/lib/servlet-api.jar:/usr/local/apache-tomcat-6.0.18/lib/tomcat-i18n-es.jar:/usr/local/apache-tomcat-6.0.18/lib/jasper-el.jar:/usr/local/apache-tomcat-6.0.18/lib/tomcat-dbcp.jar:/usr/local/apache-tomcat-6.0.18/lib/el-api.jar:/usr/local/apache-tomcat-6.0.18/lib/catalina-ha.jar:/usr/local/apache-tomcat-6.0.18/lib/tomcat-i18n-ja.jar:/usr/local/apache-tomcat-6.0.18/lib/tomcat-i18n-fr.jar:/usr/local/apache-tomcat-6.0.18/lib/catalina-ant.jar:/usr/local/apache-tomcat-6.0.18/lib/jsp-api.jar:/usr/local/apache-tomcat-6.0.18/bin/tomcat-juli.jar +j2ee.server.instance=tomcat60:home=/usr/local/apache-tomcat-6.0.18:base=apache-tomcat-6.0.18_base +javac.debug=true +javadoc.preview=true +jaxws.endorsed.dir=/usr/local/netbeans-6.7.1/java2/modules/ext/jaxws21/api:/usr/local/netbeans-6.7.1/ide11/modules/ext/jaxb/api +user.properties.file=/home/dneves/.netbeans/6.7/build.properties diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/private/private.xml b/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/private/private.xml new file mode 100644 index 00000000..c1f155a7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/project.properties b/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/project.properties new file mode 100644 index 00000000..29b3a066 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/project.properties @@ -0,0 +1,127 @@ +build.classes.dir=${build.web.dir}/WEB-INF/classes +build.classes.excludes=**/*.java,**/*.form +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +build.web.dir=${build.dir}/web +build.web.excludes=${build.classes.excludes} +client.urlPart= +compile.jsps=false +conf.dir=${source.root}/conf +debug.classpath=${build.classes.dir}:${javac.classpath} +debug.client=false +debug.server=true +debug.test.classpath=\ + ${run.test.classpath} +display.browser=true +dist.dir=dist +dist.ear.war=${dist.dir}/${war.ear.name} +dist.javadoc.dir=${dist.dir}/javadoc +dist.war=${dist.dir}/${war.name} +excludes= +file.reference.activation.jar=lib/activation.jar +file.reference.ashwood-2.0.jar=lib/ashwood-2.0.jar +file.reference.avalon-framework-4.2.0.jar=lib/avalon-framework-4.2.0.jar +file.reference.batik-all-1.7.jar=lib/batik-all-1.7.jar +file.reference.common-src=../common/src +file.reference.commons-collections-3.1.jar=lib/commons-collections-3.1.jar +file.reference.commons-io-1.4.jar=lib/commons-io-1.4.jar +file.reference.commons-lang-2.1.jar=lib/commons-lang-2.1.jar +file.reference.commons-logging-1.1.jar=lib/commons-logging-1.1.jar +file.reference.cursos.jar=lib/cursos.jar +file.reference.evologger.jar=lib/evologger.jar +file.reference.evolute.jar=lib/evolute.jar +file.reference.fop.jar=lib/fop.jar +file.reference.jai_imageio.jar=lib/jai_imageio.jar +file.reference.jdom.jar=lib/jdom.jar +file.reference.log4j-1.2.15.jar=lib/log4j-1.2.15.jar +file.reference.mail.jar-1=lib/mail.jar +file.reference.postgresql-8.4-701.jdbc4.jar=lib/postgresql-8.4-701.jdbc4.jar +file.reference.serializer-2.7.0.jar=lib/serializer-2.7.0.jar +file.reference.shst.jar=lib/shst.jar +file.reference.xalan-2.7.0.jar=lib/xalan-2.7.0.jar +file.reference.xercesImpl-2.7.1.jar=lib/xercesImpl-2.7.1.jar +file.reference.xml-apis-1.3.04.jar=lib/xml-apis-1.3.04.jar +file.reference.xml-apis-ext-1.3.04.jar=lib/xml-apis-ext-1.3.04.jar +file.reference.xmlgraphics-commons-1.3.1.jar=lib/xmlgraphics-commons-1.3.1.jar +includes=** +j2ee.deploy.on.save=false +j2ee.platform=1.5 +j2ee.server.type=Tomcat60 +jar.compress=false +javac.classpath=\ + ${libs.jsf12.classpath}:\ + ${libs.jstl11.classpath}:\ + ${libs.jsf12-support.classpath}:\ + ${libs.woodstock-components.classpath}:\ + ${libs.woodstock-theme-default.classpath}:\ + ${file.reference.jdom.jar}:\ + ${file.reference.ashwood-2.0.jar}:\ + ${file.reference.avalon-framework-4.2.0.jar}:\ + ${file.reference.activation.jar}:\ + ${file.reference.fop.jar}:\ + ${file.reference.jai_imageio.jar}:\ + ${file.reference.postgresql-8.4-701.jdbc4.jar}:\ + ${file.reference.evologger.jar}:\ + ${file.reference.batik-all-1.7.jar}:\ + ${file.reference.xmlgraphics-commons-1.3.1.jar}:\ + ${file.reference.commons-io-1.4.jar}:\ + ${file.reference.commons-collections-3.1.jar}:\ + ${file.reference.commons-lang-2.1.jar}:\ + ${file.reference.commons-logging-1.1.jar}:\ + ${file.reference.evolute.jar}:\ + ${file.reference.mail.jar-1}:\ + ${file.reference.log4j-1.2.15.jar}:\ + ${file.reference.xalan-2.7.0.jar}:\ + ${file.reference.xercesImpl-2.7.1.jar}:\ + ${file.reference.xml-apis-1.3.04.jar}:\ + ${file.reference.xml-apis-ext-1.3.04.jar}:\ + ${file.reference.serializer-2.7.0.jar}:\ + ${file.reference.cursos.jar}:\ + ${file.reference.shst.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.debug=true +javac.deprecation=false +javac.source=1.5 +javac.target=1.5 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir}:\ + ${libs.junit.classpath}:\ + ${libs.junit_4.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.preview=true +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +jspcompilation.classpath=${jspc.classpath}:${javac.classpath} +lib.dir=${web.docbase.dir}/WEB-INF/lib +persistence.xml.dir=${conf.dir} +platform.active=default_platform +resource.dir=setup +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +# Space-separated list of JVM arguments used when running a class with a main method +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): +runmain.jvmargs= +source.encoding=ISO-8859-1 +source.root=src +src.dir=${source.root}/java +test.src.dir=test +war.content.additional=\ + ${libs.exceptionhandler-runtime.classpath} +war.ear.name=PlanosActuacao.war +war.name=PlanosActuacao.war +web.docbase.dir=web +webinf.dir=web/WEB-INF diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/project.xml b/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/project.xml new file mode 100644 index 00000000..e7f09cca --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/nbproject/project.xml @@ -0,0 +1,141 @@ + + + org.netbeans.modules.web.project + + + + PlanosActuacao + 1.6 + + + ${libs.jsf12.classpath} + WEB-INF/lib + + + ${libs.jstl11.classpath} + WEB-INF/lib + + + ${libs.jsf12-support.classpath} + WEB-INF/lib + + + ${libs.woodstock-components.classpath} + WEB-INF/lib + + + ${libs.woodstock-theme-default.classpath} + WEB-INF/lib + + + ${file.reference.jdom.jar} + WEB-INF/lib + + + ${file.reference.ashwood-2.0.jar} + WEB-INF/lib + + + ${file.reference.avalon-framework-4.2.0.jar} + WEB-INF/lib + + + ${file.reference.activation.jar} + WEB-INF/lib + + + ${file.reference.fop.jar} + WEB-INF/lib + + + ${file.reference.jai_imageio.jar} + WEB-INF/lib + + + ${file.reference.postgresql-8.4-701.jdbc4.jar} + WEB-INF/lib + + + ${file.reference.evologger.jar} + WEB-INF/lib + + + ${file.reference.batik-all-1.7.jar} + WEB-INF/lib + + + ${file.reference.xmlgraphics-commons-1.3.1.jar} + WEB-INF/lib + + + ${file.reference.commons-io-1.4.jar} + WEB-INF/lib + + + ${file.reference.commons-collections-3.1.jar} + WEB-INF/lib + + + ${file.reference.commons-lang-2.1.jar} + WEB-INF/lib + + + ${file.reference.commons-logging-1.1.jar} + WEB-INF/lib + + + ${file.reference.evolute.jar} + WEB-INF/lib + + + ${file.reference.mail.jar-1} + WEB-INF/lib + + + ${file.reference.log4j-1.2.15.jar} + WEB-INF/lib + + + ${file.reference.xalan-2.7.0.jar} + WEB-INF/lib + + + ${file.reference.xercesImpl-2.7.1.jar} + WEB-INF/lib + + + ${file.reference.xml-apis-1.3.04.jar} + WEB-INF/lib + + + ${file.reference.xml-apis-ext-1.3.04.jar} + WEB-INF/lib + + + ${file.reference.serializer-2.7.0.jar} + WEB-INF/lib + + + ${file.reference.cursos.jar} + WEB-INF/lib + + + ${file.reference.shst.jar} + WEB-INF/lib + + + + + ${libs.exceptionhandler-runtime.classpath} + WEB-INF/lib + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/conf/MANIFEST.MF b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/conf/MANIFEST.MF new file mode 100644 index 00000000..59499bce --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/app.properties b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/app.properties new file mode 100644 index 00000000..bc8f2e0f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/app.properties @@ -0,0 +1,40 @@ + +# production +server.siprp = localhost +port.siprp = 5436 +database.siprp = siprp +username.siprp = postgres +#password.siprp = + +server.siprp_local = localhost +port.siprp_local = 5436 +database.siprp_local = siprp_local_3 +username.siprp_local = postgres +#password.siprp_local = + + + +# tests +#server.siprp = localhost +#port.siprp = 5432 +#database.siprp = siprp +#username.siprp = postgres +#password.siprp = Typein +# +#server.siprp_local = localhost +#port.siprp_local = 5432 +#database.siprp_local = siprp_local_3 +#username.siprp_local = postgres +#password.siprp_local = Typein + +#server.siprp = www.evolute.pt +#port.siprp = 5436 +#database.siprp = siprp +#username.siprp = postgres +#password.siprp = -rg2hpgsql +# +#server.siprp_local = www.evolute.pt +#port.siprp_local = 5436 +#database.siprp_local = siprp_local_3 +#username.siprp_local = postgres +#password.siprp_local = -rg2hpgsql diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/DBConstants.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/DBConstants.java new file mode 100644 index 00000000..91408006 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/DBConstants.java @@ -0,0 +1,41 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db; + +import com.evolute.utils.Singleton; + +/** + * + * @author dneves + */ +public interface DBConstants +{ + public static enum DB { SIPRP, SIPRP_LOCAL }; + + public static final String DEFAULT_PROVIDER = Singleton.DEFAULT_OBJECT_PROVIDER; + public static final String LOCAL_PROVIDER = "LOCAL_PROVIDER"; + + public static final String DEFAULT_DBMANAGER = "DEFAULT_DBMANAGER"; + public static final String LOCAL_DBMANAGER = "LOCAL_DBMANAGER"; + + public static final String SESSION_CONNECTION = "SESSION_CONNECTION"; + public static final String SESSION_CONNECTION_LOCAL = "SESSION_CONNECTION_LOCAL"; + + public static final String SERVER_SIPRP = "server.siprp"; + public static final String PORT_SIPRP = "port.siprp"; + public static final String DATABASE_SIPRP = "database.siprp"; + public static final String USERNAME_SIPRP = "username.siprp"; + public static final String PASSWORD_SIPRP = "password.siprp"; + + public static final String SERVER_SIPRP_LOCAL = "server.siprp_local"; + public static final String PORT_SIPRP_LOCAL = "port.siprp_local"; + public static final String DATABASE_SIPRP_LOCAL = "database.siprp_local"; + public static final String USERNAME_SIPRP_LOCAL = "username.siprp_local"; + public static final String PASSWORD_SIPRP_LOCAL = "password.siprp_local"; + + public static final String CONNECTION_URL = "connection.url"; + public static final String LOCAL_CONNECTION_URL = "connection.local_url"; +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/DBPropertiesLoader.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/DBPropertiesLoader.java new file mode 100644 index 00000000..ec62fc2b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/DBPropertiesLoader.java @@ -0,0 +1,61 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db; + +import com.evolute.properties.EvoAbstractPropertiesLoader; +import com.evolute.properties.PropertiesException; + +/** + * + * @author dneves + */ +public class DBPropertiesLoader extends EvoAbstractPropertiesLoader +{ + private static DBPropertiesLoader INSTANCE = null; + + private String connection_url = null; + private String local_connection_url = null; + + + private DBPropertiesLoader() + { + super( null, null, null, null ); + } + + public static synchronized DBPropertiesLoader getInstance() + { + if ( INSTANCE == null ) + { + INSTANCE = new DBPropertiesLoader(); + } + return INSTANCE; + } + + @Override + protected void postLoad() throws PropertiesException + { + String server = findProperty( DBConstants.SERVER_SIPRP ); + int port = findProperty( DBConstants.PORT_SIPRP, new Integer( -1 ) ); + String database = findProperty( DBConstants.DATABASE_SIPRP ); + connection_url = "jdbc:postgresql://" + server + ":" + port + "/" + database; + + server = findProperty( DBConstants.SERVER_SIPRP_LOCAL ); + port = findProperty( DBConstants.PORT_SIPRP_LOCAL, new Integer( -1 ) ); + database = findProperty( DBConstants.DATABASE_SIPRP_LOCAL ); + local_connection_url = "jdbc:postgresql://" + server + ":" + port + "/" + database; + } + + public String getConnectionURL() + { + return connection_url; + } + + public String getLocalConnectionURL() + { + return local_connection_url; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Acidentados.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Acidentados.java new file mode 100644 index 00000000..293c1eb8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Acidentados.java @@ -0,0 +1,1065 @@ +/* +* Acidentados.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Acidentados extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Acidentados.ID, Acidentados.ID_INDEX ); + FIELD_INDEXES.put( Acidentados.ID_FULL, Acidentados.ID_INDEX ); + FIELD_INDEXES.put( Acidentados.NOME, Acidentados.NOME_INDEX ); + FIELD_INDEXES.put( Acidentados.NOME_FULL, Acidentados.NOME_INDEX ); + FIELD_INDEXES.put( Acidentados.DATA_NASCIMENTO, Acidentados.DATA_NASCIMENTO_INDEX ); + FIELD_INDEXES.put( Acidentados.DATA_NASCIMENTO_FULL, Acidentados.DATA_NASCIMENTO_INDEX ); + FIELD_INDEXES.put( Acidentados.BILHETE_IDENTIDADE, Acidentados.BILHETE_IDENTIDADE_INDEX ); + FIELD_INDEXES.put( Acidentados.BILHETE_IDENTIDADE_FULL, Acidentados.BILHETE_IDENTIDADE_INDEX ); + FIELD_INDEXES.put( Acidentados.MORADA, Acidentados.MORADA_INDEX ); + FIELD_INDEXES.put( Acidentados.MORADA_FULL, Acidentados.MORADA_INDEX ); + FIELD_INDEXES.put( Acidentados.COD_POSTAL, Acidentados.COD_POSTAL_INDEX ); + FIELD_INDEXES.put( Acidentados.COD_POSTAL_FULL, Acidentados.COD_POSTAL_INDEX ); + FIELD_INDEXES.put( Acidentados.LOCALIDADE, Acidentados.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( Acidentados.LOCALIDADE_FULL, Acidentados.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( Acidentados.CONTACTO_TELEFONICO, Acidentados.CONTACTO_TELEFONICO_INDEX ); + FIELD_INDEXES.put( Acidentados.CONTACTO_TELEFONICO_FULL, Acidentados.CONTACTO_TELEFONICO_INDEX ); + FIELD_INDEXES.put( Acidentados.DATA_ADMISSAO, Acidentados.DATA_ADMISSAO_INDEX ); + FIELD_INDEXES.put( Acidentados.DATA_ADMISSAO_FULL, Acidentados.DATA_ADMISSAO_INDEX ); + FIELD_INDEXES.put( Acidentados.FUNCAO, Acidentados.FUNCAO_INDEX ); + FIELD_INDEXES.put( Acidentados.FUNCAO_FULL, Acidentados.FUNCAO_INDEX ); + FIELD_INDEXES.put( Acidentados.TRABALHADOR_ID, Acidentados.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( Acidentados.TRABALHADOR_ID_FULL, Acidentados.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( Acidentados.TURNO, Acidentados.TURNO_INDEX ); + FIELD_INDEXES.put( Acidentados.TURNO_FULL, Acidentados.TURNO_INDEX ); + FIELD_INDEXES.put( Acidentados.NUMERO_MECANOGRAFICO, Acidentados.NUMERO_MECANOGRAFICO_INDEX ); + FIELD_INDEXES.put( Acidentados.NUMERO_MECANOGRAFICO_FULL, Acidentados.NUMERO_MECANOGRAFICO_INDEX ); + FIELD_INDEXES.put( Acidentados.NOME_SUPERIOR_HIERARQUICO, Acidentados.NOME_SUPERIOR_HIERARQUICO_INDEX ); + FIELD_INDEXES.put( Acidentados.NOME_SUPERIOR_HIERARQUICO_FULL, Acidentados.NOME_SUPERIOR_HIERARQUICO_INDEX ); + FIELD_INDEXES.put( Acidentados.EMAIL_SUPERIOR_HIERARQUICO, Acidentados.EMAIL_SUPERIOR_HIERARQUICO_INDEX ); + FIELD_INDEXES.put( Acidentados.EMAIL_SUPERIOR_HIERARQUICO_FULL, Acidentados.EMAIL_SUPERIOR_HIERARQUICO_INDEX ); + FIELD_INDEXES.put( Acidentados.ESTABELECIMENTO_ORIGEM, Acidentados.ESTABELECIMENTO_ORIGEM_INDEX ); + FIELD_INDEXES.put( Acidentados.ESTABELECIMENTO_ORIGEM_FULL, Acidentados.ESTABELECIMENTO_ORIGEM_INDEX ); + FIELD_INDEXES.put( Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO, Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO_INDEX ); + FIELD_INDEXES.put( Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO_FULL, Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "acidentados"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.acidentados"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "acidentados.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "acidentados.nome"; + public static final int NOME_INDEX = 1; + public static final String DATA_NASCIMENTO = "data_nascimento"; + public static final String DATA_NASCIMENTO_FULL = "acidentados.data_nascimento"; + public static final int DATA_NASCIMENTO_INDEX = 2; + public static final String BILHETE_IDENTIDADE = "bilhete_identidade"; + public static final String BILHETE_IDENTIDADE_FULL = "acidentados.bilhete_identidade"; + public static final int BILHETE_IDENTIDADE_INDEX = 3; + public static final String MORADA = "morada"; + public static final String MORADA_FULL = "acidentados.morada"; + public static final int MORADA_INDEX = 4; + public static final String COD_POSTAL = "cod_postal"; + public static final String COD_POSTAL_FULL = "acidentados.cod_postal"; + public static final int COD_POSTAL_INDEX = 5; + public static final String LOCALIDADE = "localidade"; + public static final String LOCALIDADE_FULL = "acidentados.localidade"; + public static final int LOCALIDADE_INDEX = 6; + public static final String CONTACTO_TELEFONICO = "contacto_telefonico"; + public static final String CONTACTO_TELEFONICO_FULL = "acidentados.contacto_telefonico"; + public static final int CONTACTO_TELEFONICO_INDEX = 7; + public static final String DATA_ADMISSAO = "data_admissao"; + public static final String DATA_ADMISSAO_FULL = "acidentados.data_admissao"; + public static final int DATA_ADMISSAO_INDEX = 8; + public static final String FUNCAO = "funcao"; + public static final String FUNCAO_FULL = "acidentados.funcao"; + public static final int FUNCAO_INDEX = 9; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "acidentados.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 10; + public static final String TURNO = "turno"; + public static final String TURNO_FULL = "acidentados.turno"; + public static final int TURNO_INDEX = 11; + public static final String NUMERO_MECANOGRAFICO = "numero_mecanografico"; + public static final String NUMERO_MECANOGRAFICO_FULL = "acidentados.numero_mecanografico"; + public static final int NUMERO_MECANOGRAFICO_INDEX = 12; + public static final String NOME_SUPERIOR_HIERARQUICO = "nome_superior_hierarquico"; + public static final String NOME_SUPERIOR_HIERARQUICO_FULL = "acidentados.nome_superior_hierarquico"; + public static final int NOME_SUPERIOR_HIERARQUICO_INDEX = 13; + public static final String EMAIL_SUPERIOR_HIERARQUICO = "email_superior_hierarquico"; + public static final String EMAIL_SUPERIOR_HIERARQUICO_FULL = "acidentados.email_superior_hierarquico"; + public static final int EMAIL_SUPERIOR_HIERARQUICO_INDEX = 14; + public static final String ESTABELECIMENTO_ORIGEM = "estabelecimento_origem"; + public static final String ESTABELECIMENTO_ORIGEM_FULL = "acidentados.estabelecimento_origem"; + public static final int ESTABELECIMENTO_ORIGEM_INDEX = 15; + public static final String DATA_EMAIL_SUPERIOR_HIERARQUICO = "data_email_superior_hierarquico"; + public static final String DATA_EMAIL_SUPERIOR_HIERARQUICO_FULL = "acidentados.data_email_superior_hierarquico"; + public static final int DATA_EMAIL_SUPERIOR_HIERARQUICO_INDEX = 16; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, DATA_NASCIMENTO, BILHETE_IDENTIDADE, MORADA, COD_POSTAL, LOCALIDADE, + CONTACTO_TELEFONICO, DATA_ADMISSAO, FUNCAO, TRABALHADOR_ID, TURNO, + NUMERO_MECANOGRAFICO, NOME_SUPERIOR_HIERARQUICO, + EMAIL_SUPERIOR_HIERARQUICO, ESTABELECIMENTO_ORIGEM, + DATA_EMAIL_SUPERIOR_HIERARQUICO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + DATA_NASCIMENTO, TABLENAME + "." + BILHETE_IDENTIDADE, TABLENAME + "." + MORADA, TABLENAME + "." + COD_POSTAL, TABLENAME + "." + LOCALIDADE, + TABLENAME + "." + CONTACTO_TELEFONICO, TABLENAME + "." + DATA_ADMISSAO, TABLENAME + "." + FUNCAO, TABLENAME + "." + TRABALHADOR_ID, TABLENAME + "." + TURNO, + TABLENAME + "." + NUMERO_MECANOGRAFICO, TABLENAME + "." + NOME_SUPERIOR_HIERARQUICO, + TABLENAME + "." + EMAIL_SUPERIOR_HIERARQUICO, TABLENAME + "." + ESTABELECIMENTO_ORIGEM, + TABLENAME + "." + DATA_EMAIL_SUPERIOR_HIERARQUICO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, DATA_NASCIMENTO, BILHETE_IDENTIDADE, MORADA, COD_POSTAL, LOCALIDADE, + CONTACTO_TELEFONICO, DATA_ADMISSAO, FUNCAO, TRABALHADOR_ID, TURNO, + NUMERO_MECANOGRAFICO, NOME_SUPERIOR_HIERARQUICO, + EMAIL_SUPERIOR_HIERARQUICO, ESTABELECIMENTO_ORIGEM, + DATA_EMAIL_SUPERIOR_HIERARQUICO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, DATA_NASCIMENTO, BILHETE_IDENTIDADE, MORADA, COD_POSTAL, LOCALIDADE, + CONTACTO_TELEFONICO, DATA_ADMISSAO, FUNCAO, TRABALHADOR_ID, TURNO, + NUMERO_MECANOGRAFICO, NOME_SUPERIOR_HIERARQUICO, + EMAIL_SUPERIOR_HIERARQUICO, ESTABELECIMENTO_ORIGEM, + DATA_EMAIL_SUPERIOR_HIERARQUICO, }; + + private Integer id; + private String nome; + private java.util.Date data_nascimento; + private String bilhete_identidade; + private String morada; + private String cod_postal; + private String localidade; + private String contacto_telefonico; + private java.util.Date data_admissao; + private String funcao; + private Integer trabalhador_id; + private String turno; + private String numero_mecanografico; + private String nome_superior_hierarquico; + private String email_superior_hierarquico; + private String estabelecimento_origem; + private java.util.Date data_email_superior_hierarquico; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Acidentados() + { + super(); + dirtyProperties = new boolean[]{ 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.ListfromAnalisesAcidentes_acidentado_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.AnalisesAcidentesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.AnalisesAcidentesData.class , getPrimaryKey().getMap().get("id"), "acidentado_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 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 getBilhete_identidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( BILHETE_IDENTIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.bilhete_identidade; + } + + public void setBilhete_identidade( String bilhete_identidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( BILHETE_IDENTIDADE, bilhete_identidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.bilhete_identidade = bilhete_identidade; + LAZY_LOADED_OBJECTS.put( BILHETE_IDENTIDADE, 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 getCod_postal() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( COD_POSTAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.cod_postal; + } + + public void setCod_postal( String cod_postal ) + { + try + { + setLockedForRefresh( true ); + preProcess( COD_POSTAL, cod_postal ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.cod_postal = cod_postal; + LAZY_LOADED_OBJECTS.put( COD_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 getContacto_telefonico() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONTACTO_TELEFONICO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.contacto_telefonico; + } + + public void setContacto_telefonico( String contacto_telefonico ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONTACTO_TELEFONICO, contacto_telefonico ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.contacto_telefonico = contacto_telefonico; + LAZY_LOADED_OBJECTS.put( CONTACTO_TELEFONICO, 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 getFuncao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FUNCAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.funcao; + } + + public void setFuncao( String funcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( FUNCAO, funcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.funcao = funcao; + LAZY_LOADED_OBJECTS.put( FUNCAO, 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 String getTurno() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TURNO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.turno; + } + + public void setTurno( String turno ) + { + try + { + setLockedForRefresh( true ); + preProcess( TURNO, turno ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.turno = turno; + LAZY_LOADED_OBJECTS.put( TURNO, 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 String getNome_superior_hierarquico() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_SUPERIOR_HIERARQUICO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_superior_hierarquico; + } + + public void setNome_superior_hierarquico( String nome_superior_hierarquico ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_SUPERIOR_HIERARQUICO, nome_superior_hierarquico ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_superior_hierarquico = nome_superior_hierarquico; + LAZY_LOADED_OBJECTS.put( NOME_SUPERIOR_HIERARQUICO, Boolean.TRUE ); + } + + public String getEmail_superior_hierarquico() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( EMAIL_SUPERIOR_HIERARQUICO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.email_superior_hierarquico; + } + + public void setEmail_superior_hierarquico( String email_superior_hierarquico ) + { + try + { + setLockedForRefresh( true ); + preProcess( EMAIL_SUPERIOR_HIERARQUICO, email_superior_hierarquico ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.email_superior_hierarquico = email_superior_hierarquico; + LAZY_LOADED_OBJECTS.put( EMAIL_SUPERIOR_HIERARQUICO, Boolean.TRUE ); + } + + public String getEstabelecimento_origem() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTABELECIMENTO_ORIGEM ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estabelecimento_origem; + } + + public void setEstabelecimento_origem( String estabelecimento_origem ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTABELECIMENTO_ORIGEM, estabelecimento_origem ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estabelecimento_origem = estabelecimento_origem; + LAZY_LOADED_OBJECTS.put( ESTABELECIMENTO_ORIGEM, Boolean.TRUE ); + } + + public java.util.Date getData_email_superior_hierarquico() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_EMAIL_SUPERIOR_HIERARQUICO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_email_superior_hierarquico; + } + + public void setData_email_superior_hierarquico( java.util.Date data_email_superior_hierarquico ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_EMAIL_SUPERIOR_HIERARQUICO, data_email_superior_hierarquico ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_email_superior_hierarquico = data_email_superior_hierarquico; + LAZY_LOADED_OBJECTS.put( DATA_EMAIL_SUPERIOR_HIERARQUICO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Acidentados.ID_INDEX: + value = getId(); + break; + case Acidentados.NOME_INDEX: + value = getNome(); + break; + case Acidentados.DATA_NASCIMENTO_INDEX: + value = getData_nascimento(); + break; + case Acidentados.BILHETE_IDENTIDADE_INDEX: + value = getBilhete_identidade(); + break; + case Acidentados.MORADA_INDEX: + value = getMorada(); + break; + case Acidentados.COD_POSTAL_INDEX: + value = getCod_postal(); + break; + case Acidentados.LOCALIDADE_INDEX: + value = getLocalidade(); + break; + case Acidentados.CONTACTO_TELEFONICO_INDEX: + value = getContacto_telefonico(); + break; + case Acidentados.DATA_ADMISSAO_INDEX: + value = getData_admissao(); + break; + case Acidentados.FUNCAO_INDEX: + value = getFuncao(); + break; + case Acidentados.TRABALHADOR_ID_INDEX: + value = getTrabalhador_id(); + break; + case Acidentados.TURNO_INDEX: + value = getTurno(); + break; + case Acidentados.NUMERO_MECANOGRAFICO_INDEX: + value = getNumero_mecanografico(); + break; + case Acidentados.NOME_SUPERIOR_HIERARQUICO_INDEX: + value = getNome_superior_hierarquico(); + break; + case Acidentados.EMAIL_SUPERIOR_HIERARQUICO_INDEX: + value = getEmail_superior_hierarquico(); + break; + case Acidentados.ESTABELECIMENTO_ORIGEM_INDEX: + value = getEstabelecimento_origem(); + break; + case Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO_INDEX: + value = getData_email_superior_hierarquico(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Acidentados.ID_INDEX: + value = this.id; + break; + case Acidentados.NOME_INDEX: + value = this.nome; + break; + case Acidentados.DATA_NASCIMENTO_INDEX: + value = this.data_nascimento; + break; + case Acidentados.BILHETE_IDENTIDADE_INDEX: + value = this.bilhete_identidade; + break; + case Acidentados.MORADA_INDEX: + value = this.morada; + break; + case Acidentados.COD_POSTAL_INDEX: + value = this.cod_postal; + break; + case Acidentados.LOCALIDADE_INDEX: + value = this.localidade; + break; + case Acidentados.CONTACTO_TELEFONICO_INDEX: + value = this.contacto_telefonico; + break; + case Acidentados.DATA_ADMISSAO_INDEX: + value = this.data_admissao; + break; + case Acidentados.FUNCAO_INDEX: + value = this.funcao; + break; + case Acidentados.TRABALHADOR_ID_INDEX: + value = this.trabalhador_id; + break; + case Acidentados.TURNO_INDEX: + value = this.turno; + break; + case Acidentados.NUMERO_MECANOGRAFICO_INDEX: + value = this.numero_mecanografico; + break; + case Acidentados.NOME_SUPERIOR_HIERARQUICO_INDEX: + value = this.nome_superior_hierarquico; + break; + case Acidentados.EMAIL_SUPERIOR_HIERARQUICO_INDEX: + value = this.email_superior_hierarquico; + break; + case Acidentados.ESTABELECIMENTO_ORIGEM_INDEX: + value = this.estabelecimento_origem; + break; + case Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO_INDEX: + value = this.data_email_superior_hierarquico; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Acidentados.ID_INDEX: + setId( ( Integer ) value ); + break; + case Acidentados.NOME_INDEX: + setNome( ( String ) value ); + break; + case Acidentados.DATA_NASCIMENTO_INDEX: + setData_nascimento( ( java.util.Date ) value ); + break; + case Acidentados.BILHETE_IDENTIDADE_INDEX: + setBilhete_identidade( ( String ) value ); + break; + case Acidentados.MORADA_INDEX: + setMorada( ( String ) value ); + break; + case Acidentados.COD_POSTAL_INDEX: + setCod_postal( ( String ) value ); + break; + case Acidentados.LOCALIDADE_INDEX: + setLocalidade( ( String ) value ); + break; + case Acidentados.CONTACTO_TELEFONICO_INDEX: + setContacto_telefonico( ( String ) value ); + break; + case Acidentados.DATA_ADMISSAO_INDEX: + setData_admissao( ( java.util.Date ) value ); + break; + case Acidentados.FUNCAO_INDEX: + setFuncao( ( String ) value ); + break; + case Acidentados.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case Acidentados.TURNO_INDEX: + setTurno( ( String ) value ); + break; + case Acidentados.NUMERO_MECANOGRAFICO_INDEX: + setNumero_mecanografico( ( String ) value ); + break; + case Acidentados.NOME_SUPERIOR_HIERARQUICO_INDEX: + setNome_superior_hierarquico( ( String ) value ); + break; + case Acidentados.EMAIL_SUPERIOR_HIERARQUICO_INDEX: + setEmail_superior_hierarquico( ( String ) value ); + break; + case Acidentados.ESTABELECIMENTO_ORIGEM_INDEX: + setEstabelecimento_origem( ( String ) value ); + break; + case Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO_INDEX: + setData_email_superior_hierarquico( ( java.util.Date ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Acidentados.ID_INDEX: + this.id = ( Integer ) value; + break; + case Acidentados.NOME_INDEX: + this.nome = ( String ) value; + break; + case Acidentados.DATA_NASCIMENTO_INDEX: + this.data_nascimento = ( java.util.Date ) value; + break; + case Acidentados.BILHETE_IDENTIDADE_INDEX: + this.bilhete_identidade = ( String ) value; + break; + case Acidentados.MORADA_INDEX: + this.morada = ( String ) value; + break; + case Acidentados.COD_POSTAL_INDEX: + this.cod_postal = ( String ) value; + break; + case Acidentados.LOCALIDADE_INDEX: + this.localidade = ( String ) value; + break; + case Acidentados.CONTACTO_TELEFONICO_INDEX: + this.contacto_telefonico = ( String ) value; + break; + case Acidentados.DATA_ADMISSAO_INDEX: + this.data_admissao = ( java.util.Date ) value; + break; + case Acidentados.FUNCAO_INDEX: + this.funcao = ( String ) value; + break; + case Acidentados.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case Acidentados.TURNO_INDEX: + this.turno = ( String ) value; + break; + case Acidentados.NUMERO_MECANOGRAFICO_INDEX: + this.numero_mecanografico = ( String ) value; + break; + case Acidentados.NOME_SUPERIOR_HIERARQUICO_INDEX: + this.nome_superior_hierarquico = ( String ) value; + break; + case Acidentados.EMAIL_SUPERIOR_HIERARQUICO_INDEX: + this.email_superior_hierarquico = ( String ) value; + break; + case Acidentados.ESTABELECIMENTO_ORIGEM_INDEX: + this.estabelecimento_origem = ( String ) value; + break; + case Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO_INDEX: + this.data_email_superior_hierarquico = ( 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 Acidentados.ID_INDEX: + theClass = Integer.class; + break; + case Acidentados.NOME_INDEX: + theClass = String.class; + break; + case Acidentados.DATA_NASCIMENTO_INDEX: + theClass = java.util.Date.class; + break; + case Acidentados.BILHETE_IDENTIDADE_INDEX: + theClass = String.class; + break; + case Acidentados.MORADA_INDEX: + theClass = String.class; + break; + case Acidentados.COD_POSTAL_INDEX: + theClass = String.class; + break; + case Acidentados.LOCALIDADE_INDEX: + theClass = String.class; + break; + case Acidentados.CONTACTO_TELEFONICO_INDEX: + theClass = String.class; + break; + case Acidentados.DATA_ADMISSAO_INDEX: + theClass = java.util.Date.class; + break; + case Acidentados.FUNCAO_INDEX: + theClass = String.class; + break; + case Acidentados.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case Acidentados.TURNO_INDEX: + theClass = String.class; + break; + case Acidentados.NUMERO_MECANOGRAFICO_INDEX: + theClass = String.class; + break; + case Acidentados.NOME_SUPERIOR_HIERARQUICO_INDEX: + theClass = String.class; + break; + case Acidentados.EMAIL_SUPERIOR_HIERARQUICO_INDEX: + theClass = String.class; + break; + case Acidentados.ESTABELECIMENTO_ORIGEM_INDEX: + theClass = String.class; + break; + case Acidentados.DATA_EMAIL_SUPERIOR_HIERARQUICO_INDEX: + theClass = java.util.Date.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Acidentados._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, Acidentados.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Actualizacao.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Actualizacao.java new file mode 100644 index 00000000..bd8499be --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Actualizacao.java @@ -0,0 +1,178 @@ +/* +* Actualizacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Actualizacao extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "actualizacao"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.actualizacao"; + + public static final int _INVALID__INDEX = -1; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + }; + + + protected com.evolute.entity.utils.ObjectPrimaryKey primaryKey; + + public Actualizacao() + { + super(); + dirtyProperties = new boolean[]{ }; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + throw new RuntimeException( "getPrimaryKeyName on Actualizacao is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Actualizacao._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.ObjectPrimaryKey( TABLENAME, Actualizacao.PK_FIELD_NAMES ); + } + } + + @Override + public com.evolute.entity.utils.ObjectPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/AnalisesAcidentes.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/AnalisesAcidentes.java new file mode 100644 index 00000000..529fd159 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/AnalisesAcidentes.java @@ -0,0 +1,5786 @@ +/* +* AnalisesAcidentes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class AnalisesAcidentes extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( AnalisesAcidentes.ID, AnalisesAcidentes.ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ID_FULL, AnalisesAcidentes.ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_ACIDENTE, AnalisesAcidentes.DATA_ACIDENTE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_ACIDENTE_FULL, AnalisesAcidentes.DATA_ACIDENTE_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AnalisesAcidentes.CLASS_IDENTIFIER, AnalisesAcidentes.ACIDENTADO_ID, AnalisesAcidentes.TO_ACIDENTADO_ID ); + FIELD_INDEXES.put( AnalisesAcidentes.ACIDENTADO_ID, AnalisesAcidentes.ACIDENTADO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ACIDENTADO_ID_FULL, AnalisesAcidentes.ACIDENTADO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TO_ACIDENTADO_ID, AnalisesAcidentes.TO_ACIDENTADO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESTADO, AnalisesAcidentes.ESTADO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESTADO_FULL, AnalisesAcidentes.ESTADO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESTABELECIMENTO_ID, AnalisesAcidentes.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESTABELECIMENTO_ID_FULL, AnalisesAcidentes.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.HORAS_TURNO, AnalisesAcidentes.HORAS_TURNO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.HORAS_TURNO_FULL, AnalisesAcidentes.HORAS_TURNO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.SECCAO, AnalisesAcidentes.SECCAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.SECCAO_FULL, AnalisesAcidentes.SECCAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LOCAL_TRABALHO, AnalisesAcidentes.LOCAL_TRABALHO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LOCAL_TRABALHO_FULL, AnalisesAcidentes.LOCAL_TRABALHO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TAREFA, AnalisesAcidentes.TAREFA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TAREFA_FULL, AnalisesAcidentes.TAREFA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.SUBSTANCIAS, AnalisesAcidentes.SUBSTANCIAS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.SUBSTANCIAS_FULL, AnalisesAcidentes.SUBSTANCIAS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.SUPERIOR_HIERARQUICO, AnalisesAcidentes.SUPERIOR_HIERARQUICO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.SUPERIOR_HIERARQUICO_FULL, AnalisesAcidentes.SUPERIOR_HIERARQUICO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CONDICOES, AnalisesAcidentes.CONDICOES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CONDICOES_FULL, AnalisesAcidentes.CONDICOES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TESTEMUNHAS, AnalisesAcidentes.TESTEMUNHAS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TESTEMUNHAS_FULL, AnalisesAcidentes.TESTEMUNHAS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DESCRICAO, AnalisesAcidentes.DESCRICAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DESCRICAO_FULL, AnalisesAcidentes.DESCRICAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CONCLUSOES, AnalisesAcidentes.CONCLUSOES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CONCLUSOES_FULL, AnalisesAcidentes.CONCLUSOES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ACCOES, AnalisesAcidentes.ACCOES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ACCOES_FULL, AnalisesAcidentes.ACCOES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.HORA_ACIDENTE, AnalisesAcidentes.HORA_ACIDENTE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.HORA_ACIDENTE_FULL, AnalisesAcidentes.HORA_ACIDENTE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.FORMACAO_SHST, AnalisesAcidentes.FORMACAO_SHST_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.FORMACAO_SHST_FULL, AnalisesAcidentes.FORMACAO_SHST_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE, AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE_FULL, AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR, AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR_FULL, AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR, AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR_FULL, AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1_FULL, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2_FULL, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3_FULL, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4_FULL, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES, AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES_FULL, AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES, AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES_FULL, AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_FULL, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_FULL, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_FULL, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_FULL, AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_CABECA, AnalisesAcidentes.LESAO_CABECA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_CABECA_FULL, AnalisesAcidentes.LESAO_CABECA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_PESCOCO, AnalisesAcidentes.LESAO_PESCOCO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_PESCOCO_FULL, AnalisesAcidentes.LESAO_PESCOCO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_TRONCO, AnalisesAcidentes.LESAO_TRONCO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_TRONCO_FULL, AnalisesAcidentes.LESAO_TRONCO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR, AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR_FULL, AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ, AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ_FULL, AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_MEMBRO_INF_DIR, AnalisesAcidentes.LESAO_MEMBRO_INF_DIR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_MEMBRO_INF_DIR_FULL, AnalisesAcidentes.LESAO_MEMBRO_INF_DIR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ, AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ_FULL, AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESPECIF1, AnalisesAcidentes.ESPECIF1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESPECIF1_FULL, AnalisesAcidentes.ESPECIF1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESPECIF2, AnalisesAcidentes.ESPECIF2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESPECIF2_FULL, AnalisesAcidentes.ESPECIF2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESPECIF3, AnalisesAcidentes.ESPECIF3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESPECIF3_FULL, AnalisesAcidentes.ESPECIF3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESPECIF4, AnalisesAcidentes.ESPECIF4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESPECIF4_FULL, AnalisesAcidentes.ESPECIF4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TIPO_INCAPACIDADE, AnalisesAcidentes.TIPO_INCAPACIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TIPO_INCAPACIDADE_FULL, AnalisesAcidentes.TIPO_INCAPACIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.COEF_INCAPACIDADE, AnalisesAcidentes.COEF_INCAPACIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.COEF_INCAPACIDADE_FULL, AnalisesAcidentes.COEF_INCAPACIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_AVAL_INCAPACIDADE, AnalisesAcidentes.DATA_AVAL_INCAPACIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_AVAL_INCAPACIDADE_FULL, AnalisesAcidentes.DATA_AVAL_INCAPACIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_REV_INCAPACIDADE, AnalisesAcidentes.DATA_REV_INCAPACIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_REV_INCAPACIDADE_FULL, AnalisesAcidentes.DATA_REV_INCAPACIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.PERIODO_INCAPACIDADE_DE, AnalisesAcidentes.PERIODO_INCAPACIDADE_DE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.PERIODO_INCAPACIDADE_DE_FULL, AnalisesAcidentes.PERIODO_INCAPACIDADE_DE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.PERIODO_INCAPACIDADE_A, AnalisesAcidentes.PERIODO_INCAPACIDADE_A_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.PERIODO_INCAPACIDADE_A_FULL, AnalisesAcidentes.PERIODO_INCAPACIDADE_A_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_FLEXAO, AnalisesAcidentes.IMG_FLEXAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_FLEXAO_FULL, AnalisesAcidentes.IMG_FLEXAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_EXT1, AnalisesAcidentes.IMG_EXT1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_EXT1_FULL, AnalisesAcidentes.IMG_EXT1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_EXT2, AnalisesAcidentes.IMG_EXT2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_EXT2_FULL, AnalisesAcidentes.IMG_EXT2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_CAB2, AnalisesAcidentes.IMG_CAB2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_CAB2_FULL, AnalisesAcidentes.IMG_CAB2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_CAB3, AnalisesAcidentes.IMG_CAB3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_CAB3_FULL, AnalisesAcidentes.IMG_CAB3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA2, AnalisesAcidentes.IMG_MA2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA2_FULL, AnalisesAcidentes.IMG_MA2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA3, AnalisesAcidentes.IMG_MA3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA3_FULL, AnalisesAcidentes.IMG_MA3_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA5, AnalisesAcidentes.IMG_MA5_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA5_FULL, AnalisesAcidentes.IMG_MA5_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA6, AnalisesAcidentes.IMG_MA6_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA6_FULL, AnalisesAcidentes.IMG_MA6_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA8, AnalisesAcidentes.IMG_MA8_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA8_FULL, AnalisesAcidentes.IMG_MA8_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA10, AnalisesAcidentes.IMG_MA10_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA10_FULL, AnalisesAcidentes.IMG_MA10_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_CARGA, AnalisesAcidentes.RESTRICAO_CARGA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_CARGA_FULL, AnalisesAcidentes.RESTRICAO_CARGA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_MOTRICIDADE, AnalisesAcidentes.RESTRICAO_MOTRICIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_MOTRICIDADE_FULL, AnalisesAcidentes.RESTRICAO_MOTRICIDADE_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_CONDUCAO, AnalisesAcidentes.RESTRICAO_CONDUCAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_CONDUCAO_FULL, AnalisesAcidentes.RESTRICAO_CONDUCAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_VIBRACOES, AnalisesAcidentes.RESTRICAO_VIBRACOES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_VIBRACOES_FULL, AnalisesAcidentes.RESTRICAO_VIBRACOES_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_OUTRAS, AnalisesAcidentes.RESTRICAO_OUTRAS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RESTRICAO_OUTRAS_FULL, AnalisesAcidentes.RESTRICAO_OUTRAS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.MED_OBSERV, AnalisesAcidentes.MED_OBSERV_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.MED_OBSERV_FULL, AnalisesAcidentes.MED_OBSERV_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TIPO_LESAO, AnalisesAcidentes.TIPO_LESAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TIPO_LESAO_FULL, AnalisesAcidentes.TIPO_LESAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_ROT1, AnalisesAcidentes.IMG_ROT1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_ROT1_FULL, AnalisesAcidentes.IMG_ROT1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_ROT2, AnalisesAcidentes.IMG_ROT2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_ROT2_FULL, AnalisesAcidentes.IMG_ROT2_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_CAB1, AnalisesAcidentes.IMG_CAB1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_CAB1_FULL, AnalisesAcidentes.IMG_CAB1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_CAB4, AnalisesAcidentes.IMG_CAB4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_CAB4_FULL, AnalisesAcidentes.IMG_CAB4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA1, AnalisesAcidentes.IMG_MA1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA1_FULL, AnalisesAcidentes.IMG_MA1_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA4, AnalisesAcidentes.IMG_MA4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA4_FULL, AnalisesAcidentes.IMG_MA4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA7, AnalisesAcidentes.IMG_MA7_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA7_FULL, AnalisesAcidentes.IMG_MA7_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA9, AnalisesAcidentes.IMG_MA9_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.IMG_MA9_FULL, AnalisesAcidentes.IMG_MA9_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.EMPRESA_ID, AnalisesAcidentes.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.EMPRESA_ID_FULL, AnalisesAcidentes.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.MEDICO_ID, AnalisesAcidentes.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.MEDICO_ID_FULL, AnalisesAcidentes.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TECNICO_SAUDE_ID, AnalisesAcidentes.TECNICO_SAUDE_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TECNICO_SAUDE_ID_FULL, AnalisesAcidentes.TECNICO_SAUDE_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ANALISE_NR, AnalisesAcidentes.ANALISE_NR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ANALISE_NR_FULL, AnalisesAcidentes.ANALISE_NR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESTADO_ASSINATURA, AnalisesAcidentes.ESTADO_ASSINATURA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESTADO_ASSINATURA_FULL, AnalisesAcidentes.ESTADO_ASSINATURA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ASS_RESP_SEG, AnalisesAcidentes.ASS_RESP_SEG_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ASS_RESP_SEG_FULL, AnalisesAcidentes.ASS_RESP_SEG_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ASS_RESP_RH, AnalisesAcidentes.ASS_RESP_RH_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ASS_RESP_RH_FULL, AnalisesAcidentes.ASS_RESP_RH_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_CONSOLIDACAO, AnalisesAcidentes.DATA_CONSOLIDACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_CONSOLIDACAO_FULL, AnalisesAcidentes.DATA_CONSOLIDACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_ASSINATURA_SEG, AnalisesAcidentes.DATA_ASSINATURA_SEG_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_ASSINATURA_SEG_FULL, AnalisesAcidentes.DATA_ASSINATURA_SEG_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_ASSINATURA_RH, AnalisesAcidentes.DATA_ASSINATURA_RH_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_ASSINATURA_RH_FULL, AnalisesAcidentes.DATA_ASSINATURA_RH_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ASS_CONSOLIDACAO, AnalisesAcidentes.ASS_CONSOLIDACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ASS_CONSOLIDACAO_FULL, AnalisesAcidentes.ASS_CONSOLIDACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NOME_RESP_SEG, AnalisesAcidentes.NOME_RESP_SEG_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NOME_RESP_SEG_FULL, AnalisesAcidentes.NOME_RESP_SEG_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NOME_RESP_RH, AnalisesAcidentes.NOME_RESP_RH_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NOME_RESP_RH_FULL, AnalisesAcidentes.NOME_RESP_RH_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CAUSAS, AnalisesAcidentes.CAUSAS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CAUSAS_FULL, AnalisesAcidentes.CAUSAS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESTADO_ANTES_CORRECAO, AnalisesAcidentes.ESTADO_ANTES_CORRECAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ESTADO_ANTES_CORRECAO_FULL, AnalisesAcidentes.ESTADO_ANTES_CORRECAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.OBSERVACOES_CORRECAO, AnalisesAcidentes.OBSERVACOES_CORRECAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.OBSERVACOES_CORRECAO_FULL, AnalisesAcidentes.OBSERVACOES_CORRECAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CORRECAO, AnalisesAcidentes.CORRECAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CORRECAO_FULL, AnalisesAcidentes.CORRECAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ASS_SUPERIOR, AnalisesAcidentes.ASS_SUPERIOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.ASS_SUPERIOR_FULL, AnalisesAcidentes.ASS_SUPERIOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NOME_SUPERIOR, AnalisesAcidentes.NOME_SUPERIOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NOME_SUPERIOR_FULL, AnalisesAcidentes.NOME_SUPERIOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR, AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR_FULL, AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.AVERIGUADOR, AnalisesAcidentes.AVERIGUADOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.AVERIGUADOR_FULL, AnalisesAcidentes.AVERIGUADOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.AVERIGUACAO_POSTERIOR, AnalisesAcidentes.AVERIGUACAO_POSTERIOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.AVERIGUACAO_POSTERIOR_FULL, AnalisesAcidentes.AVERIGUACAO_POSTERIOR_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.AVERIGUACAO_OBS, AnalisesAcidentes.AVERIGUACAO_OBS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.AVERIGUACAO_OBS_FULL, AnalisesAcidentes.AVERIGUACAO_OBS_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NOME_RESP_CONSOLIDACAO, AnalisesAcidentes.NOME_RESP_CONSOLIDACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.NOME_RESP_CONSOLIDACAO_FULL, AnalisesAcidentes.NOME_RESP_CONSOLIDACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_INICIO_PROCESSO, AnalisesAcidentes.DATA_INICIO_PROCESSO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_INICIO_PROCESSO_FULL, AnalisesAcidentes.DATA_INICIO_PROCESSO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AnalisesAcidentes.CLASS_IDENTIFIER, AnalisesAcidentes.DEPARTAMENTO_ID, AnalisesAcidentes.TO_DEPARTAMENTO_ID ); + FIELD_INDEXES.put( AnalisesAcidentes.DEPARTAMENTO_ID, AnalisesAcidentes.DEPARTAMENTO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DEPARTAMENTO_ID_FULL, AnalisesAcidentes.DEPARTAMENTO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TO_DEPARTAMENTO_ID, AnalisesAcidentes.TO_DEPARTAMENTO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AnalisesAcidentes.CLASS_IDENTIFIER, AnalisesAcidentes.SECCAO_ID, AnalisesAcidentes.TO_SECCAO_ID ); + FIELD_INDEXES.put( AnalisesAcidentes.SECCAO_ID, AnalisesAcidentes.SECCAO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.SECCAO_ID_FULL, AnalisesAcidentes.SECCAO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.TO_SECCAO_ID, AnalisesAcidentes.TO_SECCAO_ID_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RH_FASE4, AnalisesAcidentes.RH_FASE4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.RH_FASE4_FULL, AnalisesAcidentes.RH_FASE4_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.APAGADA, AnalisesAcidentes.APAGADA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.APAGADA_FULL, AnalisesAcidentes.APAGADA_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO, AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO_FULL, AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_DESACTIVACAO, AnalisesAcidentes.DATA_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.DATA_DESACTIVACAO_FULL, AnalisesAcidentes.DATA_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.COMENTARIO_DESACTIVACAO, AnalisesAcidentes.COMENTARIO_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( AnalisesAcidentes.COMENTARIO_DESACTIVACAO_FULL, AnalisesAcidentes.COMENTARIO_DESACTIVACAO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyacidentado_idToacidentados = + new com.evolute.entity.ForeignKey( AnalisesAcidentes.class, AnalisesAcidentes.ACIDENTADO_ID, db.data.siprp.outer.AcidentadosData.class, db.data.siprp.outer.AcidentadosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeydepartamento_idTodepartamentos = + new com.evolute.entity.ForeignKey( AnalisesAcidentes.class, AnalisesAcidentes.DEPARTAMENTO_ID, db.data.siprp.outer.DepartamentosData.class, db.data.siprp.outer.DepartamentosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyseccao_idToseccoes = + new com.evolute.entity.ForeignKey( AnalisesAcidentes.class, AnalisesAcidentes.SECCAO_ID, db.data.siprp.outer.SeccoesData.class, db.data.siprp.outer.SeccoesData.ID ); + + public static final String TABLENAME = "analises_acidentes"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.analises_acidentes"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "analises_acidentes.id"; + public static final int ID_INDEX = 0; + public static final String DATA_ACIDENTE = "data_acidente"; + public static final String DATA_ACIDENTE_FULL = "analises_acidentes.data_acidente"; + public static final int DATA_ACIDENTE_INDEX = 1; + public static final String ACIDENTADO_ID = "acidentado_id"; + public static final String ACIDENTADO_ID_FULL = "analises_acidentes.acidentado_id"; + public static final int ACIDENTADO_ID_INDEX = 2; + public static final String TO_ACIDENTADO_ID = "to_acidentado_id"; + public static final String TO_ACIDENTADO_ID_FULL = "analises_acidentes.to_acidentado_id"; + public static final int TO_ACIDENTADO_ID_INDEX = 3; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "analises_acidentes.estado"; + public static final int ESTADO_INDEX = 4; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "analises_acidentes.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 5; + public static final String HORAS_TURNO = "horas_turno"; + public static final String HORAS_TURNO_FULL = "analises_acidentes.horas_turno"; + public static final int HORAS_TURNO_INDEX = 6; + public static final String SECCAO = "seccao"; + public static final String SECCAO_FULL = "analises_acidentes.seccao"; + public static final int SECCAO_INDEX = 7; + public static final String LOCAL_TRABALHO = "local_trabalho"; + public static final String LOCAL_TRABALHO_FULL = "analises_acidentes.local_trabalho"; + public static final int LOCAL_TRABALHO_INDEX = 8; + public static final String TAREFA = "tarefa"; + public static final String TAREFA_FULL = "analises_acidentes.tarefa"; + public static final int TAREFA_INDEX = 9; + public static final String SUBSTANCIAS = "substancias"; + public static final String SUBSTANCIAS_FULL = "analises_acidentes.substancias"; + public static final int SUBSTANCIAS_INDEX = 10; + public static final String SUPERIOR_HIERARQUICO = "superior_hierarquico"; + public static final String SUPERIOR_HIERARQUICO_FULL = "analises_acidentes.superior_hierarquico"; + public static final int SUPERIOR_HIERARQUICO_INDEX = 11; + public static final String CONDICOES = "condicoes"; + public static final String CONDICOES_FULL = "analises_acidentes.condicoes"; + public static final int CONDICOES_INDEX = 12; + public static final String TESTEMUNHAS = "testemunhas"; + public static final String TESTEMUNHAS_FULL = "analises_acidentes.testemunhas"; + public static final int TESTEMUNHAS_INDEX = 13; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "analises_acidentes.descricao"; + public static final int DESCRICAO_INDEX = 14; + public static final String CONCLUSOES = "conclusoes"; + public static final String CONCLUSOES_FULL = "analises_acidentes.conclusoes"; + public static final int CONCLUSOES_INDEX = 15; + public static final String ACCOES = "accoes"; + public static final String ACCOES_FULL = "analises_acidentes.accoes"; + public static final int ACCOES_INDEX = 16; + public static final String HORA_ACIDENTE = "hora_acidente"; + public static final String HORA_ACIDENTE_FULL = "analises_acidentes.hora_acidente"; + public static final int HORA_ACIDENTE_INDEX = 17; + public static final String FORMACAO_SHST = "formacao_shst"; + public static final String FORMACAO_SHST_FULL = "analises_acidentes.formacao_shst"; + public static final int FORMACAO_SHST_INDEX = 18; + public static final String FORMACAO_SHST_NAO_PORQUE = "formacao_shst_nao_porque"; + public static final String FORMACAO_SHST_NAO_PORQUE_FULL = "analises_acidentes.formacao_shst_nao_porque"; + public static final int FORMACAO_SHST_NAO_PORQUE_INDEX = 19; + public static final String OUTROS_ACIDENTES_COM_COLABORADOR = "outros_acidentes_com_colaborador"; + public static final String OUTROS_ACIDENTES_COM_COLABORADOR_FULL = "analises_acidentes.outros_acidentes_com_colaborador"; + public static final int OUTROS_ACIDENTES_COM_COLABORADOR_INDEX = 20; + public static final String NR_ACIDENTES_COM_COLABORADOR = "nr_acidentes_com_colaborador"; + public static final String NR_ACIDENTES_COM_COLABORADOR_FULL = "analises_acidentes.nr_acidentes_com_colaborador"; + public static final int NR_ACIDENTES_COM_COLABORADOR_INDEX = 21; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR1 = "nr_relatorio_acidente_colaborador1"; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR1_FULL = "analises_acidentes.nr_relatorio_acidente_colaborador1"; + public static final int NR_RELATORIO_ACIDENTE_COLABORADOR1_INDEX = 22; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR2 = "nr_relatorio_acidente_colaborador2"; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR2_FULL = "analises_acidentes.nr_relatorio_acidente_colaborador2"; + public static final int NR_RELATORIO_ACIDENTE_COLABORADOR2_INDEX = 23; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR3 = "nr_relatorio_acidente_colaborador3"; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR3_FULL = "analises_acidentes.nr_relatorio_acidente_colaborador3"; + public static final int NR_RELATORIO_ACIDENTE_COLABORADOR3_INDEX = 24; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR4 = "nr_relatorio_acidente_colaborador4"; + public static final String NR_RELATORIO_ACIDENTE_COLABORADOR4_FULL = "analises_acidentes.nr_relatorio_acidente_colaborador4"; + public static final int NR_RELATORIO_ACIDENTE_COLABORADOR4_INDEX = 25; + public static final String ACIDENTES_OUTROS_COLABORADORES = "acidentes_outros_colaboradores"; + public static final String ACIDENTES_OUTROS_COLABORADORES_FULL = "analises_acidentes.acidentes_outros_colaboradores"; + public static final int ACIDENTES_OUTROS_COLABORADORES_INDEX = 26; + public static final String NR_ACIDENTES_OUTROS_COLABORADORES = "nr_acidentes_outros_colaboradores"; + public static final String NR_ACIDENTES_OUTROS_COLABORADORES_FULL = "analises_acidentes.nr_acidentes_outros_colaboradores"; + public static final int NR_ACIDENTES_OUTROS_COLABORADORES_INDEX = 27; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1 = "nr_relatorio_acidente_outros_colaboradores1"; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_FULL = "analises_acidentes.nr_relatorio_acidente_outros_colaboradores1"; + public static final int NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_INDEX = 28; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2 = "nr_relatorio_acidente_outros_colaboradores2"; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_FULL = "analises_acidentes.nr_relatorio_acidente_outros_colaboradores2"; + public static final int NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_INDEX = 29; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3 = "nr_relatorio_acidente_outros_colaboradores3"; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_FULL = "analises_acidentes.nr_relatorio_acidente_outros_colaboradores3"; + public static final int NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_INDEX = 30; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4 = "nr_relatorio_acidente_outros_colaboradores4"; + public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_FULL = "analises_acidentes.nr_relatorio_acidente_outros_colaboradores4"; + public static final int NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_INDEX = 31; + public static final String LESAO_CABECA = "lesao_cabeca"; + public static final String LESAO_CABECA_FULL = "analises_acidentes.lesao_cabeca"; + public static final int LESAO_CABECA_INDEX = 32; + public static final String LESAO_PESCOCO = "lesao_pescoco"; + public static final String LESAO_PESCOCO_FULL = "analises_acidentes.lesao_pescoco"; + public static final int LESAO_PESCOCO_INDEX = 33; + public static final String LESAO_TRONCO = "lesao_tronco"; + public static final String LESAO_TRONCO_FULL = "analises_acidentes.lesao_tronco"; + public static final int LESAO_TRONCO_INDEX = 34; + public static final String LESAO_MEMBRO_SUP_DIR = "lesao_membro_sup_dir"; + public static final String LESAO_MEMBRO_SUP_DIR_FULL = "analises_acidentes.lesao_membro_sup_dir"; + public static final int LESAO_MEMBRO_SUP_DIR_INDEX = 35; + public static final String LESAO_MEMBRO_SUP_ESQ = "lesao_membro_sup_esq"; + public static final String LESAO_MEMBRO_SUP_ESQ_FULL = "analises_acidentes.lesao_membro_sup_esq"; + public static final int LESAO_MEMBRO_SUP_ESQ_INDEX = 36; + public static final String LESAO_MEMBRO_INF_DIR = "lesao_membro_inf_dir"; + public static final String LESAO_MEMBRO_INF_DIR_FULL = "analises_acidentes.lesao_membro_inf_dir"; + public static final int LESAO_MEMBRO_INF_DIR_INDEX = 37; + public static final String LESAO_MEMBRO_INF_ESQ = "lesao_membro_inf_esq"; + public static final String LESAO_MEMBRO_INF_ESQ_FULL = "analises_acidentes.lesao_membro_inf_esq"; + public static final int LESAO_MEMBRO_INF_ESQ_INDEX = 38; + public static final String ESPECIF1 = "especif1"; + public static final String ESPECIF1_FULL = "analises_acidentes.especif1"; + public static final int ESPECIF1_INDEX = 39; + public static final String ESPECIF2 = "especif2"; + public static final String ESPECIF2_FULL = "analises_acidentes.especif2"; + public static final int ESPECIF2_INDEX = 40; + public static final String ESPECIF3 = "especif3"; + public static final String ESPECIF3_FULL = "analises_acidentes.especif3"; + public static final int ESPECIF3_INDEX = 41; + public static final String ESPECIF4 = "especif4"; + public static final String ESPECIF4_FULL = "analises_acidentes.especif4"; + public static final int ESPECIF4_INDEX = 42; + public static final String TIPO_INCAPACIDADE = "tipo_incapacidade"; + public static final String TIPO_INCAPACIDADE_FULL = "analises_acidentes.tipo_incapacidade"; + public static final int TIPO_INCAPACIDADE_INDEX = 43; + public static final String COEF_INCAPACIDADE = "coef_incapacidade"; + public static final String COEF_INCAPACIDADE_FULL = "analises_acidentes.coef_incapacidade"; + public static final int COEF_INCAPACIDADE_INDEX = 44; + public static final String DATA_AVAL_INCAPACIDADE = "data_aval_incapacidade"; + public static final String DATA_AVAL_INCAPACIDADE_FULL = "analises_acidentes.data_aval_incapacidade"; + public static final int DATA_AVAL_INCAPACIDADE_INDEX = 45; + public static final String DATA_REV_INCAPACIDADE = "data_rev_incapacidade"; + public static final String DATA_REV_INCAPACIDADE_FULL = "analises_acidentes.data_rev_incapacidade"; + public static final int DATA_REV_INCAPACIDADE_INDEX = 46; + public static final String PERIODO_INCAPACIDADE_DE = "periodo_incapacidade_de"; + public static final String PERIODO_INCAPACIDADE_DE_FULL = "analises_acidentes.periodo_incapacidade_de"; + public static final int PERIODO_INCAPACIDADE_DE_INDEX = 47; + public static final String PERIODO_INCAPACIDADE_A = "periodo_incapacidade_a"; + public static final String PERIODO_INCAPACIDADE_A_FULL = "analises_acidentes.periodo_incapacidade_a"; + public static final int PERIODO_INCAPACIDADE_A_INDEX = 48; + public static final String IMG_FLEXAO = "img_flexao"; + public static final String IMG_FLEXAO_FULL = "analises_acidentes.img_flexao"; + public static final int IMG_FLEXAO_INDEX = 49; + public static final String IMG_EXT1 = "img_ext1"; + public static final String IMG_EXT1_FULL = "analises_acidentes.img_ext1"; + public static final int IMG_EXT1_INDEX = 50; + public static final String IMG_EXT2 = "img_ext2"; + public static final String IMG_EXT2_FULL = "analises_acidentes.img_ext2"; + public static final int IMG_EXT2_INDEX = 51; + public static final String IMG_CAB2 = "img_cab2"; + public static final String IMG_CAB2_FULL = "analises_acidentes.img_cab2"; + public static final int IMG_CAB2_INDEX = 52; + public static final String IMG_CAB3 = "img_cab3"; + public static final String IMG_CAB3_FULL = "analises_acidentes.img_cab3"; + public static final int IMG_CAB3_INDEX = 53; + public static final String IMG_MA2 = "img_ma2"; + public static final String IMG_MA2_FULL = "analises_acidentes.img_ma2"; + public static final int IMG_MA2_INDEX = 54; + public static final String IMG_MA3 = "img_ma3"; + public static final String IMG_MA3_FULL = "analises_acidentes.img_ma3"; + public static final int IMG_MA3_INDEX = 55; + public static final String IMG_MA5 = "img_ma5"; + public static final String IMG_MA5_FULL = "analises_acidentes.img_ma5"; + public static final int IMG_MA5_INDEX = 56; + public static final String IMG_MA6 = "img_ma6"; + public static final String IMG_MA6_FULL = "analises_acidentes.img_ma6"; + public static final int IMG_MA6_INDEX = 57; + public static final String IMG_MA8 = "img_ma8"; + public static final String IMG_MA8_FULL = "analises_acidentes.img_ma8"; + public static final int IMG_MA8_INDEX = 58; + public static final String IMG_MA10 = "img_ma10"; + public static final String IMG_MA10_FULL = "analises_acidentes.img_ma10"; + public static final int IMG_MA10_INDEX = 59; + public static final String RESTRICAO_CARGA = "restricao_carga"; + public static final String RESTRICAO_CARGA_FULL = "analises_acidentes.restricao_carga"; + public static final int RESTRICAO_CARGA_INDEX = 60; + public static final String RESTRICAO_MOTRICIDADE = "restricao_motricidade"; + public static final String RESTRICAO_MOTRICIDADE_FULL = "analises_acidentes.restricao_motricidade"; + public static final int RESTRICAO_MOTRICIDADE_INDEX = 61; + public static final String RESTRICAO_CONDUCAO = "restricao_conducao"; + public static final String RESTRICAO_CONDUCAO_FULL = "analises_acidentes.restricao_conducao"; + public static final int RESTRICAO_CONDUCAO_INDEX = 62; + public static final String RESTRICAO_VIBRACOES = "restricao_vibracoes"; + public static final String RESTRICAO_VIBRACOES_FULL = "analises_acidentes.restricao_vibracoes"; + public static final int RESTRICAO_VIBRACOES_INDEX = 63; + public static final String RESTRICAO_OUTRAS = "restricao_outras"; + public static final String RESTRICAO_OUTRAS_FULL = "analises_acidentes.restricao_outras"; + public static final int RESTRICAO_OUTRAS_INDEX = 64; + public static final String MED_OBSERV = "med_observ"; + public static final String MED_OBSERV_FULL = "analises_acidentes.med_observ"; + public static final int MED_OBSERV_INDEX = 65; + public static final String TIPO_LESAO = "tipo_lesao"; + public static final String TIPO_LESAO_FULL = "analises_acidentes.tipo_lesao"; + public static final int TIPO_LESAO_INDEX = 66; + public static final String IMG_ROT1 = "img_rot1"; + public static final String IMG_ROT1_FULL = "analises_acidentes.img_rot1"; + public static final int IMG_ROT1_INDEX = 67; + public static final String IMG_ROT2 = "img_rot2"; + public static final String IMG_ROT2_FULL = "analises_acidentes.img_rot2"; + public static final int IMG_ROT2_INDEX = 68; + public static final String IMG_CAB1 = "img_cab1"; + public static final String IMG_CAB1_FULL = "analises_acidentes.img_cab1"; + public static final int IMG_CAB1_INDEX = 69; + public static final String IMG_CAB4 = "img_cab4"; + public static final String IMG_CAB4_FULL = "analises_acidentes.img_cab4"; + public static final int IMG_CAB4_INDEX = 70; + public static final String IMG_MA1 = "img_ma1"; + public static final String IMG_MA1_FULL = "analises_acidentes.img_ma1"; + public static final int IMG_MA1_INDEX = 71; + public static final String IMG_MA4 = "img_ma4"; + public static final String IMG_MA4_FULL = "analises_acidentes.img_ma4"; + public static final int IMG_MA4_INDEX = 72; + public static final String IMG_MA7 = "img_ma7"; + public static final String IMG_MA7_FULL = "analises_acidentes.img_ma7"; + public static final int IMG_MA7_INDEX = 73; + public static final String IMG_MA9 = "img_ma9"; + public static final String IMG_MA9_FULL = "analises_acidentes.img_ma9"; + public static final int IMG_MA9_INDEX = 74; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "analises_acidentes.empresa_id"; + public static final int EMPRESA_ID_INDEX = 75; + public static final String MEDICO_ID = "medico_id"; + public static final String MEDICO_ID_FULL = "analises_acidentes.medico_id"; + public static final int MEDICO_ID_INDEX = 76; + public static final String TECNICO_SAUDE_ID = "tecnico_saude_id"; + public static final String TECNICO_SAUDE_ID_FULL = "analises_acidentes.tecnico_saude_id"; + public static final int TECNICO_SAUDE_ID_INDEX = 77; + public static final String ANALISE_NR = "analise_nr"; + public static final String ANALISE_NR_FULL = "analises_acidentes.analise_nr"; + public static final int ANALISE_NR_INDEX = 78; + public static final String ESTADO_ASSINATURA = "estado_assinatura"; + public static final String ESTADO_ASSINATURA_FULL = "analises_acidentes.estado_assinatura"; + public static final int ESTADO_ASSINATURA_INDEX = 79; + public static final String ASS_RESP_SEG = "ass_resp_seg"; + public static final String ASS_RESP_SEG_FULL = "analises_acidentes.ass_resp_seg"; + public static final int ASS_RESP_SEG_INDEX = 80; + public static final String ASS_RESP_RH = "ass_resp_rh"; + public static final String ASS_RESP_RH_FULL = "analises_acidentes.ass_resp_rh"; + public static final int ASS_RESP_RH_INDEX = 81; + public static final String DATA_CONSOLIDACAO = "data_consolidacao"; + public static final String DATA_CONSOLIDACAO_FULL = "analises_acidentes.data_consolidacao"; + public static final int DATA_CONSOLIDACAO_INDEX = 82; + public static final String DATA_ASSINATURA_SEG = "data_assinatura_seg"; + public static final String DATA_ASSINATURA_SEG_FULL = "analises_acidentes.data_assinatura_seg"; + public static final int DATA_ASSINATURA_SEG_INDEX = 83; + public static final String DATA_ASSINATURA_RH = "data_assinatura_rh"; + public static final String DATA_ASSINATURA_RH_FULL = "analises_acidentes.data_assinatura_rh"; + public static final int DATA_ASSINATURA_RH_INDEX = 84; + public static final String ASS_CONSOLIDACAO = "ass_consolidacao"; + public static final String ASS_CONSOLIDACAO_FULL = "analises_acidentes.ass_consolidacao"; + public static final int ASS_CONSOLIDACAO_INDEX = 85; + public static final String NOME_RESP_SEG = "nome_resp_seg"; + public static final String NOME_RESP_SEG_FULL = "analises_acidentes.nome_resp_seg"; + public static final int NOME_RESP_SEG_INDEX = 86; + public static final String NOME_RESP_RH = "nome_resp_rh"; + public static final String NOME_RESP_RH_FULL = "analises_acidentes.nome_resp_rh"; + public static final int NOME_RESP_RH_INDEX = 87; + public static final String CAUSAS = "causas"; + public static final String CAUSAS_FULL = "analises_acidentes.causas"; + public static final int CAUSAS_INDEX = 88; + public static final String ESTADO_ANTES_CORRECAO = "estado_antes_correcao"; + public static final String ESTADO_ANTES_CORRECAO_FULL = "analises_acidentes.estado_antes_correcao"; + public static final int ESTADO_ANTES_CORRECAO_INDEX = 89; + public static final String OBSERVACOES_CORRECAO = "observacoes_correcao"; + public static final String OBSERVACOES_CORRECAO_FULL = "analises_acidentes.observacoes_correcao"; + public static final int OBSERVACOES_CORRECAO_INDEX = 90; + public static final String CORRECAO = "correcao"; + public static final String CORRECAO_FULL = "analises_acidentes.correcao"; + public static final int CORRECAO_INDEX = 91; + public static final String ASS_SUPERIOR = "ass_superior"; + public static final String ASS_SUPERIOR_FULL = "analises_acidentes.ass_superior"; + public static final int ASS_SUPERIOR_INDEX = 92; + public static final String NOME_SUPERIOR = "nome_superior"; + public static final String NOME_SUPERIOR_FULL = "analises_acidentes.nome_superior"; + public static final int NOME_SUPERIOR_INDEX = 93; + public static final String DATA_ASSINATURA_SUPERIOR = "data_assinatura_superior"; + public static final String DATA_ASSINATURA_SUPERIOR_FULL = "analises_acidentes.data_assinatura_superior"; + public static final int DATA_ASSINATURA_SUPERIOR_INDEX = 94; + public static final String AVERIGUADOR = "averiguador"; + public static final String AVERIGUADOR_FULL = "analises_acidentes.averiguador"; + public static final int AVERIGUADOR_INDEX = 95; + public static final String AVERIGUACAO_POSTERIOR = "averiguacao_posterior"; + public static final String AVERIGUACAO_POSTERIOR_FULL = "analises_acidentes.averiguacao_posterior"; + public static final int AVERIGUACAO_POSTERIOR_INDEX = 96; + public static final String AVERIGUACAO_OBS = "averiguacao_obs"; + public static final String AVERIGUACAO_OBS_FULL = "analises_acidentes.averiguacao_obs"; + public static final int AVERIGUACAO_OBS_INDEX = 97; + public static final String NOME_RESP_CONSOLIDACAO = "nome_resp_consolidacao"; + public static final String NOME_RESP_CONSOLIDACAO_FULL = "analises_acidentes.nome_resp_consolidacao"; + public static final int NOME_RESP_CONSOLIDACAO_INDEX = 98; + public static final String DATA_INICIO_PROCESSO = "data_inicio_processo"; + public static final String DATA_INICIO_PROCESSO_FULL = "analises_acidentes.data_inicio_processo"; + public static final int DATA_INICIO_PROCESSO_INDEX = 99; + public static final String DEPARTAMENTO_ID = "departamento_id"; + public static final String DEPARTAMENTO_ID_FULL = "analises_acidentes.departamento_id"; + public static final int DEPARTAMENTO_ID_INDEX = 100; + public static final String TO_DEPARTAMENTO_ID = "to_departamento_id"; + public static final String TO_DEPARTAMENTO_ID_FULL = "analises_acidentes.to_departamento_id"; + public static final int TO_DEPARTAMENTO_ID_INDEX = 101; + public static final String SECCAO_ID = "seccao_id"; + public static final String SECCAO_ID_FULL = "analises_acidentes.seccao_id"; + public static final int SECCAO_ID_INDEX = 102; + public static final String TO_SECCAO_ID = "to_seccao_id"; + public static final String TO_SECCAO_ID_FULL = "analises_acidentes.to_seccao_id"; + public static final int TO_SECCAO_ID_INDEX = 103; + public static final String RH_FASE4 = "rh_fase4"; + public static final String RH_FASE4_FULL = "analises_acidentes.rh_fase4"; + public static final int RH_FASE4_INDEX = 104; + public static final String APAGADA = "apagada"; + public static final String APAGADA_FULL = "analises_acidentes.apagada"; + public static final int APAGADA_INDEX = 105; + public static final String CONCLUIDO_POR_DESACTIVACAO = "concluido_por_desactivacao"; + public static final String CONCLUIDO_POR_DESACTIVACAO_FULL = "analises_acidentes.concluido_por_desactivacao"; + public static final int CONCLUIDO_POR_DESACTIVACAO_INDEX = 106; + public static final String DATA_DESACTIVACAO = "data_desactivacao"; + public static final String DATA_DESACTIVACAO_FULL = "analises_acidentes.data_desactivacao"; + public static final int DATA_DESACTIVACAO_INDEX = 107; + public static final String COMENTARIO_DESACTIVACAO = "comentario_desactivacao"; + public static final String COMENTARIO_DESACTIVACAO_FULL = "analises_acidentes.comentario_desactivacao"; + public static final int COMENTARIO_DESACTIVACAO_INDEX = 108; + + public static final String FIELD_NAMES[] = new String[]{ + DATA_ACIDENTE, ACIDENTADO_ID, TO_ACIDENTADO_ID, ESTADO, ESTABELECIMENTO_ID, + HORAS_TURNO, SECCAO, LOCAL_TRABALHO, TAREFA, SUBSTANCIAS, SUPERIOR_HIERARQUICO, + CONDICOES, TESTEMUNHAS, DESCRICAO, CONCLUSOES, ACCOES, HORA_ACIDENTE, + FORMACAO_SHST, FORMACAO_SHST_NAO_PORQUE, OUTROS_ACIDENTES_COM_COLABORADOR, + NR_ACIDENTES_COM_COLABORADOR, NR_RELATORIO_ACIDENTE_COLABORADOR1, + NR_RELATORIO_ACIDENTE_COLABORADOR2, NR_RELATORIO_ACIDENTE_COLABORADOR3, + NR_RELATORIO_ACIDENTE_COLABORADOR4, ACIDENTES_OUTROS_COLABORADORES, + NR_ACIDENTES_OUTROS_COLABORADORES, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, LESAO_CABECA, LESAO_PESCOCO, + LESAO_TRONCO, LESAO_MEMBRO_SUP_DIR, LESAO_MEMBRO_SUP_ESQ, + LESAO_MEMBRO_INF_DIR, LESAO_MEMBRO_INF_ESQ, ESPECIF1, ESPECIF2, ESPECIF3, + ESPECIF4, TIPO_INCAPACIDADE, COEF_INCAPACIDADE, DATA_AVAL_INCAPACIDADE, + DATA_REV_INCAPACIDADE, PERIODO_INCAPACIDADE_DE, PERIODO_INCAPACIDADE_A, + IMG_FLEXAO, IMG_EXT1, IMG_EXT2, IMG_CAB2, IMG_CAB3, IMG_MA2, IMG_MA3, IMG_MA5, IMG_MA6, + IMG_MA8, IMG_MA10, RESTRICAO_CARGA, RESTRICAO_MOTRICIDADE, RESTRICAO_CONDUCAO, + RESTRICAO_VIBRACOES, RESTRICAO_OUTRAS, MED_OBSERV, TIPO_LESAO, IMG_ROT1, + IMG_ROT2, IMG_CAB1, IMG_CAB4, IMG_MA1, IMG_MA4, IMG_MA7, IMG_MA9, EMPRESA_ID, + MEDICO_ID, TECNICO_SAUDE_ID, ANALISE_NR, ESTADO_ASSINATURA, ASS_RESP_SEG, + ASS_RESP_RH, DATA_CONSOLIDACAO, DATA_ASSINATURA_SEG, DATA_ASSINATURA_RH, + ASS_CONSOLIDACAO, NOME_RESP_SEG, NOME_RESP_RH, CAUSAS, ESTADO_ANTES_CORRECAO, + OBSERVACOES_CORRECAO, CORRECAO, ASS_SUPERIOR, NOME_SUPERIOR, + DATA_ASSINATURA_SUPERIOR, AVERIGUADOR, AVERIGUACAO_POSTERIOR, + AVERIGUACAO_OBS, NOME_RESP_CONSOLIDACAO, DATA_INICIO_PROCESSO, + DEPARTAMENTO_ID, TO_DEPARTAMENTO_ID, SECCAO_ID, TO_SECCAO_ID, RH_FASE4, APAGADA, + CONCLUIDO_POR_DESACTIVACAO, DATA_DESACTIVACAO, COMENTARIO_DESACTIVACAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA_ACIDENTE, TABLENAME + "." + ACIDENTADO_ID, TABLENAME + "." + TO_ACIDENTADO_ID, TABLENAME + "." + ESTADO, TABLENAME + "." + ESTABELECIMENTO_ID, + TABLENAME + "." + HORAS_TURNO, TABLENAME + "." + SECCAO, TABLENAME + "." + LOCAL_TRABALHO, TABLENAME + "." + TAREFA, TABLENAME + "." + SUBSTANCIAS, TABLENAME + "." + SUPERIOR_HIERARQUICO, + TABLENAME + "." + CONDICOES, TABLENAME + "." + TESTEMUNHAS, TABLENAME + "." + DESCRICAO, TABLENAME + "." + CONCLUSOES, TABLENAME + "." + ACCOES, TABLENAME + "." + HORA_ACIDENTE, + TABLENAME + "." + FORMACAO_SHST, TABLENAME + "." + FORMACAO_SHST_NAO_PORQUE, TABLENAME + "." + OUTROS_ACIDENTES_COM_COLABORADOR, + TABLENAME + "." + NR_ACIDENTES_COM_COLABORADOR, TABLENAME + "." + NR_RELATORIO_ACIDENTE_COLABORADOR1, + TABLENAME + "." + NR_RELATORIO_ACIDENTE_COLABORADOR2, TABLENAME + "." + NR_RELATORIO_ACIDENTE_COLABORADOR3, + TABLENAME + "." + NR_RELATORIO_ACIDENTE_COLABORADOR4, TABLENAME + "." + ACIDENTES_OUTROS_COLABORADORES, + TABLENAME + "." + NR_ACIDENTES_OUTROS_COLABORADORES, + TABLENAME + "." + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, + TABLENAME + "." + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, + TABLENAME + "." + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, + TABLENAME + "." + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, TABLENAME + "." + LESAO_CABECA, TABLENAME + "." + LESAO_PESCOCO, + TABLENAME + "." + LESAO_TRONCO, TABLENAME + "." + LESAO_MEMBRO_SUP_DIR, TABLENAME + "." + LESAO_MEMBRO_SUP_ESQ, + TABLENAME + "." + LESAO_MEMBRO_INF_DIR, TABLENAME + "." + LESAO_MEMBRO_INF_ESQ, TABLENAME + "." + ESPECIF1, TABLENAME + "." + ESPECIF2, TABLENAME + "." + ESPECIF3, + TABLENAME + "." + ESPECIF4, TABLENAME + "." + TIPO_INCAPACIDADE, TABLENAME + "." + COEF_INCAPACIDADE, TABLENAME + "." + DATA_AVAL_INCAPACIDADE, + TABLENAME + "." + DATA_REV_INCAPACIDADE, TABLENAME + "." + PERIODO_INCAPACIDADE_DE, TABLENAME + "." + PERIODO_INCAPACIDADE_A, + TABLENAME + "." + IMG_FLEXAO, TABLENAME + "." + IMG_EXT1, TABLENAME + "." + IMG_EXT2, TABLENAME + "." + IMG_CAB2, TABLENAME + "." + IMG_CAB3, TABLENAME + "." + IMG_MA2, TABLENAME + "." + IMG_MA3, TABLENAME + "." + IMG_MA5, TABLENAME + "." + IMG_MA6, + TABLENAME + "." + IMG_MA8, TABLENAME + "." + IMG_MA10, TABLENAME + "." + RESTRICAO_CARGA, TABLENAME + "." + RESTRICAO_MOTRICIDADE, TABLENAME + "." + RESTRICAO_CONDUCAO, + TABLENAME + "." + RESTRICAO_VIBRACOES, TABLENAME + "." + RESTRICAO_OUTRAS, TABLENAME + "." + MED_OBSERV, TABLENAME + "." + TIPO_LESAO, TABLENAME + "." + IMG_ROT1, + TABLENAME + "." + IMG_ROT2, TABLENAME + "." + IMG_CAB1, TABLENAME + "." + IMG_CAB4, TABLENAME + "." + IMG_MA1, TABLENAME + "." + IMG_MA4, TABLENAME + "." + IMG_MA7, TABLENAME + "." + IMG_MA9, TABLENAME + "." + EMPRESA_ID, + TABLENAME + "." + MEDICO_ID, TABLENAME + "." + TECNICO_SAUDE_ID, TABLENAME + "." + ANALISE_NR, TABLENAME + "." + ESTADO_ASSINATURA, TABLENAME + "." + ASS_RESP_SEG, + TABLENAME + "." + ASS_RESP_RH, TABLENAME + "." + DATA_CONSOLIDACAO, TABLENAME + "." + DATA_ASSINATURA_SEG, TABLENAME + "." + DATA_ASSINATURA_RH, + TABLENAME + "." + ASS_CONSOLIDACAO, TABLENAME + "." + NOME_RESP_SEG, TABLENAME + "." + NOME_RESP_RH, TABLENAME + "." + CAUSAS, TABLENAME + "." + ESTADO_ANTES_CORRECAO, + TABLENAME + "." + OBSERVACOES_CORRECAO, TABLENAME + "." + CORRECAO, TABLENAME + "." + ASS_SUPERIOR, TABLENAME + "." + NOME_SUPERIOR, + TABLENAME + "." + DATA_ASSINATURA_SUPERIOR, TABLENAME + "." + AVERIGUADOR, TABLENAME + "." + AVERIGUACAO_POSTERIOR, + TABLENAME + "." + AVERIGUACAO_OBS, TABLENAME + "." + NOME_RESP_CONSOLIDACAO, TABLENAME + "." + DATA_INICIO_PROCESSO, + TABLENAME + "." + DEPARTAMENTO_ID, TABLENAME + "." + TO_DEPARTAMENTO_ID, TABLENAME + "." + SECCAO_ID, TABLENAME + "." + TO_SECCAO_ID, TABLENAME + "." + RH_FASE4, TABLENAME + "." + APAGADA, + TABLENAME + "." + CONCLUIDO_POR_DESACTIVACAO, TABLENAME + "." + DATA_DESACTIVACAO, TABLENAME + "." + COMENTARIO_DESACTIVACAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA_ACIDENTE, ACIDENTADO_ID, ESTADO, ESTABELECIMENTO_ID, HORAS_TURNO, SECCAO, + LOCAL_TRABALHO, TAREFA, SUBSTANCIAS, SUPERIOR_HIERARQUICO, CONDICOES, + TESTEMUNHAS, DESCRICAO, CONCLUSOES, ACCOES, HORA_ACIDENTE, FORMACAO_SHST, + FORMACAO_SHST_NAO_PORQUE, OUTROS_ACIDENTES_COM_COLABORADOR, + NR_ACIDENTES_COM_COLABORADOR, NR_RELATORIO_ACIDENTE_COLABORADOR1, + NR_RELATORIO_ACIDENTE_COLABORADOR2, NR_RELATORIO_ACIDENTE_COLABORADOR3, + NR_RELATORIO_ACIDENTE_COLABORADOR4, ACIDENTES_OUTROS_COLABORADORES, + NR_ACIDENTES_OUTROS_COLABORADORES, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, LESAO_CABECA, LESAO_PESCOCO, + LESAO_TRONCO, LESAO_MEMBRO_SUP_DIR, LESAO_MEMBRO_SUP_ESQ, + LESAO_MEMBRO_INF_DIR, LESAO_MEMBRO_INF_ESQ, ESPECIF1, ESPECIF2, ESPECIF3, + ESPECIF4, TIPO_INCAPACIDADE, COEF_INCAPACIDADE, DATA_AVAL_INCAPACIDADE, + DATA_REV_INCAPACIDADE, PERIODO_INCAPACIDADE_DE, PERIODO_INCAPACIDADE_A, + IMG_FLEXAO, IMG_EXT1, IMG_EXT2, IMG_CAB2, IMG_CAB3, IMG_MA2, IMG_MA3, IMG_MA5, IMG_MA6, + IMG_MA8, IMG_MA10, RESTRICAO_CARGA, RESTRICAO_MOTRICIDADE, RESTRICAO_CONDUCAO, + RESTRICAO_VIBRACOES, RESTRICAO_OUTRAS, MED_OBSERV, TIPO_LESAO, IMG_ROT1, + IMG_ROT2, IMG_CAB1, IMG_CAB4, IMG_MA1, IMG_MA4, IMG_MA7, IMG_MA9, EMPRESA_ID, + MEDICO_ID, TECNICO_SAUDE_ID, ANALISE_NR, ESTADO_ASSINATURA, ASS_RESP_SEG, + ASS_RESP_RH, DATA_CONSOLIDACAO, DATA_ASSINATURA_SEG, DATA_ASSINATURA_RH, + ASS_CONSOLIDACAO, NOME_RESP_SEG, NOME_RESP_RH, CAUSAS, ESTADO_ANTES_CORRECAO, + OBSERVACOES_CORRECAO, CORRECAO, ASS_SUPERIOR, NOME_SUPERIOR, + DATA_ASSINATURA_SUPERIOR, AVERIGUADOR, AVERIGUACAO_POSTERIOR, + AVERIGUACAO_OBS, NOME_RESP_CONSOLIDACAO, DATA_INICIO_PROCESSO, + DEPARTAMENTO_ID, SECCAO_ID, RH_FASE4, APAGADA, CONCLUIDO_POR_DESACTIVACAO, + DATA_DESACTIVACAO, COMENTARIO_DESACTIVACAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA_ACIDENTE, ACIDENTADO_ID, ESTADO, ESTABELECIMENTO_ID, HORAS_TURNO, SECCAO, + LOCAL_TRABALHO, TAREFA, SUBSTANCIAS, SUPERIOR_HIERARQUICO, CONDICOES, + TESTEMUNHAS, DESCRICAO, CONCLUSOES, ACCOES, HORA_ACIDENTE, FORMACAO_SHST, + FORMACAO_SHST_NAO_PORQUE, OUTROS_ACIDENTES_COM_COLABORADOR, + NR_ACIDENTES_COM_COLABORADOR, NR_RELATORIO_ACIDENTE_COLABORADOR1, + NR_RELATORIO_ACIDENTE_COLABORADOR2, NR_RELATORIO_ACIDENTE_COLABORADOR3, + NR_RELATORIO_ACIDENTE_COLABORADOR4, ACIDENTES_OUTROS_COLABORADORES, + NR_ACIDENTES_OUTROS_COLABORADORES, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, + NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, LESAO_CABECA, LESAO_PESCOCO, + LESAO_TRONCO, LESAO_MEMBRO_SUP_DIR, LESAO_MEMBRO_SUP_ESQ, + LESAO_MEMBRO_INF_DIR, LESAO_MEMBRO_INF_ESQ, ESPECIF1, ESPECIF2, ESPECIF3, + ESPECIF4, TIPO_INCAPACIDADE, COEF_INCAPACIDADE, DATA_AVAL_INCAPACIDADE, + DATA_REV_INCAPACIDADE, PERIODO_INCAPACIDADE_DE, PERIODO_INCAPACIDADE_A, + IMG_FLEXAO, IMG_EXT1, IMG_EXT2, IMG_CAB2, IMG_CAB3, IMG_MA2, IMG_MA3, IMG_MA5, IMG_MA6, + IMG_MA8, IMG_MA10, RESTRICAO_CARGA, RESTRICAO_MOTRICIDADE, RESTRICAO_CONDUCAO, + RESTRICAO_VIBRACOES, RESTRICAO_OUTRAS, MED_OBSERV, TIPO_LESAO, IMG_ROT1, + IMG_ROT2, IMG_CAB1, IMG_CAB4, IMG_MA1, IMG_MA4, IMG_MA7, IMG_MA9, EMPRESA_ID, + MEDICO_ID, TECNICO_SAUDE_ID, ANALISE_NR, ESTADO_ASSINATURA, ASS_RESP_SEG, + ASS_RESP_RH, DATA_CONSOLIDACAO, DATA_ASSINATURA_SEG, DATA_ASSINATURA_RH, + ASS_CONSOLIDACAO, NOME_RESP_SEG, NOME_RESP_RH, CAUSAS, ESTADO_ANTES_CORRECAO, + OBSERVACOES_CORRECAO, CORRECAO, ASS_SUPERIOR, NOME_SUPERIOR, + DATA_ASSINATURA_SUPERIOR, AVERIGUADOR, AVERIGUACAO_POSTERIOR, + AVERIGUACAO_OBS, NOME_RESP_CONSOLIDACAO, DATA_INICIO_PROCESSO, + DEPARTAMENTO_ID, SECCAO_ID, RH_FASE4, APAGADA, CONCLUIDO_POR_DESACTIVACAO, + DATA_DESACTIVACAO, COMENTARIO_DESACTIVACAO, }; + + private Integer id; + private java.util.Date data_acidente; + private Integer acidentado_id; + private db.data.siprp.outer.AcidentadosData to_acidentado_id; + private Integer estado; + private Integer estabelecimento_id; + private Integer horas_turno; + private String seccao; + private String local_trabalho; + private String tarefa; + private String substancias; + private String superior_hierarquico; + private String condicoes; + private String testemunhas; + private String descricao; + private String conclusoes; + private String accoes; + private java.sql.Time hora_acidente; + private String formacao_shst; + private String formacao_shst_nao_porque; + private String outros_acidentes_com_colaborador; + private Integer nr_acidentes_com_colaborador; + private Integer nr_relatorio_acidente_colaborador1; + private Integer nr_relatorio_acidente_colaborador2; + private Integer nr_relatorio_acidente_colaborador3; + private Integer nr_relatorio_acidente_colaborador4; + private String acidentes_outros_colaboradores; + private Integer nr_acidentes_outros_colaboradores; + private Integer nr_relatorio_acidente_outros_colaboradores1; + private Integer nr_relatorio_acidente_outros_colaboradores2; + private Integer nr_relatorio_acidente_outros_colaboradores3; + private Integer nr_relatorio_acidente_outros_colaboradores4; + private String lesao_cabeca; + private String lesao_pescoco; + private String lesao_tronco; + private String lesao_membro_sup_dir; + private String lesao_membro_sup_esq; + private String lesao_membro_inf_dir; + private String lesao_membro_inf_esq; + private String especif1; + private String especif2; + private String especif3; + private String especif4; + private String tipo_incapacidade; + private Integer coef_incapacidade; + private java.util.Date data_aval_incapacidade; + private java.util.Date data_rev_incapacidade; + private java.util.Date periodo_incapacidade_de; + private java.util.Date periodo_incapacidade_a; + private String img_flexao; + private String img_ext1; + private String img_ext2; + private String img_cab2; + private String img_cab3; + private String img_ma2; + private String img_ma3; + private String img_ma5; + private String img_ma6; + private String img_ma8; + private String img_ma10; + private Integer restricao_carga; + private String restricao_motricidade; + private String restricao_conducao; + private String restricao_vibracoes; + private String restricao_outras; + private String med_observ; + private String tipo_lesao; + private String img_rot1; + private String img_rot2; + private String img_cab1; + private String img_cab4; + private String img_ma1; + private String img_ma4; + private String img_ma7; + private String img_ma9; + private Integer empresa_id; + private Integer medico_id; + private Integer tecnico_saude_id; + private String analise_nr; + private Integer estado_assinatura; + private String ass_resp_seg; + private String ass_resp_rh; + private java.util.Date data_consolidacao; + private java.util.Date data_assinatura_seg; + private java.util.Date data_assinatura_rh; + private String ass_consolidacao; + private String nome_resp_seg; + private String nome_resp_rh; + private Integer causas; + private Integer estado_antes_correcao; + private String observacoes_correcao; + private String correcao; + private String ass_superior; + private String nome_superior; + private java.util.Date data_assinatura_superior; + private String averiguador; + private String averiguacao_posterior; + private String averiguacao_obs; + private String nome_resp_consolidacao; + private java.util.Date data_inicio_processo; + private Integer departamento_id; + private db.data.siprp.outer.DepartamentosData to_departamento_id; + private Integer seccao_id; + private db.data.siprp.outer.SeccoesData to_seccao_id; + private Integer rh_fase4; + private String apagada; + private Boolean concluido_por_desactivacao; + private java.util.Date data_desactivacao; + private String comentario_desactivacao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public AnalisesAcidentes() + { + 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, 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, 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.ListfromMedidas_analise_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.MedidasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.MedidasData.class , getPrimaryKey().getMap().get("id"), "analise_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromRecomendacoes_analise_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.RecomendacoesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.RecomendacoesData.class , getPrimaryKey().getMap().get("id"), "analise_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.Date getData_acidente() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ACIDENTE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_acidente; + } + + public void setData_acidente( java.util.Date data_acidente ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ACIDENTE, data_acidente ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_acidente = data_acidente; + LAZY_LOADED_OBJECTS.put( DATA_ACIDENTE, Boolean.TRUE ); + } + + public Integer getAcidentado_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACIDENTADO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.acidentado_id; + } + + public void setAcidentado_id( Integer acidentado_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACIDENTADO_ID, acidentado_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.acidentado_id = acidentado_id; + LAZY_LOADED_OBJECTS.put( ACIDENTADO_ID, Boolean.TRUE ); + } + + public db.data.siprp.outer.AcidentadosData toAcidentado_id() + { + try + { + prepare( TO_ACIDENTADO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_acidentado_id; + } + + public void setToAcidentado_id( db.data.siprp.outer.AcidentadosData to_acidentado_id ) + { + try + { + preProcess( TO_ACIDENTADO_ID, to_acidentado_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_acidentado_id = to_acidentado_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 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 Integer getHoras_turno() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HORAS_TURNO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.horas_turno; + } + + public void setHoras_turno( Integer horas_turno ) + { + try + { + setLockedForRefresh( true ); + preProcess( HORAS_TURNO, horas_turno ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.horas_turno = horas_turno; + LAZY_LOADED_OBJECTS.put( HORAS_TURNO, Boolean.TRUE ); + } + + public String getSeccao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SECCAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.seccao; + } + + public void setSeccao( String seccao ) + { + try + { + setLockedForRefresh( true ); + preProcess( SECCAO, seccao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.seccao = seccao; + LAZY_LOADED_OBJECTS.put( SECCAO, 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 getTarefa() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TAREFA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tarefa; + } + + public void setTarefa( String tarefa ) + { + try + { + setLockedForRefresh( true ); + preProcess( TAREFA, tarefa ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tarefa = tarefa; + LAZY_LOADED_OBJECTS.put( TAREFA, Boolean.TRUE ); + } + + public String getSubstancias() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SUBSTANCIAS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.substancias; + } + + public void setSubstancias( String substancias ) + { + try + { + setLockedForRefresh( true ); + preProcess( SUBSTANCIAS, substancias ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.substancias = substancias; + LAZY_LOADED_OBJECTS.put( SUBSTANCIAS, Boolean.TRUE ); + } + + public String getSuperior_hierarquico() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SUPERIOR_HIERARQUICO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.superior_hierarquico; + } + + public void setSuperior_hierarquico( String superior_hierarquico ) + { + try + { + setLockedForRefresh( true ); + preProcess( SUPERIOR_HIERARQUICO, superior_hierarquico ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.superior_hierarquico = superior_hierarquico; + LAZY_LOADED_OBJECTS.put( SUPERIOR_HIERARQUICO, Boolean.TRUE ); + } + + public String getCondicoes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONDICOES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.condicoes; + } + + public void setCondicoes( String condicoes ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONDICOES, condicoes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.condicoes = condicoes; + LAZY_LOADED_OBJECTS.put( CONDICOES, Boolean.TRUE ); + } + + public String getTestemunhas() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TESTEMUNHAS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.testemunhas; + } + + public void setTestemunhas( String testemunhas ) + { + try + { + setLockedForRefresh( true ); + preProcess( TESTEMUNHAS, testemunhas ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.testemunhas = testemunhas; + LAZY_LOADED_OBJECTS.put( TESTEMUNHAS, 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 getConclusoes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONCLUSOES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.conclusoes; + } + + public void setConclusoes( String conclusoes ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONCLUSOES, conclusoes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.conclusoes = conclusoes; + LAZY_LOADED_OBJECTS.put( CONCLUSOES, Boolean.TRUE ); + } + + public String getAccoes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACCOES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.accoes; + } + + public void setAccoes( String accoes ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACCOES, accoes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.accoes = accoes; + LAZY_LOADED_OBJECTS.put( ACCOES, Boolean.TRUE ); + } + + public java.sql.Time getHora_acidente() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HORA_ACIDENTE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.hora_acidente; + } + + public void setHora_acidente( java.sql.Time hora_acidente ) + { + try + { + setLockedForRefresh( true ); + preProcess( HORA_ACIDENTE, hora_acidente ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.hora_acidente = hora_acidente; + LAZY_LOADED_OBJECTS.put( HORA_ACIDENTE, Boolean.TRUE ); + } + + public String getFormacao_shst() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMACAO_SHST ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formacao_shst; + } + + public void setFormacao_shst( String formacao_shst ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMACAO_SHST, formacao_shst ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formacao_shst = formacao_shst; + LAZY_LOADED_OBJECTS.put( FORMACAO_SHST, Boolean.TRUE ); + } + + public String getFormacao_shst_nao_porque() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMACAO_SHST_NAO_PORQUE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formacao_shst_nao_porque; + } + + public void setFormacao_shst_nao_porque( String formacao_shst_nao_porque ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMACAO_SHST_NAO_PORQUE, formacao_shst_nao_porque ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formacao_shst_nao_porque = formacao_shst_nao_porque; + LAZY_LOADED_OBJECTS.put( FORMACAO_SHST_NAO_PORQUE, Boolean.TRUE ); + } + + public String getOutros_acidentes_com_colaborador() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OUTROS_ACIDENTES_COM_COLABORADOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.outros_acidentes_com_colaborador; + } + + public void setOutros_acidentes_com_colaborador( String outros_acidentes_com_colaborador ) + { + try + { + setLockedForRefresh( true ); + preProcess( OUTROS_ACIDENTES_COM_COLABORADOR, outros_acidentes_com_colaborador ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.outros_acidentes_com_colaborador = outros_acidentes_com_colaborador; + LAZY_LOADED_OBJECTS.put( OUTROS_ACIDENTES_COM_COLABORADOR, Boolean.TRUE ); + } + + public Integer getNr_acidentes_com_colaborador() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_ACIDENTES_COM_COLABORADOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_acidentes_com_colaborador; + } + + public void setNr_acidentes_com_colaborador( Integer nr_acidentes_com_colaborador ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_ACIDENTES_COM_COLABORADOR, nr_acidentes_com_colaborador ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_acidentes_com_colaborador = nr_acidentes_com_colaborador; + LAZY_LOADED_OBJECTS.put( NR_ACIDENTES_COM_COLABORADOR, Boolean.TRUE ); + } + + public Integer getNr_relatorio_acidente_colaborador1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_RELATORIO_ACIDENTE_COLABORADOR1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_relatorio_acidente_colaborador1; + } + + public void setNr_relatorio_acidente_colaborador1( Integer nr_relatorio_acidente_colaborador1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_RELATORIO_ACIDENTE_COLABORADOR1, nr_relatorio_acidente_colaborador1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_relatorio_acidente_colaborador1 = nr_relatorio_acidente_colaborador1; + LAZY_LOADED_OBJECTS.put( NR_RELATORIO_ACIDENTE_COLABORADOR1, Boolean.TRUE ); + } + + public Integer getNr_relatorio_acidente_colaborador2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_RELATORIO_ACIDENTE_COLABORADOR2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_relatorio_acidente_colaborador2; + } + + public void setNr_relatorio_acidente_colaborador2( Integer nr_relatorio_acidente_colaborador2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_RELATORIO_ACIDENTE_COLABORADOR2, nr_relatorio_acidente_colaborador2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_relatorio_acidente_colaborador2 = nr_relatorio_acidente_colaborador2; + LAZY_LOADED_OBJECTS.put( NR_RELATORIO_ACIDENTE_COLABORADOR2, Boolean.TRUE ); + } + + public Integer getNr_relatorio_acidente_colaborador3() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_RELATORIO_ACIDENTE_COLABORADOR3 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_relatorio_acidente_colaborador3; + } + + public void setNr_relatorio_acidente_colaborador3( Integer nr_relatorio_acidente_colaborador3 ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_RELATORIO_ACIDENTE_COLABORADOR3, nr_relatorio_acidente_colaborador3 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_relatorio_acidente_colaborador3 = nr_relatorio_acidente_colaborador3; + LAZY_LOADED_OBJECTS.put( NR_RELATORIO_ACIDENTE_COLABORADOR3, Boolean.TRUE ); + } + + public Integer getNr_relatorio_acidente_colaborador4() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_RELATORIO_ACIDENTE_COLABORADOR4 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_relatorio_acidente_colaborador4; + } + + public void setNr_relatorio_acidente_colaborador4( Integer nr_relatorio_acidente_colaborador4 ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_RELATORIO_ACIDENTE_COLABORADOR4, nr_relatorio_acidente_colaborador4 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_relatorio_acidente_colaborador4 = nr_relatorio_acidente_colaborador4; + LAZY_LOADED_OBJECTS.put( NR_RELATORIO_ACIDENTE_COLABORADOR4, Boolean.TRUE ); + } + + public String getAcidentes_outros_colaboradores() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACIDENTES_OUTROS_COLABORADORES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.acidentes_outros_colaboradores; + } + + public void setAcidentes_outros_colaboradores( String acidentes_outros_colaboradores ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACIDENTES_OUTROS_COLABORADORES, acidentes_outros_colaboradores ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.acidentes_outros_colaboradores = acidentes_outros_colaboradores; + LAZY_LOADED_OBJECTS.put( ACIDENTES_OUTROS_COLABORADORES, Boolean.TRUE ); + } + + public Integer getNr_acidentes_outros_colaboradores() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_ACIDENTES_OUTROS_COLABORADORES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_acidentes_outros_colaboradores; + } + + public void setNr_acidentes_outros_colaboradores( Integer nr_acidentes_outros_colaboradores ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_ACIDENTES_OUTROS_COLABORADORES, nr_acidentes_outros_colaboradores ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_acidentes_outros_colaboradores = nr_acidentes_outros_colaboradores; + LAZY_LOADED_OBJECTS.put( NR_ACIDENTES_OUTROS_COLABORADORES, Boolean.TRUE ); + } + + public Integer getNr_relatorio_acidente_outros_colaboradores1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_relatorio_acidente_outros_colaboradores1; + } + + public void setNr_relatorio_acidente_outros_colaboradores1( Integer nr_relatorio_acidente_outros_colaboradores1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, nr_relatorio_acidente_outros_colaboradores1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_relatorio_acidente_outros_colaboradores1 = nr_relatorio_acidente_outros_colaboradores1; + LAZY_LOADED_OBJECTS.put( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, Boolean.TRUE ); + } + + public Integer getNr_relatorio_acidente_outros_colaboradores2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_relatorio_acidente_outros_colaboradores2; + } + + public void setNr_relatorio_acidente_outros_colaboradores2( Integer nr_relatorio_acidente_outros_colaboradores2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, nr_relatorio_acidente_outros_colaboradores2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_relatorio_acidente_outros_colaboradores2 = nr_relatorio_acidente_outros_colaboradores2; + LAZY_LOADED_OBJECTS.put( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, Boolean.TRUE ); + } + + public Integer getNr_relatorio_acidente_outros_colaboradores3() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_relatorio_acidente_outros_colaboradores3; + } + + public void setNr_relatorio_acidente_outros_colaboradores3( Integer nr_relatorio_acidente_outros_colaboradores3 ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, nr_relatorio_acidente_outros_colaboradores3 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_relatorio_acidente_outros_colaboradores3 = nr_relatorio_acidente_outros_colaboradores3; + LAZY_LOADED_OBJECTS.put( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, Boolean.TRUE ); + } + + public Integer getNr_relatorio_acidente_outros_colaboradores4() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nr_relatorio_acidente_outros_colaboradores4; + } + + public void setNr_relatorio_acidente_outros_colaboradores4( Integer nr_relatorio_acidente_outros_colaboradores4 ) + { + try + { + setLockedForRefresh( true ); + preProcess( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, nr_relatorio_acidente_outros_colaboradores4 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nr_relatorio_acidente_outros_colaboradores4 = nr_relatorio_acidente_outros_colaboradores4; + LAZY_LOADED_OBJECTS.put( NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, Boolean.TRUE ); + } + + public String getLesao_cabeca() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LESAO_CABECA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.lesao_cabeca; + } + + public void setLesao_cabeca( String lesao_cabeca ) + { + try + { + setLockedForRefresh( true ); + preProcess( LESAO_CABECA, lesao_cabeca ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.lesao_cabeca = lesao_cabeca; + LAZY_LOADED_OBJECTS.put( LESAO_CABECA, Boolean.TRUE ); + } + + public String getLesao_pescoco() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LESAO_PESCOCO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.lesao_pescoco; + } + + public void setLesao_pescoco( String lesao_pescoco ) + { + try + { + setLockedForRefresh( true ); + preProcess( LESAO_PESCOCO, lesao_pescoco ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.lesao_pescoco = lesao_pescoco; + LAZY_LOADED_OBJECTS.put( LESAO_PESCOCO, Boolean.TRUE ); + } + + public String getLesao_tronco() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LESAO_TRONCO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.lesao_tronco; + } + + public void setLesao_tronco( String lesao_tronco ) + { + try + { + setLockedForRefresh( true ); + preProcess( LESAO_TRONCO, lesao_tronco ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.lesao_tronco = lesao_tronco; + LAZY_LOADED_OBJECTS.put( LESAO_TRONCO, Boolean.TRUE ); + } + + public String getLesao_membro_sup_dir() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LESAO_MEMBRO_SUP_DIR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.lesao_membro_sup_dir; + } + + public void setLesao_membro_sup_dir( String lesao_membro_sup_dir ) + { + try + { + setLockedForRefresh( true ); + preProcess( LESAO_MEMBRO_SUP_DIR, lesao_membro_sup_dir ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.lesao_membro_sup_dir = lesao_membro_sup_dir; + LAZY_LOADED_OBJECTS.put( LESAO_MEMBRO_SUP_DIR, Boolean.TRUE ); + } + + public String getLesao_membro_sup_esq() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LESAO_MEMBRO_SUP_ESQ ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.lesao_membro_sup_esq; + } + + public void setLesao_membro_sup_esq( String lesao_membro_sup_esq ) + { + try + { + setLockedForRefresh( true ); + preProcess( LESAO_MEMBRO_SUP_ESQ, lesao_membro_sup_esq ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.lesao_membro_sup_esq = lesao_membro_sup_esq; + LAZY_LOADED_OBJECTS.put( LESAO_MEMBRO_SUP_ESQ, Boolean.TRUE ); + } + + public String getLesao_membro_inf_dir() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LESAO_MEMBRO_INF_DIR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.lesao_membro_inf_dir; + } + + public void setLesao_membro_inf_dir( String lesao_membro_inf_dir ) + { + try + { + setLockedForRefresh( true ); + preProcess( LESAO_MEMBRO_INF_DIR, lesao_membro_inf_dir ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.lesao_membro_inf_dir = lesao_membro_inf_dir; + LAZY_LOADED_OBJECTS.put( LESAO_MEMBRO_INF_DIR, Boolean.TRUE ); + } + + public String getLesao_membro_inf_esq() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LESAO_MEMBRO_INF_ESQ ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.lesao_membro_inf_esq; + } + + public void setLesao_membro_inf_esq( String lesao_membro_inf_esq ) + { + try + { + setLockedForRefresh( true ); + preProcess( LESAO_MEMBRO_INF_ESQ, lesao_membro_inf_esq ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.lesao_membro_inf_esq = lesao_membro_inf_esq; + LAZY_LOADED_OBJECTS.put( LESAO_MEMBRO_INF_ESQ, Boolean.TRUE ); + } + + public String getEspecif1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESPECIF1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.especif1; + } + + public void setEspecif1( String especif1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESPECIF1, especif1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.especif1 = especif1; + LAZY_LOADED_OBJECTS.put( ESPECIF1, Boolean.TRUE ); + } + + public String getEspecif2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESPECIF2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.especif2; + } + + public void setEspecif2( String especif2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESPECIF2, especif2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.especif2 = especif2; + LAZY_LOADED_OBJECTS.put( ESPECIF2, Boolean.TRUE ); + } + + public String getEspecif3() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESPECIF3 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.especif3; + } + + public void setEspecif3( String especif3 ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESPECIF3, especif3 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.especif3 = especif3; + LAZY_LOADED_OBJECTS.put( ESPECIF3, Boolean.TRUE ); + } + + public String getEspecif4() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESPECIF4 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.especif4; + } + + public void setEspecif4( String especif4 ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESPECIF4, especif4 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.especif4 = especif4; + LAZY_LOADED_OBJECTS.put( ESPECIF4, Boolean.TRUE ); + } + + public String getTipo_incapacidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TIPO_INCAPACIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tipo_incapacidade; + } + + public void setTipo_incapacidade( String tipo_incapacidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( TIPO_INCAPACIDADE, tipo_incapacidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tipo_incapacidade = tipo_incapacidade; + LAZY_LOADED_OBJECTS.put( TIPO_INCAPACIDADE, Boolean.TRUE ); + } + + public Integer getCoef_incapacidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( COEF_INCAPACIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.coef_incapacidade; + } + + public void setCoef_incapacidade( Integer coef_incapacidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( COEF_INCAPACIDADE, coef_incapacidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.coef_incapacidade = coef_incapacidade; + LAZY_LOADED_OBJECTS.put( COEF_INCAPACIDADE, Boolean.TRUE ); + } + + public java.util.Date getData_aval_incapacidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_AVAL_INCAPACIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_aval_incapacidade; + } + + public void setData_aval_incapacidade( java.util.Date data_aval_incapacidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_AVAL_INCAPACIDADE, data_aval_incapacidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_aval_incapacidade = data_aval_incapacidade; + LAZY_LOADED_OBJECTS.put( DATA_AVAL_INCAPACIDADE, Boolean.TRUE ); + } + + public java.util.Date getData_rev_incapacidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_REV_INCAPACIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_rev_incapacidade; + } + + public void setData_rev_incapacidade( java.util.Date data_rev_incapacidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_REV_INCAPACIDADE, data_rev_incapacidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_rev_incapacidade = data_rev_incapacidade; + LAZY_LOADED_OBJECTS.put( DATA_REV_INCAPACIDADE, Boolean.TRUE ); + } + + public java.util.Date getPeriodo_incapacidade_de() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PERIODO_INCAPACIDADE_DE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.periodo_incapacidade_de; + } + + public void setPeriodo_incapacidade_de( java.util.Date periodo_incapacidade_de ) + { + try + { + setLockedForRefresh( true ); + preProcess( PERIODO_INCAPACIDADE_DE, periodo_incapacidade_de ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.periodo_incapacidade_de = periodo_incapacidade_de; + LAZY_LOADED_OBJECTS.put( PERIODO_INCAPACIDADE_DE, Boolean.TRUE ); + } + + public java.util.Date getPeriodo_incapacidade_a() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PERIODO_INCAPACIDADE_A ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.periodo_incapacidade_a; + } + + public void setPeriodo_incapacidade_a( java.util.Date periodo_incapacidade_a ) + { + try + { + setLockedForRefresh( true ); + preProcess( PERIODO_INCAPACIDADE_A, periodo_incapacidade_a ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.periodo_incapacidade_a = periodo_incapacidade_a; + LAZY_LOADED_OBJECTS.put( PERIODO_INCAPACIDADE_A, Boolean.TRUE ); + } + + public String getImg_flexao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_FLEXAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_flexao; + } + + public void setImg_flexao( String img_flexao ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_FLEXAO, img_flexao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_flexao = img_flexao; + LAZY_LOADED_OBJECTS.put( IMG_FLEXAO, Boolean.TRUE ); + } + + public String getImg_ext1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_EXT1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ext1; + } + + public void setImg_ext1( String img_ext1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_EXT1, img_ext1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ext1 = img_ext1; + LAZY_LOADED_OBJECTS.put( IMG_EXT1, Boolean.TRUE ); + } + + public String getImg_ext2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_EXT2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ext2; + } + + public void setImg_ext2( String img_ext2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_EXT2, img_ext2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ext2 = img_ext2; + LAZY_LOADED_OBJECTS.put( IMG_EXT2, Boolean.TRUE ); + } + + public String getImg_cab2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_CAB2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_cab2; + } + + public void setImg_cab2( String img_cab2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_CAB2, img_cab2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_cab2 = img_cab2; + LAZY_LOADED_OBJECTS.put( IMG_CAB2, Boolean.TRUE ); + } + + public String getImg_cab3() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_CAB3 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_cab3; + } + + public void setImg_cab3( String img_cab3 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_CAB3, img_cab3 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_cab3 = img_cab3; + LAZY_LOADED_OBJECTS.put( IMG_CAB3, Boolean.TRUE ); + } + + public String getImg_ma2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma2; + } + + public void setImg_ma2( String img_ma2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA2, img_ma2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma2 = img_ma2; + LAZY_LOADED_OBJECTS.put( IMG_MA2, Boolean.TRUE ); + } + + public String getImg_ma3() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA3 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma3; + } + + public void setImg_ma3( String img_ma3 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA3, img_ma3 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma3 = img_ma3; + LAZY_LOADED_OBJECTS.put( IMG_MA3, Boolean.TRUE ); + } + + public String getImg_ma5() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA5 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma5; + } + + public void setImg_ma5( String img_ma5 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA5, img_ma5 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma5 = img_ma5; + LAZY_LOADED_OBJECTS.put( IMG_MA5, Boolean.TRUE ); + } + + public String getImg_ma6() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA6 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma6; + } + + public void setImg_ma6( String img_ma6 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA6, img_ma6 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma6 = img_ma6; + LAZY_LOADED_OBJECTS.put( IMG_MA6, Boolean.TRUE ); + } + + public String getImg_ma8() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA8 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma8; + } + + public void setImg_ma8( String img_ma8 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA8, img_ma8 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma8 = img_ma8; + LAZY_LOADED_OBJECTS.put( IMG_MA8, Boolean.TRUE ); + } + + public String getImg_ma10() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA10 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma10; + } + + public void setImg_ma10( String img_ma10 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA10, img_ma10 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma10 = img_ma10; + LAZY_LOADED_OBJECTS.put( IMG_MA10, Boolean.TRUE ); + } + + public Integer getRestricao_carga() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESTRICAO_CARGA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.restricao_carga; + } + + public void setRestricao_carga( Integer restricao_carga ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESTRICAO_CARGA, restricao_carga ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.restricao_carga = restricao_carga; + LAZY_LOADED_OBJECTS.put( RESTRICAO_CARGA, Boolean.TRUE ); + } + + public String getRestricao_motricidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESTRICAO_MOTRICIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.restricao_motricidade; + } + + public void setRestricao_motricidade( String restricao_motricidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESTRICAO_MOTRICIDADE, restricao_motricidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.restricao_motricidade = restricao_motricidade; + LAZY_LOADED_OBJECTS.put( RESTRICAO_MOTRICIDADE, Boolean.TRUE ); + } + + public String getRestricao_conducao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESTRICAO_CONDUCAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.restricao_conducao; + } + + public void setRestricao_conducao( String restricao_conducao ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESTRICAO_CONDUCAO, restricao_conducao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.restricao_conducao = restricao_conducao; + LAZY_LOADED_OBJECTS.put( RESTRICAO_CONDUCAO, Boolean.TRUE ); + } + + public String getRestricao_vibracoes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESTRICAO_VIBRACOES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.restricao_vibracoes; + } + + public void setRestricao_vibracoes( String restricao_vibracoes ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESTRICAO_VIBRACOES, restricao_vibracoes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.restricao_vibracoes = restricao_vibracoes; + LAZY_LOADED_OBJECTS.put( RESTRICAO_VIBRACOES, Boolean.TRUE ); + } + + public String getRestricao_outras() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESTRICAO_OUTRAS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.restricao_outras; + } + + public void setRestricao_outras( String restricao_outras ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESTRICAO_OUTRAS, restricao_outras ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.restricao_outras = restricao_outras; + LAZY_LOADED_OBJECTS.put( RESTRICAO_OUTRAS, Boolean.TRUE ); + } + + public String getMed_observ() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MED_OBSERV ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.med_observ; + } + + public void setMed_observ( String med_observ ) + { + try + { + setLockedForRefresh( true ); + preProcess( MED_OBSERV, med_observ ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.med_observ = med_observ; + LAZY_LOADED_OBJECTS.put( MED_OBSERV, Boolean.TRUE ); + } + + public String getTipo_lesao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TIPO_LESAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tipo_lesao; + } + + public void setTipo_lesao( String tipo_lesao ) + { + try + { + setLockedForRefresh( true ); + preProcess( TIPO_LESAO, tipo_lesao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tipo_lesao = tipo_lesao; + LAZY_LOADED_OBJECTS.put( TIPO_LESAO, Boolean.TRUE ); + } + + public String getImg_rot1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_ROT1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_rot1; + } + + public void setImg_rot1( String img_rot1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_ROT1, img_rot1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_rot1 = img_rot1; + LAZY_LOADED_OBJECTS.put( IMG_ROT1, Boolean.TRUE ); + } + + public String getImg_rot2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_ROT2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_rot2; + } + + public void setImg_rot2( String img_rot2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_ROT2, img_rot2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_rot2 = img_rot2; + LAZY_LOADED_OBJECTS.put( IMG_ROT2, Boolean.TRUE ); + } + + public String getImg_cab1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_CAB1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_cab1; + } + + public void setImg_cab1( String img_cab1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_CAB1, img_cab1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_cab1 = img_cab1; + LAZY_LOADED_OBJECTS.put( IMG_CAB1, Boolean.TRUE ); + } + + public String getImg_cab4() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_CAB4 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_cab4; + } + + public void setImg_cab4( String img_cab4 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_CAB4, img_cab4 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_cab4 = img_cab4; + LAZY_LOADED_OBJECTS.put( IMG_CAB4, Boolean.TRUE ); + } + + public String getImg_ma1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma1; + } + + public void setImg_ma1( String img_ma1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA1, img_ma1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma1 = img_ma1; + LAZY_LOADED_OBJECTS.put( IMG_MA1, Boolean.TRUE ); + } + + public String getImg_ma4() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA4 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma4; + } + + public void setImg_ma4( String img_ma4 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA4, img_ma4 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma4 = img_ma4; + LAZY_LOADED_OBJECTS.put( IMG_MA4, Boolean.TRUE ); + } + + public String getImg_ma7() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA7 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma7; + } + + public void setImg_ma7( String img_ma7 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA7, img_ma7 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma7 = img_ma7; + LAZY_LOADED_OBJECTS.put( IMG_MA7, Boolean.TRUE ); + } + + public String getImg_ma9() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMG_MA9 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.img_ma9; + } + + public void setImg_ma9( String img_ma9 ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMG_MA9, img_ma9 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.img_ma9 = img_ma9; + LAZY_LOADED_OBJECTS.put( IMG_MA9, 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 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 Integer getTecnico_saude_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TECNICO_SAUDE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tecnico_saude_id; + } + + public void setTecnico_saude_id( Integer tecnico_saude_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TECNICO_SAUDE_ID, tecnico_saude_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tecnico_saude_id = tecnico_saude_id; + LAZY_LOADED_OBJECTS.put( TECNICO_SAUDE_ID, Boolean.TRUE ); + } + + public String getAnalise_nr() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ANALISE_NR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.analise_nr; + } + + public void setAnalise_nr( String analise_nr ) + { + try + { + setLockedForRefresh( true ); + preProcess( ANALISE_NR, analise_nr ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.analise_nr = analise_nr; + LAZY_LOADED_OBJECTS.put( ANALISE_NR, Boolean.TRUE ); + } + + public Integer getEstado_assinatura() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTADO_ASSINATURA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estado_assinatura; + } + + public void setEstado_assinatura( Integer estado_assinatura ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTADO_ASSINATURA, estado_assinatura ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estado_assinatura = estado_assinatura; + LAZY_LOADED_OBJECTS.put( ESTADO_ASSINATURA, Boolean.TRUE ); + } + + public String getAss_resp_seg() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ASS_RESP_SEG ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ass_resp_seg; + } + + public void setAss_resp_seg( String ass_resp_seg ) + { + try + { + setLockedForRefresh( true ); + preProcess( ASS_RESP_SEG, ass_resp_seg ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ass_resp_seg = ass_resp_seg; + LAZY_LOADED_OBJECTS.put( ASS_RESP_SEG, Boolean.TRUE ); + } + + public String getAss_resp_rh() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ASS_RESP_RH ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ass_resp_rh; + } + + public void setAss_resp_rh( String ass_resp_rh ) + { + try + { + setLockedForRefresh( true ); + preProcess( ASS_RESP_RH, ass_resp_rh ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ass_resp_rh = ass_resp_rh; + LAZY_LOADED_OBJECTS.put( ASS_RESP_RH, Boolean.TRUE ); + } + + public java.util.Date getData_consolidacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_CONSOLIDACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_consolidacao; + } + + public void setData_consolidacao( java.util.Date data_consolidacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_CONSOLIDACAO, data_consolidacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_consolidacao = data_consolidacao; + LAZY_LOADED_OBJECTS.put( DATA_CONSOLIDACAO, Boolean.TRUE ); + } + + public java.util.Date getData_assinatura_seg() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ASSINATURA_SEG ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_assinatura_seg; + } + + public void setData_assinatura_seg( java.util.Date data_assinatura_seg ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ASSINATURA_SEG, data_assinatura_seg ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_assinatura_seg = data_assinatura_seg; + LAZY_LOADED_OBJECTS.put( DATA_ASSINATURA_SEG, Boolean.TRUE ); + } + + public java.util.Date getData_assinatura_rh() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ASSINATURA_RH ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_assinatura_rh; + } + + public void setData_assinatura_rh( java.util.Date data_assinatura_rh ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ASSINATURA_RH, data_assinatura_rh ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_assinatura_rh = data_assinatura_rh; + LAZY_LOADED_OBJECTS.put( DATA_ASSINATURA_RH, Boolean.TRUE ); + } + + public String getAss_consolidacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ASS_CONSOLIDACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ass_consolidacao; + } + + public void setAss_consolidacao( String ass_consolidacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( ASS_CONSOLIDACAO, ass_consolidacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ass_consolidacao = ass_consolidacao; + LAZY_LOADED_OBJECTS.put( ASS_CONSOLIDACAO, Boolean.TRUE ); + } + + public String getNome_resp_seg() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_RESP_SEG ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_resp_seg; + } + + public void setNome_resp_seg( String nome_resp_seg ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_RESP_SEG, nome_resp_seg ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_resp_seg = nome_resp_seg; + LAZY_LOADED_OBJECTS.put( NOME_RESP_SEG, Boolean.TRUE ); + } + + public String getNome_resp_rh() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_RESP_RH ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_resp_rh; + } + + public void setNome_resp_rh( String nome_resp_rh ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_RESP_RH, nome_resp_rh ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_resp_rh = nome_resp_rh; + LAZY_LOADED_OBJECTS.put( NOME_RESP_RH, Boolean.TRUE ); + } + + public Integer getCausas() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CAUSAS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.causas; + } + + public void setCausas( Integer causas ) + { + try + { + setLockedForRefresh( true ); + preProcess( CAUSAS, causas ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.causas = causas; + LAZY_LOADED_OBJECTS.put( CAUSAS, Boolean.TRUE ); + } + + public Integer getEstado_antes_correcao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTADO_ANTES_CORRECAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estado_antes_correcao; + } + + public void setEstado_antes_correcao( Integer estado_antes_correcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTADO_ANTES_CORRECAO, estado_antes_correcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estado_antes_correcao = estado_antes_correcao; + LAZY_LOADED_OBJECTS.put( ESTADO_ANTES_CORRECAO, Boolean.TRUE ); + } + + public String getObservacoes_correcao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OBSERVACOES_CORRECAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.observacoes_correcao; + } + + public void setObservacoes_correcao( String observacoes_correcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( OBSERVACOES_CORRECAO, observacoes_correcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.observacoes_correcao = observacoes_correcao; + LAZY_LOADED_OBJECTS.put( OBSERVACOES_CORRECAO, Boolean.TRUE ); + } + + public String getCorrecao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CORRECAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.correcao; + } + + public void setCorrecao( String correcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( CORRECAO, correcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.correcao = correcao; + LAZY_LOADED_OBJECTS.put( CORRECAO, Boolean.TRUE ); + } + + public String getAss_superior() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ASS_SUPERIOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ass_superior; + } + + public void setAss_superior( String ass_superior ) + { + try + { + setLockedForRefresh( true ); + preProcess( ASS_SUPERIOR, ass_superior ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ass_superior = ass_superior; + LAZY_LOADED_OBJECTS.put( ASS_SUPERIOR, Boolean.TRUE ); + } + + public String getNome_superior() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_SUPERIOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_superior; + } + + public void setNome_superior( String nome_superior ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_SUPERIOR, nome_superior ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_superior = nome_superior; + LAZY_LOADED_OBJECTS.put( NOME_SUPERIOR, Boolean.TRUE ); + } + + public java.util.Date getData_assinatura_superior() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ASSINATURA_SUPERIOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_assinatura_superior; + } + + public void setData_assinatura_superior( java.util.Date data_assinatura_superior ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ASSINATURA_SUPERIOR, data_assinatura_superior ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_assinatura_superior = data_assinatura_superior; + LAZY_LOADED_OBJECTS.put( DATA_ASSINATURA_SUPERIOR, Boolean.TRUE ); + } + + public String getAveriguador() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( AVERIGUADOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.averiguador; + } + + public void setAveriguador( String averiguador ) + { + try + { + setLockedForRefresh( true ); + preProcess( AVERIGUADOR, averiguador ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.averiguador = averiguador; + LAZY_LOADED_OBJECTS.put( AVERIGUADOR, Boolean.TRUE ); + } + + public String getAveriguacao_posterior() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( AVERIGUACAO_POSTERIOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.averiguacao_posterior; + } + + public void setAveriguacao_posterior( String averiguacao_posterior ) + { + try + { + setLockedForRefresh( true ); + preProcess( AVERIGUACAO_POSTERIOR, averiguacao_posterior ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.averiguacao_posterior = averiguacao_posterior; + LAZY_LOADED_OBJECTS.put( AVERIGUACAO_POSTERIOR, Boolean.TRUE ); + } + + public String getAveriguacao_obs() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( AVERIGUACAO_OBS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.averiguacao_obs; + } + + public void setAveriguacao_obs( String averiguacao_obs ) + { + try + { + setLockedForRefresh( true ); + preProcess( AVERIGUACAO_OBS, averiguacao_obs ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.averiguacao_obs = averiguacao_obs; + LAZY_LOADED_OBJECTS.put( AVERIGUACAO_OBS, Boolean.TRUE ); + } + + public String getNome_resp_consolidacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_RESP_CONSOLIDACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_resp_consolidacao; + } + + public void setNome_resp_consolidacao( String nome_resp_consolidacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_RESP_CONSOLIDACAO, nome_resp_consolidacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_resp_consolidacao = nome_resp_consolidacao; + LAZY_LOADED_OBJECTS.put( NOME_RESP_CONSOLIDACAO, Boolean.TRUE ); + } + + public java.util.Date getData_inicio_processo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_INICIO_PROCESSO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_inicio_processo; + } + + public void setData_inicio_processo( java.util.Date data_inicio_processo ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_INICIO_PROCESSO, data_inicio_processo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_inicio_processo = data_inicio_processo; + LAZY_LOADED_OBJECTS.put( DATA_INICIO_PROCESSO, Boolean.TRUE ); + } + + public Integer getDepartamento_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DEPARTAMENTO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.departamento_id; + } + + public void setDepartamento_id( Integer departamento_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( DEPARTAMENTO_ID, departamento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.departamento_id = departamento_id; + LAZY_LOADED_OBJECTS.put( DEPARTAMENTO_ID, Boolean.TRUE ); + } + + public db.data.siprp.outer.DepartamentosData toDepartamento_id() + { + try + { + prepare( TO_DEPARTAMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_departamento_id; + } + + public void setToDepartamento_id( db.data.siprp.outer.DepartamentosData to_departamento_id ) + { + try + { + preProcess( TO_DEPARTAMENTO_ID, to_departamento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_departamento_id = to_departamento_id; + } + + public Integer getSeccao_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SECCAO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.seccao_id; + } + + public void setSeccao_id( Integer seccao_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( SECCAO_ID, seccao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.seccao_id = seccao_id; + LAZY_LOADED_OBJECTS.put( SECCAO_ID, Boolean.TRUE ); + } + + public db.data.siprp.outer.SeccoesData toSeccao_id() + { + try + { + prepare( TO_SECCAO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_seccao_id; + } + + public void setToSeccao_id( db.data.siprp.outer.SeccoesData to_seccao_id ) + { + try + { + preProcess( TO_SECCAO_ID, to_seccao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_seccao_id = to_seccao_id; + } + + public Integer getRh_fase4() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RH_FASE4 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.rh_fase4; + } + + public void setRh_fase4( Integer rh_fase4 ) + { + try + { + setLockedForRefresh( true ); + preProcess( RH_FASE4, rh_fase4 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.rh_fase4 = rh_fase4; + LAZY_LOADED_OBJECTS.put( RH_FASE4, Boolean.TRUE ); + } + + public String getApagada() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( APAGADA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.apagada; + } + + public void setApagada( String apagada ) + { + try + { + setLockedForRefresh( true ); + preProcess( APAGADA, apagada ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.apagada = apagada; + LAZY_LOADED_OBJECTS.put( APAGADA, Boolean.TRUE ); + } + + public Boolean getConcluido_por_desactivacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONCLUIDO_POR_DESACTIVACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.concluido_por_desactivacao; + } + + public void setConcluido_por_desactivacao( Boolean concluido_por_desactivacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONCLUIDO_POR_DESACTIVACAO, concluido_por_desactivacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.concluido_por_desactivacao = concluido_por_desactivacao; + LAZY_LOADED_OBJECTS.put( CONCLUIDO_POR_DESACTIVACAO, Boolean.TRUE ); + } + + public java.util.Date getData_desactivacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_DESACTIVACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_desactivacao; + } + + public void setData_desactivacao( java.util.Date data_desactivacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_DESACTIVACAO, data_desactivacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_desactivacao = data_desactivacao; + LAZY_LOADED_OBJECTS.put( DATA_DESACTIVACAO, Boolean.TRUE ); + } + + public String getComentario_desactivacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( COMENTARIO_DESACTIVACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.comentario_desactivacao; + } + + public void setComentario_desactivacao( String comentario_desactivacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( COMENTARIO_DESACTIVACAO, comentario_desactivacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.comentario_desactivacao = comentario_desactivacao; + LAZY_LOADED_OBJECTS.put( COMENTARIO_DESACTIVACAO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AnalisesAcidentes.ID_INDEX: + value = getId(); + break; + case AnalisesAcidentes.DATA_ACIDENTE_INDEX: + value = getData_acidente(); + break; + case AnalisesAcidentes.ACIDENTADO_ID_INDEX: + value = getAcidentado_id(); + break; + case AnalisesAcidentes.TO_ACIDENTADO_ID_INDEX: + value = toAcidentado_id(); + break; + case AnalisesAcidentes.ESTADO_INDEX: + value = getEstado(); + break; + case AnalisesAcidentes.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case AnalisesAcidentes.HORAS_TURNO_INDEX: + value = getHoras_turno(); + break; + case AnalisesAcidentes.SECCAO_INDEX: + value = getSeccao(); + break; + case AnalisesAcidentes.LOCAL_TRABALHO_INDEX: + value = getLocal_trabalho(); + break; + case AnalisesAcidentes.TAREFA_INDEX: + value = getTarefa(); + break; + case AnalisesAcidentes.SUBSTANCIAS_INDEX: + value = getSubstancias(); + break; + case AnalisesAcidentes.SUPERIOR_HIERARQUICO_INDEX: + value = getSuperior_hierarquico(); + break; + case AnalisesAcidentes.CONDICOES_INDEX: + value = getCondicoes(); + break; + case AnalisesAcidentes.TESTEMUNHAS_INDEX: + value = getTestemunhas(); + break; + case AnalisesAcidentes.DESCRICAO_INDEX: + value = getDescricao(); + break; + case AnalisesAcidentes.CONCLUSOES_INDEX: + value = getConclusoes(); + break; + case AnalisesAcidentes.ACCOES_INDEX: + value = getAccoes(); + break; + case AnalisesAcidentes.HORA_ACIDENTE_INDEX: + value = getHora_acidente(); + break; + case AnalisesAcidentes.FORMACAO_SHST_INDEX: + value = getFormacao_shst(); + break; + case AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE_INDEX: + value = getFormacao_shst_nao_porque(); + break; + case AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR_INDEX: + value = getOutros_acidentes_com_colaborador(); + break; + case AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR_INDEX: + value = getNr_acidentes_com_colaborador(); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1_INDEX: + value = getNr_relatorio_acidente_colaborador1(); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2_INDEX: + value = getNr_relatorio_acidente_colaborador2(); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3_INDEX: + value = getNr_relatorio_acidente_colaborador3(); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4_INDEX: + value = getNr_relatorio_acidente_colaborador4(); + break; + case AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES_INDEX: + value = getAcidentes_outros_colaboradores(); + break; + case AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES_INDEX: + value = getNr_acidentes_outros_colaboradores(); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_INDEX: + value = getNr_relatorio_acidente_outros_colaboradores1(); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_INDEX: + value = getNr_relatorio_acidente_outros_colaboradores2(); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_INDEX: + value = getNr_relatorio_acidente_outros_colaboradores3(); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_INDEX: + value = getNr_relatorio_acidente_outros_colaboradores4(); + break; + case AnalisesAcidentes.LESAO_CABECA_INDEX: + value = getLesao_cabeca(); + break; + case AnalisesAcidentes.LESAO_PESCOCO_INDEX: + value = getLesao_pescoco(); + break; + case AnalisesAcidentes.LESAO_TRONCO_INDEX: + value = getLesao_tronco(); + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR_INDEX: + value = getLesao_membro_sup_dir(); + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ_INDEX: + value = getLesao_membro_sup_esq(); + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_DIR_INDEX: + value = getLesao_membro_inf_dir(); + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ_INDEX: + value = getLesao_membro_inf_esq(); + break; + case AnalisesAcidentes.ESPECIF1_INDEX: + value = getEspecif1(); + break; + case AnalisesAcidentes.ESPECIF2_INDEX: + value = getEspecif2(); + break; + case AnalisesAcidentes.ESPECIF3_INDEX: + value = getEspecif3(); + break; + case AnalisesAcidentes.ESPECIF4_INDEX: + value = getEspecif4(); + break; + case AnalisesAcidentes.TIPO_INCAPACIDADE_INDEX: + value = getTipo_incapacidade(); + break; + case AnalisesAcidentes.COEF_INCAPACIDADE_INDEX: + value = getCoef_incapacidade(); + break; + case AnalisesAcidentes.DATA_AVAL_INCAPACIDADE_INDEX: + value = getData_aval_incapacidade(); + break; + case AnalisesAcidentes.DATA_REV_INCAPACIDADE_INDEX: + value = getData_rev_incapacidade(); + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_DE_INDEX: + value = getPeriodo_incapacidade_de(); + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_A_INDEX: + value = getPeriodo_incapacidade_a(); + break; + case AnalisesAcidentes.IMG_FLEXAO_INDEX: + value = getImg_flexao(); + break; + case AnalisesAcidentes.IMG_EXT1_INDEX: + value = getImg_ext1(); + break; + case AnalisesAcidentes.IMG_EXT2_INDEX: + value = getImg_ext2(); + break; + case AnalisesAcidentes.IMG_CAB2_INDEX: + value = getImg_cab2(); + break; + case AnalisesAcidentes.IMG_CAB3_INDEX: + value = getImg_cab3(); + break; + case AnalisesAcidentes.IMG_MA2_INDEX: + value = getImg_ma2(); + break; + case AnalisesAcidentes.IMG_MA3_INDEX: + value = getImg_ma3(); + break; + case AnalisesAcidentes.IMG_MA5_INDEX: + value = getImg_ma5(); + break; + case AnalisesAcidentes.IMG_MA6_INDEX: + value = getImg_ma6(); + break; + case AnalisesAcidentes.IMG_MA8_INDEX: + value = getImg_ma8(); + break; + case AnalisesAcidentes.IMG_MA10_INDEX: + value = getImg_ma10(); + break; + case AnalisesAcidentes.RESTRICAO_CARGA_INDEX: + value = getRestricao_carga(); + break; + case AnalisesAcidentes.RESTRICAO_MOTRICIDADE_INDEX: + value = getRestricao_motricidade(); + break; + case AnalisesAcidentes.RESTRICAO_CONDUCAO_INDEX: + value = getRestricao_conducao(); + break; + case AnalisesAcidentes.RESTRICAO_VIBRACOES_INDEX: + value = getRestricao_vibracoes(); + break; + case AnalisesAcidentes.RESTRICAO_OUTRAS_INDEX: + value = getRestricao_outras(); + break; + case AnalisesAcidentes.MED_OBSERV_INDEX: + value = getMed_observ(); + break; + case AnalisesAcidentes.TIPO_LESAO_INDEX: + value = getTipo_lesao(); + break; + case AnalisesAcidentes.IMG_ROT1_INDEX: + value = getImg_rot1(); + break; + case AnalisesAcidentes.IMG_ROT2_INDEX: + value = getImg_rot2(); + break; + case AnalisesAcidentes.IMG_CAB1_INDEX: + value = getImg_cab1(); + break; + case AnalisesAcidentes.IMG_CAB4_INDEX: + value = getImg_cab4(); + break; + case AnalisesAcidentes.IMG_MA1_INDEX: + value = getImg_ma1(); + break; + case AnalisesAcidentes.IMG_MA4_INDEX: + value = getImg_ma4(); + break; + case AnalisesAcidentes.IMG_MA7_INDEX: + value = getImg_ma7(); + break; + case AnalisesAcidentes.IMG_MA9_INDEX: + value = getImg_ma9(); + break; + case AnalisesAcidentes.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case AnalisesAcidentes.MEDICO_ID_INDEX: + value = getMedico_id(); + break; + case AnalisesAcidentes.TECNICO_SAUDE_ID_INDEX: + value = getTecnico_saude_id(); + break; + case AnalisesAcidentes.ANALISE_NR_INDEX: + value = getAnalise_nr(); + break; + case AnalisesAcidentes.ESTADO_ASSINATURA_INDEX: + value = getEstado_assinatura(); + break; + case AnalisesAcidentes.ASS_RESP_SEG_INDEX: + value = getAss_resp_seg(); + break; + case AnalisesAcidentes.ASS_RESP_RH_INDEX: + value = getAss_resp_rh(); + break; + case AnalisesAcidentes.DATA_CONSOLIDACAO_INDEX: + value = getData_consolidacao(); + break; + case AnalisesAcidentes.DATA_ASSINATURA_SEG_INDEX: + value = getData_assinatura_seg(); + break; + case AnalisesAcidentes.DATA_ASSINATURA_RH_INDEX: + value = getData_assinatura_rh(); + break; + case AnalisesAcidentes.ASS_CONSOLIDACAO_INDEX: + value = getAss_consolidacao(); + break; + case AnalisesAcidentes.NOME_RESP_SEG_INDEX: + value = getNome_resp_seg(); + break; + case AnalisesAcidentes.NOME_RESP_RH_INDEX: + value = getNome_resp_rh(); + break; + case AnalisesAcidentes.CAUSAS_INDEX: + value = getCausas(); + break; + case AnalisesAcidentes.ESTADO_ANTES_CORRECAO_INDEX: + value = getEstado_antes_correcao(); + break; + case AnalisesAcidentes.OBSERVACOES_CORRECAO_INDEX: + value = getObservacoes_correcao(); + break; + case AnalisesAcidentes.CORRECAO_INDEX: + value = getCorrecao(); + break; + case AnalisesAcidentes.ASS_SUPERIOR_INDEX: + value = getAss_superior(); + break; + case AnalisesAcidentes.NOME_SUPERIOR_INDEX: + value = getNome_superior(); + break; + case AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR_INDEX: + value = getData_assinatura_superior(); + break; + case AnalisesAcidentes.AVERIGUADOR_INDEX: + value = getAveriguador(); + break; + case AnalisesAcidentes.AVERIGUACAO_POSTERIOR_INDEX: + value = getAveriguacao_posterior(); + break; + case AnalisesAcidentes.AVERIGUACAO_OBS_INDEX: + value = getAveriguacao_obs(); + break; + case AnalisesAcidentes.NOME_RESP_CONSOLIDACAO_INDEX: + value = getNome_resp_consolidacao(); + break; + case AnalisesAcidentes.DATA_INICIO_PROCESSO_INDEX: + value = getData_inicio_processo(); + break; + case AnalisesAcidentes.DEPARTAMENTO_ID_INDEX: + value = getDepartamento_id(); + break; + case AnalisesAcidentes.TO_DEPARTAMENTO_ID_INDEX: + value = toDepartamento_id(); + break; + case AnalisesAcidentes.SECCAO_ID_INDEX: + value = getSeccao_id(); + break; + case AnalisesAcidentes.TO_SECCAO_ID_INDEX: + value = toSeccao_id(); + break; + case AnalisesAcidentes.RH_FASE4_INDEX: + value = getRh_fase4(); + break; + case AnalisesAcidentes.APAGADA_INDEX: + value = getApagada(); + break; + case AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO_INDEX: + value = getConcluido_por_desactivacao(); + break; + case AnalisesAcidentes.DATA_DESACTIVACAO_INDEX: + value = getData_desactivacao(); + break; + case AnalisesAcidentes.COMENTARIO_DESACTIVACAO_INDEX: + value = getComentario_desactivacao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AnalisesAcidentes.ID_INDEX: + value = this.id; + break; + case AnalisesAcidentes.DATA_ACIDENTE_INDEX: + value = this.data_acidente; + break; + case AnalisesAcidentes.ACIDENTADO_ID_INDEX: + value = this.acidentado_id; + break; + case AnalisesAcidentes.TO_ACIDENTADO_ID_INDEX: + value = this.to_acidentado_id; + break; + case AnalisesAcidentes.ESTADO_INDEX: + value = this.estado; + break; + case AnalisesAcidentes.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + case AnalisesAcidentes.HORAS_TURNO_INDEX: + value = this.horas_turno; + break; + case AnalisesAcidentes.SECCAO_INDEX: + value = this.seccao; + break; + case AnalisesAcidentes.LOCAL_TRABALHO_INDEX: + value = this.local_trabalho; + break; + case AnalisesAcidentes.TAREFA_INDEX: + value = this.tarefa; + break; + case AnalisesAcidentes.SUBSTANCIAS_INDEX: + value = this.substancias; + break; + case AnalisesAcidentes.SUPERIOR_HIERARQUICO_INDEX: + value = this.superior_hierarquico; + break; + case AnalisesAcidentes.CONDICOES_INDEX: + value = this.condicoes; + break; + case AnalisesAcidentes.TESTEMUNHAS_INDEX: + value = this.testemunhas; + break; + case AnalisesAcidentes.DESCRICAO_INDEX: + value = this.descricao; + break; + case AnalisesAcidentes.CONCLUSOES_INDEX: + value = this.conclusoes; + break; + case AnalisesAcidentes.ACCOES_INDEX: + value = this.accoes; + break; + case AnalisesAcidentes.HORA_ACIDENTE_INDEX: + value = this.hora_acidente; + break; + case AnalisesAcidentes.FORMACAO_SHST_INDEX: + value = this.formacao_shst; + break; + case AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE_INDEX: + value = this.formacao_shst_nao_porque; + break; + case AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR_INDEX: + value = this.outros_acidentes_com_colaborador; + break; + case AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR_INDEX: + value = this.nr_acidentes_com_colaborador; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1_INDEX: + value = this.nr_relatorio_acidente_colaborador1; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2_INDEX: + value = this.nr_relatorio_acidente_colaborador2; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3_INDEX: + value = this.nr_relatorio_acidente_colaborador3; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4_INDEX: + value = this.nr_relatorio_acidente_colaborador4; + break; + case AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES_INDEX: + value = this.acidentes_outros_colaboradores; + break; + case AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES_INDEX: + value = this.nr_acidentes_outros_colaboradores; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_INDEX: + value = this.nr_relatorio_acidente_outros_colaboradores1; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_INDEX: + value = this.nr_relatorio_acidente_outros_colaboradores2; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_INDEX: + value = this.nr_relatorio_acidente_outros_colaboradores3; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_INDEX: + value = this.nr_relatorio_acidente_outros_colaboradores4; + break; + case AnalisesAcidentes.LESAO_CABECA_INDEX: + value = this.lesao_cabeca; + break; + case AnalisesAcidentes.LESAO_PESCOCO_INDEX: + value = this.lesao_pescoco; + break; + case AnalisesAcidentes.LESAO_TRONCO_INDEX: + value = this.lesao_tronco; + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR_INDEX: + value = this.lesao_membro_sup_dir; + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ_INDEX: + value = this.lesao_membro_sup_esq; + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_DIR_INDEX: + value = this.lesao_membro_inf_dir; + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ_INDEX: + value = this.lesao_membro_inf_esq; + break; + case AnalisesAcidentes.ESPECIF1_INDEX: + value = this.especif1; + break; + case AnalisesAcidentes.ESPECIF2_INDEX: + value = this.especif2; + break; + case AnalisesAcidentes.ESPECIF3_INDEX: + value = this.especif3; + break; + case AnalisesAcidentes.ESPECIF4_INDEX: + value = this.especif4; + break; + case AnalisesAcidentes.TIPO_INCAPACIDADE_INDEX: + value = this.tipo_incapacidade; + break; + case AnalisesAcidentes.COEF_INCAPACIDADE_INDEX: + value = this.coef_incapacidade; + break; + case AnalisesAcidentes.DATA_AVAL_INCAPACIDADE_INDEX: + value = this.data_aval_incapacidade; + break; + case AnalisesAcidentes.DATA_REV_INCAPACIDADE_INDEX: + value = this.data_rev_incapacidade; + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_DE_INDEX: + value = this.periodo_incapacidade_de; + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_A_INDEX: + value = this.periodo_incapacidade_a; + break; + case AnalisesAcidentes.IMG_FLEXAO_INDEX: + value = this.img_flexao; + break; + case AnalisesAcidentes.IMG_EXT1_INDEX: + value = this.img_ext1; + break; + case AnalisesAcidentes.IMG_EXT2_INDEX: + value = this.img_ext2; + break; + case AnalisesAcidentes.IMG_CAB2_INDEX: + value = this.img_cab2; + break; + case AnalisesAcidentes.IMG_CAB3_INDEX: + value = this.img_cab3; + break; + case AnalisesAcidentes.IMG_MA2_INDEX: + value = this.img_ma2; + break; + case AnalisesAcidentes.IMG_MA3_INDEX: + value = this.img_ma3; + break; + case AnalisesAcidentes.IMG_MA5_INDEX: + value = this.img_ma5; + break; + case AnalisesAcidentes.IMG_MA6_INDEX: + value = this.img_ma6; + break; + case AnalisesAcidentes.IMG_MA8_INDEX: + value = this.img_ma8; + break; + case AnalisesAcidentes.IMG_MA10_INDEX: + value = this.img_ma10; + break; + case AnalisesAcidentes.RESTRICAO_CARGA_INDEX: + value = this.restricao_carga; + break; + case AnalisesAcidentes.RESTRICAO_MOTRICIDADE_INDEX: + value = this.restricao_motricidade; + break; + case AnalisesAcidentes.RESTRICAO_CONDUCAO_INDEX: + value = this.restricao_conducao; + break; + case AnalisesAcidentes.RESTRICAO_VIBRACOES_INDEX: + value = this.restricao_vibracoes; + break; + case AnalisesAcidentes.RESTRICAO_OUTRAS_INDEX: + value = this.restricao_outras; + break; + case AnalisesAcidentes.MED_OBSERV_INDEX: + value = this.med_observ; + break; + case AnalisesAcidentes.TIPO_LESAO_INDEX: + value = this.tipo_lesao; + break; + case AnalisesAcidentes.IMG_ROT1_INDEX: + value = this.img_rot1; + break; + case AnalisesAcidentes.IMG_ROT2_INDEX: + value = this.img_rot2; + break; + case AnalisesAcidentes.IMG_CAB1_INDEX: + value = this.img_cab1; + break; + case AnalisesAcidentes.IMG_CAB4_INDEX: + value = this.img_cab4; + break; + case AnalisesAcidentes.IMG_MA1_INDEX: + value = this.img_ma1; + break; + case AnalisesAcidentes.IMG_MA4_INDEX: + value = this.img_ma4; + break; + case AnalisesAcidentes.IMG_MA7_INDEX: + value = this.img_ma7; + break; + case AnalisesAcidentes.IMG_MA9_INDEX: + value = this.img_ma9; + break; + case AnalisesAcidentes.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case AnalisesAcidentes.MEDICO_ID_INDEX: + value = this.medico_id; + break; + case AnalisesAcidentes.TECNICO_SAUDE_ID_INDEX: + value = this.tecnico_saude_id; + break; + case AnalisesAcidentes.ANALISE_NR_INDEX: + value = this.analise_nr; + break; + case AnalisesAcidentes.ESTADO_ASSINATURA_INDEX: + value = this.estado_assinatura; + break; + case AnalisesAcidentes.ASS_RESP_SEG_INDEX: + value = this.ass_resp_seg; + break; + case AnalisesAcidentes.ASS_RESP_RH_INDEX: + value = this.ass_resp_rh; + break; + case AnalisesAcidentes.DATA_CONSOLIDACAO_INDEX: + value = this.data_consolidacao; + break; + case AnalisesAcidentes.DATA_ASSINATURA_SEG_INDEX: + value = this.data_assinatura_seg; + break; + case AnalisesAcidentes.DATA_ASSINATURA_RH_INDEX: + value = this.data_assinatura_rh; + break; + case AnalisesAcidentes.ASS_CONSOLIDACAO_INDEX: + value = this.ass_consolidacao; + break; + case AnalisesAcidentes.NOME_RESP_SEG_INDEX: + value = this.nome_resp_seg; + break; + case AnalisesAcidentes.NOME_RESP_RH_INDEX: + value = this.nome_resp_rh; + break; + case AnalisesAcidentes.CAUSAS_INDEX: + value = this.causas; + break; + case AnalisesAcidentes.ESTADO_ANTES_CORRECAO_INDEX: + value = this.estado_antes_correcao; + break; + case AnalisesAcidentes.OBSERVACOES_CORRECAO_INDEX: + value = this.observacoes_correcao; + break; + case AnalisesAcidentes.CORRECAO_INDEX: + value = this.correcao; + break; + case AnalisesAcidentes.ASS_SUPERIOR_INDEX: + value = this.ass_superior; + break; + case AnalisesAcidentes.NOME_SUPERIOR_INDEX: + value = this.nome_superior; + break; + case AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR_INDEX: + value = this.data_assinatura_superior; + break; + case AnalisesAcidentes.AVERIGUADOR_INDEX: + value = this.averiguador; + break; + case AnalisesAcidentes.AVERIGUACAO_POSTERIOR_INDEX: + value = this.averiguacao_posterior; + break; + case AnalisesAcidentes.AVERIGUACAO_OBS_INDEX: + value = this.averiguacao_obs; + break; + case AnalisesAcidentes.NOME_RESP_CONSOLIDACAO_INDEX: + value = this.nome_resp_consolidacao; + break; + case AnalisesAcidentes.DATA_INICIO_PROCESSO_INDEX: + value = this.data_inicio_processo; + break; + case AnalisesAcidentes.DEPARTAMENTO_ID_INDEX: + value = this.departamento_id; + break; + case AnalisesAcidentes.TO_DEPARTAMENTO_ID_INDEX: + value = this.to_departamento_id; + break; + case AnalisesAcidentes.SECCAO_ID_INDEX: + value = this.seccao_id; + break; + case AnalisesAcidentes.TO_SECCAO_ID_INDEX: + value = this.to_seccao_id; + break; + case AnalisesAcidentes.RH_FASE4_INDEX: + value = this.rh_fase4; + break; + case AnalisesAcidentes.APAGADA_INDEX: + value = this.apagada; + break; + case AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO_INDEX: + value = this.concluido_por_desactivacao; + break; + case AnalisesAcidentes.DATA_DESACTIVACAO_INDEX: + value = this.data_desactivacao; + break; + case AnalisesAcidentes.COMENTARIO_DESACTIVACAO_INDEX: + value = this.comentario_desactivacao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AnalisesAcidentes.ID_INDEX: + setId( ( Integer ) value ); + break; + case AnalisesAcidentes.DATA_ACIDENTE_INDEX: + setData_acidente( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.ACIDENTADO_ID_INDEX: + setAcidentado_id( ( Integer ) value ); + break; + case AnalisesAcidentes.TO_ACIDENTADO_ID_INDEX: + setToAcidentado_id( ( db.data.siprp.outer.AcidentadosData ) value ); + break; + case AnalisesAcidentes.ESTADO_INDEX: + setEstado( ( Integer ) value ); + break; + case AnalisesAcidentes.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case AnalisesAcidentes.HORAS_TURNO_INDEX: + setHoras_turno( ( Integer ) value ); + break; + case AnalisesAcidentes.SECCAO_INDEX: + setSeccao( ( String ) value ); + break; + case AnalisesAcidentes.LOCAL_TRABALHO_INDEX: + setLocal_trabalho( ( String ) value ); + break; + case AnalisesAcidentes.TAREFA_INDEX: + setTarefa( ( String ) value ); + break; + case AnalisesAcidentes.SUBSTANCIAS_INDEX: + setSubstancias( ( String ) value ); + break; + case AnalisesAcidentes.SUPERIOR_HIERARQUICO_INDEX: + setSuperior_hierarquico( ( String ) value ); + break; + case AnalisesAcidentes.CONDICOES_INDEX: + setCondicoes( ( String ) value ); + break; + case AnalisesAcidentes.TESTEMUNHAS_INDEX: + setTestemunhas( ( String ) value ); + break; + case AnalisesAcidentes.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case AnalisesAcidentes.CONCLUSOES_INDEX: + setConclusoes( ( String ) value ); + break; + case AnalisesAcidentes.ACCOES_INDEX: + setAccoes( ( String ) value ); + break; + case AnalisesAcidentes.HORA_ACIDENTE_INDEX: + setHora_acidente( ( java.sql.Time ) value ); + break; + case AnalisesAcidentes.FORMACAO_SHST_INDEX: + setFormacao_shst( ( String ) value ); + break; + case AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE_INDEX: + setFormacao_shst_nao_porque( ( String ) value ); + break; + case AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR_INDEX: + setOutros_acidentes_com_colaborador( ( String ) value ); + break; + case AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR_INDEX: + setNr_acidentes_com_colaborador( ( Integer ) value ); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1_INDEX: + setNr_relatorio_acidente_colaborador1( ( Integer ) value ); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2_INDEX: + setNr_relatorio_acidente_colaborador2( ( Integer ) value ); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3_INDEX: + setNr_relatorio_acidente_colaborador3( ( Integer ) value ); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4_INDEX: + setNr_relatorio_acidente_colaborador4( ( Integer ) value ); + break; + case AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES_INDEX: + setAcidentes_outros_colaboradores( ( String ) value ); + break; + case AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES_INDEX: + setNr_acidentes_outros_colaboradores( ( Integer ) value ); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_INDEX: + setNr_relatorio_acidente_outros_colaboradores1( ( Integer ) value ); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_INDEX: + setNr_relatorio_acidente_outros_colaboradores2( ( Integer ) value ); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_INDEX: + setNr_relatorio_acidente_outros_colaboradores3( ( Integer ) value ); + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_INDEX: + setNr_relatorio_acidente_outros_colaboradores4( ( Integer ) value ); + break; + case AnalisesAcidentes.LESAO_CABECA_INDEX: + setLesao_cabeca( ( String ) value ); + break; + case AnalisesAcidentes.LESAO_PESCOCO_INDEX: + setLesao_pescoco( ( String ) value ); + break; + case AnalisesAcidentes.LESAO_TRONCO_INDEX: + setLesao_tronco( ( String ) value ); + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR_INDEX: + setLesao_membro_sup_dir( ( String ) value ); + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ_INDEX: + setLesao_membro_sup_esq( ( String ) value ); + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_DIR_INDEX: + setLesao_membro_inf_dir( ( String ) value ); + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ_INDEX: + setLesao_membro_inf_esq( ( String ) value ); + break; + case AnalisesAcidentes.ESPECIF1_INDEX: + setEspecif1( ( String ) value ); + break; + case AnalisesAcidentes.ESPECIF2_INDEX: + setEspecif2( ( String ) value ); + break; + case AnalisesAcidentes.ESPECIF3_INDEX: + setEspecif3( ( String ) value ); + break; + case AnalisesAcidentes.ESPECIF4_INDEX: + setEspecif4( ( String ) value ); + break; + case AnalisesAcidentes.TIPO_INCAPACIDADE_INDEX: + setTipo_incapacidade( ( String ) value ); + break; + case AnalisesAcidentes.COEF_INCAPACIDADE_INDEX: + setCoef_incapacidade( ( Integer ) value ); + break; + case AnalisesAcidentes.DATA_AVAL_INCAPACIDADE_INDEX: + setData_aval_incapacidade( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.DATA_REV_INCAPACIDADE_INDEX: + setData_rev_incapacidade( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_DE_INDEX: + setPeriodo_incapacidade_de( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_A_INDEX: + setPeriodo_incapacidade_a( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.IMG_FLEXAO_INDEX: + setImg_flexao( ( String ) value ); + break; + case AnalisesAcidentes.IMG_EXT1_INDEX: + setImg_ext1( ( String ) value ); + break; + case AnalisesAcidentes.IMG_EXT2_INDEX: + setImg_ext2( ( String ) value ); + break; + case AnalisesAcidentes.IMG_CAB2_INDEX: + setImg_cab2( ( String ) value ); + break; + case AnalisesAcidentes.IMG_CAB3_INDEX: + setImg_cab3( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA2_INDEX: + setImg_ma2( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA3_INDEX: + setImg_ma3( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA5_INDEX: + setImg_ma5( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA6_INDEX: + setImg_ma6( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA8_INDEX: + setImg_ma8( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA10_INDEX: + setImg_ma10( ( String ) value ); + break; + case AnalisesAcidentes.RESTRICAO_CARGA_INDEX: + setRestricao_carga( ( Integer ) value ); + break; + case AnalisesAcidentes.RESTRICAO_MOTRICIDADE_INDEX: + setRestricao_motricidade( ( String ) value ); + break; + case AnalisesAcidentes.RESTRICAO_CONDUCAO_INDEX: + setRestricao_conducao( ( String ) value ); + break; + case AnalisesAcidentes.RESTRICAO_VIBRACOES_INDEX: + setRestricao_vibracoes( ( String ) value ); + break; + case AnalisesAcidentes.RESTRICAO_OUTRAS_INDEX: + setRestricao_outras( ( String ) value ); + break; + case AnalisesAcidentes.MED_OBSERV_INDEX: + setMed_observ( ( String ) value ); + break; + case AnalisesAcidentes.TIPO_LESAO_INDEX: + setTipo_lesao( ( String ) value ); + break; + case AnalisesAcidentes.IMG_ROT1_INDEX: + setImg_rot1( ( String ) value ); + break; + case AnalisesAcidentes.IMG_ROT2_INDEX: + setImg_rot2( ( String ) value ); + break; + case AnalisesAcidentes.IMG_CAB1_INDEX: + setImg_cab1( ( String ) value ); + break; + case AnalisesAcidentes.IMG_CAB4_INDEX: + setImg_cab4( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA1_INDEX: + setImg_ma1( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA4_INDEX: + setImg_ma4( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA7_INDEX: + setImg_ma7( ( String ) value ); + break; + case AnalisesAcidentes.IMG_MA9_INDEX: + setImg_ma9( ( String ) value ); + break; + case AnalisesAcidentes.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case AnalisesAcidentes.MEDICO_ID_INDEX: + setMedico_id( ( Integer ) value ); + break; + case AnalisesAcidentes.TECNICO_SAUDE_ID_INDEX: + setTecnico_saude_id( ( Integer ) value ); + break; + case AnalisesAcidentes.ANALISE_NR_INDEX: + setAnalise_nr( ( String ) value ); + break; + case AnalisesAcidentes.ESTADO_ASSINATURA_INDEX: + setEstado_assinatura( ( Integer ) value ); + break; + case AnalisesAcidentes.ASS_RESP_SEG_INDEX: + setAss_resp_seg( ( String ) value ); + break; + case AnalisesAcidentes.ASS_RESP_RH_INDEX: + setAss_resp_rh( ( String ) value ); + break; + case AnalisesAcidentes.DATA_CONSOLIDACAO_INDEX: + setData_consolidacao( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.DATA_ASSINATURA_SEG_INDEX: + setData_assinatura_seg( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.DATA_ASSINATURA_RH_INDEX: + setData_assinatura_rh( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.ASS_CONSOLIDACAO_INDEX: + setAss_consolidacao( ( String ) value ); + break; + case AnalisesAcidentes.NOME_RESP_SEG_INDEX: + setNome_resp_seg( ( String ) value ); + break; + case AnalisesAcidentes.NOME_RESP_RH_INDEX: + setNome_resp_rh( ( String ) value ); + break; + case AnalisesAcidentes.CAUSAS_INDEX: + setCausas( ( Integer ) value ); + break; + case AnalisesAcidentes.ESTADO_ANTES_CORRECAO_INDEX: + setEstado_antes_correcao( ( Integer ) value ); + break; + case AnalisesAcidentes.OBSERVACOES_CORRECAO_INDEX: + setObservacoes_correcao( ( String ) value ); + break; + case AnalisesAcidentes.CORRECAO_INDEX: + setCorrecao( ( String ) value ); + break; + case AnalisesAcidentes.ASS_SUPERIOR_INDEX: + setAss_superior( ( String ) value ); + break; + case AnalisesAcidentes.NOME_SUPERIOR_INDEX: + setNome_superior( ( String ) value ); + break; + case AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR_INDEX: + setData_assinatura_superior( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.AVERIGUADOR_INDEX: + setAveriguador( ( String ) value ); + break; + case AnalisesAcidentes.AVERIGUACAO_POSTERIOR_INDEX: + setAveriguacao_posterior( ( String ) value ); + break; + case AnalisesAcidentes.AVERIGUACAO_OBS_INDEX: + setAveriguacao_obs( ( String ) value ); + break; + case AnalisesAcidentes.NOME_RESP_CONSOLIDACAO_INDEX: + setNome_resp_consolidacao( ( String ) value ); + break; + case AnalisesAcidentes.DATA_INICIO_PROCESSO_INDEX: + setData_inicio_processo( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.DEPARTAMENTO_ID_INDEX: + setDepartamento_id( ( Integer ) value ); + break; + case AnalisesAcidentes.TO_DEPARTAMENTO_ID_INDEX: + setToDepartamento_id( ( db.data.siprp.outer.DepartamentosData ) value ); + break; + case AnalisesAcidentes.SECCAO_ID_INDEX: + setSeccao_id( ( Integer ) value ); + break; + case AnalisesAcidentes.TO_SECCAO_ID_INDEX: + setToSeccao_id( ( db.data.siprp.outer.SeccoesData ) value ); + break; + case AnalisesAcidentes.RH_FASE4_INDEX: + setRh_fase4( ( Integer ) value ); + break; + case AnalisesAcidentes.APAGADA_INDEX: + setApagada( ( String ) value ); + break; + case AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO_INDEX: + setConcluido_por_desactivacao( ( Boolean ) value ); + break; + case AnalisesAcidentes.DATA_DESACTIVACAO_INDEX: + setData_desactivacao( ( java.util.Date ) value ); + break; + case AnalisesAcidentes.COMENTARIO_DESACTIVACAO_INDEX: + setComentario_desactivacao( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AnalisesAcidentes.ID_INDEX: + this.id = ( Integer ) value; + break; + case AnalisesAcidentes.DATA_ACIDENTE_INDEX: + this.data_acidente = ( java.util.Date ) value; + break; + case AnalisesAcidentes.ACIDENTADO_ID_INDEX: + this.acidentado_id = ( Integer ) value; + break; + case AnalisesAcidentes.TO_ACIDENTADO_ID_INDEX: + this.to_acidentado_id = ( db.data.siprp.outer.AcidentadosData ) value; + break; + case AnalisesAcidentes.ESTADO_INDEX: + this.estado = ( Integer ) value; + break; + case AnalisesAcidentes.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case AnalisesAcidentes.HORAS_TURNO_INDEX: + this.horas_turno = ( Integer ) value; + break; + case AnalisesAcidentes.SECCAO_INDEX: + this.seccao = ( String ) value; + break; + case AnalisesAcidentes.LOCAL_TRABALHO_INDEX: + this.local_trabalho = ( String ) value; + break; + case AnalisesAcidentes.TAREFA_INDEX: + this.tarefa = ( String ) value; + break; + case AnalisesAcidentes.SUBSTANCIAS_INDEX: + this.substancias = ( String ) value; + break; + case AnalisesAcidentes.SUPERIOR_HIERARQUICO_INDEX: + this.superior_hierarquico = ( String ) value; + break; + case AnalisesAcidentes.CONDICOES_INDEX: + this.condicoes = ( String ) value; + break; + case AnalisesAcidentes.TESTEMUNHAS_INDEX: + this.testemunhas = ( String ) value; + break; + case AnalisesAcidentes.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case AnalisesAcidentes.CONCLUSOES_INDEX: + this.conclusoes = ( String ) value; + break; + case AnalisesAcidentes.ACCOES_INDEX: + this.accoes = ( String ) value; + break; + case AnalisesAcidentes.HORA_ACIDENTE_INDEX: + this.hora_acidente = ( java.sql.Time ) value; + break; + case AnalisesAcidentes.FORMACAO_SHST_INDEX: + this.formacao_shst = ( String ) value; + break; + case AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE_INDEX: + this.formacao_shst_nao_porque = ( String ) value; + break; + case AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR_INDEX: + this.outros_acidentes_com_colaborador = ( String ) value; + break; + case AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR_INDEX: + this.nr_acidentes_com_colaborador = ( Integer ) value; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1_INDEX: + this.nr_relatorio_acidente_colaborador1 = ( Integer ) value; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2_INDEX: + this.nr_relatorio_acidente_colaborador2 = ( Integer ) value; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3_INDEX: + this.nr_relatorio_acidente_colaborador3 = ( Integer ) value; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4_INDEX: + this.nr_relatorio_acidente_colaborador4 = ( Integer ) value; + break; + case AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES_INDEX: + this.acidentes_outros_colaboradores = ( String ) value; + break; + case AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES_INDEX: + this.nr_acidentes_outros_colaboradores = ( Integer ) value; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_INDEX: + this.nr_relatorio_acidente_outros_colaboradores1 = ( Integer ) value; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_INDEX: + this.nr_relatorio_acidente_outros_colaboradores2 = ( Integer ) value; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_INDEX: + this.nr_relatorio_acidente_outros_colaboradores3 = ( Integer ) value; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_INDEX: + this.nr_relatorio_acidente_outros_colaboradores4 = ( Integer ) value; + break; + case AnalisesAcidentes.LESAO_CABECA_INDEX: + this.lesao_cabeca = ( String ) value; + break; + case AnalisesAcidentes.LESAO_PESCOCO_INDEX: + this.lesao_pescoco = ( String ) value; + break; + case AnalisesAcidentes.LESAO_TRONCO_INDEX: + this.lesao_tronco = ( String ) value; + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR_INDEX: + this.lesao_membro_sup_dir = ( String ) value; + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ_INDEX: + this.lesao_membro_sup_esq = ( String ) value; + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_DIR_INDEX: + this.lesao_membro_inf_dir = ( String ) value; + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ_INDEX: + this.lesao_membro_inf_esq = ( String ) value; + break; + case AnalisesAcidentes.ESPECIF1_INDEX: + this.especif1 = ( String ) value; + break; + case AnalisesAcidentes.ESPECIF2_INDEX: + this.especif2 = ( String ) value; + break; + case AnalisesAcidentes.ESPECIF3_INDEX: + this.especif3 = ( String ) value; + break; + case AnalisesAcidentes.ESPECIF4_INDEX: + this.especif4 = ( String ) value; + break; + case AnalisesAcidentes.TIPO_INCAPACIDADE_INDEX: + this.tipo_incapacidade = ( String ) value; + break; + case AnalisesAcidentes.COEF_INCAPACIDADE_INDEX: + this.coef_incapacidade = ( Integer ) value; + break; + case AnalisesAcidentes.DATA_AVAL_INCAPACIDADE_INDEX: + this.data_aval_incapacidade = ( java.util.Date ) value; + break; + case AnalisesAcidentes.DATA_REV_INCAPACIDADE_INDEX: + this.data_rev_incapacidade = ( java.util.Date ) value; + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_DE_INDEX: + this.periodo_incapacidade_de = ( java.util.Date ) value; + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_A_INDEX: + this.periodo_incapacidade_a = ( java.util.Date ) value; + break; + case AnalisesAcidentes.IMG_FLEXAO_INDEX: + this.img_flexao = ( String ) value; + break; + case AnalisesAcidentes.IMG_EXT1_INDEX: + this.img_ext1 = ( String ) value; + break; + case AnalisesAcidentes.IMG_EXT2_INDEX: + this.img_ext2 = ( String ) value; + break; + case AnalisesAcidentes.IMG_CAB2_INDEX: + this.img_cab2 = ( String ) value; + break; + case AnalisesAcidentes.IMG_CAB3_INDEX: + this.img_cab3 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA2_INDEX: + this.img_ma2 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA3_INDEX: + this.img_ma3 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA5_INDEX: + this.img_ma5 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA6_INDEX: + this.img_ma6 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA8_INDEX: + this.img_ma8 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA10_INDEX: + this.img_ma10 = ( String ) value; + break; + case AnalisesAcidentes.RESTRICAO_CARGA_INDEX: + this.restricao_carga = ( Integer ) value; + break; + case AnalisesAcidentes.RESTRICAO_MOTRICIDADE_INDEX: + this.restricao_motricidade = ( String ) value; + break; + case AnalisesAcidentes.RESTRICAO_CONDUCAO_INDEX: + this.restricao_conducao = ( String ) value; + break; + case AnalisesAcidentes.RESTRICAO_VIBRACOES_INDEX: + this.restricao_vibracoes = ( String ) value; + break; + case AnalisesAcidentes.RESTRICAO_OUTRAS_INDEX: + this.restricao_outras = ( String ) value; + break; + case AnalisesAcidentes.MED_OBSERV_INDEX: + this.med_observ = ( String ) value; + break; + case AnalisesAcidentes.TIPO_LESAO_INDEX: + this.tipo_lesao = ( String ) value; + break; + case AnalisesAcidentes.IMG_ROT1_INDEX: + this.img_rot1 = ( String ) value; + break; + case AnalisesAcidentes.IMG_ROT2_INDEX: + this.img_rot2 = ( String ) value; + break; + case AnalisesAcidentes.IMG_CAB1_INDEX: + this.img_cab1 = ( String ) value; + break; + case AnalisesAcidentes.IMG_CAB4_INDEX: + this.img_cab4 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA1_INDEX: + this.img_ma1 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA4_INDEX: + this.img_ma4 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA7_INDEX: + this.img_ma7 = ( String ) value; + break; + case AnalisesAcidentes.IMG_MA9_INDEX: + this.img_ma9 = ( String ) value; + break; + case AnalisesAcidentes.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case AnalisesAcidentes.MEDICO_ID_INDEX: + this.medico_id = ( Integer ) value; + break; + case AnalisesAcidentes.TECNICO_SAUDE_ID_INDEX: + this.tecnico_saude_id = ( Integer ) value; + break; + case AnalisesAcidentes.ANALISE_NR_INDEX: + this.analise_nr = ( String ) value; + break; + case AnalisesAcidentes.ESTADO_ASSINATURA_INDEX: + this.estado_assinatura = ( Integer ) value; + break; + case AnalisesAcidentes.ASS_RESP_SEG_INDEX: + this.ass_resp_seg = ( String ) value; + break; + case AnalisesAcidentes.ASS_RESP_RH_INDEX: + this.ass_resp_rh = ( String ) value; + break; + case AnalisesAcidentes.DATA_CONSOLIDACAO_INDEX: + this.data_consolidacao = ( java.util.Date ) value; + break; + case AnalisesAcidentes.DATA_ASSINATURA_SEG_INDEX: + this.data_assinatura_seg = ( java.util.Date ) value; + break; + case AnalisesAcidentes.DATA_ASSINATURA_RH_INDEX: + this.data_assinatura_rh = ( java.util.Date ) value; + break; + case AnalisesAcidentes.ASS_CONSOLIDACAO_INDEX: + this.ass_consolidacao = ( String ) value; + break; + case AnalisesAcidentes.NOME_RESP_SEG_INDEX: + this.nome_resp_seg = ( String ) value; + break; + case AnalisesAcidentes.NOME_RESP_RH_INDEX: + this.nome_resp_rh = ( String ) value; + break; + case AnalisesAcidentes.CAUSAS_INDEX: + this.causas = ( Integer ) value; + break; + case AnalisesAcidentes.ESTADO_ANTES_CORRECAO_INDEX: + this.estado_antes_correcao = ( Integer ) value; + break; + case AnalisesAcidentes.OBSERVACOES_CORRECAO_INDEX: + this.observacoes_correcao = ( String ) value; + break; + case AnalisesAcidentes.CORRECAO_INDEX: + this.correcao = ( String ) value; + break; + case AnalisesAcidentes.ASS_SUPERIOR_INDEX: + this.ass_superior = ( String ) value; + break; + case AnalisesAcidentes.NOME_SUPERIOR_INDEX: + this.nome_superior = ( String ) value; + break; + case AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR_INDEX: + this.data_assinatura_superior = ( java.util.Date ) value; + break; + case AnalisesAcidentes.AVERIGUADOR_INDEX: + this.averiguador = ( String ) value; + break; + case AnalisesAcidentes.AVERIGUACAO_POSTERIOR_INDEX: + this.averiguacao_posterior = ( String ) value; + break; + case AnalisesAcidentes.AVERIGUACAO_OBS_INDEX: + this.averiguacao_obs = ( String ) value; + break; + case AnalisesAcidentes.NOME_RESP_CONSOLIDACAO_INDEX: + this.nome_resp_consolidacao = ( String ) value; + break; + case AnalisesAcidentes.DATA_INICIO_PROCESSO_INDEX: + this.data_inicio_processo = ( java.util.Date ) value; + break; + case AnalisesAcidentes.DEPARTAMENTO_ID_INDEX: + this.departamento_id = ( Integer ) value; + break; + case AnalisesAcidentes.TO_DEPARTAMENTO_ID_INDEX: + this.to_departamento_id = ( db.data.siprp.outer.DepartamentosData ) value; + break; + case AnalisesAcidentes.SECCAO_ID_INDEX: + this.seccao_id = ( Integer ) value; + break; + case AnalisesAcidentes.TO_SECCAO_ID_INDEX: + this.to_seccao_id = ( db.data.siprp.outer.SeccoesData ) value; + break; + case AnalisesAcidentes.RH_FASE4_INDEX: + this.rh_fase4 = ( Integer ) value; + break; + case AnalisesAcidentes.APAGADA_INDEX: + this.apagada = ( String ) value; + break; + case AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO_INDEX: + this.concluido_por_desactivacao = ( Boolean ) value; + break; + case AnalisesAcidentes.DATA_DESACTIVACAO_INDEX: + this.data_desactivacao = ( java.util.Date ) value; + break; + case AnalisesAcidentes.COMENTARIO_DESACTIVACAO_INDEX: + this.comentario_desactivacao = ( 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 AnalisesAcidentes.ID_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.DATA_ACIDENTE_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.ACIDENTADO_ID_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.TO_ACIDENTADO_ID_INDEX: + theClass = db.data.siprp.outer.AcidentadosData.class; + break; + case AnalisesAcidentes.ESTADO_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.HORAS_TURNO_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.SECCAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.LOCAL_TRABALHO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.TAREFA_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.SUBSTANCIAS_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.SUPERIOR_HIERARQUICO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.CONDICOES_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.TESTEMUNHAS_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.DESCRICAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.CONCLUSOES_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.ACCOES_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.HORA_ACIDENTE_INDEX: + theClass = java.sql.Time.class; + break; + case AnalisesAcidentes.FORMACAO_SHST_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.FORMACAO_SHST_NAO_PORQUE_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.OUTROS_ACIDENTES_COM_COLABORADOR_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.NR_ACIDENTES_COM_COLABORADOR_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR1_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR2_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR3_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_COLABORADOR4_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.ACIDENTES_OUTROS_COLABORADORES_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.NR_ACIDENTES_OUTROS_COLABORADORES_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.LESAO_CABECA_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.LESAO_PESCOCO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.LESAO_TRONCO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_DIR_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.LESAO_MEMBRO_SUP_ESQ_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_DIR_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.LESAO_MEMBRO_INF_ESQ_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.ESPECIF1_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.ESPECIF2_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.ESPECIF3_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.ESPECIF4_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.TIPO_INCAPACIDADE_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.COEF_INCAPACIDADE_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.DATA_AVAL_INCAPACIDADE_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.DATA_REV_INCAPACIDADE_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_DE_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.PERIODO_INCAPACIDADE_A_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.IMG_FLEXAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_EXT1_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_EXT2_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_CAB2_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_CAB3_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA2_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA3_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA5_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA6_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA8_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA10_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.RESTRICAO_CARGA_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.RESTRICAO_MOTRICIDADE_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.RESTRICAO_CONDUCAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.RESTRICAO_VIBRACOES_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.RESTRICAO_OUTRAS_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.MED_OBSERV_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.TIPO_LESAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_ROT1_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_ROT2_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_CAB1_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_CAB4_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA1_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA4_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA7_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.IMG_MA9_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.MEDICO_ID_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.TECNICO_SAUDE_ID_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.ANALISE_NR_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.ESTADO_ASSINATURA_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.ASS_RESP_SEG_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.ASS_RESP_RH_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.DATA_CONSOLIDACAO_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.DATA_ASSINATURA_SEG_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.DATA_ASSINATURA_RH_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.ASS_CONSOLIDACAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.NOME_RESP_SEG_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.NOME_RESP_RH_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.CAUSAS_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.ESTADO_ANTES_CORRECAO_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.OBSERVACOES_CORRECAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.CORRECAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.ASS_SUPERIOR_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.NOME_SUPERIOR_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.DATA_ASSINATURA_SUPERIOR_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.AVERIGUADOR_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.AVERIGUACAO_POSTERIOR_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.AVERIGUACAO_OBS_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.NOME_RESP_CONSOLIDACAO_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.DATA_INICIO_PROCESSO_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.DEPARTAMENTO_ID_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.TO_DEPARTAMENTO_ID_INDEX: + theClass = db.data.siprp.outer.DepartamentosData.class; + break; + case AnalisesAcidentes.SECCAO_ID_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.TO_SECCAO_ID_INDEX: + theClass = db.data.siprp.outer.SeccoesData.class; + break; + case AnalisesAcidentes.RH_FASE4_INDEX: + theClass = Integer.class; + break; + case AnalisesAcidentes.APAGADA_INDEX: + theClass = String.class; + break; + case AnalisesAcidentes.CONCLUIDO_POR_DESACTIVACAO_INDEX: + theClass = Boolean.class; + break; + case AnalisesAcidentes.DATA_DESACTIVACAO_INDEX: + theClass = java.util.Date.class; + break; + case AnalisesAcidentes.COMENTARIO_DESACTIVACAO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : AnalisesAcidentes._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, AnalisesAcidentes.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Avisos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Avisos.java new file mode 100644 index 00000000..3a068632 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Avisos.java @@ -0,0 +1,785 @@ +/* +* Avisos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Avisos extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp.outer.EmpresasData.class, db.data.siprp.outer.EmpresasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( Avisos.class, Avisos.ESTABELECIMENTO_ID, db.data.siprp.outer.EstabelecimentosData.class, db.data.siprp.outer.EstabelecimentosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores = + new com.evolute.entity.ForeignKey( Avisos.class, Avisos.TRABALHADOR_ID, db.data.siprp.outer.TrabalhadoresData.class, db.data.siprp.outer.TrabalhadoresData.ID ); + + public static final String TABLENAME = "avisos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.avisos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "avisos.id"; + public static final int ID_INDEX = 0; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "avisos.tipo"; + public static final int TIPO_INDEX = 1; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "avisos.empresa_id"; + public static final int EMPRESA_ID_INDEX = 2; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final String TO_EMPRESA_ID_FULL = "avisos.to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 3; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "avisos.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 4; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID_FULL = "avisos.to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 5; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "avisos.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 6; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final String TO_TRABALHADOR_ID_FULL = "avisos.to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 7; + public static final String EVENTO_ID = "evento_id"; + public static final String EVENTO_ID_FULL = "avisos.evento_id"; + public static final int EVENTO_ID_INDEX = 8; + public static final String DATA_AVISO = "data_aviso"; + public static final String DATA_AVISO_FULL = "avisos.data_aviso"; + public static final int DATA_AVISO_INDEX = 9; + public static final String DATA_EVENTO = "data_evento"; + public static final String DATA_EVENTO_FULL = "avisos.data_evento"; + public static final int DATA_EVENTO_INDEX = 10; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "avisos.descricao"; + public static final int DESCRICAO_INDEX = 11; + + public static final String FIELD_NAMES[] = new String[]{ + TIPO, EMPRESA_ID, TO_EMPRESA_ID, ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, + TRABALHADOR_ID, TO_TRABALHADOR_ID, EVENTO_ID, DATA_AVISO, DATA_EVENTO, DESCRICAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TIPO, TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID, + TABLENAME + "." + TRABALHADOR_ID, TABLENAME + "." + TO_TRABALHADOR_ID, TABLENAME + "." + EVENTO_ID, TABLENAME + "." + DATA_AVISO, TABLENAME + "." + DATA_EVENTO, TABLENAME + "." + DESCRICAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TIPO, EMPRESA_ID, ESTABELECIMENTO_ID, TRABALHADOR_ID, EVENTO_ID, DATA_AVISO, + DATA_EVENTO, DESCRICAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TIPO, EMPRESA_ID, ESTABELECIMENTO_ID, TRABALHADOR_ID, EVENTO_ID, DATA_AVISO, + DATA_EVENTO, DESCRICAO, }; + + private Integer id; + private Integer tipo; + private Integer empresa_id; + private db.data.siprp.outer.EmpresasData to_empresa_id; + private Integer estabelecimento_id; + private db.data.siprp.outer.EstabelecimentosData to_estabelecimento_id; + private Integer trabalhador_id; + private db.data.siprp.outer.TrabalhadoresData to_trabalhador_id; + private Integer evento_id; + private java.util.Date data_aviso; + private java.util.Date data_evento; + private String descricao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Avisos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false, false, false, false, false, false, false, + false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 db.data.siprp.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp.outer.EmpresasData to_empresa_id ) + { + try + { + preProcess( TO_EMPRESA_ID, to_empresa_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_empresa_id = to_empresa_id; + } + + public Integer getEstabelecimento_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTABELECIMENTO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estabelecimento_id; + } + + public void setEstabelecimento_id( Integer estabelecimento_id ) + { + try + { + 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 db.data.siprp.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp.outer.EstabelecimentosData to_estabelecimento_id ) + { + try + { + preProcess( TO_ESTABELECIMENTO_ID, to_estabelecimento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_estabelecimento_id = to_estabelecimento_id; + } + + public Integer getTrabalhador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TRABALHADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.trabalhador_id; + } + + public void setTrabalhador_id( Integer trabalhador_id ) + { + try + { + 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 db.data.siprp.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp.outer.TrabalhadoresData to_trabalhador_id ) + { + try + { + preProcess( TO_TRABALHADOR_ID, to_trabalhador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_trabalhador_id = to_trabalhador_id; + } + + public Integer getEvento_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( EVENTO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.evento_id; + } + + public void setEvento_id( Integer evento_id ) + { + try + { + 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( ( db.data.siprp.outer.EmpresasData ) value ); + break; + case Avisos.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case Avisos.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp.outer.EstabelecimentosData ) value ); + break; + case Avisos.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case Avisos.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( db.data.siprp.outer.TrabalhadoresData ) value ); + break; + case Avisos.EVENTO_ID_INDEX: + setEvento_id( ( Integer ) value ); + break; + case Avisos.DATA_AVISO_INDEX: + setData_aviso( ( java.util.Date ) value ); + break; + case Avisos.DATA_EVENTO_INDEX: + setData_evento( ( java.util.Date ) value ); + break; + case Avisos.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Avisos.ID_INDEX: + this.id = ( Integer ) value; + break; + case Avisos.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case Avisos.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case Avisos.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( db.data.siprp.outer.EmpresasData ) value; + break; + case Avisos.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case Avisos.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( db.data.siprp.outer.EstabelecimentosData ) value; + break; + case Avisos.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case Avisos.TO_TRABALHADOR_ID_INDEX: + this.to_trabalhador_id = ( db.data.siprp.outer.TrabalhadoresData ) value; + break; + case Avisos.EVENTO_ID_INDEX: + this.evento_id = ( Integer ) value; + break; + case Avisos.DATA_AVISO_INDEX: + this.data_aviso = ( java.util.Date ) value; + break; + case Avisos.DATA_EVENTO_INDEX: + this.data_evento = ( java.util.Date ) value; + break; + case Avisos.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Avisos.ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TIPO_INDEX: + theClass = Integer.class; + break; + case Avisos.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp.outer.EmpresasData.class; + break; + case Avisos.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp.outer.EstabelecimentosData.class; + break; + case Avisos.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TO_TRABALHADOR_ID_INDEX: + theClass = db.data.siprp.outer.TrabalhadoresData.class; + break; + case Avisos.EVENTO_ID_INDEX: + theClass = Integer.class; + break; + case Avisos.DATA_AVISO_INDEX: + theClass = java.util.Date.class; + break; + case Avisos.DATA_EVENTO_INDEX: + theClass = java.util.Date.class; + break; + case Avisos.DESCRICAO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Avisos._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Avisos.PK_FIELD_NAMES ); + primaryKey.set( 0, getId() ); + } + } + + @Override + public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Causas.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Causas.java new file mode 100644 index 00000000..0a5db08d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Causas.java @@ -0,0 +1,330 @@ +/* +* Causas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Causas extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Causas.ID, Causas.ID_INDEX ); + FIELD_INDEXES.put( Causas.ID_FULL, Causas.ID_INDEX ); + FIELD_INDEXES.put( Causas.CAUSA, Causas.CAUSA_INDEX ); + FIELD_INDEXES.put( Causas.CAUSA_FULL, Causas.CAUSA_INDEX ); + FIELD_INDEXES.put( Causas.ACTIVA, Causas.ACTIVA_INDEX ); + FIELD_INDEXES.put( Causas.ACTIVA_FULL, Causas.ACTIVA_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "causas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.causas"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "causas.id"; + public static final int ID_INDEX = 0; + public static final String CAUSA = "causa"; + public static final String CAUSA_FULL = "causas.causa"; + public static final int CAUSA_INDEX = 1; + public static final String ACTIVA = "activa"; + public static final String ACTIVA_FULL = "causas.activa"; + public static final int ACTIVA_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + CAUSA, ACTIVA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + CAUSA, TABLENAME + "." + ACTIVA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, CAUSA, ACTIVA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, CAUSA, ACTIVA, }; + + private Integer id; + private String causa; + private String activa; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Causas() + { + super(); + dirtyProperties = new boolean[]{ false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 getCausa() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CAUSA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.causa; + } + + public void setCausa( String causa ) + { + try + { + setLockedForRefresh( true ); + preProcess( CAUSA, causa ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.causa = causa; + LAZY_LOADED_OBJECTS.put( CAUSA, Boolean.TRUE ); + } + + public String getActiva() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACTIVA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.activa; + } + + public void setActiva( String activa ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACTIVA, activa ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.activa = activa; + LAZY_LOADED_OBJECTS.put( ACTIVA, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Causas.ID_INDEX: + value = getId(); + break; + case Causas.CAUSA_INDEX: + value = getCausa(); + break; + case Causas.ACTIVA_INDEX: + value = getActiva(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Causas.ID_INDEX: + value = this.id; + break; + case Causas.CAUSA_INDEX: + value = this.causa; + break; + case Causas.ACTIVA_INDEX: + value = this.activa; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Causas.ID_INDEX: + setId( ( Integer ) value ); + break; + case Causas.CAUSA_INDEX: + setCausa( ( String ) value ); + break; + case Causas.ACTIVA_INDEX: + setActiva( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Causas.ID_INDEX: + this.id = ( Integer ) value; + break; + case Causas.CAUSA_INDEX: + this.causa = ( String ) value; + break; + case Causas.ACTIVA_INDEX: + this.activa = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Causas.ID_INDEX: + theClass = Integer.class; + break; + case Causas.CAUSA_INDEX: + theClass = String.class; + break; + case Causas.ACTIVA_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Causas._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Causas.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Contactos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Contactos.java new file mode 100644 index 00000000..4f16629d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Contactos.java @@ -0,0 +1,530 @@ +/* +* Contactos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Contactos extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp.inner.contactos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "contactos.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "contactos.nome"; + public static final int NOME_INDEX = 1; + public static final String TELEFONE = "telefone"; + public static final String TELEFONE_FULL = "contactos.telefone"; + public static final int TELEFONE_INDEX = 2; + public static final String TELEMOVEL = "telemovel"; + public static final String TELEMOVEL_FULL = "contactos.telemovel"; + public static final int TELEMOVEL_INDEX = 3; + public static final String FAX = "fax"; + public static final String FAX_FULL = "contactos.fax"; + public static final int FAX_INDEX = 4; + public static final String EMAIL = "email"; + public static final String EMAIL_FULL = "contactos.email"; + public static final int EMAIL_INDEX = 5; + public static final String CARGO = "cargo"; + public static final String CARGO_FULL = "contactos.cargo"; + public static final int CARGO_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + TELEFONE, TABLENAME + "." + TELEMOVEL, TABLENAME + "." + FAX, TABLENAME + "." + EMAIL, TABLENAME + "." + CARGO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, }; + + private Integer id; + private String nome; + private String telefone; + private String telemovel; + private String fax; + private String email; + private String cargo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Contactos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Controle.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Controle.java new file mode 100644 index 00000000..a4904c80 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Controle.java @@ -0,0 +1,330 @@ +/* +* Controle.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Controle extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Controle.ID, Controle.ID_INDEX ); + FIELD_INDEXES.put( Controle.ID_FULL, Controle.ID_INDEX ); + FIELD_INDEXES.put( Controle.ANALISE_YEAR, Controle.ANALISE_YEAR_INDEX ); + FIELD_INDEXES.put( Controle.ANALISE_YEAR_FULL, Controle.ANALISE_YEAR_INDEX ); + FIELD_INDEXES.put( Controle.LAST_ANALISE_NR, Controle.LAST_ANALISE_NR_INDEX ); + FIELD_INDEXES.put( Controle.LAST_ANALISE_NR_FULL, Controle.LAST_ANALISE_NR_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "controle"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.controle"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "controle.id"; + public static final int ID_INDEX = 0; + public static final String ANALISE_YEAR = "analise_year"; + public static final String ANALISE_YEAR_FULL = "controle.analise_year"; + public static final int ANALISE_YEAR_INDEX = 1; + public static final String LAST_ANALISE_NR = "last_analise_nr"; + public static final String LAST_ANALISE_NR_FULL = "controle.last_analise_nr"; + public static final int LAST_ANALISE_NR_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + ANALISE_YEAR, LAST_ANALISE_NR, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ANALISE_YEAR, TABLENAME + "." + LAST_ANALISE_NR, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ANALISE_YEAR, LAST_ANALISE_NR, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ANALISE_YEAR, LAST_ANALISE_NR, }; + + private Integer id; + private Integer analise_year; + private Integer last_analise_nr; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Controle() + { + super(); + dirtyProperties = new boolean[]{ false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 getAnalise_year() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ANALISE_YEAR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.analise_year; + } + + public void setAnalise_year( Integer analise_year ) + { + try + { + setLockedForRefresh( true ); + preProcess( ANALISE_YEAR, analise_year ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.analise_year = analise_year; + LAZY_LOADED_OBJECTS.put( ANALISE_YEAR, Boolean.TRUE ); + } + + public Integer getLast_analise_nr() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LAST_ANALISE_NR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.last_analise_nr; + } + + public void setLast_analise_nr( Integer last_analise_nr ) + { + try + { + setLockedForRefresh( true ); + preProcess( LAST_ANALISE_NR, last_analise_nr ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.last_analise_nr = last_analise_nr; + LAZY_LOADED_OBJECTS.put( LAST_ANALISE_NR, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Controle.ID_INDEX: + value = getId(); + break; + case Controle.ANALISE_YEAR_INDEX: + value = getAnalise_year(); + break; + case Controle.LAST_ANALISE_NR_INDEX: + value = getLast_analise_nr(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Controle.ID_INDEX: + value = this.id; + break; + case Controle.ANALISE_YEAR_INDEX: + value = this.analise_year; + break; + case Controle.LAST_ANALISE_NR_INDEX: + value = this.last_analise_nr; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Controle.ID_INDEX: + setId( ( Integer ) value ); + break; + case Controle.ANALISE_YEAR_INDEX: + setAnalise_year( ( Integer ) value ); + break; + case Controle.LAST_ANALISE_NR_INDEX: + setLast_analise_nr( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Controle.ID_INDEX: + this.id = ( Integer ) value; + break; + case Controle.ANALISE_YEAR_INDEX: + this.analise_year = ( Integer ) value; + break; + case Controle.LAST_ANALISE_NR_INDEX: + this.last_analise_nr = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Controle.ID_INDEX: + theClass = Integer.class; + break; + case Controle.ANALISE_YEAR_INDEX: + theClass = Integer.class; + break; + case Controle.LAST_ANALISE_NR_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Controle._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Controle.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Departamentos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Departamentos.java new file mode 100644 index 00000000..1408f2ea --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Departamentos.java @@ -0,0 +1,364 @@ +/* +* Departamentos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Departamentos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Departamentos.ID, Departamentos.ID_INDEX ); + FIELD_INDEXES.put( Departamentos.ID_FULL, Departamentos.ID_INDEX ); + FIELD_INDEXES.put( Departamentos.DESCRICAO, Departamentos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( Departamentos.DESCRICAO_FULL, Departamentos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( Departamentos.ACTIVO, Departamentos.ACTIVO_INDEX ); + FIELD_INDEXES.put( Departamentos.ACTIVO_FULL, Departamentos.ACTIVO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "departamentos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.departamentos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "departamentos.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "departamentos.descricao"; + public static final int DESCRICAO_INDEX = 1; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "departamentos.activo"; + public static final int ACTIVO_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, ACTIVO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + ACTIVO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, ACTIVO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRICAO, ACTIVO, }; + + private Integer id; + private String descricao; + private String activo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Departamentos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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.ListfromAnalisesAcidentes_departamento_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.AnalisesAcidentesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.AnalisesAcidentesData.class , getPrimaryKey().getMap().get("id"), "departamento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromSeccoes_departamento_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.SeccoesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.SeccoesData.class , getPrimaryKey().getMap().get("id"), "departamento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public String getDescricao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao; + } + + public void setDescricao( String descricao ) + { + try + { + 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 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 Departamentos.ID_INDEX: + value = getId(); + break; + case Departamentos.DESCRICAO_INDEX: + value = getDescricao(); + break; + case Departamentos.ACTIVO_INDEX: + value = getActivo(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Departamentos.ID_INDEX: + value = this.id; + break; + case Departamentos.DESCRICAO_INDEX: + value = this.descricao; + break; + case Departamentos.ACTIVO_INDEX: + value = this.activo; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Departamentos.ID_INDEX: + setId( ( Integer ) value ); + break; + case Departamentos.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case Departamentos.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Departamentos.ID_INDEX: + this.id = ( Integer ) value; + break; + case Departamentos.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case Departamentos.ACTIVO_INDEX: + this.activo = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Departamentos.ID_INDEX: + theClass = Integer.class; + break; + case Departamentos.DESCRICAO_INDEX: + theClass = String.class; + break; + case Departamentos.ACTIVO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Departamentos._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Departamentos.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Empresas.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Empresas.java new file mode 100644 index 00000000..1f56ab10 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Empresas.java @@ -0,0 +1,1038 @@ +/* +* Empresas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Empresas extends com.evolute.entity.evo.EvoDataObject +{ + 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.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.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.CODIGO, Empresas.CODIGO_INDEX ); + FIELD_INDEXES.put( Empresas.CODIGO_FULL, Empresas.CODIGO_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.ACTIVIDADE, Empresas.ACTIVIDADE_INDEX ); + FIELD_INDEXES.put( Empresas.ACTIVIDADE_FULL, Empresas.ACTIVIDADE_INDEX ); + FIELD_INDEXES.put( Empresas.SERVICOS, Empresas.SERVICOS_INDEX ); + FIELD_INDEXES.put( Empresas.SERVICOS_FULL, Empresas.SERVICOS_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.EMAIL, Empresas.EMAIL_INDEX ); + FIELD_INDEXES.put( Empresas.EMAIL_FULL, Empresas.EMAIL_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "empresas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.empresas"; + + 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 MORADA = "morada"; + public static final String MORADA_FULL = "empresas.morada"; + public static final int MORADA_INDEX = 1; + 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 = 2; + public static final String LOCALIDADE = "localidade"; + public static final String LOCALIDADE_FULL = "empresas.localidade"; + public static final int LOCALIDADE_INDEX = 3; + public static final String DISTRITO = "distrito"; + public static final String DISTRITO_FULL = "empresas.distrito"; + public static final int DISTRITO_INDEX = 4; + public static final String CONCELHO = "concelho"; + public static final String CONCELHO_FULL = "empresas.concelho"; + public static final int CONCELHO_INDEX = 5; + 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 = 6; + 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 = 7; + public static final String CODIGO = "codigo"; + public static final String CODIGO_FULL = "empresas.codigo"; + public static final int CODIGO_INDEX = 8; + public static final String CAE = "cae"; + public static final String CAE_FULL = "empresas.cae"; + public static final int CAE_INDEX = 9; + public static final String CONTRIBUINTE = "contribuinte"; + public static final String CONTRIBUINTE_FULL = "empresas.contribuinte"; + public static final int CONTRIBUINTE_INDEX = 10; + 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 = 11; + public static final String ACTIVIDADE = "actividade"; + public static final String ACTIVIDADE_FULL = "empresas.actividade"; + public static final int ACTIVIDADE_INDEX = 12; + public static final String SERVICOS = "servicos"; + public static final String SERVICOS_FULL = "empresas.servicos"; + public static final int SERVICOS_INDEX = 13; + 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 = 14; + public static final String EMAIL = "email"; + public static final String EMAIL_FULL = "empresas.email"; + public static final int EMAIL_INDEX = 15; + + public static final String FIELD_NAMES[] = new String[]{ + MORADA, CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, PERFIL_1, PERFIL_2, CODIGO, CAE, + CONTRIBUINTE, SEGURANCA_SOCIAL, ACTIVIDADE, SERVICOS, DESIGNACAO_SOCIAL, EMAIL, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + MORADA, TABLENAME + "." + CODIGO_POSTAL, TABLENAME + "." + LOCALIDADE, TABLENAME + "." + DISTRITO, TABLENAME + "." + CONCELHO, TABLENAME + "." + PERFIL_1, TABLENAME + "." + PERFIL_2, TABLENAME + "." + CODIGO, TABLENAME + "." + CAE, + TABLENAME + "." + CONTRIBUINTE, TABLENAME + "." + SEGURANCA_SOCIAL, TABLENAME + "." + ACTIVIDADE, TABLENAME + "." + SERVICOS, TABLENAME + "." + DESIGNACAO_SOCIAL, TABLENAME + "." + EMAIL, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, MORADA, CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, PERFIL_1, PERFIL_2, CODIGO, + CAE, CONTRIBUINTE, SEGURANCA_SOCIAL, ACTIVIDADE, SERVICOS, DESIGNACAO_SOCIAL, + EMAIL, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, MORADA, CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, PERFIL_1, PERFIL_2, CODIGO, + CAE, CONTRIBUINTE, SEGURANCA_SOCIAL, ACTIVIDADE, SERVICOS, DESIGNACAO_SOCIAL, + EMAIL, }; + + private Integer id; + private String morada; + private String codigo_postal; + private String localidade; + private String distrito; + private String concelho; + private Integer perfil_1; + private Integer perfil_2; + private String codigo; + private String cae; + private String contribuinte; + private String seguranca_social; + private String actividade; + private Integer servicos; + private String designacao_social; + private String email; + + 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 }; + } + + 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 = new java.util.LinkedList< db.data.siprp.outer.AvisosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.AvisosData.class , getPrimaryKey().getMap().get("id"), "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 = new java.util.LinkedList< db.data.siprp.outer.EstabelecimentosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.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.ListfromMarcacoesEmpresa_empresa_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.MarcacoesEmpresaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.MarcacoesEmpresaData.class , getPrimaryKey().getMap().get("id"), "empresa_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + 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 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( Integer 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 Integer 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( Integer 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 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 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 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 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 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 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 Empresas.ID_INDEX: + value = getId(); + 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.PERFIL_1_INDEX: + value = getPerfil_1(); + break; + case Empresas.PERFIL_2_INDEX: + value = getPerfil_2(); + break; + case Empresas.CODIGO_INDEX: + value = getCodigo(); + 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.ACTIVIDADE_INDEX: + value = getActividade(); + break; + case Empresas.SERVICOS_INDEX: + value = getServicos(); + break; + case Empresas.DESIGNACAO_SOCIAL_INDEX: + value = getDesignacao_social(); + break; + case Empresas.EMAIL_INDEX: + value = getEmail(); + 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.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.PERFIL_1_INDEX: + value = this.perfil_1; + break; + case Empresas.PERFIL_2_INDEX: + value = this.perfil_2; + break; + case Empresas.CODIGO_INDEX: + value = this.codigo; + 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.ACTIVIDADE_INDEX: + value = this.actividade; + break; + case Empresas.SERVICOS_INDEX: + value = this.servicos; + break; + case Empresas.DESIGNACAO_SOCIAL_INDEX: + value = this.designacao_social; + break; + case Empresas.EMAIL_INDEX: + value = this.email; + 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.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.PERFIL_1_INDEX: + setPerfil_1( ( Integer ) value ); + break; + case Empresas.PERFIL_2_INDEX: + setPerfil_2( ( Integer ) value ); + break; + case Empresas.CODIGO_INDEX: + setCodigo( ( String ) 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.ACTIVIDADE_INDEX: + setActividade( ( String ) value ); + break; + case Empresas.SERVICOS_INDEX: + setServicos( ( Integer ) value ); + break; + case Empresas.DESIGNACAO_SOCIAL_INDEX: + setDesignacao_social( ( String ) value ); + break; + case Empresas.EMAIL_INDEX: + setEmail( ( String ) 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.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.PERFIL_1_INDEX: + this.perfil_1 = ( Integer ) value; + break; + case Empresas.PERFIL_2_INDEX: + this.perfil_2 = ( Integer ) value; + break; + case Empresas.CODIGO_INDEX: + this.codigo = ( String ) 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.ACTIVIDADE_INDEX: + this.actividade = ( String ) value; + break; + case Empresas.SERVICOS_INDEX: + this.servicos = ( Integer ) value; + break; + case Empresas.DESIGNACAO_SOCIAL_INDEX: + this.designacao_social = ( String ) value; + break; + case Empresas.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 Empresas.ID_INDEX: + theClass = Integer.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.PERFIL_1_INDEX: + theClass = Integer.class; + break; + case Empresas.PERFIL_2_INDEX: + theClass = Integer.class; + break; + case Empresas.CODIGO_INDEX: + theClass = String.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.ACTIVIDADE_INDEX: + theClass = String.class; + break; + case Empresas.SERVICOS_INDEX: + theClass = Integer.class; + break; + case Empresas.DESIGNACAO_SOCIAL_INDEX: + theClass = String.class; + break; + case Empresas.EMAIL_INDEX: + theClass = String.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Errors.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Errors.java new file mode 100644 index 00000000..37c345ff --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Errors.java @@ -0,0 +1,430 @@ +/* +* Errors.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Errors extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp.inner.errors"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "errors.id"; + public static final int ID_INDEX = 0; + public static final String DATE = "date"; + public static final String DATE_FULL = "errors.date"; + public static final int DATE_INDEX = 1; + public static final String TYPE = "type"; + public static final String TYPE_FULL = "errors.type"; + public static final int TYPE_INDEX = 2; + public static final String ENVIRONMENT = "environment"; + public static final String ENVIRONMENT_FULL = "errors.environment"; + public static final int ENVIRONMENT_INDEX = 3; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "errors.description"; + public static final int DESCRIPTION_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DATE, TYPE, ENVIRONMENT, DESCRIPTION, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATE, TABLENAME + "." + TYPE, TABLENAME + "." + ENVIRONMENT, TABLENAME + "." + DESCRIPTION, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATE, TYPE, ENVIRONMENT, DESCRIPTION, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATE, TYPE, ENVIRONMENT, DESCRIPTION, }; + + private Integer id; + private java.sql.Timestamp date; + private String type; + private String environment; + private String description; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Errors() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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, 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Estabelecimentos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Estabelecimentos.java new file mode 100644 index 00000000..f4aab040 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Estabelecimentos.java @@ -0,0 +1,785 @@ +/* +* Estabelecimentos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Estabelecimentos extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + com.evolute.entity.evo.EvoDataObject.register( Estabelecimentos.CLASS_IDENTIFIER, Estabelecimentos.EMPRESA_ID, Estabelecimentos.TO_EMPRESA_ID ); + FIELD_INDEXES.put( Estabelecimentos.EMPRESA_ID, Estabelecimentos.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.EMPRESA_ID_FULL, Estabelecimentos.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.TO_EMPRESA_ID, Estabelecimentos.TO_EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.MORADA, Estabelecimentos.MORADA_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.MORADA_FULL, Estabelecimentos.MORADA_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.CODIGO_POSTAL, Estabelecimentos.CODIGO_POSTAL_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.CODIGO_POSTAL_FULL, Estabelecimentos.CODIGO_POSTAL_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.LOCALIDADE, Estabelecimentos.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.LOCALIDADE_FULL, Estabelecimentos.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.ULTIMA_VISITA, Estabelecimentos.ULTIMA_VISITA_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.ULTIMA_VISITA_FULL, Estabelecimentos.ULTIMA_VISITA_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.REALIZADA, Estabelecimentos.REALIZADA_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.REALIZADA_FULL, Estabelecimentos.REALIZADA_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.PROXIMA_VISITA, Estabelecimentos.PROXIMA_VISITA_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.PROXIMA_VISITA_FULL, Estabelecimentos.PROXIMA_VISITA_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.NOME, Estabelecimentos.NOME_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.NOME_FULL, Estabelecimentos.NOME_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.MEDICO_ID, Estabelecimentos.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.MEDICO_ID_FULL, Estabelecimentos.MEDICO_ID_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( Estabelecimentos.class, Estabelecimentos.EMPRESA_ID, db.data.siprp.outer.EmpresasData.class, db.data.siprp.outer.EmpresasData.ID ); + + public static final String TABLENAME = "estabelecimentos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.estabelecimentos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "estabelecimentos.id"; + public static final int ID_INDEX = 0; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "estabelecimentos.empresa_id"; + public static final int EMPRESA_ID_INDEX = 1; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final String TO_EMPRESA_ID_FULL = "estabelecimentos.to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 2; + public static final String MORADA = "morada"; + public static final String MORADA_FULL = "estabelecimentos.morada"; + public static final int MORADA_INDEX = 3; + public static final String CODIGO_POSTAL = "codigo_postal"; + public static final String CODIGO_POSTAL_FULL = "estabelecimentos.codigo_postal"; + public static final int CODIGO_POSTAL_INDEX = 4; + public static final String LOCALIDADE = "localidade"; + public static final String LOCALIDADE_FULL = "estabelecimentos.localidade"; + public static final int LOCALIDADE_INDEX = 5; + public static final String ULTIMA_VISITA = "ultima_visita"; + public static final String ULTIMA_VISITA_FULL = "estabelecimentos.ultima_visita"; + public static final int ULTIMA_VISITA_INDEX = 6; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "estabelecimentos.realizada"; + public static final int REALIZADA_INDEX = 7; + public static final String PROXIMA_VISITA = "proxima_visita"; + public static final String PROXIMA_VISITA_FULL = "estabelecimentos.proxima_visita"; + public static final int PROXIMA_VISITA_INDEX = 8; + public static final String NOME = "nome"; + public static final String NOME_FULL = "estabelecimentos.nome"; + public static final int NOME_INDEX = 9; + public static final String MEDICO_ID = "medico_id"; + public static final String MEDICO_ID_FULL = "estabelecimentos.medico_id"; + public static final int MEDICO_ID_INDEX = 10; + + public static final String FIELD_NAMES[] = new String[]{ + EMPRESA_ID, TO_EMPRESA_ID, MORADA, CODIGO_POSTAL, LOCALIDADE, ULTIMA_VISITA, + REALIZADA, PROXIMA_VISITA, NOME, MEDICO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + MORADA, TABLENAME + "." + CODIGO_POSTAL, TABLENAME + "." + LOCALIDADE, TABLENAME + "." + ULTIMA_VISITA, + TABLENAME + "." + REALIZADA, TABLENAME + "." + PROXIMA_VISITA, TABLENAME + "." + NOME, TABLENAME + "." + MEDICO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, EMPRESA_ID, MORADA, CODIGO_POSTAL, LOCALIDADE, ULTIMA_VISITA, REALIZADA, + PROXIMA_VISITA, NOME, MEDICO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, EMPRESA_ID, MORADA, CODIGO_POSTAL, LOCALIDADE, ULTIMA_VISITA, REALIZADA, + PROXIMA_VISITA, NOME, MEDICO_ID, }; + + private Integer id; + private Integer empresa_id; + private db.data.siprp.outer.EmpresasData to_empresa_id; + private String morada; + private String codigo_postal; + private String localidade; + private java.util.Date ultima_visita; + private String realizada; + private java.util.Date proxima_visita; + private String nome; + private Integer medico_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Estabelecimentos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false, false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 = new java.util.LinkedList< db.data.siprp.outer.AvisosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.AvisosData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromHistoricoEstabelecimento_estabelecimento_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.HistoricoEstabelecimentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.HistoricoEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromTrabalhadores_estabelecimento_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.TrabalhadoresData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.TrabalhadoresData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public Integer getEmpresa_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( EMPRESA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.empresa_id; + } + + public void setEmpresa_id( Integer empresa_id ) + { + try + { + 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 db.data.siprp.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp.outer.EmpresasData to_empresa_id ) + { + try + { + preProcess( TO_EMPRESA_ID, to_empresa_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_empresa_id = to_empresa_id; + } + + public String getMorada() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MORADA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.morada; + } + + public void setMorada( String morada ) + { + try + { + 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 java.util.Date getUltima_visita() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ULTIMA_VISITA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ultima_visita; + } + + public void setUltima_visita( java.util.Date ultima_visita ) + { + try + { + setLockedForRefresh( true ); + preProcess( ULTIMA_VISITA, ultima_visita ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ultima_visita = ultima_visita; + LAZY_LOADED_OBJECTS.put( ULTIMA_VISITA, Boolean.TRUE ); + } + + public String getRealizada() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( REALIZADA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.realizada; + } + + public void setRealizada( String realizada ) + { + try + { + 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 getProxima_visita() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROXIMA_VISITA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.proxima_visita; + } + + public void setProxima_visita( java.util.Date proxima_visita ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROXIMA_VISITA, proxima_visita ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.proxima_visita = proxima_visita; + LAZY_LOADED_OBJECTS.put( PROXIMA_VISITA, Boolean.TRUE ); + } + + public String getNome() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome; + } + + public void setNome( String nome ) + { + try + { + 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 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Estabelecimentos.ID_INDEX: + value = getId(); + break; + case Estabelecimentos.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case Estabelecimentos.TO_EMPRESA_ID_INDEX: + value = toEmpresa_id(); + break; + case Estabelecimentos.MORADA_INDEX: + value = getMorada(); + break; + case Estabelecimentos.CODIGO_POSTAL_INDEX: + value = getCodigo_postal(); + break; + case Estabelecimentos.LOCALIDADE_INDEX: + value = getLocalidade(); + break; + case Estabelecimentos.ULTIMA_VISITA_INDEX: + value = getUltima_visita(); + break; + case Estabelecimentos.REALIZADA_INDEX: + value = getRealizada(); + break; + case Estabelecimentos.PROXIMA_VISITA_INDEX: + value = getProxima_visita(); + break; + case Estabelecimentos.NOME_INDEX: + value = getNome(); + break; + case Estabelecimentos.MEDICO_ID_INDEX: + value = getMedico_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Estabelecimentos.ID_INDEX: + value = this.id; + break; + case Estabelecimentos.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case Estabelecimentos.TO_EMPRESA_ID_INDEX: + value = this.to_empresa_id; + break; + case Estabelecimentos.MORADA_INDEX: + value = this.morada; + break; + case Estabelecimentos.CODIGO_POSTAL_INDEX: + value = this.codigo_postal; + break; + case Estabelecimentos.LOCALIDADE_INDEX: + value = this.localidade; + break; + case Estabelecimentos.ULTIMA_VISITA_INDEX: + value = this.ultima_visita; + break; + case Estabelecimentos.REALIZADA_INDEX: + value = this.realizada; + break; + case Estabelecimentos.PROXIMA_VISITA_INDEX: + value = this.proxima_visita; + break; + case Estabelecimentos.NOME_INDEX: + value = this.nome; + break; + case Estabelecimentos.MEDICO_ID_INDEX: + value = this.medico_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Estabelecimentos.ID_INDEX: + setId( ( Integer ) value ); + break; + case Estabelecimentos.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case Estabelecimentos.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( db.data.siprp.outer.EmpresasData ) value ); + break; + case Estabelecimentos.MORADA_INDEX: + setMorada( ( String ) value ); + break; + case Estabelecimentos.CODIGO_POSTAL_INDEX: + setCodigo_postal( ( String ) value ); + break; + case Estabelecimentos.LOCALIDADE_INDEX: + setLocalidade( ( String ) value ); + break; + case Estabelecimentos.ULTIMA_VISITA_INDEX: + setUltima_visita( ( java.util.Date ) value ); + break; + case Estabelecimentos.REALIZADA_INDEX: + setRealizada( ( String ) value ); + break; + case Estabelecimentos.PROXIMA_VISITA_INDEX: + setProxima_visita( ( java.util.Date ) value ); + break; + case Estabelecimentos.NOME_INDEX: + setNome( ( String ) value ); + break; + case Estabelecimentos.MEDICO_ID_INDEX: + setMedico_id( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Estabelecimentos.ID_INDEX: + this.id = ( Integer ) value; + break; + case Estabelecimentos.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case Estabelecimentos.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( db.data.siprp.outer.EmpresasData ) value; + break; + case Estabelecimentos.MORADA_INDEX: + this.morada = ( String ) value; + break; + case Estabelecimentos.CODIGO_POSTAL_INDEX: + this.codigo_postal = ( String ) value; + break; + case Estabelecimentos.LOCALIDADE_INDEX: + this.localidade = ( String ) value; + break; + case Estabelecimentos.ULTIMA_VISITA_INDEX: + this.ultima_visita = ( java.util.Date ) value; + break; + case Estabelecimentos.REALIZADA_INDEX: + this.realizada = ( String ) value; + break; + case Estabelecimentos.PROXIMA_VISITA_INDEX: + this.proxima_visita = ( java.util.Date ) value; + break; + case Estabelecimentos.NOME_INDEX: + this.nome = ( String ) value; + break; + case Estabelecimentos.MEDICO_ID_INDEX: + this.medico_id = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Estabelecimentos.ID_INDEX: + theClass = Integer.class; + break; + case Estabelecimentos.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case Estabelecimentos.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp.outer.EmpresasData.class; + break; + case Estabelecimentos.MORADA_INDEX: + theClass = String.class; + break; + case Estabelecimentos.CODIGO_POSTAL_INDEX: + theClass = String.class; + break; + case Estabelecimentos.LOCALIDADE_INDEX: + theClass = String.class; + break; + case Estabelecimentos.ULTIMA_VISITA_INDEX: + theClass = java.util.Date.class; + break; + case Estabelecimentos.REALIZADA_INDEX: + theClass = String.class; + break; + case Estabelecimentos.PROXIMA_VISITA_INDEX: + theClass = java.util.Date.class; + break; + case Estabelecimentos.NOME_INDEX: + theClass = String.class; + break; + case Estabelecimentos.MEDICO_ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Estabelecimentos._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Estabelecimentos.PK_FIELD_NAMES ); + primaryKey.set( 0, getId() ); + } + } + + @Override + public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/EstadoMedidas.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/EstadoMedidas.java new file mode 100644 index 00000000..ba43213c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/EstadoMedidas.java @@ -0,0 +1,398 @@ +/* +* EstadoMedidas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class EstadoMedidas extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EstadoMedidas.ID, EstadoMedidas.ID_INDEX ); + FIELD_INDEXES.put( EstadoMedidas.ID_FULL, EstadoMedidas.ID_INDEX ); + FIELD_INDEXES.put( EstadoMedidas.DESCRICAO, EstadoMedidas.DESCRICAO_INDEX ); + FIELD_INDEXES.put( EstadoMedidas.DESCRICAO_FULL, EstadoMedidas.DESCRICAO_INDEX ); + FIELD_INDEXES.put( EstadoMedidas.ORDEM, EstadoMedidas.ORDEM_INDEX ); + FIELD_INDEXES.put( EstadoMedidas.ORDEM_FULL, EstadoMedidas.ORDEM_INDEX ); + FIELD_INDEXES.put( EstadoMedidas.ACTIVO, EstadoMedidas.ACTIVO_INDEX ); + FIELD_INDEXES.put( EstadoMedidas.ACTIVO_FULL, EstadoMedidas.ACTIVO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "estado_medidas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.estado_medidas"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "estado_medidas.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "estado_medidas.descricao"; + public static final int DESCRICAO_INDEX = 1; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "estado_medidas.ordem"; + public static final int ORDEM_INDEX = 2; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "estado_medidas.activo"; + public static final int ACTIVO_INDEX = 3; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, ORDEM, ACTIVO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + ORDEM, TABLENAME + "." + ACTIVO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, ORDEM, ACTIVO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRICAO, ORDEM, ACTIVO, }; + + private Integer id; + private String descricao; + private Integer ordem; + private String activo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EstadoMedidas() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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.ListfromPlanoMedidas_estado_medidas_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.PlanoMedidasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.PlanoMedidasData.class , getPrimaryKey().getMap().get("id"), "estado_medidas_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public String getDescricao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao; + } + + public void setDescricao( String descricao ) + { + try + { + 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 EstadoMedidas.ID_INDEX: + value = getId(); + break; + case EstadoMedidas.DESCRICAO_INDEX: + value = getDescricao(); + break; + case EstadoMedidas.ORDEM_INDEX: + value = getOrdem(); + break; + case EstadoMedidas.ACTIVO_INDEX: + value = getActivo(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EstadoMedidas.ID_INDEX: + value = this.id; + break; + case EstadoMedidas.DESCRICAO_INDEX: + value = this.descricao; + break; + case EstadoMedidas.ORDEM_INDEX: + value = this.ordem; + break; + case EstadoMedidas.ACTIVO_INDEX: + value = this.activo; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EstadoMedidas.ID_INDEX: + setId( ( Integer ) value ); + break; + case EstadoMedidas.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case EstadoMedidas.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + case EstadoMedidas.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EstadoMedidas.ID_INDEX: + this.id = ( Integer ) value; + break; + case EstadoMedidas.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case EstadoMedidas.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + case EstadoMedidas.ACTIVO_INDEX: + this.activo = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case EstadoMedidas.ID_INDEX: + theClass = Integer.class; + break; + case EstadoMedidas.DESCRICAO_INDEX: + theClass = String.class; + break; + case EstadoMedidas.ORDEM_INDEX: + theClass = Integer.class; + break; + case EstadoMedidas.ACTIVO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EstadoMedidas._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, EstadoMedidas.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Exames.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Exames.java new file mode 100644 index 00000000..04f0a3fd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Exames.java @@ -0,0 +1,1096 @@ +/* +* Exames.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Exames extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + } + + 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, db.data.siprp.outer.TrabalhadoresData.class, db.data.siprp.outer.TrabalhadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedico_idTomedicos = + new com.evolute.entity.ForeignKey( Exames.class, Exames.MEDICO_ID, db.data.siprp.outer.MedicosData.class, db.data.siprp.outer.MedicosData.ID ); + + public static final String TABLENAME = "exames"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.exames"; + + 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 String TO_TRABALHADOR_ID_FULL = "exames.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 String TO_MEDICO_ID_FULL = "exames.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 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, }; + + 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, }; + + 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, }; + + + 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 db.data.siprp.outer.TrabalhadoresData to_trabalhador_id; + private Integer medico_id; + private db.data.siprp.outer.MedicosData to_medico_id; + private byte[] pdf; + + 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 }; + } + + 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 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 db.data.siprp.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp.outer.TrabalhadoresData to_trabalhador_id ) + { + try + { + preProcess( TO_TRABALHADOR_ID, to_trabalhador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_trabalhador_id = to_trabalhador_id; + } + + public Integer 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 db.data.siprp.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( db.data.siprp.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 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; + } + 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; + } + 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( ( db.data.siprp.outer.TrabalhadoresData ) value ); + break; + case Exames.MEDICO_ID_INDEX: + setMedico_id( ( Integer ) value ); + break; + case Exames.TO_MEDICO_ID_INDEX: + setToMedico_id( ( db.data.siprp.outer.MedicosData ) value ); + break; + case Exames.PDF_INDEX: + setPdf( ( 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 = ( db.data.siprp.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 = ( db.data.siprp.outer.MedicosData ) value; + break; + case Exames.PDF_INDEX: + this.pdf = ( 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 = db.data.siprp.outer.TrabalhadoresData.class; + break; + case Exames.MEDICO_ID_INDEX: + theClass = Integer.class; + break; + case Exames.TO_MEDICO_ID_INDEX: + theClass = db.data.siprp.outer.MedicosData.class; + break; + case Exames.PDF_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 ); + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/ExamesPerfis.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/ExamesPerfis.java new file mode 100644 index 00000000..c81ab08c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/ExamesPerfis.java @@ -0,0 +1,430 @@ +/* +* ExamesPerfis.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class ExamesPerfis extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp.outer.TiposExamesCompData.class, db.data.siprp.outer.TiposExamesCompData.ID ); + + public static final String TABLENAME = "exames_perfis"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.exames_perfis"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "exames_perfis.id"; + public static final int ID_INDEX = 0; + public static final String PERFIL = "perfil"; + public static final String PERFIL_FULL = "exames_perfis.perfil"; + public static final int PERFIL_INDEX = 1; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "exames_perfis.tipo"; + public static final int TIPO_INDEX = 2; + public static final String TO_TIPO = "to_tipo"; + public static final String TO_TIPO_FULL = "exames_perfis.to_tipo"; + public static final int TO_TIPO_INDEX = 3; + public static final String MULTIPLICADOR = "multiplicador"; + public static final String MULTIPLICADOR_FULL = "exames_perfis.multiplicador"; + public static final int MULTIPLICADOR_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + PERFIL, TIPO, TO_TIPO, MULTIPLICADOR, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + PERFIL, TABLENAME + "." + TIPO, TABLENAME + "." + TO_TIPO, TABLENAME + "." + MULTIPLICADOR, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, PERFIL, TIPO, MULTIPLICADOR, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, PERFIL, TIPO, MULTIPLICADOR, }; + + private Integer id; + private Integer perfil; + private Integer tipo; + private db.data.siprp.outer.TiposExamesCompData to_tipo; + private Integer multiplicador; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public ExamesPerfis() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 db.data.siprp.outer.TiposExamesCompData toTipo() + { + try + { + prepare( TO_TIPO ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_tipo; + } + + public void setToTipo( db.data.siprp.outer.TiposExamesCompData to_tipo ) + { + try + { + preProcess( TO_TIPO, to_tipo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_tipo = to_tipo; + } + + public Integer getMultiplicador() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MULTIPLICADOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.multiplicador; + } + + public void setMultiplicador( Integer multiplicador ) + { + try + { + 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( ( db.data.siprp.outer.TiposExamesCompData ) value ); + break; + case ExamesPerfis.MULTIPLICADOR_INDEX: + setMultiplicador( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case ExamesPerfis.ID_INDEX: + this.id = ( Integer ) value; + break; + case ExamesPerfis.PERFIL_INDEX: + this.perfil = ( Integer ) value; + break; + case ExamesPerfis.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case ExamesPerfis.TO_TIPO_INDEX: + this.to_tipo = ( db.data.siprp.outer.TiposExamesCompData ) value; + break; + case ExamesPerfis.MULTIPLICADOR_INDEX: + this.multiplicador = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case ExamesPerfis.ID_INDEX: + theClass = Integer.class; + break; + case ExamesPerfis.PERFIL_INDEX: + theClass = Integer.class; + break; + case ExamesPerfis.TIPO_INDEX: + theClass = Integer.class; + break; + case ExamesPerfis.TO_TIPO_INDEX: + theClass = db.data.siprp.outer.TiposExamesCompData.class; + break; + case ExamesPerfis.MULTIPLICADOR_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : ExamesPerfis._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, ExamesPerfis.PK_FIELD_NAMES ); + primaryKey.set( 0, getId() ); + } + } + + @Override + public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/HistoricoEstabelecimento.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/HistoricoEstabelecimento.java new file mode 100644 index 00000000..4c876346 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/HistoricoEstabelecimento.java @@ -0,0 +1,430 @@ +/* +* HistoricoEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class HistoricoEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp.outer.EstabelecimentosData.class, db.data.siprp.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "historico_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.historico_estabelecimento"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "historico_estabelecimento.id"; + public static final int ID_INDEX = 0; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "historico_estabelecimento.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 1; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID_FULL = "historico_estabelecimento.to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 2; + public static final String DATA = "data"; + public static final String DATA_FULL = "historico_estabelecimento.data"; + public static final int DATA_INDEX = 3; + public static final String TEXTO = "texto"; + public static final String TEXTO_FULL = "historico_estabelecimento.texto"; + public static final int TEXTO_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, DATA, TEXTO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID, TABLENAME + "." + DATA, TABLENAME + "." + TEXTO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ESTABELECIMENTO_ID, DATA, TEXTO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ESTABELECIMENTO_ID, DATA, TEXTO, }; + + private Integer id; + private Integer estabelecimento_id; + private db.data.siprp.outer.EstabelecimentosData to_estabelecimento_id; + private java.util.Date data; + private String texto; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HistoricoEstabelecimento() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 db.data.siprp.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp.outer.EstabelecimentosData to_estabelecimento_id ) + { + try + { + preProcess( TO_ESTABELECIMENTO_ID, to_estabelecimento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_estabelecimento_id = to_estabelecimento_id; + } + + public java.util.Date getData() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data; + } + + public void setData( java.util.Date data ) + { + try + { + 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( ( db.data.siprp.outer.EstabelecimentosData ) value ); + break; + case HistoricoEstabelecimento.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case HistoricoEstabelecimento.TEXTO_INDEX: + setTexto( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HistoricoEstabelecimento.ID_INDEX: + this.id = ( Integer ) value; + break; + case HistoricoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case HistoricoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( db.data.siprp.outer.EstabelecimentosData ) value; + break; + case HistoricoEstabelecimento.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case HistoricoEstabelecimento.TEXTO_INDEX: + this.texto = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HistoricoEstabelecimento.ID_INDEX: + theClass = Integer.class; + break; + case HistoricoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case HistoricoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp.outer.EstabelecimentosData.class; + break; + case HistoricoEstabelecimento.DATA_INDEX: + theClass = java.util.Date.class; + break; + case HistoricoEstabelecimento.TEXTO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HistoricoEstabelecimento._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, HistoricoEstabelecimento.PK_FIELD_NAMES ); + primaryKey.set( 0, getId() ); + } + } + + @Override + public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/MarcacoesEmpresa.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/MarcacoesEmpresa.java new file mode 100644 index 00000000..14a69140 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/MarcacoesEmpresa.java @@ -0,0 +1,480 @@ +/* +* MarcacoesEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class MarcacoesEmpresa extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp.outer.EmpresasData.class, db.data.siprp.outer.EmpresasData.ID ); + + public static final String TABLENAME = "marcacoes_empresa"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.marcacoes_empresa"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_empresa.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_empresa.data"; + public static final int DATA_INDEX = 1; + public static final String TEXTO = "texto"; + public static final String TEXTO_FULL = "marcacoes_empresa.texto"; + public static final int TEXTO_INDEX = 2; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "marcacoes_empresa.empresa_id"; + public static final int EMPRESA_ID_INDEX = 3; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final String TO_EMPRESA_ID_FULL = "marcacoes_empresa.to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 4; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "marcacoes_empresa.realizada"; + public static final int REALIZADA_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, TEXTO, EMPRESA_ID, TO_EMPRESA_ID, REALIZADA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA, TABLENAME + "." + TEXTO, TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + REALIZADA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, TEXTO, EMPRESA_ID, REALIZADA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA, TEXTO, EMPRESA_ID, REALIZADA, }; + + private Integer id; + private java.util.Date data; + private String texto; + private Integer empresa_id; + private db.data.siprp.outer.EmpresasData to_empresa_id; + private String realizada; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public MarcacoesEmpresa() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 db.data.siprp.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp.outer.EmpresasData to_empresa_id ) + { + try + { + preProcess( TO_EMPRESA_ID, to_empresa_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_empresa_id = to_empresa_id; + } + + public String getRealizada() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( REALIZADA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.realizada; + } + + public void setRealizada( String realizada ) + { + try + { + 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( ( db.data.siprp.outer.EmpresasData ) value ); + break; + case MarcacoesEmpresa.REALIZADA_INDEX: + setRealizada( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesEmpresa.ID_INDEX: + this.id = ( Integer ) value; + break; + case MarcacoesEmpresa.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case MarcacoesEmpresa.TEXTO_INDEX: + this.texto = ( String ) value; + break; + case MarcacoesEmpresa.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case MarcacoesEmpresa.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( db.data.siprp.outer.EmpresasData ) value; + break; + case MarcacoesEmpresa.REALIZADA_INDEX: + this.realizada = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case MarcacoesEmpresa.ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesEmpresa.DATA_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesEmpresa.TEXTO_INDEX: + theClass = String.class; + break; + case MarcacoesEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesEmpresa.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp.outer.EmpresasData.class; + break; + case MarcacoesEmpresa.REALIZADA_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : MarcacoesEmpresa._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, MarcacoesEmpresa.PK_FIELD_NAMES ); + primaryKey.set( 0, getId() ); + } + } + + @Override + public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/MarcacoesEstabelecimento.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/MarcacoesEstabelecimento.java new file mode 100644 index 00000000..4028cd6c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/MarcacoesEstabelecimento.java @@ -0,0 +1,480 @@ +/* +* MarcacoesEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.ESTABELECIMENTO_ID, MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.ESTABELECIMENTO_ID_FULL, MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "marcacoes_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.marcacoes_estabelecimento"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_estabelecimento.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_estabelecimento.data"; + public static final int DATA_INDEX = 1; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "marcacoes_estabelecimento.realizada"; + public static final int REALIZADA_INDEX = 2; + public static final String DATA_EMAIL = "data_email"; + public static final String DATA_EMAIL_FULL = "marcacoes_estabelecimento.data_email"; + public static final int DATA_EMAIL_INDEX = 3; + public static final String DATA_RELATORIO = "data_relatorio"; + public static final String DATA_RELATORIO_FULL = "marcacoes_estabelecimento.data_relatorio"; + public static final int DATA_RELATORIO_INDEX = 4; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "marcacoes_estabelecimento.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA, TABLENAME + "." + REALIZADA, TABLENAME + "." + DATA_EMAIL, TABLENAME + "." + DATA_RELATORIO, TABLENAME + "." + ESTABELECIMENTO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO_ID, }; + + private Integer id; + private java.util.Date data; + private String realizada; + private java.util.Date data_email; + private java.util.Date data_relatorio; + private Integer estabelecimento_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public MarcacoesEstabelecimento() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesEstabelecimento.ID_INDEX: + value = getId(); + break; + case MarcacoesEstabelecimento.DATA_INDEX: + value = getData(); + break; + case MarcacoesEstabelecimento.REALIZADA_INDEX: + value = getRealizada(); + break; + case MarcacoesEstabelecimento.DATA_EMAIL_INDEX: + value = getData_email(); + break; + case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX: + value = getData_relatorio(); + break; + case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesEstabelecimento.ID_INDEX: + value = this.id; + break; + case MarcacoesEstabelecimento.DATA_INDEX: + value = this.data; + break; + case MarcacoesEstabelecimento.REALIZADA_INDEX: + value = this.realizada; + break; + case MarcacoesEstabelecimento.DATA_EMAIL_INDEX: + value = this.data_email; + break; + case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX: + value = this.data_relatorio; + break; + case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesEstabelecimento.ID_INDEX: + setId( ( Integer ) value ); + break; + case MarcacoesEstabelecimento.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case MarcacoesEstabelecimento.REALIZADA_INDEX: + setRealizada( ( String ) value ); + break; + case MarcacoesEstabelecimento.DATA_EMAIL_INDEX: + setData_email( ( java.util.Date ) value ); + break; + case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX: + setData_relatorio( ( java.util.Date ) value ); + break; + case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesEstabelecimento.ID_INDEX: + this.id = ( Integer ) value; + break; + case MarcacoesEstabelecimento.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case MarcacoesEstabelecimento.REALIZADA_INDEX: + this.realizada = ( String ) value; + break; + case MarcacoesEstabelecimento.DATA_EMAIL_INDEX: + this.data_email = ( java.util.Date ) value; + break; + case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX: + this.data_relatorio = ( java.util.Date ) value; + break; + case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case MarcacoesEstabelecimento.ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesEstabelecimento.DATA_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesEstabelecimento.REALIZADA_INDEX: + theClass = String.class; + break; + case MarcacoesEstabelecimento.DATA_EMAIL_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : MarcacoesEstabelecimento._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, MarcacoesEstabelecimento.PK_FIELD_NAMES ); + primaryKey.set( 0, getId() ); + } + } + + @Override + public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/MarcacoesTrabalhador.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/MarcacoesTrabalhador.java new file mode 100644 index 00000000..b45dc69a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/MarcacoesTrabalhador.java @@ -0,0 +1,582 @@ +/* +* MarcacoesTrabalhador.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class MarcacoesTrabalhador extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores = + new com.evolute.entity.ForeignKey( MarcacoesTrabalhador.class, MarcacoesTrabalhador.TRABALHADOR_ID, db.data.siprp.outer.TrabalhadoresData.class, db.data.siprp.outer.TrabalhadoresData.ID ); + + public static final String TABLENAME = "marcacoes_trabalhador"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.marcacoes_trabalhador"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_trabalhador.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_trabalhador.data"; + public static final int DATA_INDEX = 1; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "marcacoes_trabalhador.realizada"; + public static final int REALIZADA_INDEX = 2; + public static final String DATA_EMAIL = "data_email"; + public static final String DATA_EMAIL_FULL = "marcacoes_trabalhador.data_email"; + public static final int DATA_EMAIL_INDEX = 3; + public static final String DATA_RELATORIO = "data_relatorio"; + public static final String DATA_RELATORIO_FULL = "marcacoes_trabalhador.data_relatorio"; + public static final int DATA_RELATORIO_INDEX = 4; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "marcacoes_trabalhador.tipo"; + public static final int TIPO_INDEX = 5; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "marcacoes_trabalhador.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 6; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final String TO_TRABALHADOR_ID_FULL = "marcacoes_trabalhador.to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 7; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR_ID, + TO_TRABALHADOR_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA, TABLENAME + "." + REALIZADA, TABLENAME + "." + DATA_EMAIL, TABLENAME + "." + DATA_RELATORIO, TABLENAME + "." + TIPO, TABLENAME + "." + TRABALHADOR_ID, + TABLENAME + "." + TO_TRABALHADOR_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR_ID, }; + + private Integer id; + private java.util.Date data; + private String realizada; + private java.util.Date data_email; + private java.util.Date data_relatorio; + private Integer tipo; + private Integer trabalhador_id; + private db.data.siprp.outer.TrabalhadoresData to_trabalhador_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public MarcacoesTrabalhador() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 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 db.data.siprp.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp.outer.TrabalhadoresData to_trabalhador_id ) + { + try + { + preProcess( TO_TRABALHADOR_ID, to_trabalhador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_trabalhador_id = to_trabalhador_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTrabalhador.ID_INDEX: + value = getId(); + break; + case MarcacoesTrabalhador.DATA_INDEX: + value = getData(); + break; + case MarcacoesTrabalhador.REALIZADA_INDEX: + value = getRealizada(); + break; + case MarcacoesTrabalhador.DATA_EMAIL_INDEX: + value = getData_email(); + break; + case MarcacoesTrabalhador.DATA_RELATORIO_INDEX: + value = getData_relatorio(); + break; + case MarcacoesTrabalhador.TIPO_INDEX: + value = getTipo(); + break; + case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX: + value = getTrabalhador_id(); + break; + case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX: + value = toTrabalhador_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTrabalhador.ID_INDEX: + value = this.id; + break; + case MarcacoesTrabalhador.DATA_INDEX: + value = this.data; + break; + case MarcacoesTrabalhador.REALIZADA_INDEX: + value = this.realizada; + break; + case MarcacoesTrabalhador.DATA_EMAIL_INDEX: + value = this.data_email; + break; + case MarcacoesTrabalhador.DATA_RELATORIO_INDEX: + value = this.data_relatorio; + break; + case MarcacoesTrabalhador.TIPO_INDEX: + value = this.tipo; + break; + case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX: + value = this.trabalhador_id; + break; + case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX: + value = this.to_trabalhador_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTrabalhador.ID_INDEX: + setId( ( Integer ) value ); + break; + case MarcacoesTrabalhador.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case MarcacoesTrabalhador.REALIZADA_INDEX: + setRealizada( ( String ) value ); + break; + case MarcacoesTrabalhador.DATA_EMAIL_INDEX: + setData_email( ( java.util.Date ) value ); + break; + case MarcacoesTrabalhador.DATA_RELATORIO_INDEX: + setData_relatorio( ( java.util.Date ) value ); + break; + case MarcacoesTrabalhador.TIPO_INDEX: + setTipo( ( Integer ) value ); + break; + case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( db.data.siprp.outer.TrabalhadoresData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTrabalhador.ID_INDEX: + this.id = ( Integer ) value; + break; + case MarcacoesTrabalhador.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case MarcacoesTrabalhador.REALIZADA_INDEX: + this.realizada = ( String ) value; + break; + case MarcacoesTrabalhador.DATA_EMAIL_INDEX: + this.data_email = ( java.util.Date ) value; + break; + case MarcacoesTrabalhador.DATA_RELATORIO_INDEX: + this.data_relatorio = ( java.util.Date ) value; + break; + case MarcacoesTrabalhador.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX: + this.to_trabalhador_id = ( db.data.siprp.outer.TrabalhadoresData ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case MarcacoesTrabalhador.ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.DATA_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesTrabalhador.REALIZADA_INDEX: + theClass = String.class; + break; + case MarcacoesTrabalhador.DATA_EMAIL_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesTrabalhador.DATA_RELATORIO_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesTrabalhador.TIPO_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX: + theClass = db.data.siprp.outer.TrabalhadoresData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : MarcacoesTrabalhador._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, MarcacoesTrabalhador.PK_FIELD_NAMES ); + primaryKey.set( 0, getId() ); + } + } + + @Override + public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Medicos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Medicos.java new file mode 100644 index 00000000..a2cf678b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Medicos.java @@ -0,0 +1,397 @@ +/* +* Medicos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Medicos extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp.inner.medicos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "medicos.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "medicos.nome"; + public static final int NOME_INDEX = 1; + public static final String NUMERO_CEDULA = "numero_cedula"; + public static final String NUMERO_CEDULA_FULL = "medicos.numero_cedula"; + public static final int NUMERO_CEDULA_INDEX = 2; + public static final String INACTIVO = "inactivo"; + public static final String INACTIVO_FULL = "medicos.inactivo"; + public static final int INACTIVO_INDEX = 3; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, NUMERO_CEDULA, INACTIVO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + NUMERO_CEDULA, TABLENAME + "." + INACTIVO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, NUMERO_CEDULA, INACTIVO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, NUMERO_CEDULA, INACTIVO, }; + + private Integer id; + private String nome; + private String numero_cedula; + private String inactivo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Medicos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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.ListfromExames_medico_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.ExamesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.ExamesData.class , getPrimaryKey().getMap().get("id"), "medico_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public String getNome() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome; + } + + public void setNome( String nome ) + { + try + { + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Medidas.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Medidas.java new file mode 100644 index 00000000..bbc281d0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Medidas.java @@ -0,0 +1,381 @@ +/* +* Medidas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Medidas extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Medidas.ID, Medidas.ID_INDEX ); + FIELD_INDEXES.put( Medidas.ID_FULL, Medidas.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Medidas.CLASS_IDENTIFIER, Medidas.ANALISE_ID, Medidas.TO_ANALISE_ID ); + FIELD_INDEXES.put( Medidas.ANALISE_ID, Medidas.ANALISE_ID_INDEX ); + FIELD_INDEXES.put( Medidas.ANALISE_ID_FULL, Medidas.ANALISE_ID_INDEX ); + FIELD_INDEXES.put( Medidas.TO_ANALISE_ID, Medidas.TO_ANALISE_ID_INDEX ); + FIELD_INDEXES.put( Medidas.MEDIDA, Medidas.MEDIDA_INDEX ); + FIELD_INDEXES.put( Medidas.MEDIDA_FULL, Medidas.MEDIDA_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyanalise_idToanalises_acidentes = + new com.evolute.entity.ForeignKey( Medidas.class, Medidas.ANALISE_ID, db.data.siprp.outer.AnalisesAcidentesData.class, db.data.siprp.outer.AnalisesAcidentesData.ID ); + + public static final String TABLENAME = "medidas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.medidas"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "medidas.id"; + public static final int ID_INDEX = 0; + public static final String ANALISE_ID = "analise_id"; + public static final String ANALISE_ID_FULL = "medidas.analise_id"; + public static final int ANALISE_ID_INDEX = 1; + public static final String TO_ANALISE_ID = "to_analise_id"; + public static final String TO_ANALISE_ID_FULL = "medidas.to_analise_id"; + public static final int TO_ANALISE_ID_INDEX = 2; + public static final String MEDIDA = "medida"; + public static final String MEDIDA_FULL = "medidas.medida"; + public static final int MEDIDA_INDEX = 3; + + public static final String FIELD_NAMES[] = new String[]{ + ANALISE_ID, TO_ANALISE_ID, MEDIDA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ANALISE_ID, TABLENAME + "." + TO_ANALISE_ID, TABLENAME + "." + MEDIDA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ANALISE_ID, MEDIDA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ANALISE_ID, MEDIDA, }; + + private Integer id; + private Integer analise_id; + private db.data.siprp.outer.AnalisesAcidentesData to_analise_id; + private String medida; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Medidas() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 getAnalise_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ANALISE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.analise_id; + } + + public void setAnalise_id( Integer analise_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ANALISE_ID, analise_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.analise_id = analise_id; + LAZY_LOADED_OBJECTS.put( ANALISE_ID, Boolean.TRUE ); + } + + public db.data.siprp.outer.AnalisesAcidentesData toAnalise_id() + { + try + { + prepare( TO_ANALISE_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_analise_id; + } + + public void setToAnalise_id( db.data.siprp.outer.AnalisesAcidentesData to_analise_id ) + { + try + { + preProcess( TO_ANALISE_ID, to_analise_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_analise_id = to_analise_id; + } + + public String getMedida() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MEDIDA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.medida; + } + + public void setMedida( String medida ) + { + try + { + setLockedForRefresh( true ); + preProcess( MEDIDA, medida ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.medida = medida; + LAZY_LOADED_OBJECTS.put( MEDIDA, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Medidas.ID_INDEX: + value = getId(); + break; + case Medidas.ANALISE_ID_INDEX: + value = getAnalise_id(); + break; + case Medidas.TO_ANALISE_ID_INDEX: + value = toAnalise_id(); + break; + case Medidas.MEDIDA_INDEX: + value = getMedida(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Medidas.ID_INDEX: + value = this.id; + break; + case Medidas.ANALISE_ID_INDEX: + value = this.analise_id; + break; + case Medidas.TO_ANALISE_ID_INDEX: + value = this.to_analise_id; + break; + case Medidas.MEDIDA_INDEX: + value = this.medida; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Medidas.ID_INDEX: + setId( ( Integer ) value ); + break; + case Medidas.ANALISE_ID_INDEX: + setAnalise_id( ( Integer ) value ); + break; + case Medidas.TO_ANALISE_ID_INDEX: + setToAnalise_id( ( db.data.siprp.outer.AnalisesAcidentesData ) value ); + break; + case Medidas.MEDIDA_INDEX: + setMedida( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Medidas.ID_INDEX: + this.id = ( Integer ) value; + break; + case Medidas.ANALISE_ID_INDEX: + this.analise_id = ( Integer ) value; + break; + case Medidas.TO_ANALISE_ID_INDEX: + this.to_analise_id = ( db.data.siprp.outer.AnalisesAcidentesData ) value; + break; + case Medidas.MEDIDA_INDEX: + this.medida = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Medidas.ID_INDEX: + theClass = Integer.class; + break; + case Medidas.ANALISE_ID_INDEX: + theClass = Integer.class; + break; + case Medidas.TO_ANALISE_ID_INDEX: + theClass = db.data.siprp.outer.AnalisesAcidentesData.class; + break; + case Medidas.MEDIDA_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Medidas._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Medidas.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/NotNoticias.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/NotNoticias.java new file mode 100644 index 00000000..74589834 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/NotNoticias.java @@ -0,0 +1,431 @@ +/* +* NotNoticias.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class NotNoticias extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( NotNoticias.ID, NotNoticias.ID_INDEX ); + FIELD_INDEXES.put( NotNoticias.ID_FULL, NotNoticias.ID_INDEX ); + FIELD_INDEXES.put( NotNoticias.DATA, NotNoticias.DATA_INDEX ); + FIELD_INDEXES.put( NotNoticias.DATA_FULL, NotNoticias.DATA_INDEX ); + FIELD_INDEXES.put( NotNoticias.STAMP, NotNoticias.STAMP_INDEX ); + FIELD_INDEXES.put( NotNoticias.STAMP_FULL, NotNoticias.STAMP_INDEX ); + FIELD_INDEXES.put( NotNoticias.UTILIZADOR, NotNoticias.UTILIZADOR_INDEX ); + FIELD_INDEXES.put( NotNoticias.UTILIZADOR_FULL, NotNoticias.UTILIZADOR_INDEX ); + FIELD_INDEXES.put( NotNoticias.NOTICIA, NotNoticias.NOTICIA_INDEX ); + FIELD_INDEXES.put( NotNoticias.NOTICIA_FULL, NotNoticias.NOTICIA_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "not_noticias"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.not_noticias"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "not_noticias.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "not_noticias.data"; + public static final int DATA_INDEX = 1; + public static final String STAMP = "stamp"; + public static final String STAMP_FULL = "not_noticias.stamp"; + public static final int STAMP_INDEX = 2; + public static final String UTILIZADOR = "utilizador"; + public static final String UTILIZADOR_FULL = "not_noticias.utilizador"; + public static final int UTILIZADOR_INDEX = 3; + public static final String NOTICIA = "noticia"; + public static final String NOTICIA_FULL = "not_noticias.noticia"; + public static final int NOTICIA_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, STAMP, UTILIZADOR, NOTICIA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA, TABLENAME + "." + STAMP, TABLENAME + "." + UTILIZADOR, TABLENAME + "." + NOTICIA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, STAMP, UTILIZADOR, NOTICIA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA, STAMP, UTILIZADOR, NOTICIA, }; + + private Integer id; + private java.util.Date data; + private java.sql.Timestamp stamp; + private String utilizador; + private String noticia; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public NotNoticias() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 java.sql.Timestamp getStamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.stamp; + } + + public void setStamp( java.sql.Timestamp stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( STAMP, stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.stamp = stamp; + LAZY_LOADED_OBJECTS.put( STAMP, Boolean.TRUE ); + } + + public String getUtilizador() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( UTILIZADOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.utilizador; + } + + public void setUtilizador( String utilizador ) + { + try + { + setLockedForRefresh( true ); + preProcess( UTILIZADOR, utilizador ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.utilizador = utilizador; + LAZY_LOADED_OBJECTS.put( UTILIZADOR, Boolean.TRUE ); + } + + public String getNoticia() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOTICIA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.noticia; + } + + public void setNoticia( String noticia ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOTICIA, noticia ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.noticia = noticia; + LAZY_LOADED_OBJECTS.put( NOTICIA, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case NotNoticias.ID_INDEX: + value = getId(); + break; + case NotNoticias.DATA_INDEX: + value = getData(); + break; + case NotNoticias.STAMP_INDEX: + value = getStamp(); + break; + case NotNoticias.UTILIZADOR_INDEX: + value = getUtilizador(); + break; + case NotNoticias.NOTICIA_INDEX: + value = getNoticia(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case NotNoticias.ID_INDEX: + value = this.id; + break; + case NotNoticias.DATA_INDEX: + value = this.data; + break; + case NotNoticias.STAMP_INDEX: + value = this.stamp; + break; + case NotNoticias.UTILIZADOR_INDEX: + value = this.utilizador; + break; + case NotNoticias.NOTICIA_INDEX: + value = this.noticia; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case NotNoticias.ID_INDEX: + setId( ( Integer ) value ); + break; + case NotNoticias.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case NotNoticias.STAMP_INDEX: + setStamp( ( java.sql.Timestamp ) value ); + break; + case NotNoticias.UTILIZADOR_INDEX: + setUtilizador( ( String ) value ); + break; + case NotNoticias.NOTICIA_INDEX: + setNoticia( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case NotNoticias.ID_INDEX: + this.id = ( Integer ) value; + break; + case NotNoticias.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case NotNoticias.STAMP_INDEX: + this.stamp = ( java.sql.Timestamp ) value; + break; + case NotNoticias.UTILIZADOR_INDEX: + this.utilizador = ( String ) value; + break; + case NotNoticias.NOTICIA_INDEX: + this.noticia = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case NotNoticias.ID_INDEX: + theClass = Integer.class; + break; + case NotNoticias.DATA_INDEX: + theClass = java.util.Date.class; + break; + case NotNoticias.STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + case NotNoticias.UTILIZADOR_INDEX: + theClass = String.class; + break; + case NotNoticias.NOTICIA_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : NotNoticias._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, NotNoticias.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Permissoes.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Permissoes.java new file mode 100644 index 00000000..c1b739cd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Permissoes.java @@ -0,0 +1,330 @@ +/* +* Permissoes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Permissoes extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Permissoes.ID, Permissoes.ID_INDEX ); + FIELD_INDEXES.put( Permissoes.ID_FULL, Permissoes.ID_INDEX ); + FIELD_INDEXES.put( Permissoes.USER_ID, Permissoes.USER_ID_INDEX ); + FIELD_INDEXES.put( Permissoes.USER_ID_FULL, Permissoes.USER_ID_INDEX ); + FIELD_INDEXES.put( Permissoes.CODIGO_PERMISSAO, Permissoes.CODIGO_PERMISSAO_INDEX ); + FIELD_INDEXES.put( Permissoes.CODIGO_PERMISSAO_FULL, Permissoes.CODIGO_PERMISSAO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "permissoes"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.permissoes"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "permissoes.id"; + public static final int ID_INDEX = 0; + public static final String USER_ID = "user_id"; + public static final String USER_ID_FULL = "permissoes.user_id"; + public static final int USER_ID_INDEX = 1; + public static final String CODIGO_PERMISSAO = "codigo_permissao"; + public static final String CODIGO_PERMISSAO_FULL = "permissoes.codigo_permissao"; + public static final int CODIGO_PERMISSAO_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + USER_ID, CODIGO_PERMISSAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + USER_ID, TABLENAME + "." + CODIGO_PERMISSAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, USER_ID, CODIGO_PERMISSAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, USER_ID, CODIGO_PERMISSAO, }; + + private Integer id; + private Integer user_id; + private Integer codigo_permissao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Permissoes() + { + super(); + dirtyProperties = new boolean[]{ false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 getUser_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( USER_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.user_id; + } + + public void setUser_id( Integer user_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( USER_ID, user_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.user_id = user_id; + LAZY_LOADED_OBJECTS.put( USER_ID, Boolean.TRUE ); + } + + public Integer getCodigo_permissao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CODIGO_PERMISSAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.codigo_permissao; + } + + public void setCodigo_permissao( Integer codigo_permissao ) + { + try + { + setLockedForRefresh( true ); + preProcess( CODIGO_PERMISSAO, codigo_permissao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.codigo_permissao = codigo_permissao; + LAZY_LOADED_OBJECTS.put( CODIGO_PERMISSAO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Permissoes.ID_INDEX: + value = getId(); + break; + case Permissoes.USER_ID_INDEX: + value = getUser_id(); + break; + case Permissoes.CODIGO_PERMISSAO_INDEX: + value = getCodigo_permissao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Permissoes.ID_INDEX: + value = this.id; + break; + case Permissoes.USER_ID_INDEX: + value = this.user_id; + break; + case Permissoes.CODIGO_PERMISSAO_INDEX: + value = this.codigo_permissao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Permissoes.ID_INDEX: + setId( ( Integer ) value ); + break; + case Permissoes.USER_ID_INDEX: + setUser_id( ( Integer ) value ); + break; + case Permissoes.CODIGO_PERMISSAO_INDEX: + setCodigo_permissao( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Permissoes.ID_INDEX: + this.id = ( Integer ) value; + break; + case Permissoes.USER_ID_INDEX: + this.user_id = ( Integer ) value; + break; + case Permissoes.CODIGO_PERMISSAO_INDEX: + this.codigo_permissao = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Permissoes.ID_INDEX: + theClass = Integer.class; + break; + case Permissoes.USER_ID_INDEX: + theClass = Integer.class; + break; + case Permissoes.CODIGO_PERMISSAO_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Permissoes._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Permissoes.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/PlanoAreas.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/PlanoAreas.java new file mode 100644 index 00000000..320a54a3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/PlanoAreas.java @@ -0,0 +1,448 @@ +/* +* PlanoAreas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class PlanoAreas extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PlanoAreas.DESCRICAO, PlanoAreas.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PlanoAreas.DESCRICAO_FULL, PlanoAreas.DESCRICAO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PlanoAreas.CLASS_IDENTIFIER, PlanoAreas.PLANO_ID, PlanoAreas.TO_PLANO_ID ); + FIELD_INDEXES.put( PlanoAreas.PLANO_ID, PlanoAreas.PLANO_ID_INDEX ); + FIELD_INDEXES.put( PlanoAreas.PLANO_ID_FULL, PlanoAreas.PLANO_ID_INDEX ); + FIELD_INDEXES.put( PlanoAreas.TO_PLANO_ID, PlanoAreas.TO_PLANO_ID_INDEX ); + FIELD_INDEXES.put( PlanoAreas.ID, PlanoAreas.ID_INDEX ); + FIELD_INDEXES.put( PlanoAreas.ID_FULL, PlanoAreas.ID_INDEX ); + FIELD_INDEXES.put( PlanoAreas.AREA_ID, PlanoAreas.AREA_ID_INDEX ); + FIELD_INDEXES.put( PlanoAreas.AREA_ID_FULL, PlanoAreas.AREA_ID_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyplano_idToplanos_actuacao = + new com.evolute.entity.ForeignKey( PlanoAreas.class, PlanoAreas.PLANO_ID, db.data.siprp.outer.PlanosActuacaoData.class, db.data.siprp.outer.PlanosActuacaoData.ID ); + + public static final String TABLENAME = "plano_areas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.plano_areas"; + + public static final int _INVALID__INDEX = -1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "plano_areas.descricao"; + public static final int DESCRICAO_INDEX = 0; + public static final String PLANO_ID = "plano_id"; + public static final String PLANO_ID_FULL = "plano_areas.plano_id"; + public static final int PLANO_ID_INDEX = 1; + public static final String TO_PLANO_ID = "to_plano_id"; + public static final String TO_PLANO_ID_FULL = "plano_areas.to_plano_id"; + public static final int TO_PLANO_ID_INDEX = 2; + public static final String ID = "id"; + public static final String ID_FULL = "plano_areas.id"; + public static final int ID_INDEX = 3; + public static final String AREA_ID = "area_id"; + public static final String AREA_ID_FULL = "plano_areas.area_id"; + public static final int AREA_ID_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, PLANO_ID, TO_PLANO_ID, AREA_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + PLANO_ID, TABLENAME + "." + TO_PLANO_ID, TABLENAME + "." + AREA_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + DESCRICAO, PLANO_ID, ID, AREA_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + DESCRICAO, PLANO_ID, ID, AREA_ID, }; + + private String descricao; + private Integer plano_id; + private db.data.siprp.outer.PlanosActuacaoData to_plano_id; + private Integer id; + private Integer area_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PlanoAreas() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false }; + } + + public String getDescricao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao; + } + + public void setDescricao( String descricao ) + { + try + { + 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 getPlano_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PLANO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.plano_id; + } + + public void setPlano_id( Integer plano_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PLANO_ID, plano_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.plano_id = plano_id; + LAZY_LOADED_OBJECTS.put( PLANO_ID, Boolean.TRUE ); + } + + public db.data.siprp.outer.PlanosActuacaoData toPlano_id() + { + try + { + prepare( TO_PLANO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_plano_id; + } + + public void setToPlano_id( db.data.siprp.outer.PlanosActuacaoData to_plano_id ) + { + try + { + preProcess( TO_PLANO_ID, to_plano_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_plano_id = to_plano_id; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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.ListfromPlanoRiscos_area_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.PlanoRiscosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.PlanoRiscosData.class , getPrimaryKey().getMap().get("id"), "area_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public Integer getArea_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( AREA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.area_id; + } + + public void setArea_id( Integer area_id ) + { + try + { + 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoAreas.DESCRICAO_INDEX: + value = getDescricao(); + break; + case PlanoAreas.PLANO_ID_INDEX: + value = getPlano_id(); + break; + case PlanoAreas.TO_PLANO_ID_INDEX: + value = toPlano_id(); + break; + case PlanoAreas.ID_INDEX: + value = getId(); + break; + case PlanoAreas.AREA_ID_INDEX: + value = getArea_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoAreas.DESCRICAO_INDEX: + value = this.descricao; + break; + case PlanoAreas.PLANO_ID_INDEX: + value = this.plano_id; + break; + case PlanoAreas.TO_PLANO_ID_INDEX: + value = this.to_plano_id; + break; + case PlanoAreas.ID_INDEX: + value = this.id; + break; + case PlanoAreas.AREA_ID_INDEX: + value = this.area_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoAreas.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case PlanoAreas.PLANO_ID_INDEX: + setPlano_id( ( Integer ) value ); + break; + case PlanoAreas.TO_PLANO_ID_INDEX: + setToPlano_id( ( db.data.siprp.outer.PlanosActuacaoData ) value ); + break; + case PlanoAreas.ID_INDEX: + setId( ( Integer ) value ); + break; + case PlanoAreas.AREA_ID_INDEX: + setArea_id( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoAreas.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case PlanoAreas.PLANO_ID_INDEX: + this.plano_id = ( Integer ) value; + break; + case PlanoAreas.TO_PLANO_ID_INDEX: + this.to_plano_id = ( db.data.siprp.outer.PlanosActuacaoData ) value; + break; + case PlanoAreas.ID_INDEX: + this.id = ( Integer ) value; + break; + case PlanoAreas.AREA_ID_INDEX: + this.area_id = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case PlanoAreas.DESCRICAO_INDEX: + theClass = String.class; + break; + case PlanoAreas.PLANO_ID_INDEX: + theClass = Integer.class; + break; + case PlanoAreas.TO_PLANO_ID_INDEX: + theClass = db.data.siprp.outer.PlanosActuacaoData.class; + break; + case PlanoAreas.ID_INDEX: + theClass = Integer.class; + break; + case PlanoAreas.AREA_ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PlanoAreas._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, PlanoAreas.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/PlanoMedidas.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/PlanoMedidas.java new file mode 100644 index 00000000..e4a23e0c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/PlanoMedidas.java @@ -0,0 +1,550 @@ +/* +* PlanoMedidas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class PlanoMedidas extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PlanoMedidas.DESCRICAO, PlanoMedidas.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.DESCRICAO_FULL, PlanoMedidas.DESCRICAO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PlanoMedidas.CLASS_IDENTIFIER, PlanoMedidas.RISCO_ID, PlanoMedidas.TO_RISCO_ID ); + FIELD_INDEXES.put( PlanoMedidas.RISCO_ID, PlanoMedidas.RISCO_ID_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.RISCO_ID_FULL, PlanoMedidas.RISCO_ID_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.TO_RISCO_ID, PlanoMedidas.TO_RISCO_ID_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.ID, PlanoMedidas.ID_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.ID_FULL, PlanoMedidas.ID_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.MEDIDA_ID, PlanoMedidas.MEDIDA_ID_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.MEDIDA_ID_FULL, PlanoMedidas.MEDIDA_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PlanoMedidas.CLASS_IDENTIFIER, PlanoMedidas.ESTADO_MEDIDAS_ID, PlanoMedidas.TO_ESTADO_MEDIDAS_ID ); + FIELD_INDEXES.put( PlanoMedidas.ESTADO_MEDIDAS_ID, PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.ESTADO_MEDIDAS_ID_FULL, PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX ); + FIELD_INDEXES.put( PlanoMedidas.TO_ESTADO_MEDIDAS_ID, PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyrisco_idToplano_riscos = + new com.evolute.entity.ForeignKey( PlanoMedidas.class, PlanoMedidas.RISCO_ID, db.data.siprp.outer.PlanoRiscosData.class, db.data.siprp.outer.PlanoRiscosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestado_medidas_idToestado_medidas = + new com.evolute.entity.ForeignKey( PlanoMedidas.class, PlanoMedidas.ESTADO_MEDIDAS_ID, db.data.siprp.outer.EstadoMedidasData.class, db.data.siprp.outer.EstadoMedidasData.ID ); + + public static final String TABLENAME = "plano_medidas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.plano_medidas"; + + public static final int _INVALID__INDEX = -1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "plano_medidas.descricao"; + public static final int DESCRICAO_INDEX = 0; + public static final String RISCO_ID = "risco_id"; + public static final String RISCO_ID_FULL = "plano_medidas.risco_id"; + public static final int RISCO_ID_INDEX = 1; + public static final String TO_RISCO_ID = "to_risco_id"; + public static final String TO_RISCO_ID_FULL = "plano_medidas.to_risco_id"; + public static final int TO_RISCO_ID_INDEX = 2; + public static final String ID = "id"; + public static final String ID_FULL = "plano_medidas.id"; + public static final int ID_INDEX = 3; + public static final String MEDIDA_ID = "medida_id"; + public static final String MEDIDA_ID_FULL = "plano_medidas.medida_id"; + public static final int MEDIDA_ID_INDEX = 4; + public static final String ESTADO_MEDIDAS_ID = "estado_medidas_id"; + public static final String ESTADO_MEDIDAS_ID_FULL = "plano_medidas.estado_medidas_id"; + public static final int ESTADO_MEDIDAS_ID_INDEX = 5; + public static final String TO_ESTADO_MEDIDAS_ID = "to_estado_medidas_id"; + public static final String TO_ESTADO_MEDIDAS_ID_FULL = "plano_medidas.to_estado_medidas_id"; + public static final int TO_ESTADO_MEDIDAS_ID_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, RISCO_ID, TO_RISCO_ID, MEDIDA_ID, ESTADO_MEDIDAS_ID, + TO_ESTADO_MEDIDAS_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + RISCO_ID, TABLENAME + "." + TO_RISCO_ID, TABLENAME + "." + MEDIDA_ID, TABLENAME + "." + ESTADO_MEDIDAS_ID, + TABLENAME + "." + TO_ESTADO_MEDIDAS_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + DESCRICAO, RISCO_ID, ID, MEDIDA_ID, ESTADO_MEDIDAS_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + DESCRICAO, RISCO_ID, ID, MEDIDA_ID, ESTADO_MEDIDAS_ID, }; + + private String descricao; + private Integer risco_id; + private db.data.siprp.outer.PlanoRiscosData to_risco_id; + private Integer id; + private Integer medida_id; + private Integer estado_medidas_id; + private db.data.siprp.outer.EstadoMedidasData to_estado_medidas_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PlanoMedidas() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false }; + } + + public String getDescricao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao; + } + + public void setDescricao( String descricao ) + { + try + { + 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 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 db.data.siprp.outer.PlanoRiscosData toRisco_id() + { + try + { + prepare( TO_RISCO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_risco_id; + } + + public void setToRisco_id( db.data.siprp.outer.PlanoRiscosData to_risco_id ) + { + try + { + preProcess( TO_RISCO_ID, to_risco_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_risco_id = to_risco_id; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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.ListfromPlanoPostosTrabalho_medida_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.PlanoPostosTrabalhoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.PlanoPostosTrabalhoData.class , getPrimaryKey().getMap().get("id"), "medida_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public Integer getMedida_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MEDIDA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.medida_id; + } + + public void setMedida_id( Integer medida_id ) + { + try + { + 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 Integer getEstado_medidas_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTADO_MEDIDAS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estado_medidas_id; + } + + public void setEstado_medidas_id( Integer estado_medidas_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTADO_MEDIDAS_ID, estado_medidas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estado_medidas_id = estado_medidas_id; + LAZY_LOADED_OBJECTS.put( ESTADO_MEDIDAS_ID, Boolean.TRUE ); + } + + public db.data.siprp.outer.EstadoMedidasData toEstado_medidas_id() + { + try + { + prepare( TO_ESTADO_MEDIDAS_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estado_medidas_id; + } + + public void setToEstado_medidas_id( db.data.siprp.outer.EstadoMedidasData to_estado_medidas_id ) + { + try + { + preProcess( TO_ESTADO_MEDIDAS_ID, to_estado_medidas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_estado_medidas_id = to_estado_medidas_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoMedidas.DESCRICAO_INDEX: + value = getDescricao(); + break; + case PlanoMedidas.RISCO_ID_INDEX: + value = getRisco_id(); + break; + case PlanoMedidas.TO_RISCO_ID_INDEX: + value = toRisco_id(); + break; + case PlanoMedidas.ID_INDEX: + value = getId(); + break; + case PlanoMedidas.MEDIDA_ID_INDEX: + value = getMedida_id(); + break; + case PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX: + value = getEstado_medidas_id(); + break; + case PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX: + value = toEstado_medidas_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoMedidas.DESCRICAO_INDEX: + value = this.descricao; + break; + case PlanoMedidas.RISCO_ID_INDEX: + value = this.risco_id; + break; + case PlanoMedidas.TO_RISCO_ID_INDEX: + value = this.to_risco_id; + break; + case PlanoMedidas.ID_INDEX: + value = this.id; + break; + case PlanoMedidas.MEDIDA_ID_INDEX: + value = this.medida_id; + break; + case PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX: + value = this.estado_medidas_id; + break; + case PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX: + value = this.to_estado_medidas_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoMedidas.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case PlanoMedidas.RISCO_ID_INDEX: + setRisco_id( ( Integer ) value ); + break; + case PlanoMedidas.TO_RISCO_ID_INDEX: + setToRisco_id( ( db.data.siprp.outer.PlanoRiscosData ) value ); + break; + case PlanoMedidas.ID_INDEX: + setId( ( Integer ) value ); + break; + case PlanoMedidas.MEDIDA_ID_INDEX: + setMedida_id( ( Integer ) value ); + break; + case PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX: + setEstado_medidas_id( ( Integer ) value ); + break; + case PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX: + setToEstado_medidas_id( ( db.data.siprp.outer.EstadoMedidasData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoMedidas.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case PlanoMedidas.RISCO_ID_INDEX: + this.risco_id = ( Integer ) value; + break; + case PlanoMedidas.TO_RISCO_ID_INDEX: + this.to_risco_id = ( db.data.siprp.outer.PlanoRiscosData ) value; + break; + case PlanoMedidas.ID_INDEX: + this.id = ( Integer ) value; + break; + case PlanoMedidas.MEDIDA_ID_INDEX: + this.medida_id = ( Integer ) value; + break; + case PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX: + this.estado_medidas_id = ( Integer ) value; + break; + case PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX: + this.to_estado_medidas_id = ( db.data.siprp.outer.EstadoMedidasData ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case PlanoMedidas.DESCRICAO_INDEX: + theClass = String.class; + break; + case PlanoMedidas.RISCO_ID_INDEX: + theClass = Integer.class; + break; + case PlanoMedidas.TO_RISCO_ID_INDEX: + theClass = db.data.siprp.outer.PlanoRiscosData.class; + break; + case PlanoMedidas.ID_INDEX: + theClass = Integer.class; + break; + case PlanoMedidas.MEDIDA_ID_INDEX: + theClass = Integer.class; + break; + case PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX: + theClass = Integer.class; + break; + case PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX: + theClass = db.data.siprp.outer.EstadoMedidasData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PlanoMedidas._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, PlanoMedidas.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/PlanoPostosTrabalho.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/PlanoPostosTrabalho.java new file mode 100644 index 00000000..5de651e4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/PlanoPostosTrabalho.java @@ -0,0 +1,431 @@ +/* +* PlanoPostosTrabalho.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class PlanoPostosTrabalho extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PlanoPostosTrabalho.DESCRICAO, PlanoPostosTrabalho.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PlanoPostosTrabalho.DESCRICAO_FULL, PlanoPostosTrabalho.DESCRICAO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PlanoPostosTrabalho.CLASS_IDENTIFIER, PlanoPostosTrabalho.MEDIDA_ID, PlanoPostosTrabalho.TO_MEDIDA_ID ); + FIELD_INDEXES.put( PlanoPostosTrabalho.MEDIDA_ID, PlanoPostosTrabalho.MEDIDA_ID_INDEX ); + FIELD_INDEXES.put( PlanoPostosTrabalho.MEDIDA_ID_FULL, PlanoPostosTrabalho.MEDIDA_ID_INDEX ); + FIELD_INDEXES.put( PlanoPostosTrabalho.TO_MEDIDA_ID, PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX ); + FIELD_INDEXES.put( PlanoPostosTrabalho.ID, PlanoPostosTrabalho.ID_INDEX ); + FIELD_INDEXES.put( PlanoPostosTrabalho.ID_FULL, PlanoPostosTrabalho.ID_INDEX ); + FIELD_INDEXES.put( PlanoPostosTrabalho.POSTO_ID, PlanoPostosTrabalho.POSTO_ID_INDEX ); + FIELD_INDEXES.put( PlanoPostosTrabalho.POSTO_ID_FULL, PlanoPostosTrabalho.POSTO_ID_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeymedida_idToplano_medidas = + new com.evolute.entity.ForeignKey( PlanoPostosTrabalho.class, PlanoPostosTrabalho.MEDIDA_ID, db.data.siprp.outer.PlanoMedidasData.class, db.data.siprp.outer.PlanoMedidasData.ID ); + + public static final String TABLENAME = "plano_postos_trabalho"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.plano_postos_trabalho"; + + public static final int _INVALID__INDEX = -1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "plano_postos_trabalho.descricao"; + public static final int DESCRICAO_INDEX = 0; + public static final String MEDIDA_ID = "medida_id"; + public static final String MEDIDA_ID_FULL = "plano_postos_trabalho.medida_id"; + public static final int MEDIDA_ID_INDEX = 1; + public static final String TO_MEDIDA_ID = "to_medida_id"; + public static final String TO_MEDIDA_ID_FULL = "plano_postos_trabalho.to_medida_id"; + public static final int TO_MEDIDA_ID_INDEX = 2; + public static final String ID = "id"; + public static final String ID_FULL = "plano_postos_trabalho.id"; + public static final int ID_INDEX = 3; + public static final String POSTO_ID = "posto_id"; + public static final String POSTO_ID_FULL = "plano_postos_trabalho.posto_id"; + public static final int POSTO_ID_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, MEDIDA_ID, TO_MEDIDA_ID, POSTO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + MEDIDA_ID, TABLENAME + "." + TO_MEDIDA_ID, TABLENAME + "." + POSTO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + DESCRICAO, MEDIDA_ID, ID, POSTO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + DESCRICAO, MEDIDA_ID, ID, POSTO_ID, }; + + private String descricao; + private Integer medida_id; + private db.data.siprp.outer.PlanoMedidasData to_medida_id; + private Integer id; + private Integer posto_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PlanoPostosTrabalho() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false }; + } + + public String getDescricao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao; + } + + public void setDescricao( String descricao ) + { + try + { + 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 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 db.data.siprp.outer.PlanoMedidasData toMedida_id() + { + try + { + prepare( TO_MEDIDA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_medida_id; + } + + public void setToMedida_id( db.data.siprp.outer.PlanoMedidasData to_medida_id ) + { + try + { + preProcess( TO_MEDIDA_ID, to_medida_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_medida_id = to_medida_id; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoPostosTrabalho.DESCRICAO_INDEX: + value = getDescricao(); + break; + case PlanoPostosTrabalho.MEDIDA_ID_INDEX: + value = getMedida_id(); + break; + case PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX: + value = toMedida_id(); + break; + case PlanoPostosTrabalho.ID_INDEX: + value = getId(); + break; + case PlanoPostosTrabalho.POSTO_ID_INDEX: + value = getPosto_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoPostosTrabalho.DESCRICAO_INDEX: + value = this.descricao; + break; + case PlanoPostosTrabalho.MEDIDA_ID_INDEX: + value = this.medida_id; + break; + case PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX: + value = this.to_medida_id; + break; + case PlanoPostosTrabalho.ID_INDEX: + value = this.id; + break; + case PlanoPostosTrabalho.POSTO_ID_INDEX: + value = this.posto_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoPostosTrabalho.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case PlanoPostosTrabalho.MEDIDA_ID_INDEX: + setMedida_id( ( Integer ) value ); + break; + case PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX: + setToMedida_id( ( db.data.siprp.outer.PlanoMedidasData ) value ); + break; + case PlanoPostosTrabalho.ID_INDEX: + setId( ( Integer ) value ); + break; + case PlanoPostosTrabalho.POSTO_ID_INDEX: + setPosto_id( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoPostosTrabalho.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case PlanoPostosTrabalho.MEDIDA_ID_INDEX: + this.medida_id = ( Integer ) value; + break; + case PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX: + this.to_medida_id = ( db.data.siprp.outer.PlanoMedidasData ) value; + break; + case PlanoPostosTrabalho.ID_INDEX: + this.id = ( Integer ) value; + break; + case PlanoPostosTrabalho.POSTO_ID_INDEX: + this.posto_id = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case PlanoPostosTrabalho.DESCRICAO_INDEX: + theClass = String.class; + break; + case PlanoPostosTrabalho.MEDIDA_ID_INDEX: + theClass = Integer.class; + break; + case PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX: + theClass = db.data.siprp.outer.PlanoMedidasData.class; + break; + case PlanoPostosTrabalho.ID_INDEX: + theClass = Integer.class; + break; + case PlanoPostosTrabalho.POSTO_ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PlanoPostosTrabalho._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, PlanoPostosTrabalho.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/PlanoRiscos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/PlanoRiscos.java new file mode 100644 index 00000000..8cc3b5c5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/PlanoRiscos.java @@ -0,0 +1,1007 @@ +/* +* PlanoRiscos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class PlanoRiscos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PlanoRiscos.DESCRICAO, PlanoRiscos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.DESCRICAO_FULL, PlanoRiscos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.ACTIVO, PlanoRiscos.ACTIVO_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.ACTIVO_FULL, PlanoRiscos.ACTIVO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PlanoRiscos.CLASS_IDENTIFIER, PlanoRiscos.AREA_ID, PlanoRiscos.TO_AREA_ID ); + FIELD_INDEXES.put( PlanoRiscos.AREA_ID, PlanoRiscos.AREA_ID_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.AREA_ID_FULL, PlanoRiscos.AREA_ID_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.TO_AREA_ID, PlanoRiscos.TO_AREA_ID_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.ID, PlanoRiscos.ID_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.ID_FULL, PlanoRiscos.ID_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.VALOR, PlanoRiscos.VALOR_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.VALOR_FULL, PlanoRiscos.VALOR_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.RESPONSAVEL_EXECUCAO, PlanoRiscos.RESPONSAVEL_EXECUCAO_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.RESPONSAVEL_EXECUCAO_FULL, PlanoRiscos.RESPONSAVEL_EXECUCAO_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.RECURSOS_NECESSARIOS, PlanoRiscos.RECURSOS_NECESSARIOS_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.RECURSOS_NECESSARIOS_FULL, PlanoRiscos.RECURSOS_NECESSARIOS_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.DATA_INICIO, PlanoRiscos.DATA_INICIO_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.DATA_INICIO_FULL, PlanoRiscos.DATA_INICIO_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.DATA_FIM, PlanoRiscos.DATA_FIM_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.DATA_FIM_FULL, PlanoRiscos.DATA_FIM_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.PARECER_DL, PlanoRiscos.PARECER_DL_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.PARECER_DL_FULL, PlanoRiscos.PARECER_DL_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.PARECER_DNS, PlanoRiscos.PARECER_DNS_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.PARECER_DNS_FULL, PlanoRiscos.PARECER_DNS_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.VERIFICACAO_SIPRP, PlanoRiscos.VERIFICACAO_SIPRP_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.VERIFICACAO_SIPRP_FULL, PlanoRiscos.VERIFICACAO_SIPRP_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.RISCO_ID, PlanoRiscos.RISCO_ID_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.RISCO_ID_FULL, PlanoRiscos.RISCO_ID_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.POR, PlanoRiscos.POR_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.POR_FULL, PlanoRiscos.POR_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.IS_PATRIMONIAL, PlanoRiscos.IS_PATRIMONIAL_INDEX ); + FIELD_INDEXES.put( PlanoRiscos.IS_PATRIMONIAL_FULL, PlanoRiscos.IS_PATRIMONIAL_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_idToplano_areas = + new com.evolute.entity.ForeignKey( PlanoRiscos.class, PlanoRiscos.AREA_ID, db.data.siprp.outer.PlanoAreasData.class, db.data.siprp.outer.PlanoAreasData.ID ); + + public static final String TABLENAME = "plano_riscos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.plano_riscos"; + + public static final int _INVALID__INDEX = -1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "plano_riscos.descricao"; + public static final int DESCRICAO_INDEX = 0; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "plano_riscos.activo"; + public static final int ACTIVO_INDEX = 1; + public static final String AREA_ID = "area_id"; + public static final String AREA_ID_FULL = "plano_riscos.area_id"; + public static final int AREA_ID_INDEX = 2; + public static final String TO_AREA_ID = "to_area_id"; + public static final String TO_AREA_ID_FULL = "plano_riscos.to_area_id"; + public static final int TO_AREA_ID_INDEX = 3; + public static final String ID = "id"; + public static final String ID_FULL = "plano_riscos.id"; + public static final int ID_INDEX = 4; + public static final String VALOR = "valor"; + public static final String VALOR_FULL = "plano_riscos.valor"; + public static final int VALOR_INDEX = 5; + public static final String RESPONSAVEL_EXECUCAO = "responsavel_execucao"; + public static final String RESPONSAVEL_EXECUCAO_FULL = "plano_riscos.responsavel_execucao"; + public static final int RESPONSAVEL_EXECUCAO_INDEX = 6; + public static final String RECURSOS_NECESSARIOS = "recursos_necessarios"; + public static final String RECURSOS_NECESSARIOS_FULL = "plano_riscos.recursos_necessarios"; + public static final int RECURSOS_NECESSARIOS_INDEX = 7; + public static final String DATA_INICIO = "data_inicio"; + public static final String DATA_INICIO_FULL = "plano_riscos.data_inicio"; + public static final int DATA_INICIO_INDEX = 8; + public static final String DATA_FIM = "data_fim"; + public static final String DATA_FIM_FULL = "plano_riscos.data_fim"; + public static final int DATA_FIM_INDEX = 9; + public static final String PARECER_DL = "parecer_dl"; + public static final String PARECER_DL_FULL = "plano_riscos.parecer_dl"; + public static final int PARECER_DL_INDEX = 10; + public static final String PARECER_DNS = "parecer_dns"; + public static final String PARECER_DNS_FULL = "plano_riscos.parecer_dns"; + public static final int PARECER_DNS_INDEX = 11; + public static final String VERIFICACAO_SIPRP = "verificacao_siprp"; + public static final String VERIFICACAO_SIPRP_FULL = "plano_riscos.verificacao_siprp"; + public static final int VERIFICACAO_SIPRP_INDEX = 12; + public static final String RISCO_ID = "risco_id"; + public static final String RISCO_ID_FULL = "plano_riscos.risco_id"; + public static final int RISCO_ID_INDEX = 13; + public static final String POR = "por"; + public static final String POR_FULL = "plano_riscos.por"; + public static final int POR_INDEX = 14; + public static final String IS_PATRIMONIAL = "is_patrimonial"; + public static final String IS_PATRIMONIAL_FULL = "plano_riscos.is_patrimonial"; + public static final int IS_PATRIMONIAL_INDEX = 15; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, ACTIVO, AREA_ID, TO_AREA_ID, VALOR, RESPONSAVEL_EXECUCAO, + RECURSOS_NECESSARIOS, DATA_INICIO, DATA_FIM, PARECER_DL, PARECER_DNS, + VERIFICACAO_SIPRP, RISCO_ID, POR, IS_PATRIMONIAL, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + ACTIVO, TABLENAME + "." + AREA_ID, TABLENAME + "." + TO_AREA_ID, TABLENAME + "." + VALOR, TABLENAME + "." + RESPONSAVEL_EXECUCAO, + TABLENAME + "." + RECURSOS_NECESSARIOS, TABLENAME + "." + DATA_INICIO, TABLENAME + "." + DATA_FIM, TABLENAME + "." + PARECER_DL, TABLENAME + "." + PARECER_DNS, + TABLENAME + "." + VERIFICACAO_SIPRP, TABLENAME + "." + RISCO_ID, TABLENAME + "." + POR, TABLENAME + "." + IS_PATRIMONIAL, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + DESCRICAO, ACTIVO, AREA_ID, ID, VALOR, RESPONSAVEL_EXECUCAO, RECURSOS_NECESSARIOS, + DATA_INICIO, DATA_FIM, PARECER_DL, PARECER_DNS, VERIFICACAO_SIPRP, RISCO_ID, POR, + IS_PATRIMONIAL, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + DESCRICAO, ACTIVO, AREA_ID, ID, VALOR, RESPONSAVEL_EXECUCAO, RECURSOS_NECESSARIOS, + DATA_INICIO, DATA_FIM, PARECER_DL, PARECER_DNS, VERIFICACAO_SIPRP, RISCO_ID, POR, + IS_PATRIMONIAL, }; + + private String descricao; + private String activo; + private Integer area_id; + private db.data.siprp.outer.PlanoAreasData to_area_id; + private Integer id; + private Integer valor; + private String responsavel_execucao; + private String recursos_necessarios; + private java.util.Date data_inicio; + private java.util.Date data_fim; + private String parecer_dl; + private String parecer_dns; + private String verificacao_siprp; + private Integer risco_id; + private String por; + private Boolean is_patrimonial; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PlanoRiscos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false, false, false, false, false, false, false, + false, false, false, false, false }; + } + + public String getDescricao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao; + } + + public void setDescricao( String descricao ) + { + try + { + 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 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 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 db.data.siprp.outer.PlanoAreasData 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( db.data.siprp.outer.PlanoAreasData 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 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.ListfromPlanoMedidas_risco_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.PlanoMedidasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.PlanoMedidasData.class , getPrimaryKey().getMap().get("id"), "risco_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public Integer getValor() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.valor; + } + + public void setValor( Integer valor ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALOR, valor ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.valor = valor; + LAZY_LOADED_OBJECTS.put( VALOR, Boolean.TRUE ); + } + + public String getResponsavel_execucao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESPONSAVEL_EXECUCAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.responsavel_execucao; + } + + public void setResponsavel_execucao( String responsavel_execucao ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESPONSAVEL_EXECUCAO, responsavel_execucao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.responsavel_execucao = responsavel_execucao; + LAZY_LOADED_OBJECTS.put( RESPONSAVEL_EXECUCAO, Boolean.TRUE ); + } + + public String getRecursos_necessarios() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RECURSOS_NECESSARIOS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.recursos_necessarios; + } + + public void setRecursos_necessarios( String recursos_necessarios ) + { + try + { + setLockedForRefresh( true ); + preProcess( RECURSOS_NECESSARIOS, recursos_necessarios ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.recursos_necessarios = recursos_necessarios; + LAZY_LOADED_OBJECTS.put( RECURSOS_NECESSARIOS, 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 String getParecer_dl() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PARECER_DL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.parecer_dl; + } + + public void setParecer_dl( String parecer_dl ) + { + try + { + setLockedForRefresh( true ); + preProcess( PARECER_DL, parecer_dl ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.parecer_dl = parecer_dl; + LAZY_LOADED_OBJECTS.put( PARECER_DL, Boolean.TRUE ); + } + + public String getParecer_dns() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PARECER_DNS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.parecer_dns; + } + + public void setParecer_dns( String parecer_dns ) + { + try + { + setLockedForRefresh( true ); + preProcess( PARECER_DNS, parecer_dns ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.parecer_dns = parecer_dns; + LAZY_LOADED_OBJECTS.put( PARECER_DNS, Boolean.TRUE ); + } + + public String getVerificacao_siprp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VERIFICACAO_SIPRP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.verificacao_siprp; + } + + public void setVerificacao_siprp( String verificacao_siprp ) + { + try + { + setLockedForRefresh( true ); + preProcess( VERIFICACAO_SIPRP, verificacao_siprp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.verificacao_siprp = verificacao_siprp; + LAZY_LOADED_OBJECTS.put( VERIFICACAO_SIPRP, Boolean.TRUE ); + } + + public Integer getRisco_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RISCO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.risco_id; + } + + public void setRisco_id( Integer risco_id ) + { + try + { + 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 String getPor() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( POR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.por; + } + + public void setPor( String por ) + { + try + { + setLockedForRefresh( true ); + preProcess( POR, por ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.por = por; + LAZY_LOADED_OBJECTS.put( POR, Boolean.TRUE ); + } + + public Boolean getIs_patrimonial() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IS_PATRIMONIAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.is_patrimonial; + } + + public void setIs_patrimonial( Boolean is_patrimonial ) + { + try + { + setLockedForRefresh( true ); + preProcess( IS_PATRIMONIAL, is_patrimonial ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.is_patrimonial = is_patrimonial; + LAZY_LOADED_OBJECTS.put( IS_PATRIMONIAL, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoRiscos.DESCRICAO_INDEX: + value = getDescricao(); + break; + case PlanoRiscos.ACTIVO_INDEX: + value = getActivo(); + break; + case PlanoRiscos.AREA_ID_INDEX: + value = getArea_id(); + break; + case PlanoRiscos.TO_AREA_ID_INDEX: + value = toArea_id(); + break; + case PlanoRiscos.ID_INDEX: + value = getId(); + break; + case PlanoRiscos.VALOR_INDEX: + value = getValor(); + break; + case PlanoRiscos.RESPONSAVEL_EXECUCAO_INDEX: + value = getResponsavel_execucao(); + break; + case PlanoRiscos.RECURSOS_NECESSARIOS_INDEX: + value = getRecursos_necessarios(); + break; + case PlanoRiscos.DATA_INICIO_INDEX: + value = getData_inicio(); + break; + case PlanoRiscos.DATA_FIM_INDEX: + value = getData_fim(); + break; + case PlanoRiscos.PARECER_DL_INDEX: + value = getParecer_dl(); + break; + case PlanoRiscos.PARECER_DNS_INDEX: + value = getParecer_dns(); + break; + case PlanoRiscos.VERIFICACAO_SIPRP_INDEX: + value = getVerificacao_siprp(); + break; + case PlanoRiscos.RISCO_ID_INDEX: + value = getRisco_id(); + break; + case PlanoRiscos.POR_INDEX: + value = getPor(); + break; + case PlanoRiscos.IS_PATRIMONIAL_INDEX: + value = getIs_patrimonial(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoRiscos.DESCRICAO_INDEX: + value = this.descricao; + break; + case PlanoRiscos.ACTIVO_INDEX: + value = this.activo; + break; + case PlanoRiscos.AREA_ID_INDEX: + value = this.area_id; + break; + case PlanoRiscos.TO_AREA_ID_INDEX: + value = this.to_area_id; + break; + case PlanoRiscos.ID_INDEX: + value = this.id; + break; + case PlanoRiscos.VALOR_INDEX: + value = this.valor; + break; + case PlanoRiscos.RESPONSAVEL_EXECUCAO_INDEX: + value = this.responsavel_execucao; + break; + case PlanoRiscos.RECURSOS_NECESSARIOS_INDEX: + value = this.recursos_necessarios; + break; + case PlanoRiscos.DATA_INICIO_INDEX: + value = this.data_inicio; + break; + case PlanoRiscos.DATA_FIM_INDEX: + value = this.data_fim; + break; + case PlanoRiscos.PARECER_DL_INDEX: + value = this.parecer_dl; + break; + case PlanoRiscos.PARECER_DNS_INDEX: + value = this.parecer_dns; + break; + case PlanoRiscos.VERIFICACAO_SIPRP_INDEX: + value = this.verificacao_siprp; + break; + case PlanoRiscos.RISCO_ID_INDEX: + value = this.risco_id; + break; + case PlanoRiscos.POR_INDEX: + value = this.por; + break; + case PlanoRiscos.IS_PATRIMONIAL_INDEX: + value = this.is_patrimonial; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoRiscos.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case PlanoRiscos.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + case PlanoRiscos.AREA_ID_INDEX: + setArea_id( ( Integer ) value ); + break; + case PlanoRiscos.TO_AREA_ID_INDEX: + setToArea_id( ( db.data.siprp.outer.PlanoAreasData ) value ); + break; + case PlanoRiscos.ID_INDEX: + setId( ( Integer ) value ); + break; + case PlanoRiscos.VALOR_INDEX: + setValor( ( Integer ) value ); + break; + case PlanoRiscos.RESPONSAVEL_EXECUCAO_INDEX: + setResponsavel_execucao( ( String ) value ); + break; + case PlanoRiscos.RECURSOS_NECESSARIOS_INDEX: + setRecursos_necessarios( ( String ) value ); + break; + case PlanoRiscos.DATA_INICIO_INDEX: + setData_inicio( ( java.util.Date ) value ); + break; + case PlanoRiscos.DATA_FIM_INDEX: + setData_fim( ( java.util.Date ) value ); + break; + case PlanoRiscos.PARECER_DL_INDEX: + setParecer_dl( ( String ) value ); + break; + case PlanoRiscos.PARECER_DNS_INDEX: + setParecer_dns( ( String ) value ); + break; + case PlanoRiscos.VERIFICACAO_SIPRP_INDEX: + setVerificacao_siprp( ( String ) value ); + break; + case PlanoRiscos.RISCO_ID_INDEX: + setRisco_id( ( Integer ) value ); + break; + case PlanoRiscos.POR_INDEX: + setPor( ( String ) value ); + break; + case PlanoRiscos.IS_PATRIMONIAL_INDEX: + setIs_patrimonial( ( Boolean ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanoRiscos.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case PlanoRiscos.ACTIVO_INDEX: + this.activo = ( String ) value; + break; + case PlanoRiscos.AREA_ID_INDEX: + this.area_id = ( Integer ) value; + break; + case PlanoRiscos.TO_AREA_ID_INDEX: + this.to_area_id = ( db.data.siprp.outer.PlanoAreasData ) value; + break; + case PlanoRiscos.ID_INDEX: + this.id = ( Integer ) value; + break; + case PlanoRiscos.VALOR_INDEX: + this.valor = ( Integer ) value; + break; + case PlanoRiscos.RESPONSAVEL_EXECUCAO_INDEX: + this.responsavel_execucao = ( String ) value; + break; + case PlanoRiscos.RECURSOS_NECESSARIOS_INDEX: + this.recursos_necessarios = ( String ) value; + break; + case PlanoRiscos.DATA_INICIO_INDEX: + this.data_inicio = ( java.util.Date ) value; + break; + case PlanoRiscos.DATA_FIM_INDEX: + this.data_fim = ( java.util.Date ) value; + break; + case PlanoRiscos.PARECER_DL_INDEX: + this.parecer_dl = ( String ) value; + break; + case PlanoRiscos.PARECER_DNS_INDEX: + this.parecer_dns = ( String ) value; + break; + case PlanoRiscos.VERIFICACAO_SIPRP_INDEX: + this.verificacao_siprp = ( String ) value; + break; + case PlanoRiscos.RISCO_ID_INDEX: + this.risco_id = ( Integer ) value; + break; + case PlanoRiscos.POR_INDEX: + this.por = ( String ) value; + break; + case PlanoRiscos.IS_PATRIMONIAL_INDEX: + this.is_patrimonial = ( 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 PlanoRiscos.DESCRICAO_INDEX: + theClass = String.class; + break; + case PlanoRiscos.ACTIVO_INDEX: + theClass = String.class; + break; + case PlanoRiscos.AREA_ID_INDEX: + theClass = Integer.class; + break; + case PlanoRiscos.TO_AREA_ID_INDEX: + theClass = db.data.siprp.outer.PlanoAreasData.class; + break; + case PlanoRiscos.ID_INDEX: + theClass = Integer.class; + break; + case PlanoRiscos.VALOR_INDEX: + theClass = Integer.class; + break; + case PlanoRiscos.RESPONSAVEL_EXECUCAO_INDEX: + theClass = String.class; + break; + case PlanoRiscos.RECURSOS_NECESSARIOS_INDEX: + theClass = String.class; + break; + case PlanoRiscos.DATA_INICIO_INDEX: + theClass = java.util.Date.class; + break; + case PlanoRiscos.DATA_FIM_INDEX: + theClass = java.util.Date.class; + break; + case PlanoRiscos.PARECER_DL_INDEX: + theClass = String.class; + break; + case PlanoRiscos.PARECER_DNS_INDEX: + theClass = String.class; + break; + case PlanoRiscos.VERIFICACAO_SIPRP_INDEX: + theClass = String.class; + break; + case PlanoRiscos.RISCO_ID_INDEX: + theClass = Integer.class; + break; + case PlanoRiscos.POR_INDEX: + theClass = String.class; + break; + case PlanoRiscos.IS_PATRIMONIAL_INDEX: + theClass = Boolean.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PlanoRiscos._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, PlanoRiscos.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/PlanosActuacao.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/PlanosActuacao.java new file mode 100644 index 00000000..cc364862 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/PlanosActuacao.java @@ -0,0 +1,2236 @@ +/* +* PlanosActuacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class PlanosActuacao extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PlanosActuacao.ESTABELECIMENTO_ID, PlanosActuacao.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.ESTABELECIMENTO_ID_FULL, PlanosActuacao.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.FASE, PlanosActuacao.FASE_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.FASE_FULL, PlanosActuacao.FASE_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VISITA, PlanosActuacao.DATA_VISITA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VISITA_FULL, PlanosActuacao.DATA_VISITA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.NOME_ESTABELECIMENTO, PlanosActuacao.NOME_ESTABELECIMENTO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.NOME_ESTABELECIMENTO_FULL, PlanosActuacao.NOME_ESTABELECIMENTO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.VALIDACAO_DIRECTOR_LOJA, PlanosActuacao.VALIDACAO_DIRECTOR_LOJA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.VALIDACAO_DIRECTOR_LOJA_FULL, PlanosActuacao.VALIDACAO_DIRECTOR_LOJA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.VALIDACAO_DNS, PlanosActuacao.VALIDACAO_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.VALIDACAO_DNS_FULL, PlanosActuacao.VALIDACAO_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.VALIDACAO_HS, PlanosActuacao.VALIDACAO_HS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.VALIDACAO_HS_FULL, PlanosActuacao.VALIDACAO_HS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.PARECER_DNS, PlanosActuacao.PARECER_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.PARECER_DNS_FULL, PlanosActuacao.PARECER_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.OBS_CORRECAO, PlanosActuacao.OBS_CORRECAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.OBS_CORRECAO_FULL, PlanosActuacao.OBS_CORRECAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VALIDACAO_DIR_LOJA, PlanosActuacao.DATA_VALIDACAO_DIR_LOJA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VALIDACAO_DIR_LOJA_FULL, PlanosActuacao.DATA_VALIDACAO_DIR_LOJA_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PlanosActuacao.CLASS_IDENTIFIER, PlanosActuacao.USER_DIR_LOJA, PlanosActuacao.TO_USER_DIR_LOJA ); + FIELD_INDEXES.put( PlanosActuacao.USER_DIR_LOJA, PlanosActuacao.USER_DIR_LOJA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.USER_DIR_LOJA_FULL, PlanosActuacao.USER_DIR_LOJA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TO_USER_DIR_LOJA, PlanosActuacao.TO_USER_DIR_LOJA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VALIDACAO_DNS, PlanosActuacao.DATA_VALIDACAO_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VALIDACAO_DNS_FULL, PlanosActuacao.DATA_VALIDACAO_DNS_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PlanosActuacao.CLASS_IDENTIFIER, PlanosActuacao.USER_DNS, PlanosActuacao.TO_USER_DNS ); + FIELD_INDEXES.put( PlanosActuacao.USER_DNS, PlanosActuacao.USER_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.USER_DNS_FULL, PlanosActuacao.USER_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TO_USER_DNS, PlanosActuacao.TO_USER_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VALIDACAO_HS, PlanosActuacao.DATA_VALIDACAO_HS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VALIDACAO_HS_FULL, PlanosActuacao.DATA_VALIDACAO_HS_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PlanosActuacao.CLASS_IDENTIFIER, PlanosActuacao.USER_HS, PlanosActuacao.TO_USER_HS ); + FIELD_INDEXES.put( PlanosActuacao.USER_HS, PlanosActuacao.USER_HS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.USER_HS_FULL, PlanosActuacao.USER_HS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TO_USER_HS, PlanosActuacao.TO_USER_HS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.FASE_ANTES_CORRECAO, PlanosActuacao.FASE_ANTES_CORRECAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.FASE_ANTES_CORRECAO_FULL, PlanosActuacao.FASE_ANTES_CORRECAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.CORRECAO, PlanosActuacao.CORRECAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.CORRECAO_FULL, PlanosActuacao.CORRECAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.OBSERVACOES_DL, PlanosActuacao.OBSERVACOES_DL_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.OBSERVACOES_DL_FULL, PlanosActuacao.OBSERVACOES_DL_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.OBSERVACOES_DNS, PlanosActuacao.OBSERVACOES_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.OBSERVACOES_DNS_FULL, PlanosActuacao.OBSERVACOES_DNS_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.VERIFICACAO_SIPRP, PlanosActuacao.VERIFICACAO_SIPRP_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.VERIFICACAO_SIPRP_FULL, PlanosActuacao.VERIFICACAO_SIPRP_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_CONTROLO, PlanosActuacao.DATA_CONTROLO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_CONTROLO_FULL, PlanosActuacao.DATA_CONTROLO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_EMAIL_CONTROLO, PlanosActuacao.DATA_EMAIL_CONTROLO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_EMAIL_CONTROLO_FULL, PlanosActuacao.DATA_EMAIL_CONTROLO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.EMPRESA_ID, PlanosActuacao.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.EMPRESA_ID_FULL, PlanosActuacao.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.NOME_EMPRESA, PlanosActuacao.NOME_EMPRESA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.NOME_EMPRESA_FULL, PlanosActuacao.NOME_EMPRESA_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TECNICO_HS_ID, PlanosActuacao.TECNICO_HS_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TECNICO_HS_ID_FULL, PlanosActuacao.TECNICO_HS_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TECNICO_HS_NOME, PlanosActuacao.TECNICO_HS_NOME_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TECNICO_HS_NOME_FULL, PlanosActuacao.TECNICO_HS_NOME_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.ID, PlanosActuacao.ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.ID_FULL, PlanosActuacao.ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_RELATORIO, PlanosActuacao.DATA_RELATORIO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_RELATORIO_FULL, PlanosActuacao.DATA_RELATORIO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DELETED_DATE, PlanosActuacao.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DELETED_DATE_FULL, PlanosActuacao.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO, PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO_FULL, PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TECNICO_SUPERIOR_HS_ID, PlanosActuacao.TECNICO_SUPERIOR_HS_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TECNICO_SUPERIOR_HS_ID_FULL, PlanosActuacao.TECNICO_SUPERIOR_HS_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TECNICO_SUPERIOR_HS_NOME, PlanosActuacao.TECNICO_SUPERIOR_HS_NOME_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.TECNICO_SUPERIOR_HS_NOME_FULL, PlanosActuacao.TECNICO_SUPERIOR_HS_NOME_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_DESACTIVACAO, PlanosActuacao.DATA_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_DESACTIVACAO_FULL, PlanosActuacao.DATA_DESACTIVACAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_DISPONIBILIZACAO, PlanosActuacao.DATA_DISPONIBILIZACAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_DISPONIBILIZACAO_FULL, PlanosActuacao.DATA_DISPONIBILIZACAO_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VALIDACAO_SEG, PlanosActuacao.DATA_VALIDACAO_SEG_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.DATA_VALIDACAO_SEG_FULL, PlanosActuacao.DATA_VALIDACAO_SEG_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.USER_SEG, PlanosActuacao.USER_SEG_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.USER_SEG_FULL, PlanosActuacao.USER_SEG_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.HS_RELATORIO_ID, PlanosActuacao.HS_RELATORIO_ID_INDEX ); + FIELD_INDEXES.put( PlanosActuacao.HS_RELATORIO_ID_FULL, PlanosActuacao.HS_RELATORIO_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 ForeignKeyuser_dir_lojaToutilizadores = + new com.evolute.entity.ForeignKey( PlanosActuacao.class, PlanosActuacao.USER_DIR_LOJA, db.data.siprp.outer.UtilizadoresData.class, db.data.siprp.outer.UtilizadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyuser_dnsToutilizadores = + new com.evolute.entity.ForeignKey( PlanosActuacao.class, PlanosActuacao.USER_DNS, db.data.siprp.outer.UtilizadoresData.class, db.data.siprp.outer.UtilizadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyuser_hsToutilizadores = + new com.evolute.entity.ForeignKey( PlanosActuacao.class, PlanosActuacao.USER_HS, db.data.siprp.outer.UtilizadoresData.class, db.data.siprp.outer.UtilizadoresData.ID ); + + public static final String TABLENAME = "planos_actuacao"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.planos_actuacao"; + + public static final int _INVALID__INDEX = -1; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "planos_actuacao.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 0; + public static final String FASE = "fase"; + public static final String FASE_FULL = "planos_actuacao.fase"; + public static final int FASE_INDEX = 1; + public static final String DATA_VISITA = "data_visita"; + public static final String DATA_VISITA_FULL = "planos_actuacao.data_visita"; + public static final int DATA_VISITA_INDEX = 2; + public static final String NOME_ESTABELECIMENTO = "nome_estabelecimento"; + public static final String NOME_ESTABELECIMENTO_FULL = "planos_actuacao.nome_estabelecimento"; + public static final int NOME_ESTABELECIMENTO_INDEX = 3; + public static final String VALIDACAO_DIRECTOR_LOJA = "validacao_director_loja"; + public static final String VALIDACAO_DIRECTOR_LOJA_FULL = "planos_actuacao.validacao_director_loja"; + public static final int VALIDACAO_DIRECTOR_LOJA_INDEX = 4; + public static final String VALIDACAO_DNS = "validacao_dns"; + public static final String VALIDACAO_DNS_FULL = "planos_actuacao.validacao_dns"; + public static final int VALIDACAO_DNS_INDEX = 5; + public static final String VALIDACAO_HS = "validacao_hs"; + public static final String VALIDACAO_HS_FULL = "planos_actuacao.validacao_hs"; + public static final int VALIDACAO_HS_INDEX = 6; + public static final String PARECER_DNS = "parecer_dns"; + public static final String PARECER_DNS_FULL = "planos_actuacao.parecer_dns"; + public static final int PARECER_DNS_INDEX = 7; + public static final String OBS_CORRECAO = "obs_correcao"; + public static final String OBS_CORRECAO_FULL = "planos_actuacao.obs_correcao"; + public static final int OBS_CORRECAO_INDEX = 8; + public static final String DATA_VALIDACAO_DIR_LOJA = "data_validacao_dir_loja"; + public static final String DATA_VALIDACAO_DIR_LOJA_FULL = "planos_actuacao.data_validacao_dir_loja"; + public static final int DATA_VALIDACAO_DIR_LOJA_INDEX = 9; + public static final String USER_DIR_LOJA = "user_dir_loja"; + public static final String USER_DIR_LOJA_FULL = "planos_actuacao.user_dir_loja"; + public static final int USER_DIR_LOJA_INDEX = 10; + public static final String TO_USER_DIR_LOJA = "to_user_dir_loja"; + public static final String TO_USER_DIR_LOJA_FULL = "planos_actuacao.to_user_dir_loja"; + public static final int TO_USER_DIR_LOJA_INDEX = 11; + public static final String DATA_VALIDACAO_DNS = "data_validacao_dns"; + public static final String DATA_VALIDACAO_DNS_FULL = "planos_actuacao.data_validacao_dns"; + public static final int DATA_VALIDACAO_DNS_INDEX = 12; + public static final String USER_DNS = "user_dns"; + public static final String USER_DNS_FULL = "planos_actuacao.user_dns"; + public static final int USER_DNS_INDEX = 13; + public static final String TO_USER_DNS = "to_user_dns"; + public static final String TO_USER_DNS_FULL = "planos_actuacao.to_user_dns"; + public static final int TO_USER_DNS_INDEX = 14; + public static final String DATA_VALIDACAO_HS = "data_validacao_hs"; + public static final String DATA_VALIDACAO_HS_FULL = "planos_actuacao.data_validacao_hs"; + public static final int DATA_VALIDACAO_HS_INDEX = 15; + public static final String USER_HS = "user_hs"; + public static final String USER_HS_FULL = "planos_actuacao.user_hs"; + public static final int USER_HS_INDEX = 16; + public static final String TO_USER_HS = "to_user_hs"; + public static final String TO_USER_HS_FULL = "planos_actuacao.to_user_hs"; + public static final int TO_USER_HS_INDEX = 17; + public static final String FASE_ANTES_CORRECAO = "fase_antes_correcao"; + public static final String FASE_ANTES_CORRECAO_FULL = "planos_actuacao.fase_antes_correcao"; + public static final int FASE_ANTES_CORRECAO_INDEX = 18; + public static final String CORRECAO = "correcao"; + public static final String CORRECAO_FULL = "planos_actuacao.correcao"; + public static final int CORRECAO_INDEX = 19; + public static final String OBSERVACOES_DL = "observacoes_dl"; + public static final String OBSERVACOES_DL_FULL = "planos_actuacao.observacoes_dl"; + public static final int OBSERVACOES_DL_INDEX = 20; + public static final String OBSERVACOES_DNS = "observacoes_dns"; + public static final String OBSERVACOES_DNS_FULL = "planos_actuacao.observacoes_dns"; + public static final int OBSERVACOES_DNS_INDEX = 21; + public static final String VERIFICACAO_SIPRP = "verificacao_siprp"; + public static final String VERIFICACAO_SIPRP_FULL = "planos_actuacao.verificacao_siprp"; + public static final int VERIFICACAO_SIPRP_INDEX = 22; + public static final String DATA_CONTROLO = "data_controlo"; + public static final String DATA_CONTROLO_FULL = "planos_actuacao.data_controlo"; + public static final int DATA_CONTROLO_INDEX = 23; + public static final String DATA_EMAIL_CONTROLO = "data_email_controlo"; + public static final String DATA_EMAIL_CONTROLO_FULL = "planos_actuacao.data_email_controlo"; + public static final int DATA_EMAIL_CONTROLO_INDEX = 24; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "planos_actuacao.empresa_id"; + public static final int EMPRESA_ID_INDEX = 25; + public static final String NOME_EMPRESA = "nome_empresa"; + public static final String NOME_EMPRESA_FULL = "planos_actuacao.nome_empresa"; + public static final int NOME_EMPRESA_INDEX = 26; + public static final String TECNICO_HS_ID = "tecnico_hs_id"; + public static final String TECNICO_HS_ID_FULL = "planos_actuacao.tecnico_hs_id"; + public static final int TECNICO_HS_ID_INDEX = 27; + public static final String TECNICO_HS_NOME = "tecnico_hs_nome"; + public static final String TECNICO_HS_NOME_FULL = "planos_actuacao.tecnico_hs_nome"; + public static final int TECNICO_HS_NOME_INDEX = 28; + public static final String ID = "id"; + public static final String ID_FULL = "planos_actuacao.id"; + public static final int ID_INDEX = 29; + public static final String DATA_RELATORIO = "data_relatorio"; + public static final String DATA_RELATORIO_FULL = "planos_actuacao.data_relatorio"; + public static final int DATA_RELATORIO_INDEX = 30; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "planos_actuacao.deleted_date"; + public static final int DELETED_DATE_INDEX = 31; + public static final String CONCLUIDO_POR_DESACTIVACAO = "concluido_por_desactivacao"; + public static final String CONCLUIDO_POR_DESACTIVACAO_FULL = "planos_actuacao.concluido_por_desactivacao"; + public static final int CONCLUIDO_POR_DESACTIVACAO_INDEX = 32; + public static final String TECNICO_SUPERIOR_HS_ID = "tecnico_superior_hs_id"; + public static final String TECNICO_SUPERIOR_HS_ID_FULL = "planos_actuacao.tecnico_superior_hs_id"; + public static final int TECNICO_SUPERIOR_HS_ID_INDEX = 33; + public static final String TECNICO_SUPERIOR_HS_NOME = "tecnico_superior_hs_nome"; + public static final String TECNICO_SUPERIOR_HS_NOME_FULL = "planos_actuacao.tecnico_superior_hs_nome"; + public static final int TECNICO_SUPERIOR_HS_NOME_INDEX = 34; + public static final String DATA_DESACTIVACAO = "data_desactivacao"; + public static final String DATA_DESACTIVACAO_FULL = "planos_actuacao.data_desactivacao"; + public static final int DATA_DESACTIVACAO_INDEX = 35; + public static final String DATA_DISPONIBILIZACAO = "data_disponibilizacao"; + public static final String DATA_DISPONIBILIZACAO_FULL = "planos_actuacao.data_disponibilizacao"; + public static final int DATA_DISPONIBILIZACAO_INDEX = 36; + public static final String DATA_VALIDACAO_SEG = "data_validacao_seg"; + public static final String DATA_VALIDACAO_SEG_FULL = "planos_actuacao.data_validacao_seg"; + public static final int DATA_VALIDACAO_SEG_INDEX = 37; + public static final String USER_SEG = "user_seg"; + public static final String USER_SEG_FULL = "planos_actuacao.user_seg"; + public static final int USER_SEG_INDEX = 38; + public static final String HS_RELATORIO_ID = "hs_relatorio_id"; + public static final String HS_RELATORIO_ID_FULL = "planos_actuacao.hs_relatorio_id"; + public static final int HS_RELATORIO_ID_INDEX = 39; + + public static final String FIELD_NAMES[] = new String[]{ + ESTABELECIMENTO_ID, FASE, DATA_VISITA, NOME_ESTABELECIMENTO, + VALIDACAO_DIRECTOR_LOJA, VALIDACAO_DNS, VALIDACAO_HS, PARECER_DNS, + OBS_CORRECAO, DATA_VALIDACAO_DIR_LOJA, USER_DIR_LOJA, TO_USER_DIR_LOJA, + DATA_VALIDACAO_DNS, USER_DNS, TO_USER_DNS, DATA_VALIDACAO_HS, USER_HS, + TO_USER_HS, FASE_ANTES_CORRECAO, CORRECAO, OBSERVACOES_DL, OBSERVACOES_DNS, + VERIFICACAO_SIPRP, DATA_CONTROLO, DATA_EMAIL_CONTROLO, EMPRESA_ID, + NOME_EMPRESA, TECNICO_HS_ID, TECNICO_HS_NOME, DATA_RELATORIO, DELETED_DATE, + CONCLUIDO_POR_DESACTIVACAO, TECNICO_SUPERIOR_HS_ID, + TECNICO_SUPERIOR_HS_NOME, DATA_DESACTIVACAO, DATA_DISPONIBILIZACAO, + DATA_VALIDACAO_SEG, USER_SEG, HS_RELATORIO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + FASE, TABLENAME + "." + DATA_VISITA, TABLENAME + "." + NOME_ESTABELECIMENTO, + TABLENAME + "." + VALIDACAO_DIRECTOR_LOJA, TABLENAME + "." + VALIDACAO_DNS, TABLENAME + "." + VALIDACAO_HS, TABLENAME + "." + PARECER_DNS, + TABLENAME + "." + OBS_CORRECAO, TABLENAME + "." + DATA_VALIDACAO_DIR_LOJA, TABLENAME + "." + USER_DIR_LOJA, TABLENAME + "." + TO_USER_DIR_LOJA, + TABLENAME + "." + DATA_VALIDACAO_DNS, TABLENAME + "." + USER_DNS, TABLENAME + "." + TO_USER_DNS, TABLENAME + "." + DATA_VALIDACAO_HS, TABLENAME + "." + USER_HS, + TABLENAME + "." + TO_USER_HS, TABLENAME + "." + FASE_ANTES_CORRECAO, TABLENAME + "." + CORRECAO, TABLENAME + "." + OBSERVACOES_DL, TABLENAME + "." + OBSERVACOES_DNS, + TABLENAME + "." + VERIFICACAO_SIPRP, TABLENAME + "." + DATA_CONTROLO, TABLENAME + "." + DATA_EMAIL_CONTROLO, TABLENAME + "." + EMPRESA_ID, + TABLENAME + "." + NOME_EMPRESA, TABLENAME + "." + TECNICO_HS_ID, TABLENAME + "." + TECNICO_HS_NOME, TABLENAME + "." + DATA_RELATORIO, TABLENAME + "." + DELETED_DATE, + TABLENAME + "." + CONCLUIDO_POR_DESACTIVACAO, TABLENAME + "." + TECNICO_SUPERIOR_HS_ID, + TABLENAME + "." + TECNICO_SUPERIOR_HS_NOME, TABLENAME + "." + DATA_DESACTIVACAO, TABLENAME + "." + DATA_DISPONIBILIZACAO, + TABLENAME + "." + DATA_VALIDACAO_SEG, TABLENAME + "." + USER_SEG, TABLENAME + "." + HS_RELATORIO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ESTABELECIMENTO_ID, FASE, DATA_VISITA, NOME_ESTABELECIMENTO, + VALIDACAO_DIRECTOR_LOJA, VALIDACAO_DNS, VALIDACAO_HS, PARECER_DNS, + OBS_CORRECAO, DATA_VALIDACAO_DIR_LOJA, USER_DIR_LOJA, DATA_VALIDACAO_DNS, + USER_DNS, DATA_VALIDACAO_HS, USER_HS, FASE_ANTES_CORRECAO, CORRECAO, + OBSERVACOES_DL, OBSERVACOES_DNS, VERIFICACAO_SIPRP, DATA_CONTROLO, + DATA_EMAIL_CONTROLO, EMPRESA_ID, NOME_EMPRESA, TECNICO_HS_ID, TECNICO_HS_NOME, + ID, DATA_RELATORIO, DELETED_DATE, CONCLUIDO_POR_DESACTIVACAO, + TECNICO_SUPERIOR_HS_ID, TECNICO_SUPERIOR_HS_NOME, DATA_DESACTIVACAO, + DATA_DISPONIBILIZACAO, DATA_VALIDACAO_SEG, USER_SEG, HS_RELATORIO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ESTABELECIMENTO_ID, FASE, DATA_VISITA, NOME_ESTABELECIMENTO, + VALIDACAO_DIRECTOR_LOJA, VALIDACAO_DNS, VALIDACAO_HS, PARECER_DNS, + OBS_CORRECAO, DATA_VALIDACAO_DIR_LOJA, USER_DIR_LOJA, DATA_VALIDACAO_DNS, + USER_DNS, DATA_VALIDACAO_HS, USER_HS, FASE_ANTES_CORRECAO, CORRECAO, + OBSERVACOES_DL, OBSERVACOES_DNS, VERIFICACAO_SIPRP, DATA_CONTROLO, + DATA_EMAIL_CONTROLO, EMPRESA_ID, NOME_EMPRESA, TECNICO_HS_ID, TECNICO_HS_NOME, + ID, DATA_RELATORIO, DELETED_DATE, CONCLUIDO_POR_DESACTIVACAO, + TECNICO_SUPERIOR_HS_ID, TECNICO_SUPERIOR_HS_NOME, DATA_DESACTIVACAO, + DATA_DISPONIBILIZACAO, DATA_VALIDACAO_SEG, USER_SEG, HS_RELATORIO_ID, }; + + private Integer estabelecimento_id; + private Integer fase; + private java.util.Date data_visita; + private String nome_estabelecimento; + private Boolean validacao_director_loja; + private Boolean validacao_dns; + private Boolean validacao_hs; + private String parecer_dns; + private String obs_correcao; + private java.util.Date data_validacao_dir_loja; + private Integer user_dir_loja; + private db.data.siprp.outer.UtilizadoresData to_user_dir_loja; + private java.util.Date data_validacao_dns; + private Integer user_dns; + private db.data.siprp.outer.UtilizadoresData to_user_dns; + private java.util.Date data_validacao_hs; + private Integer user_hs; + private db.data.siprp.outer.UtilizadoresData to_user_hs; + private Integer fase_antes_correcao; + private String correcao; + private String observacoes_dl; + private String observacoes_dns; + private String verificacao_siprp; + private java.util.Date data_controlo; + private java.util.Date data_email_controlo; + private Integer empresa_id; + private String nome_empresa; + private Integer tecnico_hs_id; + private String tecnico_hs_nome; + private Integer id; + private java.util.Date data_relatorio; + private java.sql.Timestamp deleted_date; + private Boolean concluido_por_desactivacao; + private Integer tecnico_superior_hs_id; + private String tecnico_superior_hs_nome; + private java.util.Date data_desactivacao; + private java.util.Date data_disponibilizacao; + private java.util.Date data_validacao_seg; + private Integer user_seg; + private Integer hs_relatorio_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PlanosActuacao() + { + 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 }; + } + + 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 Integer getFase() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FASE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.fase; + } + + public void setFase( Integer fase ) + { + try + { + setLockedForRefresh( true ); + preProcess( FASE, fase ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.fase = fase; + LAZY_LOADED_OBJECTS.put( FASE, Boolean.TRUE ); + } + + public java.util.Date getData_visita() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_VISITA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_visita; + } + + public void setData_visita( java.util.Date data_visita ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_VISITA, data_visita ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_visita = data_visita; + LAZY_LOADED_OBJECTS.put( DATA_VISITA, Boolean.TRUE ); + } + + public String getNome_estabelecimento() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_ESTABELECIMENTO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_estabelecimento; + } + + public void setNome_estabelecimento( String nome_estabelecimento ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_ESTABELECIMENTO, nome_estabelecimento ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_estabelecimento = nome_estabelecimento; + LAZY_LOADED_OBJECTS.put( NOME_ESTABELECIMENTO, Boolean.TRUE ); + } + + public Boolean getValidacao_director_loja() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALIDACAO_DIRECTOR_LOJA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.validacao_director_loja; + } + + public void setValidacao_director_loja( Boolean validacao_director_loja ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALIDACAO_DIRECTOR_LOJA, validacao_director_loja ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.validacao_director_loja = validacao_director_loja; + LAZY_LOADED_OBJECTS.put( VALIDACAO_DIRECTOR_LOJA, Boolean.TRUE ); + } + + public Boolean getValidacao_dns() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALIDACAO_DNS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.validacao_dns; + } + + public void setValidacao_dns( Boolean validacao_dns ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALIDACAO_DNS, validacao_dns ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.validacao_dns = validacao_dns; + LAZY_LOADED_OBJECTS.put( VALIDACAO_DNS, Boolean.TRUE ); + } + + public Boolean getValidacao_hs() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALIDACAO_HS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.validacao_hs; + } + + public void setValidacao_hs( Boolean validacao_hs ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALIDACAO_HS, validacao_hs ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.validacao_hs = validacao_hs; + LAZY_LOADED_OBJECTS.put( VALIDACAO_HS, Boolean.TRUE ); + } + + public String getParecer_dns() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PARECER_DNS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.parecer_dns; + } + + public void setParecer_dns( String parecer_dns ) + { + try + { + setLockedForRefresh( true ); + preProcess( PARECER_DNS, parecer_dns ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.parecer_dns = parecer_dns; + LAZY_LOADED_OBJECTS.put( PARECER_DNS, Boolean.TRUE ); + } + + public String getObs_correcao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OBS_CORRECAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.obs_correcao; + } + + public void setObs_correcao( String obs_correcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( OBS_CORRECAO, obs_correcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.obs_correcao = obs_correcao; + LAZY_LOADED_OBJECTS.put( OBS_CORRECAO, Boolean.TRUE ); + } + + public java.util.Date getData_validacao_dir_loja() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_VALIDACAO_DIR_LOJA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_validacao_dir_loja; + } + + public void setData_validacao_dir_loja( java.util.Date data_validacao_dir_loja ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_VALIDACAO_DIR_LOJA, data_validacao_dir_loja ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_validacao_dir_loja = data_validacao_dir_loja; + LAZY_LOADED_OBJECTS.put( DATA_VALIDACAO_DIR_LOJA, Boolean.TRUE ); + } + + public Integer getUser_dir_loja() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( USER_DIR_LOJA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.user_dir_loja; + } + + public void setUser_dir_loja( Integer user_dir_loja ) + { + try + { + setLockedForRefresh( true ); + preProcess( USER_DIR_LOJA, user_dir_loja ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.user_dir_loja = user_dir_loja; + LAZY_LOADED_OBJECTS.put( USER_DIR_LOJA, Boolean.TRUE ); + } + + public db.data.siprp.outer.UtilizadoresData toUser_dir_loja() + { + try + { + prepare( TO_USER_DIR_LOJA ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_user_dir_loja; + } + + public void setToUser_dir_loja( db.data.siprp.outer.UtilizadoresData to_user_dir_loja ) + { + try + { + preProcess( TO_USER_DIR_LOJA, to_user_dir_loja ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_user_dir_loja = to_user_dir_loja; + } + + public java.util.Date getData_validacao_dns() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_VALIDACAO_DNS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_validacao_dns; + } + + public void setData_validacao_dns( java.util.Date data_validacao_dns ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_VALIDACAO_DNS, data_validacao_dns ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_validacao_dns = data_validacao_dns; + LAZY_LOADED_OBJECTS.put( DATA_VALIDACAO_DNS, Boolean.TRUE ); + } + + public Integer getUser_dns() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( USER_DNS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.user_dns; + } + + public void setUser_dns( Integer user_dns ) + { + try + { + setLockedForRefresh( true ); + preProcess( USER_DNS, user_dns ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.user_dns = user_dns; + LAZY_LOADED_OBJECTS.put( USER_DNS, Boolean.TRUE ); + } + + public db.data.siprp.outer.UtilizadoresData toUser_dns() + { + try + { + prepare( TO_USER_DNS ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_user_dns; + } + + public void setToUser_dns( db.data.siprp.outer.UtilizadoresData to_user_dns ) + { + try + { + preProcess( TO_USER_DNS, to_user_dns ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_user_dns = to_user_dns; + } + + public java.util.Date getData_validacao_hs() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_VALIDACAO_HS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_validacao_hs; + } + + public void setData_validacao_hs( java.util.Date data_validacao_hs ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_VALIDACAO_HS, data_validacao_hs ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_validacao_hs = data_validacao_hs; + LAZY_LOADED_OBJECTS.put( DATA_VALIDACAO_HS, Boolean.TRUE ); + } + + public Integer getUser_hs() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( USER_HS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.user_hs; + } + + public void setUser_hs( Integer user_hs ) + { + try + { + setLockedForRefresh( true ); + preProcess( USER_HS, user_hs ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.user_hs = user_hs; + LAZY_LOADED_OBJECTS.put( USER_HS, Boolean.TRUE ); + } + + public db.data.siprp.outer.UtilizadoresData toUser_hs() + { + try + { + prepare( TO_USER_HS ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_user_hs; + } + + public void setToUser_hs( db.data.siprp.outer.UtilizadoresData to_user_hs ) + { + try + { + preProcess( TO_USER_HS, to_user_hs ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_user_hs = to_user_hs; + } + + public Integer getFase_antes_correcao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FASE_ANTES_CORRECAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.fase_antes_correcao; + } + + public void setFase_antes_correcao( Integer fase_antes_correcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( FASE_ANTES_CORRECAO, fase_antes_correcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.fase_antes_correcao = fase_antes_correcao; + LAZY_LOADED_OBJECTS.put( FASE_ANTES_CORRECAO, Boolean.TRUE ); + } + + public String getCorrecao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CORRECAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.correcao; + } + + public void setCorrecao( String correcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( CORRECAO, correcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.correcao = correcao; + LAZY_LOADED_OBJECTS.put( CORRECAO, Boolean.TRUE ); + } + + public String getObservacoes_dl() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OBSERVACOES_DL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.observacoes_dl; + } + + public void setObservacoes_dl( String observacoes_dl ) + { + try + { + setLockedForRefresh( true ); + preProcess( OBSERVACOES_DL, observacoes_dl ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.observacoes_dl = observacoes_dl; + LAZY_LOADED_OBJECTS.put( OBSERVACOES_DL, Boolean.TRUE ); + } + + public String getObservacoes_dns() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OBSERVACOES_DNS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.observacoes_dns; + } + + public void setObservacoes_dns( String observacoes_dns ) + { + try + { + setLockedForRefresh( true ); + preProcess( OBSERVACOES_DNS, observacoes_dns ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.observacoes_dns = observacoes_dns; + LAZY_LOADED_OBJECTS.put( OBSERVACOES_DNS, Boolean.TRUE ); + } + + public String getVerificacao_siprp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VERIFICACAO_SIPRP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.verificacao_siprp; + } + + public void setVerificacao_siprp( String verificacao_siprp ) + { + try + { + setLockedForRefresh( true ); + preProcess( VERIFICACAO_SIPRP, verificacao_siprp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.verificacao_siprp = verificacao_siprp; + LAZY_LOADED_OBJECTS.put( VERIFICACAO_SIPRP, Boolean.TRUE ); + } + + public java.util.Date getData_controlo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_CONTROLO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_controlo; + } + + public void setData_controlo( java.util.Date data_controlo ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_CONTROLO, data_controlo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_controlo = data_controlo; + LAZY_LOADED_OBJECTS.put( DATA_CONTROLO, Boolean.TRUE ); + } + + public java.util.Date getData_email_controlo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_EMAIL_CONTROLO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_email_controlo; + } + + public void setData_email_controlo( java.util.Date data_email_controlo ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_EMAIL_CONTROLO, data_email_controlo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_email_controlo = data_email_controlo; + LAZY_LOADED_OBJECTS.put( DATA_EMAIL_CONTROLO, 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 String getNome_empresa() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_EMPRESA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_empresa; + } + + public void setNome_empresa( String nome_empresa ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_EMPRESA, nome_empresa ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_empresa = nome_empresa; + LAZY_LOADED_OBJECTS.put( NOME_EMPRESA, Boolean.TRUE ); + } + + public Integer getTecnico_hs_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TECNICO_HS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tecnico_hs_id; + } + + public void setTecnico_hs_id( Integer tecnico_hs_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TECNICO_HS_ID, tecnico_hs_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tecnico_hs_id = tecnico_hs_id; + LAZY_LOADED_OBJECTS.put( TECNICO_HS_ID, Boolean.TRUE ); + } + + public String getTecnico_hs_nome() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TECNICO_HS_NOME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tecnico_hs_nome; + } + + public void setTecnico_hs_nome( String tecnico_hs_nome ) + { + try + { + setLockedForRefresh( true ); + preProcess( TECNICO_HS_NOME, tecnico_hs_nome ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tecnico_hs_nome = tecnico_hs_nome; + LAZY_LOADED_OBJECTS.put( TECNICO_HS_NOME, 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 java.util.ListfromPlanoAreas_plano_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.PlanoAreasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.PlanoAreasData.class , getPrimaryKey().getMap().get("id"), "plano_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + 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 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 getConcluido_por_desactivacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONCLUIDO_POR_DESACTIVACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.concluido_por_desactivacao; + } + + public void setConcluido_por_desactivacao( Boolean concluido_por_desactivacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONCLUIDO_POR_DESACTIVACAO, concluido_por_desactivacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.concluido_por_desactivacao = concluido_por_desactivacao; + LAZY_LOADED_OBJECTS.put( CONCLUIDO_POR_DESACTIVACAO, Boolean.TRUE ); + } + + public Integer getTecnico_superior_hs_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TECNICO_SUPERIOR_HS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tecnico_superior_hs_id; + } + + public void setTecnico_superior_hs_id( Integer tecnico_superior_hs_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TECNICO_SUPERIOR_HS_ID, tecnico_superior_hs_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tecnico_superior_hs_id = tecnico_superior_hs_id; + LAZY_LOADED_OBJECTS.put( TECNICO_SUPERIOR_HS_ID, Boolean.TRUE ); + } + + public String getTecnico_superior_hs_nome() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TECNICO_SUPERIOR_HS_NOME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tecnico_superior_hs_nome; + } + + public void setTecnico_superior_hs_nome( String tecnico_superior_hs_nome ) + { + try + { + setLockedForRefresh( true ); + preProcess( TECNICO_SUPERIOR_HS_NOME, tecnico_superior_hs_nome ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tecnico_superior_hs_nome = tecnico_superior_hs_nome; + LAZY_LOADED_OBJECTS.put( TECNICO_SUPERIOR_HS_NOME, Boolean.TRUE ); + } + + public java.util.Date getData_desactivacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_DESACTIVACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_desactivacao; + } + + public void setData_desactivacao( java.util.Date data_desactivacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_DESACTIVACAO, data_desactivacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_desactivacao = data_desactivacao; + LAZY_LOADED_OBJECTS.put( DATA_DESACTIVACAO, Boolean.TRUE ); + } + + public java.util.Date getData_disponibilizacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_DISPONIBILIZACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_disponibilizacao; + } + + public void setData_disponibilizacao( java.util.Date data_disponibilizacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_DISPONIBILIZACAO, data_disponibilizacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_disponibilizacao = data_disponibilizacao; + LAZY_LOADED_OBJECTS.put( DATA_DISPONIBILIZACAO, Boolean.TRUE ); + } + + public java.util.Date getData_validacao_seg() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_VALIDACAO_SEG ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_validacao_seg; + } + + public void setData_validacao_seg( java.util.Date data_validacao_seg ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_VALIDACAO_SEG, data_validacao_seg ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_validacao_seg = data_validacao_seg; + LAZY_LOADED_OBJECTS.put( DATA_VALIDACAO_SEG, Boolean.TRUE ); + } + + public Integer getUser_seg() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( USER_SEG ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.user_seg; + } + + public void setUser_seg( Integer user_seg ) + { + try + { + setLockedForRefresh( true ); + preProcess( USER_SEG, user_seg ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.user_seg = user_seg; + LAZY_LOADED_OBJECTS.put( USER_SEG, Boolean.TRUE ); + } + + 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanosActuacao.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case PlanosActuacao.FASE_INDEX: + value = getFase(); + break; + case PlanosActuacao.DATA_VISITA_INDEX: + value = getData_visita(); + break; + case PlanosActuacao.NOME_ESTABELECIMENTO_INDEX: + value = getNome_estabelecimento(); + break; + case PlanosActuacao.VALIDACAO_DIRECTOR_LOJA_INDEX: + value = getValidacao_director_loja(); + break; + case PlanosActuacao.VALIDACAO_DNS_INDEX: + value = getValidacao_dns(); + break; + case PlanosActuacao.VALIDACAO_HS_INDEX: + value = getValidacao_hs(); + break; + case PlanosActuacao.PARECER_DNS_INDEX: + value = getParecer_dns(); + break; + case PlanosActuacao.OBS_CORRECAO_INDEX: + value = getObs_correcao(); + break; + case PlanosActuacao.DATA_VALIDACAO_DIR_LOJA_INDEX: + value = getData_validacao_dir_loja(); + break; + case PlanosActuacao.USER_DIR_LOJA_INDEX: + value = getUser_dir_loja(); + break; + case PlanosActuacao.TO_USER_DIR_LOJA_INDEX: + value = toUser_dir_loja(); + break; + case PlanosActuacao.DATA_VALIDACAO_DNS_INDEX: + value = getData_validacao_dns(); + break; + case PlanosActuacao.USER_DNS_INDEX: + value = getUser_dns(); + break; + case PlanosActuacao.TO_USER_DNS_INDEX: + value = toUser_dns(); + break; + case PlanosActuacao.DATA_VALIDACAO_HS_INDEX: + value = getData_validacao_hs(); + break; + case PlanosActuacao.USER_HS_INDEX: + value = getUser_hs(); + break; + case PlanosActuacao.TO_USER_HS_INDEX: + value = toUser_hs(); + break; + case PlanosActuacao.FASE_ANTES_CORRECAO_INDEX: + value = getFase_antes_correcao(); + break; + case PlanosActuacao.CORRECAO_INDEX: + value = getCorrecao(); + break; + case PlanosActuacao.OBSERVACOES_DL_INDEX: + value = getObservacoes_dl(); + break; + case PlanosActuacao.OBSERVACOES_DNS_INDEX: + value = getObservacoes_dns(); + break; + case PlanosActuacao.VERIFICACAO_SIPRP_INDEX: + value = getVerificacao_siprp(); + break; + case PlanosActuacao.DATA_CONTROLO_INDEX: + value = getData_controlo(); + break; + case PlanosActuacao.DATA_EMAIL_CONTROLO_INDEX: + value = getData_email_controlo(); + break; + case PlanosActuacao.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case PlanosActuacao.NOME_EMPRESA_INDEX: + value = getNome_empresa(); + break; + case PlanosActuacao.TECNICO_HS_ID_INDEX: + value = getTecnico_hs_id(); + break; + case PlanosActuacao.TECNICO_HS_NOME_INDEX: + value = getTecnico_hs_nome(); + break; + case PlanosActuacao.ID_INDEX: + value = getId(); + break; + case PlanosActuacao.DATA_RELATORIO_INDEX: + value = getData_relatorio(); + break; + case PlanosActuacao.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO_INDEX: + value = getConcluido_por_desactivacao(); + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_ID_INDEX: + value = getTecnico_superior_hs_id(); + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_NOME_INDEX: + value = getTecnico_superior_hs_nome(); + break; + case PlanosActuacao.DATA_DESACTIVACAO_INDEX: + value = getData_desactivacao(); + break; + case PlanosActuacao.DATA_DISPONIBILIZACAO_INDEX: + value = getData_disponibilizacao(); + break; + case PlanosActuacao.DATA_VALIDACAO_SEG_INDEX: + value = getData_validacao_seg(); + break; + case PlanosActuacao.USER_SEG_INDEX: + value = getUser_seg(); + break; + case PlanosActuacao.HS_RELATORIO_ID_INDEX: + value = getHs_relatorio_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanosActuacao.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + case PlanosActuacao.FASE_INDEX: + value = this.fase; + break; + case PlanosActuacao.DATA_VISITA_INDEX: + value = this.data_visita; + break; + case PlanosActuacao.NOME_ESTABELECIMENTO_INDEX: + value = this.nome_estabelecimento; + break; + case PlanosActuacao.VALIDACAO_DIRECTOR_LOJA_INDEX: + value = this.validacao_director_loja; + break; + case PlanosActuacao.VALIDACAO_DNS_INDEX: + value = this.validacao_dns; + break; + case PlanosActuacao.VALIDACAO_HS_INDEX: + value = this.validacao_hs; + break; + case PlanosActuacao.PARECER_DNS_INDEX: + value = this.parecer_dns; + break; + case PlanosActuacao.OBS_CORRECAO_INDEX: + value = this.obs_correcao; + break; + case PlanosActuacao.DATA_VALIDACAO_DIR_LOJA_INDEX: + value = this.data_validacao_dir_loja; + break; + case PlanosActuacao.USER_DIR_LOJA_INDEX: + value = this.user_dir_loja; + break; + case PlanosActuacao.TO_USER_DIR_LOJA_INDEX: + value = this.to_user_dir_loja; + break; + case PlanosActuacao.DATA_VALIDACAO_DNS_INDEX: + value = this.data_validacao_dns; + break; + case PlanosActuacao.USER_DNS_INDEX: + value = this.user_dns; + break; + case PlanosActuacao.TO_USER_DNS_INDEX: + value = this.to_user_dns; + break; + case PlanosActuacao.DATA_VALIDACAO_HS_INDEX: + value = this.data_validacao_hs; + break; + case PlanosActuacao.USER_HS_INDEX: + value = this.user_hs; + break; + case PlanosActuacao.TO_USER_HS_INDEX: + value = this.to_user_hs; + break; + case PlanosActuacao.FASE_ANTES_CORRECAO_INDEX: + value = this.fase_antes_correcao; + break; + case PlanosActuacao.CORRECAO_INDEX: + value = this.correcao; + break; + case PlanosActuacao.OBSERVACOES_DL_INDEX: + value = this.observacoes_dl; + break; + case PlanosActuacao.OBSERVACOES_DNS_INDEX: + value = this.observacoes_dns; + break; + case PlanosActuacao.VERIFICACAO_SIPRP_INDEX: + value = this.verificacao_siprp; + break; + case PlanosActuacao.DATA_CONTROLO_INDEX: + value = this.data_controlo; + break; + case PlanosActuacao.DATA_EMAIL_CONTROLO_INDEX: + value = this.data_email_controlo; + break; + case PlanosActuacao.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case PlanosActuacao.NOME_EMPRESA_INDEX: + value = this.nome_empresa; + break; + case PlanosActuacao.TECNICO_HS_ID_INDEX: + value = this.tecnico_hs_id; + break; + case PlanosActuacao.TECNICO_HS_NOME_INDEX: + value = this.tecnico_hs_nome; + break; + case PlanosActuacao.ID_INDEX: + value = this.id; + break; + case PlanosActuacao.DATA_RELATORIO_INDEX: + value = this.data_relatorio; + break; + case PlanosActuacao.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO_INDEX: + value = this.concluido_por_desactivacao; + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_ID_INDEX: + value = this.tecnico_superior_hs_id; + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_NOME_INDEX: + value = this.tecnico_superior_hs_nome; + break; + case PlanosActuacao.DATA_DESACTIVACAO_INDEX: + value = this.data_desactivacao; + break; + case PlanosActuacao.DATA_DISPONIBILIZACAO_INDEX: + value = this.data_disponibilizacao; + break; + case PlanosActuacao.DATA_VALIDACAO_SEG_INDEX: + value = this.data_validacao_seg; + break; + case PlanosActuacao.USER_SEG_INDEX: + value = this.user_seg; + break; + case PlanosActuacao.HS_RELATORIO_ID_INDEX: + value = this.hs_relatorio_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanosActuacao.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case PlanosActuacao.FASE_INDEX: + setFase( ( Integer ) value ); + break; + case PlanosActuacao.DATA_VISITA_INDEX: + setData_visita( ( java.util.Date ) value ); + break; + case PlanosActuacao.NOME_ESTABELECIMENTO_INDEX: + setNome_estabelecimento( ( String ) value ); + break; + case PlanosActuacao.VALIDACAO_DIRECTOR_LOJA_INDEX: + setValidacao_director_loja( ( Boolean ) value ); + break; + case PlanosActuacao.VALIDACAO_DNS_INDEX: + setValidacao_dns( ( Boolean ) value ); + break; + case PlanosActuacao.VALIDACAO_HS_INDEX: + setValidacao_hs( ( Boolean ) value ); + break; + case PlanosActuacao.PARECER_DNS_INDEX: + setParecer_dns( ( String ) value ); + break; + case PlanosActuacao.OBS_CORRECAO_INDEX: + setObs_correcao( ( String ) value ); + break; + case PlanosActuacao.DATA_VALIDACAO_DIR_LOJA_INDEX: + setData_validacao_dir_loja( ( java.util.Date ) value ); + break; + case PlanosActuacao.USER_DIR_LOJA_INDEX: + setUser_dir_loja( ( Integer ) value ); + break; + case PlanosActuacao.TO_USER_DIR_LOJA_INDEX: + setToUser_dir_loja( ( db.data.siprp.outer.UtilizadoresData ) value ); + break; + case PlanosActuacao.DATA_VALIDACAO_DNS_INDEX: + setData_validacao_dns( ( java.util.Date ) value ); + break; + case PlanosActuacao.USER_DNS_INDEX: + setUser_dns( ( Integer ) value ); + break; + case PlanosActuacao.TO_USER_DNS_INDEX: + setToUser_dns( ( db.data.siprp.outer.UtilizadoresData ) value ); + break; + case PlanosActuacao.DATA_VALIDACAO_HS_INDEX: + setData_validacao_hs( ( java.util.Date ) value ); + break; + case PlanosActuacao.USER_HS_INDEX: + setUser_hs( ( Integer ) value ); + break; + case PlanosActuacao.TO_USER_HS_INDEX: + setToUser_hs( ( db.data.siprp.outer.UtilizadoresData ) value ); + break; + case PlanosActuacao.FASE_ANTES_CORRECAO_INDEX: + setFase_antes_correcao( ( Integer ) value ); + break; + case PlanosActuacao.CORRECAO_INDEX: + setCorrecao( ( String ) value ); + break; + case PlanosActuacao.OBSERVACOES_DL_INDEX: + setObservacoes_dl( ( String ) value ); + break; + case PlanosActuacao.OBSERVACOES_DNS_INDEX: + setObservacoes_dns( ( String ) value ); + break; + case PlanosActuacao.VERIFICACAO_SIPRP_INDEX: + setVerificacao_siprp( ( String ) value ); + break; + case PlanosActuacao.DATA_CONTROLO_INDEX: + setData_controlo( ( java.util.Date ) value ); + break; + case PlanosActuacao.DATA_EMAIL_CONTROLO_INDEX: + setData_email_controlo( ( java.util.Date ) value ); + break; + case PlanosActuacao.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case PlanosActuacao.NOME_EMPRESA_INDEX: + setNome_empresa( ( String ) value ); + break; + case PlanosActuacao.TECNICO_HS_ID_INDEX: + setTecnico_hs_id( ( Integer ) value ); + break; + case PlanosActuacao.TECNICO_HS_NOME_INDEX: + setTecnico_hs_nome( ( String ) value ); + break; + case PlanosActuacao.ID_INDEX: + setId( ( Integer ) value ); + break; + case PlanosActuacao.DATA_RELATORIO_INDEX: + setData_relatorio( ( java.util.Date ) value ); + break; + case PlanosActuacao.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO_INDEX: + setConcluido_por_desactivacao( ( Boolean ) value ); + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_ID_INDEX: + setTecnico_superior_hs_id( ( Integer ) value ); + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_NOME_INDEX: + setTecnico_superior_hs_nome( ( String ) value ); + break; + case PlanosActuacao.DATA_DESACTIVACAO_INDEX: + setData_desactivacao( ( java.util.Date ) value ); + break; + case PlanosActuacao.DATA_DISPONIBILIZACAO_INDEX: + setData_disponibilizacao( ( java.util.Date ) value ); + break; + case PlanosActuacao.DATA_VALIDACAO_SEG_INDEX: + setData_validacao_seg( ( java.util.Date ) value ); + break; + case PlanosActuacao.USER_SEG_INDEX: + setUser_seg( ( Integer ) value ); + break; + case PlanosActuacao.HS_RELATORIO_ID_INDEX: + setHs_relatorio_id( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PlanosActuacao.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case PlanosActuacao.FASE_INDEX: + this.fase = ( Integer ) value; + break; + case PlanosActuacao.DATA_VISITA_INDEX: + this.data_visita = ( java.util.Date ) value; + break; + case PlanosActuacao.NOME_ESTABELECIMENTO_INDEX: + this.nome_estabelecimento = ( String ) value; + break; + case PlanosActuacao.VALIDACAO_DIRECTOR_LOJA_INDEX: + this.validacao_director_loja = ( Boolean ) value; + break; + case PlanosActuacao.VALIDACAO_DNS_INDEX: + this.validacao_dns = ( Boolean ) value; + break; + case PlanosActuacao.VALIDACAO_HS_INDEX: + this.validacao_hs = ( Boolean ) value; + break; + case PlanosActuacao.PARECER_DNS_INDEX: + this.parecer_dns = ( String ) value; + break; + case PlanosActuacao.OBS_CORRECAO_INDEX: + this.obs_correcao = ( String ) value; + break; + case PlanosActuacao.DATA_VALIDACAO_DIR_LOJA_INDEX: + this.data_validacao_dir_loja = ( java.util.Date ) value; + break; + case PlanosActuacao.USER_DIR_LOJA_INDEX: + this.user_dir_loja = ( Integer ) value; + break; + case PlanosActuacao.TO_USER_DIR_LOJA_INDEX: + this.to_user_dir_loja = ( db.data.siprp.outer.UtilizadoresData ) value; + break; + case PlanosActuacao.DATA_VALIDACAO_DNS_INDEX: + this.data_validacao_dns = ( java.util.Date ) value; + break; + case PlanosActuacao.USER_DNS_INDEX: + this.user_dns = ( Integer ) value; + break; + case PlanosActuacao.TO_USER_DNS_INDEX: + this.to_user_dns = ( db.data.siprp.outer.UtilizadoresData ) value; + break; + case PlanosActuacao.DATA_VALIDACAO_HS_INDEX: + this.data_validacao_hs = ( java.util.Date ) value; + break; + case PlanosActuacao.USER_HS_INDEX: + this.user_hs = ( Integer ) value; + break; + case PlanosActuacao.TO_USER_HS_INDEX: + this.to_user_hs = ( db.data.siprp.outer.UtilizadoresData ) value; + break; + case PlanosActuacao.FASE_ANTES_CORRECAO_INDEX: + this.fase_antes_correcao = ( Integer ) value; + break; + case PlanosActuacao.CORRECAO_INDEX: + this.correcao = ( String ) value; + break; + case PlanosActuacao.OBSERVACOES_DL_INDEX: + this.observacoes_dl = ( String ) value; + break; + case PlanosActuacao.OBSERVACOES_DNS_INDEX: + this.observacoes_dns = ( String ) value; + break; + case PlanosActuacao.VERIFICACAO_SIPRP_INDEX: + this.verificacao_siprp = ( String ) value; + break; + case PlanosActuacao.DATA_CONTROLO_INDEX: + this.data_controlo = ( java.util.Date ) value; + break; + case PlanosActuacao.DATA_EMAIL_CONTROLO_INDEX: + this.data_email_controlo = ( java.util.Date ) value; + break; + case PlanosActuacao.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case PlanosActuacao.NOME_EMPRESA_INDEX: + this.nome_empresa = ( String ) value; + break; + case PlanosActuacao.TECNICO_HS_ID_INDEX: + this.tecnico_hs_id = ( Integer ) value; + break; + case PlanosActuacao.TECNICO_HS_NOME_INDEX: + this.tecnico_hs_nome = ( String ) value; + break; + case PlanosActuacao.ID_INDEX: + this.id = ( Integer ) value; + break; + case PlanosActuacao.DATA_RELATORIO_INDEX: + this.data_relatorio = ( java.util.Date ) value; + break; + case PlanosActuacao.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO_INDEX: + this.concluido_por_desactivacao = ( Boolean ) value; + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_ID_INDEX: + this.tecnico_superior_hs_id = ( Integer ) value; + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_NOME_INDEX: + this.tecnico_superior_hs_nome = ( String ) value; + break; + case PlanosActuacao.DATA_DESACTIVACAO_INDEX: + this.data_desactivacao = ( java.util.Date ) value; + break; + case PlanosActuacao.DATA_DISPONIBILIZACAO_INDEX: + this.data_disponibilizacao = ( java.util.Date ) value; + break; + case PlanosActuacao.DATA_VALIDACAO_SEG_INDEX: + this.data_validacao_seg = ( java.util.Date ) value; + break; + case PlanosActuacao.USER_SEG_INDEX: + this.user_seg = ( Integer ) value; + break; + case PlanosActuacao.HS_RELATORIO_ID_INDEX: + this.hs_relatorio_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 PlanosActuacao.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.FASE_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.DATA_VISITA_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.NOME_ESTABELECIMENTO_INDEX: + theClass = String.class; + break; + case PlanosActuacao.VALIDACAO_DIRECTOR_LOJA_INDEX: + theClass = Boolean.class; + break; + case PlanosActuacao.VALIDACAO_DNS_INDEX: + theClass = Boolean.class; + break; + case PlanosActuacao.VALIDACAO_HS_INDEX: + theClass = Boolean.class; + break; + case PlanosActuacao.PARECER_DNS_INDEX: + theClass = String.class; + break; + case PlanosActuacao.OBS_CORRECAO_INDEX: + theClass = String.class; + break; + case PlanosActuacao.DATA_VALIDACAO_DIR_LOJA_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.USER_DIR_LOJA_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.TO_USER_DIR_LOJA_INDEX: + theClass = db.data.siprp.outer.UtilizadoresData.class; + break; + case PlanosActuacao.DATA_VALIDACAO_DNS_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.USER_DNS_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.TO_USER_DNS_INDEX: + theClass = db.data.siprp.outer.UtilizadoresData.class; + break; + case PlanosActuacao.DATA_VALIDACAO_HS_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.USER_HS_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.TO_USER_HS_INDEX: + theClass = db.data.siprp.outer.UtilizadoresData.class; + break; + case PlanosActuacao.FASE_ANTES_CORRECAO_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.CORRECAO_INDEX: + theClass = String.class; + break; + case PlanosActuacao.OBSERVACOES_DL_INDEX: + theClass = String.class; + break; + case PlanosActuacao.OBSERVACOES_DNS_INDEX: + theClass = String.class; + break; + case PlanosActuacao.VERIFICACAO_SIPRP_INDEX: + theClass = String.class; + break; + case PlanosActuacao.DATA_CONTROLO_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.DATA_EMAIL_CONTROLO_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.NOME_EMPRESA_INDEX: + theClass = String.class; + break; + case PlanosActuacao.TECNICO_HS_ID_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.TECNICO_HS_NOME_INDEX: + theClass = String.class; + break; + case PlanosActuacao.ID_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.DATA_RELATORIO_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case PlanosActuacao.CONCLUIDO_POR_DESACTIVACAO_INDEX: + theClass = Boolean.class; + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_ID_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.TECNICO_SUPERIOR_HS_NOME_INDEX: + theClass = String.class; + break; + case PlanosActuacao.DATA_DESACTIVACAO_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.DATA_DISPONIBILIZACAO_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.DATA_VALIDACAO_SEG_INDEX: + theClass = java.util.Date.class; + break; + case PlanosActuacao.USER_SEG_INDEX: + theClass = Integer.class; + break; + case PlanosActuacao.HS_RELATORIO_ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PlanosActuacao._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, PlanosActuacao.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Properties.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Properties.java new file mode 100644 index 00000000..987f8cf7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Properties.java @@ -0,0 +1,178 @@ +/* +* Properties.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Properties extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "properties"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.properties"; + + public static final int _INVALID__INDEX = -1; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + }; + + + protected com.evolute.entity.utils.ObjectPrimaryKey primaryKey; + + public Properties() + { + super(); + dirtyProperties = new boolean[]{ }; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + throw new RuntimeException( "getPrimaryKeyName on Properties is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Properties._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.ObjectPrimaryKey( TABLENAME, Properties.PK_FIELD_NAMES ); + } + } + + @Override + public com.evolute.entity.utils.ObjectPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Recomendacoes.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Recomendacoes.java new file mode 100644 index 00000000..0e9d7531 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Recomendacoes.java @@ -0,0 +1,381 @@ +/* +* Recomendacoes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Recomendacoes extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Recomendacoes.ID, Recomendacoes.ID_INDEX ); + FIELD_INDEXES.put( Recomendacoes.ID_FULL, Recomendacoes.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Recomendacoes.CLASS_IDENTIFIER, Recomendacoes.ANALISE_ID, Recomendacoes.TO_ANALISE_ID ); + FIELD_INDEXES.put( Recomendacoes.ANALISE_ID, Recomendacoes.ANALISE_ID_INDEX ); + FIELD_INDEXES.put( Recomendacoes.ANALISE_ID_FULL, Recomendacoes.ANALISE_ID_INDEX ); + FIELD_INDEXES.put( Recomendacoes.TO_ANALISE_ID, Recomendacoes.TO_ANALISE_ID_INDEX ); + FIELD_INDEXES.put( Recomendacoes.RECOMENDACAO, Recomendacoes.RECOMENDACAO_INDEX ); + FIELD_INDEXES.put( Recomendacoes.RECOMENDACAO_FULL, Recomendacoes.RECOMENDACAO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyanalise_idToanalises_acidentes = + new com.evolute.entity.ForeignKey( Recomendacoes.class, Recomendacoes.ANALISE_ID, db.data.siprp.outer.AnalisesAcidentesData.class, db.data.siprp.outer.AnalisesAcidentesData.ID ); + + public static final String TABLENAME = "recomendacoes"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.recomendacoes"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "recomendacoes.id"; + public static final int ID_INDEX = 0; + public static final String ANALISE_ID = "analise_id"; + public static final String ANALISE_ID_FULL = "recomendacoes.analise_id"; + public static final int ANALISE_ID_INDEX = 1; + public static final String TO_ANALISE_ID = "to_analise_id"; + public static final String TO_ANALISE_ID_FULL = "recomendacoes.to_analise_id"; + public static final int TO_ANALISE_ID_INDEX = 2; + public static final String RECOMENDACAO = "recomendacao"; + public static final String RECOMENDACAO_FULL = "recomendacoes.recomendacao"; + public static final int RECOMENDACAO_INDEX = 3; + + public static final String FIELD_NAMES[] = new String[]{ + ANALISE_ID, TO_ANALISE_ID, RECOMENDACAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ANALISE_ID, TABLENAME + "." + TO_ANALISE_ID, TABLENAME + "." + RECOMENDACAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ANALISE_ID, RECOMENDACAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ANALISE_ID, RECOMENDACAO, }; + + private Integer id; + private Integer analise_id; + private db.data.siprp.outer.AnalisesAcidentesData to_analise_id; + private String recomendacao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Recomendacoes() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 getAnalise_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ANALISE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.analise_id; + } + + public void setAnalise_id( Integer analise_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ANALISE_ID, analise_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.analise_id = analise_id; + LAZY_LOADED_OBJECTS.put( ANALISE_ID, Boolean.TRUE ); + } + + public db.data.siprp.outer.AnalisesAcidentesData toAnalise_id() + { + try + { + prepare( TO_ANALISE_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_analise_id; + } + + public void setToAnalise_id( db.data.siprp.outer.AnalisesAcidentesData to_analise_id ) + { + try + { + preProcess( TO_ANALISE_ID, to_analise_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_analise_id = to_analise_id; + } + + public String getRecomendacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RECOMENDACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.recomendacao; + } + + public void setRecomendacao( String recomendacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( RECOMENDACAO, recomendacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.recomendacao = recomendacao; + LAZY_LOADED_OBJECTS.put( RECOMENDACAO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Recomendacoes.ID_INDEX: + value = getId(); + break; + case Recomendacoes.ANALISE_ID_INDEX: + value = getAnalise_id(); + break; + case Recomendacoes.TO_ANALISE_ID_INDEX: + value = toAnalise_id(); + break; + case Recomendacoes.RECOMENDACAO_INDEX: + value = getRecomendacao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Recomendacoes.ID_INDEX: + value = this.id; + break; + case Recomendacoes.ANALISE_ID_INDEX: + value = this.analise_id; + break; + case Recomendacoes.TO_ANALISE_ID_INDEX: + value = this.to_analise_id; + break; + case Recomendacoes.RECOMENDACAO_INDEX: + value = this.recomendacao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Recomendacoes.ID_INDEX: + setId( ( Integer ) value ); + break; + case Recomendacoes.ANALISE_ID_INDEX: + setAnalise_id( ( Integer ) value ); + break; + case Recomendacoes.TO_ANALISE_ID_INDEX: + setToAnalise_id( ( db.data.siprp.outer.AnalisesAcidentesData ) value ); + break; + case Recomendacoes.RECOMENDACAO_INDEX: + setRecomendacao( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Recomendacoes.ID_INDEX: + this.id = ( Integer ) value; + break; + case Recomendacoes.ANALISE_ID_INDEX: + this.analise_id = ( Integer ) value; + break; + case Recomendacoes.TO_ANALISE_ID_INDEX: + this.to_analise_id = ( db.data.siprp.outer.AnalisesAcidentesData ) value; + break; + case Recomendacoes.RECOMENDACAO_INDEX: + this.recomendacao = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Recomendacoes.ID_INDEX: + theClass = Integer.class; + break; + case Recomendacoes.ANALISE_ID_INDEX: + theClass = Integer.class; + break; + case Recomendacoes.TO_ANALISE_ID_INDEX: + theClass = db.data.siprp.outer.AnalisesAcidentesData.class; + break; + case Recomendacoes.RECOMENDACAO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Recomendacoes._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Recomendacoes.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/RiscoValoresTemp.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/RiscoValoresTemp.java new file mode 100644 index 00000000..8bf76521 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/RiscoValoresTemp.java @@ -0,0 +1,178 @@ +/* +* RiscoValoresTemp.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class RiscoValoresTemp extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "risco_valores_temp"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.risco_valores_temp"; + + public static final int _INVALID__INDEX = -1; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + }; + + + protected com.evolute.entity.utils.ObjectPrimaryKey primaryKey; + + public RiscoValoresTemp() + { + super(); + dirtyProperties = new boolean[]{ }; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + throw new RuntimeException( "getPrimaryKeyName on RiscoValoresTemp is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : RiscoValoresTemp._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.ObjectPrimaryKey( TABLENAME, RiscoValoresTemp.PK_FIELD_NAMES ); + } + } + + @Override + public com.evolute.entity.utils.ObjectPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Roles.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Roles.java new file mode 100644 index 00000000..ac757915 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Roles.java @@ -0,0 +1,178 @@ +/* +* Roles.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Roles extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "roles"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.roles"; + + public static final int _INVALID__INDEX = -1; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + }; + + + protected com.evolute.entity.utils.ObjectPrimaryKey primaryKey; + + public Roles() + { + super(); + dirtyProperties = new boolean[]{ }; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + throw new RuntimeException( "getPrimaryKeyName on Roles is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Roles._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.ObjectPrimaryKey( TABLENAME, Roles.PK_FIELD_NAMES ); + } + } + + @Override + public com.evolute.entity.utils.ObjectPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Seccoes.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Seccoes.java new file mode 100644 index 00000000..0e66639c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Seccoes.java @@ -0,0 +1,448 @@ +/* +* Seccoes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Seccoes extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Seccoes.ID, Seccoes.ID_INDEX ); + FIELD_INDEXES.put( Seccoes.ID_FULL, Seccoes.ID_INDEX ); + FIELD_INDEXES.put( Seccoes.DESCRICAO, Seccoes.DESCRICAO_INDEX ); + FIELD_INDEXES.put( Seccoes.DESCRICAO_FULL, Seccoes.DESCRICAO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Seccoes.CLASS_IDENTIFIER, Seccoes.DEPARTAMENTO_ID, Seccoes.TO_DEPARTAMENTO_ID ); + FIELD_INDEXES.put( Seccoes.DEPARTAMENTO_ID, Seccoes.DEPARTAMENTO_ID_INDEX ); + FIELD_INDEXES.put( Seccoes.DEPARTAMENTO_ID_FULL, Seccoes.DEPARTAMENTO_ID_INDEX ); + FIELD_INDEXES.put( Seccoes.TO_DEPARTAMENTO_ID, Seccoes.TO_DEPARTAMENTO_ID_INDEX ); + FIELD_INDEXES.put( Seccoes.ACTIVO, Seccoes.ACTIVO_INDEX ); + FIELD_INDEXES.put( Seccoes.ACTIVO_FULL, Seccoes.ACTIVO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeydepartamento_idTodepartamentos = + new com.evolute.entity.ForeignKey( Seccoes.class, Seccoes.DEPARTAMENTO_ID, db.data.siprp.outer.DepartamentosData.class, db.data.siprp.outer.DepartamentosData.ID ); + + public static final String TABLENAME = "seccoes"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.seccoes"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "seccoes.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "seccoes.descricao"; + public static final int DESCRICAO_INDEX = 1; + public static final String DEPARTAMENTO_ID = "departamento_id"; + public static final String DEPARTAMENTO_ID_FULL = "seccoes.departamento_id"; + public static final int DEPARTAMENTO_ID_INDEX = 2; + public static final String TO_DEPARTAMENTO_ID = "to_departamento_id"; + public static final String TO_DEPARTAMENTO_ID_FULL = "seccoes.to_departamento_id"; + public static final int TO_DEPARTAMENTO_ID_INDEX = 3; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "seccoes.activo"; + public static final int ACTIVO_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, DEPARTAMENTO_ID, TO_DEPARTAMENTO_ID, ACTIVO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + DEPARTAMENTO_ID, TABLENAME + "." + TO_DEPARTAMENTO_ID, TABLENAME + "." + ACTIVO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, DEPARTAMENTO_ID, ACTIVO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRICAO, DEPARTAMENTO_ID, ACTIVO, }; + + private Integer id; + private String descricao; + private Integer departamento_id; + private db.data.siprp.outer.DepartamentosData to_departamento_id; + private String activo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Seccoes() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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.ListfromAnalisesAcidentes_seccao_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.AnalisesAcidentesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.AnalisesAcidentesData.class , getPrimaryKey().getMap().get("id"), "seccao_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public String getDescricao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao; + } + + public void setDescricao( String descricao ) + { + try + { + 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 getDepartamento_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DEPARTAMENTO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.departamento_id; + } + + public void setDepartamento_id( Integer departamento_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( DEPARTAMENTO_ID, departamento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.departamento_id = departamento_id; + LAZY_LOADED_OBJECTS.put( DEPARTAMENTO_ID, Boolean.TRUE ); + } + + public db.data.siprp.outer.DepartamentosData toDepartamento_id() + { + try + { + prepare( TO_DEPARTAMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_departamento_id; + } + + public void setToDepartamento_id( db.data.siprp.outer.DepartamentosData to_departamento_id ) + { + try + { + preProcess( TO_DEPARTAMENTO_ID, to_departamento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_departamento_id = to_departamento_id; + } + + public String getActivo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACTIVO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.activo; + } + + public void setActivo( String activo ) + { + try + { + 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 Seccoes.ID_INDEX: + value = getId(); + break; + case Seccoes.DESCRICAO_INDEX: + value = getDescricao(); + break; + case Seccoes.DEPARTAMENTO_ID_INDEX: + value = getDepartamento_id(); + break; + case Seccoes.TO_DEPARTAMENTO_ID_INDEX: + value = toDepartamento_id(); + break; + case Seccoes.ACTIVO_INDEX: + value = getActivo(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Seccoes.ID_INDEX: + value = this.id; + break; + case Seccoes.DESCRICAO_INDEX: + value = this.descricao; + break; + case Seccoes.DEPARTAMENTO_ID_INDEX: + value = this.departamento_id; + break; + case Seccoes.TO_DEPARTAMENTO_ID_INDEX: + value = this.to_departamento_id; + break; + case Seccoes.ACTIVO_INDEX: + value = this.activo; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Seccoes.ID_INDEX: + setId( ( Integer ) value ); + break; + case Seccoes.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case Seccoes.DEPARTAMENTO_ID_INDEX: + setDepartamento_id( ( Integer ) value ); + break; + case Seccoes.TO_DEPARTAMENTO_ID_INDEX: + setToDepartamento_id( ( db.data.siprp.outer.DepartamentosData ) value ); + break; + case Seccoes.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Seccoes.ID_INDEX: + this.id = ( Integer ) value; + break; + case Seccoes.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case Seccoes.DEPARTAMENTO_ID_INDEX: + this.departamento_id = ( Integer ) value; + break; + case Seccoes.TO_DEPARTAMENTO_ID_INDEX: + this.to_departamento_id = ( db.data.siprp.outer.DepartamentosData ) value; + break; + case Seccoes.ACTIVO_INDEX: + this.activo = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Seccoes.ID_INDEX: + theClass = Integer.class; + break; + case Seccoes.DESCRICAO_INDEX: + theClass = String.class; + break; + case Seccoes.DEPARTAMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Seccoes.TO_DEPARTAMENTO_ID_INDEX: + theClass = db.data.siprp.outer.DepartamentosData.class; + break; + case Seccoes.ACTIVO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Seccoes._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Seccoes.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/TiposExamesComp.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/TiposExamesComp.java new file mode 100644 index 00000000..bbf1916b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/TiposExamesComp.java @@ -0,0 +1,346 @@ +/* +* TiposExamesComp.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class TiposExamesComp extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp.inner.tipos_exames_comp"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "tipos_exames_comp.id"; + public static final int ID_INDEX = 0; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "tipos_exames_comp.ordem"; + public static final int ORDEM_INDEX = 1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "tipos_exames_comp.descricao"; + public static final int DESCRICAO_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + ORDEM, DESCRICAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ORDEM, TABLENAME + "." + DESCRICAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ORDEM, DESCRICAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ORDEM, DESCRICAO, }; + + private Integer id; + private Integer ordem; + private String descricao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TiposExamesComp() + { + super(); + dirtyProperties = new boolean[]{ false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 = new java.util.LinkedList< db.data.siprp.outer.ExamesPerfisData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.ExamesPerfisData.class , getPrimaryKey().getMap().get("id"), "tipo" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public Integer getOrdem() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ORDEM ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ordem; + } + + public void setOrdem( Integer ordem ) + { + try + { + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/TiposUtilizadores.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/TiposUtilizadores.java new file mode 100644 index 00000000..10608736 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/TiposUtilizadores.java @@ -0,0 +1,431 @@ +/* +* TiposUtilizadores.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class TiposUtilizadores extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( TiposUtilizadores.ID, TiposUtilizadores.ID_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.ID_FULL, TiposUtilizadores.ID_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.TIPO, TiposUtilizadores.TIPO_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.TIPO_FULL, TiposUtilizadores.TIPO_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.DESCRICAO, TiposUtilizadores.DESCRICAO_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.DESCRICAO_FULL, TiposUtilizadores.DESCRICAO_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.ACTIVO, TiposUtilizadores.ACTIVO_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.ACTIVO_FULL, TiposUtilizadores.ACTIVO_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.ORDEM, TiposUtilizadores.ORDEM_INDEX ); + FIELD_INDEXES.put( TiposUtilizadores.ORDEM_FULL, TiposUtilizadores.ORDEM_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "tipos_utilizadores"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.tipos_utilizadores"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "tipos_utilizadores.id"; + public static final int ID_INDEX = 0; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "tipos_utilizadores.tipo"; + public static final int TIPO_INDEX = 1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "tipos_utilizadores.descricao"; + public static final int DESCRICAO_INDEX = 2; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "tipos_utilizadores.activo"; + public static final int ACTIVO_INDEX = 3; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "tipos_utilizadores.ordem"; + public static final int ORDEM_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + TIPO, DESCRICAO, ACTIVO, ORDEM, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TIPO, TABLENAME + "." + DESCRICAO, TABLENAME + "." + ACTIVO, TABLENAME + "." + ORDEM, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TIPO, DESCRICAO, ACTIVO, ORDEM, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TIPO, DESCRICAO, ACTIVO, ORDEM, }; + + private Integer id; + private Integer tipo; + private String descricao; + private String activo; + private Integer ordem; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TiposUtilizadores() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 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 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 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 TiposUtilizadores.ID_INDEX: + value = getId(); + break; + case TiposUtilizadores.TIPO_INDEX: + value = getTipo(); + break; + case TiposUtilizadores.DESCRICAO_INDEX: + value = getDescricao(); + break; + case TiposUtilizadores.ACTIVO_INDEX: + value = getActivo(); + break; + case TiposUtilizadores.ORDEM_INDEX: + value = getOrdem(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TiposUtilizadores.ID_INDEX: + value = this.id; + break; + case TiposUtilizadores.TIPO_INDEX: + value = this.tipo; + break; + case TiposUtilizadores.DESCRICAO_INDEX: + value = this.descricao; + break; + case TiposUtilizadores.ACTIVO_INDEX: + value = this.activo; + break; + case TiposUtilizadores.ORDEM_INDEX: + value = this.ordem; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TiposUtilizadores.ID_INDEX: + setId( ( Integer ) value ); + break; + case TiposUtilizadores.TIPO_INDEX: + setTipo( ( Integer ) value ); + break; + case TiposUtilizadores.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case TiposUtilizadores.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + case TiposUtilizadores.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TiposUtilizadores.ID_INDEX: + this.id = ( Integer ) value; + break; + case TiposUtilizadores.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case TiposUtilizadores.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case TiposUtilizadores.ACTIVO_INDEX: + this.activo = ( String ) value; + break; + case TiposUtilizadores.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case TiposUtilizadores.ID_INDEX: + theClass = Integer.class; + break; + case TiposUtilizadores.TIPO_INDEX: + theClass = Integer.class; + break; + case TiposUtilizadores.DESCRICAO_INDEX: + theClass = String.class; + break; + case TiposUtilizadores.ACTIVO_INDEX: + theClass = String.class; + break; + case TiposUtilizadores.ORDEM_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : TiposUtilizadores._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, TiposUtilizadores.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Trabalhadores.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Trabalhadores.java new file mode 100644 index 00000000..fc9a131e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Trabalhadores.java @@ -0,0 +1,1092 @@ +/* +* Trabalhadores.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Trabalhadores extends com.evolute.entity.evo.EvoDataObject +{ + 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.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.NUMERO_MECANOGRAFICO, Trabalhadores.NUMERO_MECANOGRAFICO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NUMERO_MECANOGRAFICO_FULL, Trabalhadores.NUMERO_MECANOGRAFICO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.CATEGORIA, Trabalhadores.CATEGORIA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.CATEGORIA_FULL, Trabalhadores.CATEGORIA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.ULTIMO_EXAME, Trabalhadores.ULTIMO_EXAME_INDEX ); + FIELD_INDEXES.put( Trabalhadores.ULTIMO_EXAME_FULL, Trabalhadores.ULTIMO_EXAME_INDEX ); + FIELD_INDEXES.put( Trabalhadores.REALIZADO, Trabalhadores.REALIZADO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.REALIZADO_FULL, Trabalhadores.REALIZADO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.PROXIMO_EXAME, Trabalhadores.PROXIMO_EXAME_INDEX ); + FIELD_INDEXES.put( Trabalhadores.PROXIMO_EXAME_FULL, Trabalhadores.PROXIMO_EXAME_INDEX ); + FIELD_INDEXES.put( Trabalhadores.ULTIMA_CONSULTA, Trabalhadores.ULTIMA_CONSULTA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.ULTIMA_CONSULTA_FULL, Trabalhadores.ULTIMA_CONSULTA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.REALIZADA, Trabalhadores.REALIZADA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.REALIZADA_FULL, Trabalhadores.REALIZADA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.PROXIMA_CONSULTA, Trabalhadores.PROXIMA_CONSULTA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.PROXIMA_CONSULTA_FULL, Trabalhadores.PROXIMA_CONSULTA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NOME, Trabalhadores.NOME_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NOME_FULL, Trabalhadores.NOME_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.RESULTADO, Trabalhadores.RESULTADO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.RESULTADO_FULL, Trabalhadores.RESULTADO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.DATA_ESPERADA, Trabalhadores.DATA_ESPERADA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.DATA_ESPERADA_FULL, Trabalhadores.DATA_ESPERADA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.DATA_FICHA, Trabalhadores.DATA_FICHA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.DATA_FICHA_FULL, Trabalhadores.DATA_FICHA_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, db.data.siprp.outer.EstabelecimentosData.class, db.data.siprp.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "trabalhadores"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.trabalhadores"; + + 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 SEXO = "sexo"; + public static final String SEXO_FULL = "trabalhadores.sexo"; + public static final int SEXO_INDEX = 1; + 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 = 2; + 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 = 3; + public static final String CATEGORIA = "categoria"; + public static final String CATEGORIA_FULL = "trabalhadores.categoria"; + public static final int CATEGORIA_INDEX = 4; + public static final String ULTIMO_EXAME = "ultimo_exame"; + public static final String ULTIMO_EXAME_FULL = "trabalhadores.ultimo_exame"; + public static final int ULTIMO_EXAME_INDEX = 5; + public static final String REALIZADO = "realizado"; + public static final String REALIZADO_FULL = "trabalhadores.realizado"; + public static final int REALIZADO_INDEX = 6; + public static final String PROXIMO_EXAME = "proximo_exame"; + public static final String PROXIMO_EXAME_FULL = "trabalhadores.proximo_exame"; + public static final int PROXIMO_EXAME_INDEX = 7; + public static final String ULTIMA_CONSULTA = "ultima_consulta"; + public static final String ULTIMA_CONSULTA_FULL = "trabalhadores.ultima_consulta"; + public static final int ULTIMA_CONSULTA_INDEX = 8; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "trabalhadores.realizada"; + public static final int REALIZADA_INDEX = 9; + public static final String PROXIMA_CONSULTA = "proxima_consulta"; + public static final String PROXIMA_CONSULTA_FULL = "trabalhadores.proxima_consulta"; + public static final int PROXIMA_CONSULTA_INDEX = 10; + public static final String NOME = "nome"; + public static final String NOME_FULL = "trabalhadores.nome"; + public static final int NOME_INDEX = 11; + 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 = 12; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID_FULL = "trabalhadores.to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 13; + public static final String RESULTADO = "resultado"; + public static final String RESULTADO_FULL = "trabalhadores.resultado"; + public static final int RESULTADO_INDEX = 14; + public static final String DATA_ESPERADA = "data_esperada"; + public static final String DATA_ESPERADA_FULL = "trabalhadores.data_esperada"; + public static final int DATA_ESPERADA_INDEX = 15; + public static final String DATA_FICHA = "data_ficha"; + public static final String DATA_FICHA_FULL = "trabalhadores.data_ficha"; + public static final int DATA_FICHA_INDEX = 16; + + public static final String FIELD_NAMES[] = new String[]{ + SEXO, DATA_NASCIMENTO, NUMERO_MECANOGRAFICO, CATEGORIA, ULTIMO_EXAME, REALIZADO, + PROXIMO_EXAME, ULTIMA_CONSULTA, REALIZADA, PROXIMA_CONSULTA, NOME, + ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, RESULTADO, DATA_ESPERADA, + DATA_FICHA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + SEXO, TABLENAME + "." + DATA_NASCIMENTO, TABLENAME + "." + NUMERO_MECANOGRAFICO, TABLENAME + "." + CATEGORIA, TABLENAME + "." + ULTIMO_EXAME, TABLENAME + "." + REALIZADO, + TABLENAME + "." + PROXIMO_EXAME, TABLENAME + "." + ULTIMA_CONSULTA, TABLENAME + "." + REALIZADA, TABLENAME + "." + PROXIMA_CONSULTA, TABLENAME + "." + NOME, + TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID, TABLENAME + "." + RESULTADO, TABLENAME + "." + DATA_ESPERADA, + TABLENAME + "." + DATA_FICHA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, SEXO, DATA_NASCIMENTO, NUMERO_MECANOGRAFICO, CATEGORIA, ULTIMO_EXAME, + REALIZADO, PROXIMO_EXAME, ULTIMA_CONSULTA, REALIZADA, PROXIMA_CONSULTA, NOME, + ESTABELECIMENTO_ID, RESULTADO, DATA_ESPERADA, DATA_FICHA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, SEXO, DATA_NASCIMENTO, NUMERO_MECANOGRAFICO, CATEGORIA, ULTIMO_EXAME, + REALIZADO, PROXIMO_EXAME, ULTIMA_CONSULTA, REALIZADA, PROXIMA_CONSULTA, NOME, + ESTABELECIMENTO_ID, RESULTADO, DATA_ESPERADA, DATA_FICHA, }; + + private Integer id; + private String sexo; + private java.util.Date data_nascimento; + private String numero_mecanografico; + private String categoria; + private java.util.Date ultimo_exame; + private String realizado; + private java.util.Date proximo_exame; + private java.util.Date ultima_consulta; + private String realizada; + private java.util.Date proxima_consulta; + private String nome; + private Integer estabelecimento_id; + private db.data.siprp.outer.EstabelecimentosData to_estabelecimento_id; + private String resultado; + private java.util.Date data_esperada; + private java.util.Date data_ficha; + + 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 }; + } + + 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 = new java.util.LinkedList< db.data.siprp.outer.AvisosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.AvisosData.class , getPrimaryKey().getMap().get("id"), "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 = new java.util.LinkedList< db.data.siprp.outer.ExamesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.ExamesData.class , getPrimaryKey().getMap().get("id"), "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 = new java.util.LinkedList< db.data.siprp.outer.MarcacoesTrabalhadorData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.MarcacoesTrabalhadorData.class , getPrimaryKey().getMap().get("id"), "trabalhador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + 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 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 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 java.util.Date getUltimo_exame() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ULTIMO_EXAME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ultimo_exame; + } + + public void setUltimo_exame( java.util.Date ultimo_exame ) + { + try + { + setLockedForRefresh( true ); + preProcess( ULTIMO_EXAME, ultimo_exame ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ultimo_exame = ultimo_exame; + LAZY_LOADED_OBJECTS.put( ULTIMO_EXAME, Boolean.TRUE ); + } + + public String getRealizado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( REALIZADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.realizado; + } + + public void setRealizado( String realizado ) + { + try + { + setLockedForRefresh( true ); + preProcess( REALIZADO, realizado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.realizado = realizado; + LAZY_LOADED_OBJECTS.put( REALIZADO, 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 java.util.Date getUltima_consulta() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ULTIMA_CONSULTA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ultima_consulta; + } + + public void setUltima_consulta( java.util.Date ultima_consulta ) + { + try + { + setLockedForRefresh( true ); + preProcess( ULTIMA_CONSULTA, ultima_consulta ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ultima_consulta = ultima_consulta; + LAZY_LOADED_OBJECTS.put( ULTIMA_CONSULTA, 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 getProxima_consulta() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROXIMA_CONSULTA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.proxima_consulta; + } + + public void setProxima_consulta( java.util.Date proxima_consulta ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROXIMA_CONSULTA, proxima_consulta ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.proxima_consulta = proxima_consulta; + LAZY_LOADED_OBJECTS.put( PROXIMA_CONSULTA, Boolean.TRUE ); + } + + public String getNome() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome; + } + + public void setNome( String nome ) + { + try + { + 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 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 db.data.siprp.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp.outer.EstabelecimentosData to_estabelecimento_id ) + { + try + { + preProcess( TO_ESTABELECIMENTO_ID, to_estabelecimento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_estabelecimento_id = to_estabelecimento_id; + } + + public String getResultado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESULTADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.resultado; + } + + public void setResultado( String 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 java.util.Date getData_esperada() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ESPERADA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_esperada; + } + + public void setData_esperada( java.util.Date data_esperada ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ESPERADA, data_esperada ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_esperada = data_esperada; + LAZY_LOADED_OBJECTS.put( DATA_ESPERADA, Boolean.TRUE ); + } + + public java.util.Date getData_ficha() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_FICHA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_ficha; + } + + public void setData_ficha( java.util.Date data_ficha ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_FICHA, data_ficha ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_ficha = data_ficha; + LAZY_LOADED_OBJECTS.put( DATA_FICHA, 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.SEXO_INDEX: + value = getSexo(); + break; + case Trabalhadores.DATA_NASCIMENTO_INDEX: + value = getData_nascimento(); + break; + case Trabalhadores.NUMERO_MECANOGRAFICO_INDEX: + value = getNumero_mecanografico(); + break; + case Trabalhadores.CATEGORIA_INDEX: + value = getCategoria(); + break; + case Trabalhadores.ULTIMO_EXAME_INDEX: + value = getUltimo_exame(); + break; + case Trabalhadores.REALIZADO_INDEX: + value = getRealizado(); + break; + case Trabalhadores.PROXIMO_EXAME_INDEX: + value = getProximo_exame(); + break; + case Trabalhadores.ULTIMA_CONSULTA_INDEX: + value = getUltima_consulta(); + break; + case Trabalhadores.REALIZADA_INDEX: + value = getRealizada(); + break; + case Trabalhadores.PROXIMA_CONSULTA_INDEX: + value = getProxima_consulta(); + break; + case Trabalhadores.NOME_INDEX: + value = getNome(); + break; + case Trabalhadores.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case Trabalhadores.TO_ESTABELECIMENTO_ID_INDEX: + value = toEstabelecimento_id(); + break; + case Trabalhadores.RESULTADO_INDEX: + value = getResultado(); + break; + case Trabalhadores.DATA_ESPERADA_INDEX: + value = getData_esperada(); + break; + case Trabalhadores.DATA_FICHA_INDEX: + value = getData_ficha(); + 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.SEXO_INDEX: + value = this.sexo; + break; + case Trabalhadores.DATA_NASCIMENTO_INDEX: + value = this.data_nascimento; + break; + case Trabalhadores.NUMERO_MECANOGRAFICO_INDEX: + value = this.numero_mecanografico; + break; + case Trabalhadores.CATEGORIA_INDEX: + value = this.categoria; + break; + case Trabalhadores.ULTIMO_EXAME_INDEX: + value = this.ultimo_exame; + break; + case Trabalhadores.REALIZADO_INDEX: + value = this.realizado; + break; + case Trabalhadores.PROXIMO_EXAME_INDEX: + value = this.proximo_exame; + break; + case Trabalhadores.ULTIMA_CONSULTA_INDEX: + value = this.ultima_consulta; + break; + case Trabalhadores.REALIZADA_INDEX: + value = this.realizada; + break; + case Trabalhadores.PROXIMA_CONSULTA_INDEX: + value = this.proxima_consulta; + break; + case Trabalhadores.NOME_INDEX: + value = this.nome; + 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.RESULTADO_INDEX: + value = this.resultado; + break; + case Trabalhadores.DATA_ESPERADA_INDEX: + value = this.data_esperada; + break; + case Trabalhadores.DATA_FICHA_INDEX: + value = this.data_ficha; + 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.SEXO_INDEX: + setSexo( ( String ) value ); + break; + case Trabalhadores.DATA_NASCIMENTO_INDEX: + setData_nascimento( ( java.util.Date ) value ); + break; + case Trabalhadores.NUMERO_MECANOGRAFICO_INDEX: + setNumero_mecanografico( ( String ) value ); + break; + case Trabalhadores.CATEGORIA_INDEX: + setCategoria( ( String ) value ); + break; + case Trabalhadores.ULTIMO_EXAME_INDEX: + setUltimo_exame( ( java.util.Date ) value ); + break; + case Trabalhadores.REALIZADO_INDEX: + setRealizado( ( String ) value ); + break; + case Trabalhadores.PROXIMO_EXAME_INDEX: + setProximo_exame( ( java.util.Date ) value ); + break; + case Trabalhadores.ULTIMA_CONSULTA_INDEX: + setUltima_consulta( ( java.util.Date ) value ); + break; + case Trabalhadores.REALIZADA_INDEX: + setRealizada( ( String ) value ); + break; + case Trabalhadores.PROXIMA_CONSULTA_INDEX: + setProxima_consulta( ( java.util.Date ) value ); + break; + case Trabalhadores.NOME_INDEX: + setNome( ( String ) value ); + break; + case Trabalhadores.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case Trabalhadores.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp.outer.EstabelecimentosData ) value ); + break; + case Trabalhadores.RESULTADO_INDEX: + setResultado( ( String ) value ); + break; + case Trabalhadores.DATA_ESPERADA_INDEX: + setData_esperada( ( java.util.Date ) value ); + break; + case Trabalhadores.DATA_FICHA_INDEX: + setData_ficha( ( java.util.Date ) 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.SEXO_INDEX: + this.sexo = ( String ) value; + break; + case Trabalhadores.DATA_NASCIMENTO_INDEX: + this.data_nascimento = ( java.util.Date ) value; + break; + case Trabalhadores.NUMERO_MECANOGRAFICO_INDEX: + this.numero_mecanografico = ( String ) value; + break; + case Trabalhadores.CATEGORIA_INDEX: + this.categoria = ( String ) value; + break; + case Trabalhadores.ULTIMO_EXAME_INDEX: + this.ultimo_exame = ( java.util.Date ) value; + break; + case Trabalhadores.REALIZADO_INDEX: + this.realizado = ( String ) value; + break; + case Trabalhadores.PROXIMO_EXAME_INDEX: + this.proximo_exame = ( java.util.Date ) value; + break; + case Trabalhadores.ULTIMA_CONSULTA_INDEX: + this.ultima_consulta = ( java.util.Date ) value; + break; + case Trabalhadores.REALIZADA_INDEX: + this.realizada = ( String ) value; + break; + case Trabalhadores.PROXIMA_CONSULTA_INDEX: + this.proxima_consulta = ( java.util.Date ) value; + break; + case Trabalhadores.NOME_INDEX: + this.nome = ( String ) value; + break; + case Trabalhadores.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case Trabalhadores.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( db.data.siprp.outer.EstabelecimentosData ) value; + break; + case Trabalhadores.RESULTADO_INDEX: + this.resultado = ( String ) value; + break; + case Trabalhadores.DATA_ESPERADA_INDEX: + this.data_esperada = ( java.util.Date ) value; + break; + case Trabalhadores.DATA_FICHA_INDEX: + this.data_ficha = ( 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 Trabalhadores.ID_INDEX: + theClass = Integer.class; + break; + case Trabalhadores.SEXO_INDEX: + theClass = String.class; + break; + case Trabalhadores.DATA_NASCIMENTO_INDEX: + theClass = java.util.Date.class; + break; + case Trabalhadores.NUMERO_MECANOGRAFICO_INDEX: + theClass = String.class; + break; + case Trabalhadores.CATEGORIA_INDEX: + theClass = String.class; + break; + case Trabalhadores.ULTIMO_EXAME_INDEX: + theClass = java.util.Date.class; + break; + case Trabalhadores.REALIZADO_INDEX: + theClass = String.class; + break; + case Trabalhadores.PROXIMO_EXAME_INDEX: + theClass = java.util.Date.class; + break; + case Trabalhadores.ULTIMA_CONSULTA_INDEX: + theClass = java.util.Date.class; + break; + case Trabalhadores.REALIZADA_INDEX: + theClass = String.class; + break; + case Trabalhadores.PROXIMA_CONSULTA_INDEX: + theClass = java.util.Date.class; + break; + case Trabalhadores.NOME_INDEX: + theClass = String.class; + break; + case Trabalhadores.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Trabalhadores.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp.outer.EstabelecimentosData.class; + break; + case Trabalhadores.RESULTADO_INDEX: + theClass = String.class; + break; + case Trabalhadores.DATA_ESPERADA_INDEX: + theClass = java.util.Date.class; + break; + case Trabalhadores.DATA_FICHA_INDEX: + theClass = java.util.Date.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Users.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Users.java new file mode 100644 index 00000000..1df6d29e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Users.java @@ -0,0 +1,178 @@ +/* +* Users.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Users extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "users"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.users"; + + public static final int _INVALID__INDEX = -1; + + public static final String FIELD_NAMES[] = new String[]{ + }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + }; + + + protected com.evolute.entity.utils.ObjectPrimaryKey primaryKey; + + public Users() + { + super(); + dirtyProperties = new boolean[]{ }; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + throw new RuntimeException( "getPrimaryKeyName on Users is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Users._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.ObjectPrimaryKey( TABLENAME, Users.PK_FIELD_NAMES ); + } + } + + @Override + public com.evolute.entity.utils.ObjectPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Utilizadores.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Utilizadores.java new file mode 100644 index 00000000..8323d2ec --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Utilizadores.java @@ -0,0 +1,1242 @@ +/* +* Utilizadores.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Utilizadores extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Utilizadores.ID, Utilizadores.ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.ID_FULL, Utilizadores.ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.LOGIN, Utilizadores.LOGIN_INDEX ); + FIELD_INDEXES.put( Utilizadores.LOGIN_FULL, Utilizadores.LOGIN_INDEX ); + FIELD_INDEXES.put( Utilizadores.PASSWORD, Utilizadores.PASSWORD_INDEX ); + FIELD_INDEXES.put( Utilizadores.PASSWORD_FULL, Utilizadores.PASSWORD_INDEX ); + FIELD_INDEXES.put( Utilizadores.EMAIL, Utilizadores.EMAIL_INDEX ); + FIELD_INDEXES.put( Utilizadores.EMAIL_FULL, Utilizadores.EMAIL_INDEX ); + FIELD_INDEXES.put( Utilizadores.EMPRESA_ID, Utilizadores.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.EMPRESA_ID_FULL, Utilizadores.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.ESTABELECIMENTO_ID, Utilizadores.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.ESTABELECIMENTO_ID_FULL, Utilizadores.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.ADMINISTRADOR, Utilizadores.ADMINISTRADOR_INDEX ); + FIELD_INDEXES.put( Utilizadores.ADMINISTRADOR_FULL, Utilizadores.ADMINISTRADOR_INDEX ); + FIELD_INDEXES.put( Utilizadores.MEDICO_ID, Utilizadores.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.MEDICO_ID_FULL, Utilizadores.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.TIPO, Utilizadores.TIPO_INDEX ); + FIELD_INDEXES.put( Utilizadores.TIPO_FULL, Utilizadores.TIPO_INDEX ); + FIELD_INDEXES.put( Utilizadores.NUMERO_CEDULA, Utilizadores.NUMERO_CEDULA_INDEX ); + FIELD_INDEXES.put( Utilizadores.NUMERO_CEDULA_FULL, Utilizadores.NUMERO_CEDULA_INDEX ); + FIELD_INDEXES.put( Utilizadores.CAP, Utilizadores.CAP_INDEX ); + FIELD_INDEXES.put( Utilizadores.CAP_FULL, Utilizadores.CAP_INDEX ); + FIELD_INDEXES.put( Utilizadores.NOME, Utilizadores.NOME_INDEX ); + FIELD_INDEXES.put( Utilizadores.NOME_FULL, Utilizadores.NOME_INDEX ); + FIELD_INDEXES.put( Utilizadores.FUNCIONARIO_HST_ID, Utilizadores.FUNCIONARIO_HST_ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.FUNCIONARIO_HST_ID_FULL, Utilizadores.FUNCIONARIO_HST_ID_INDEX ); + FIELD_INDEXES.put( Utilizadores.ACTIVO, Utilizadores.ACTIVO_INDEX ); + FIELD_INDEXES.put( Utilizadores.ACTIVO_FULL, Utilizadores.ACTIVO_INDEX ); + FIELD_INDEXES.put( Utilizadores.RESPONSAVEL_LOJA, Utilizadores.RESPONSAVEL_LOJA_INDEX ); + FIELD_INDEXES.put( Utilizadores.RESPONSAVEL_LOJA_FULL, Utilizadores.RESPONSAVEL_LOJA_INDEX ); + FIELD_INDEXES.put( Utilizadores.NUMERO_MECANOGRAFICO, Utilizadores.NUMERO_MECANOGRAFICO_INDEX ); + FIELD_INDEXES.put( Utilizadores.NUMERO_MECANOGRAFICO_FULL, Utilizadores.NUMERO_MECANOGRAFICO_INDEX ); + FIELD_INDEXES.put( Utilizadores.GESTOR_GERAL, Utilizadores.GESTOR_GERAL_INDEX ); + FIELD_INDEXES.put( Utilizadores.GESTOR_GERAL_FULL, Utilizadores.GESTOR_GERAL_INDEX ); + FIELD_INDEXES.put( Utilizadores.PRIMEIRO_LOGIN, Utilizadores.PRIMEIRO_LOGIN_INDEX ); + FIELD_INDEXES.put( Utilizadores.PRIMEIRO_LOGIN_FULL, Utilizadores.PRIMEIRO_LOGIN_INDEX ); + FIELD_INDEXES.put( Utilizadores.APAGADO, Utilizadores.APAGADO_INDEX ); + FIELD_INDEXES.put( Utilizadores.APAGADO_FULL, Utilizadores.APAGADO_INDEX ); + FIELD_INDEXES.put( Utilizadores.DATA_PASSWORD, Utilizadores.DATA_PASSWORD_INDEX ); + FIELD_INDEXES.put( Utilizadores.DATA_PASSWORD_FULL, Utilizadores.DATA_PASSWORD_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "utilizadores"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.utilizadores"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "utilizadores.id"; + public static final int ID_INDEX = 0; + public static final String LOGIN = "login"; + public static final String LOGIN_FULL = "utilizadores.login"; + public static final int LOGIN_INDEX = 1; + public static final String PASSWORD = "password"; + public static final String PASSWORD_FULL = "utilizadores.password"; + public static final int PASSWORD_INDEX = 2; + public static final String EMAIL = "email"; + public static final String EMAIL_FULL = "utilizadores.email"; + public static final int EMAIL_INDEX = 3; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "utilizadores.empresa_id"; + public static final int EMPRESA_ID_INDEX = 4; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "utilizadores.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 5; + public static final String ADMINISTRADOR = "administrador"; + public static final String ADMINISTRADOR_FULL = "utilizadores.administrador"; + public static final int ADMINISTRADOR_INDEX = 6; + public static final String MEDICO_ID = "medico_id"; + public static final String MEDICO_ID_FULL = "utilizadores.medico_id"; + public static final int MEDICO_ID_INDEX = 7; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "utilizadores.tipo"; + public static final int TIPO_INDEX = 8; + public static final String NUMERO_CEDULA = "numero_cedula"; + public static final String NUMERO_CEDULA_FULL = "utilizadores.numero_cedula"; + public static final int NUMERO_CEDULA_INDEX = 9; + public static final String CAP = "cap"; + public static final String CAP_FULL = "utilizadores.cap"; + public static final int CAP_INDEX = 10; + public static final String NOME = "nome"; + public static final String NOME_FULL = "utilizadores.nome"; + public static final int NOME_INDEX = 11; + public static final String FUNCIONARIO_HST_ID = "funcionario_hst_id"; + public static final String FUNCIONARIO_HST_ID_FULL = "utilizadores.funcionario_hst_id"; + public static final int FUNCIONARIO_HST_ID_INDEX = 12; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "utilizadores.activo"; + public static final int ACTIVO_INDEX = 13; + public static final String RESPONSAVEL_LOJA = "responsavel_loja"; + public static final String RESPONSAVEL_LOJA_FULL = "utilizadores.responsavel_loja"; + public static final int RESPONSAVEL_LOJA_INDEX = 14; + public static final String NUMERO_MECANOGRAFICO = "numero_mecanografico"; + public static final String NUMERO_MECANOGRAFICO_FULL = "utilizadores.numero_mecanografico"; + public static final int NUMERO_MECANOGRAFICO_INDEX = 15; + public static final String GESTOR_GERAL = "gestor_geral"; + public static final String GESTOR_GERAL_FULL = "utilizadores.gestor_geral"; + public static final int GESTOR_GERAL_INDEX = 16; + public static final String PRIMEIRO_LOGIN = "primeiro_login"; + public static final String PRIMEIRO_LOGIN_FULL = "utilizadores.primeiro_login"; + public static final int PRIMEIRO_LOGIN_INDEX = 17; + public static final String APAGADO = "apagado"; + public static final String APAGADO_FULL = "utilizadores.apagado"; + public static final int APAGADO_INDEX = 18; + public static final String DATA_PASSWORD = "data_password"; + public static final String DATA_PASSWORD_FULL = "utilizadores.data_password"; + public static final int DATA_PASSWORD_INDEX = 19; + + public static final String FIELD_NAMES[] = new String[]{ + LOGIN, PASSWORD, EMAIL, EMPRESA_ID, ESTABELECIMENTO_ID, ADMINISTRADOR, MEDICO_ID, + TIPO, NUMERO_CEDULA, CAP, NOME, FUNCIONARIO_HST_ID, ACTIVO, RESPONSAVEL_LOJA, + NUMERO_MECANOGRAFICO, GESTOR_GERAL, PRIMEIRO_LOGIN, APAGADO, DATA_PASSWORD, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + LOGIN, TABLENAME + "." + PASSWORD, TABLENAME + "." + EMAIL, TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + ADMINISTRADOR, TABLENAME + "." + MEDICO_ID, + TABLENAME + "." + TIPO, TABLENAME + "." + NUMERO_CEDULA, TABLENAME + "." + CAP, TABLENAME + "." + NOME, TABLENAME + "." + FUNCIONARIO_HST_ID, TABLENAME + "." + ACTIVO, TABLENAME + "." + RESPONSAVEL_LOJA, + TABLENAME + "." + NUMERO_MECANOGRAFICO, TABLENAME + "." + GESTOR_GERAL, TABLENAME + "." + PRIMEIRO_LOGIN, TABLENAME + "." + APAGADO, TABLENAME + "." + DATA_PASSWORD, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, LOGIN, PASSWORD, EMAIL, EMPRESA_ID, ESTABELECIMENTO_ID, ADMINISTRADOR, MEDICO_ID, + TIPO, NUMERO_CEDULA, CAP, NOME, FUNCIONARIO_HST_ID, ACTIVO, RESPONSAVEL_LOJA, + NUMERO_MECANOGRAFICO, GESTOR_GERAL, PRIMEIRO_LOGIN, APAGADO, DATA_PASSWORD, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, LOGIN, PASSWORD, EMAIL, EMPRESA_ID, ESTABELECIMENTO_ID, ADMINISTRADOR, MEDICO_ID, + TIPO, NUMERO_CEDULA, CAP, NOME, FUNCIONARIO_HST_ID, ACTIVO, RESPONSAVEL_LOJA, + NUMERO_MECANOGRAFICO, GESTOR_GERAL, PRIMEIRO_LOGIN, APAGADO, DATA_PASSWORD, }; + + private Integer id; + private String login; + private String password; + private String email; + private Integer empresa_id; + private Integer estabelecimento_id; + private String administrador; + private Integer medico_id; + private Integer tipo; + private String numero_cedula; + private String cap; + private String nome; + private Integer funcionario_hst_id; + private String activo; + private String responsavel_loja; + private String numero_mecanografico; + private String gestor_geral; + private String primeiro_login; + private String apagado; + private java.util.Date data_password; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Utilizadores() + { + 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.ListfromPlanosActuacao_user_dir_loja() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.PlanosActuacaoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.PlanosActuacaoData.class , getPrimaryKey().getMap().get("id"), "user_dir_loja" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromPlanosActuacao_user_dns() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.PlanosActuacaoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.PlanosActuacaoData.class , getPrimaryKey().getMap().get("id"), "user_dns" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromPlanosActuacao_user_hs() + { + java.util.List result = new java.util.LinkedList< db.data.siprp.outer.PlanosActuacaoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp.outer.PlanosActuacaoData.class , getPrimaryKey().getMap().get("id"), "user_hs" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public String getLogin() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LOGIN ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.login; + } + + public void setLogin( String login ) + { + try + { + setLockedForRefresh( true ); + preProcess( LOGIN, login ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.login = login; + LAZY_LOADED_OBJECTS.put( LOGIN, Boolean.TRUE ); + } + + public String getPassword() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PASSWORD ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.password; + } + + public void setPassword( String password ) + { + try + { + setLockedForRefresh( true ); + preProcess( PASSWORD, password ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.password = password; + LAZY_LOADED_OBJECTS.put( PASSWORD, 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 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 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 String getAdministrador() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ADMINISTRADOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.administrador; + } + + public void setAdministrador( String administrador ) + { + try + { + setLockedForRefresh( true ); + preProcess( ADMINISTRADOR, administrador ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.administrador = administrador; + LAZY_LOADED_OBJECTS.put( ADMINISTRADOR, 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 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 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 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 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 Integer getFuncionario_hst_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FUNCIONARIO_HST_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.funcionario_hst_id; + } + + public void setFuncionario_hst_id( Integer funcionario_hst_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FUNCIONARIO_HST_ID, funcionario_hst_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.funcionario_hst_id = funcionario_hst_id; + LAZY_LOADED_OBJECTS.put( FUNCIONARIO_HST_ID, 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 String getResponsavel_loja() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESPONSAVEL_LOJA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.responsavel_loja; + } + + public void setResponsavel_loja( String responsavel_loja ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESPONSAVEL_LOJA, responsavel_loja ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.responsavel_loja = responsavel_loja; + LAZY_LOADED_OBJECTS.put( RESPONSAVEL_LOJA, 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 String getGestor_geral() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( GESTOR_GERAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.gestor_geral; + } + + public void setGestor_geral( String gestor_geral ) + { + try + { + setLockedForRefresh( true ); + preProcess( GESTOR_GERAL, gestor_geral ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.gestor_geral = gestor_geral; + LAZY_LOADED_OBJECTS.put( GESTOR_GERAL, Boolean.TRUE ); + } + + public String getPrimeiro_login() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PRIMEIRO_LOGIN ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.primeiro_login; + } + + public void setPrimeiro_login( String primeiro_login ) + { + try + { + setLockedForRefresh( true ); + preProcess( PRIMEIRO_LOGIN, primeiro_login ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.primeiro_login = primeiro_login; + LAZY_LOADED_OBJECTS.put( PRIMEIRO_LOGIN, Boolean.TRUE ); + } + + public String getApagado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( APAGADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.apagado; + } + + public void setApagado( String apagado ) + { + try + { + setLockedForRefresh( true ); + preProcess( APAGADO, apagado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.apagado = apagado; + LAZY_LOADED_OBJECTS.put( APAGADO, Boolean.TRUE ); + } + + public java.util.Date getData_password() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_PASSWORD ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_password; + } + + public void setData_password( java.util.Date data_password ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_PASSWORD, data_password ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_password = data_password; + LAZY_LOADED_OBJECTS.put( DATA_PASSWORD, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Utilizadores.ID_INDEX: + value = getId(); + break; + case Utilizadores.LOGIN_INDEX: + value = getLogin(); + break; + case Utilizadores.PASSWORD_INDEX: + value = getPassword(); + break; + case Utilizadores.EMAIL_INDEX: + value = getEmail(); + break; + case Utilizadores.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case Utilizadores.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case Utilizadores.ADMINISTRADOR_INDEX: + value = getAdministrador(); + break; + case Utilizadores.MEDICO_ID_INDEX: + value = getMedico_id(); + break; + case Utilizadores.TIPO_INDEX: + value = getTipo(); + break; + case Utilizadores.NUMERO_CEDULA_INDEX: + value = getNumero_cedula(); + break; + case Utilizadores.CAP_INDEX: + value = getCap(); + break; + case Utilizadores.NOME_INDEX: + value = getNome(); + break; + case Utilizadores.FUNCIONARIO_HST_ID_INDEX: + value = getFuncionario_hst_id(); + break; + case Utilizadores.ACTIVO_INDEX: + value = getActivo(); + break; + case Utilizadores.RESPONSAVEL_LOJA_INDEX: + value = getResponsavel_loja(); + break; + case Utilizadores.NUMERO_MECANOGRAFICO_INDEX: + value = getNumero_mecanografico(); + break; + case Utilizadores.GESTOR_GERAL_INDEX: + value = getGestor_geral(); + break; + case Utilizadores.PRIMEIRO_LOGIN_INDEX: + value = getPrimeiro_login(); + break; + case Utilizadores.APAGADO_INDEX: + value = getApagado(); + break; + case Utilizadores.DATA_PASSWORD_INDEX: + value = getData_password(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Utilizadores.ID_INDEX: + value = this.id; + break; + case Utilizadores.LOGIN_INDEX: + value = this.login; + break; + case Utilizadores.PASSWORD_INDEX: + value = this.password; + break; + case Utilizadores.EMAIL_INDEX: + value = this.email; + break; + case Utilizadores.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case Utilizadores.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + case Utilizadores.ADMINISTRADOR_INDEX: + value = this.administrador; + break; + case Utilizadores.MEDICO_ID_INDEX: + value = this.medico_id; + break; + case Utilizadores.TIPO_INDEX: + value = this.tipo; + break; + case Utilizadores.NUMERO_CEDULA_INDEX: + value = this.numero_cedula; + break; + case Utilizadores.CAP_INDEX: + value = this.cap; + break; + case Utilizadores.NOME_INDEX: + value = this.nome; + break; + case Utilizadores.FUNCIONARIO_HST_ID_INDEX: + value = this.funcionario_hst_id; + break; + case Utilizadores.ACTIVO_INDEX: + value = this.activo; + break; + case Utilizadores.RESPONSAVEL_LOJA_INDEX: + value = this.responsavel_loja; + break; + case Utilizadores.NUMERO_MECANOGRAFICO_INDEX: + value = this.numero_mecanografico; + break; + case Utilizadores.GESTOR_GERAL_INDEX: + value = this.gestor_geral; + break; + case Utilizadores.PRIMEIRO_LOGIN_INDEX: + value = this.primeiro_login; + break; + case Utilizadores.APAGADO_INDEX: + value = this.apagado; + break; + case Utilizadores.DATA_PASSWORD_INDEX: + value = this.data_password; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Utilizadores.ID_INDEX: + setId( ( Integer ) value ); + break; + case Utilizadores.LOGIN_INDEX: + setLogin( ( String ) value ); + break; + case Utilizadores.PASSWORD_INDEX: + setPassword( ( String ) value ); + break; + case Utilizadores.EMAIL_INDEX: + setEmail( ( String ) value ); + break; + case Utilizadores.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case Utilizadores.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case Utilizadores.ADMINISTRADOR_INDEX: + setAdministrador( ( String ) value ); + break; + case Utilizadores.MEDICO_ID_INDEX: + setMedico_id( ( Integer ) value ); + break; + case Utilizadores.TIPO_INDEX: + setTipo( ( Integer ) value ); + break; + case Utilizadores.NUMERO_CEDULA_INDEX: + setNumero_cedula( ( String ) value ); + break; + case Utilizadores.CAP_INDEX: + setCap( ( String ) value ); + break; + case Utilizadores.NOME_INDEX: + setNome( ( String ) value ); + break; + case Utilizadores.FUNCIONARIO_HST_ID_INDEX: + setFuncionario_hst_id( ( Integer ) value ); + break; + case Utilizadores.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + case Utilizadores.RESPONSAVEL_LOJA_INDEX: + setResponsavel_loja( ( String ) value ); + break; + case Utilizadores.NUMERO_MECANOGRAFICO_INDEX: + setNumero_mecanografico( ( String ) value ); + break; + case Utilizadores.GESTOR_GERAL_INDEX: + setGestor_geral( ( String ) value ); + break; + case Utilizadores.PRIMEIRO_LOGIN_INDEX: + setPrimeiro_login( ( String ) value ); + break; + case Utilizadores.APAGADO_INDEX: + setApagado( ( String ) value ); + break; + case Utilizadores.DATA_PASSWORD_INDEX: + setData_password( ( java.util.Date ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Utilizadores.ID_INDEX: + this.id = ( Integer ) value; + break; + case Utilizadores.LOGIN_INDEX: + this.login = ( String ) value; + break; + case Utilizadores.PASSWORD_INDEX: + this.password = ( String ) value; + break; + case Utilizadores.EMAIL_INDEX: + this.email = ( String ) value; + break; + case Utilizadores.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case Utilizadores.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case Utilizadores.ADMINISTRADOR_INDEX: + this.administrador = ( String ) value; + break; + case Utilizadores.MEDICO_ID_INDEX: + this.medico_id = ( Integer ) value; + break; + case Utilizadores.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case Utilizadores.NUMERO_CEDULA_INDEX: + this.numero_cedula = ( String ) value; + break; + case Utilizadores.CAP_INDEX: + this.cap = ( String ) value; + break; + case Utilizadores.NOME_INDEX: + this.nome = ( String ) value; + break; + case Utilizadores.FUNCIONARIO_HST_ID_INDEX: + this.funcionario_hst_id = ( Integer ) value; + break; + case Utilizadores.ACTIVO_INDEX: + this.activo = ( String ) value; + break; + case Utilizadores.RESPONSAVEL_LOJA_INDEX: + this.responsavel_loja = ( String ) value; + break; + case Utilizadores.NUMERO_MECANOGRAFICO_INDEX: + this.numero_mecanografico = ( String ) value; + break; + case Utilizadores.GESTOR_GERAL_INDEX: + this.gestor_geral = ( String ) value; + break; + case Utilizadores.PRIMEIRO_LOGIN_INDEX: + this.primeiro_login = ( String ) value; + break; + case Utilizadores.APAGADO_INDEX: + this.apagado = ( String ) value; + break; + case Utilizadores.DATA_PASSWORD_INDEX: + this.data_password = ( 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 Utilizadores.ID_INDEX: + theClass = Integer.class; + break; + case Utilizadores.LOGIN_INDEX: + theClass = String.class; + break; + case Utilizadores.PASSWORD_INDEX: + theClass = String.class; + break; + case Utilizadores.EMAIL_INDEX: + theClass = String.class; + break; + case Utilizadores.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case Utilizadores.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Utilizadores.ADMINISTRADOR_INDEX: + theClass = String.class; + break; + case Utilizadores.MEDICO_ID_INDEX: + theClass = Integer.class; + break; + case Utilizadores.TIPO_INDEX: + theClass = Integer.class; + break; + case Utilizadores.NUMERO_CEDULA_INDEX: + theClass = String.class; + break; + case Utilizadores.CAP_INDEX: + theClass = String.class; + break; + case Utilizadores.NOME_INDEX: + theClass = String.class; + break; + case Utilizadores.FUNCIONARIO_HST_ID_INDEX: + theClass = Integer.class; + break; + case Utilizadores.ACTIVO_INDEX: + theClass = String.class; + break; + case Utilizadores.RESPONSAVEL_LOJA_INDEX: + theClass = String.class; + break; + case Utilizadores.NUMERO_MECANOGRAFICO_INDEX: + theClass = String.class; + break; + case Utilizadores.GESTOR_GERAL_INDEX: + theClass = String.class; + break; + case Utilizadores.PRIMEIRO_LOGIN_INDEX: + theClass = String.class; + break; + case Utilizadores.APAGADO_INDEX: + theClass = String.class; + break; + case Utilizadores.DATA_PASSWORD_INDEX: + theClass = java.util.Date.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Utilizadores._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, Utilizadores.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Version.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Version.java new file mode 100644 index 00000000..dd071228 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/Version.java @@ -0,0 +1,330 @@ +/* +* Version.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp.inner; + + +public class Version extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Version.CURRENT_VERSION, Version.CURRENT_VERSION_INDEX ); + FIELD_INDEXES.put( Version.CURRENT_VERSION_FULL, Version.CURRENT_VERSION_INDEX ); + FIELD_INDEXES.put( Version.ID, Version.ID_INDEX ); + FIELD_INDEXES.put( Version.ID_FULL, Version.ID_INDEX ); + FIELD_INDEXES.put( Version.MODULE_NAME, Version.MODULE_NAME_INDEX ); + FIELD_INDEXES.put( Version.MODULE_NAME_FULL, Version.MODULE_NAME_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "version"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.version"; + + public static final int _INVALID__INDEX = -1; + public static final String CURRENT_VERSION = "current_version"; + public static final String CURRENT_VERSION_FULL = "version.current_version"; + public static final int CURRENT_VERSION_INDEX = 0; + public static final String ID = "id"; + public static final String ID_FULL = "version.id"; + public static final int ID_INDEX = 1; + public static final String MODULE_NAME = "module_name"; + public static final String MODULE_NAME_FULL = "version.module_name"; + public static final int MODULE_NAME_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + CURRENT_VERSION, MODULE_NAME, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + CURRENT_VERSION, TABLENAME + "." + MODULE_NAME, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + CURRENT_VERSION, ID, MODULE_NAME, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + CURRENT_VERSION, ID, MODULE_NAME, }; + + private Double current_version; + private Integer id; + private String module_name; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Version() + { + super(); + dirtyProperties = new boolean[]{ false, false, false }; + } + + public Double getCurrent_version() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURRENT_VERSION ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.current_version; + } + + public void setCurrent_version( Double current_version ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURRENT_VERSION, current_version ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.current_version = current_version; + LAZY_LOADED_OBJECTS.put( CURRENT_VERSION, Boolean.TRUE ); + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 getModule_name() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MODULE_NAME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.module_name; + } + + public void setModule_name( String module_name ) + { + try + { + setLockedForRefresh( true ); + preProcess( MODULE_NAME, module_name ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.module_name = module_name; + LAZY_LOADED_OBJECTS.put( MODULE_NAME, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + value = getCurrent_version(); + break; + case Version.ID_INDEX: + value = getId(); + break; + case Version.MODULE_NAME_INDEX: + value = getModule_name(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + value = this.current_version; + break; + case Version.ID_INDEX: + value = this.id; + break; + case Version.MODULE_NAME_INDEX: + value = this.module_name; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + setCurrent_version( ( Double ) value ); + break; + case Version.ID_INDEX: + setId( ( Integer ) value ); + break; + case Version.MODULE_NAME_INDEX: + setModule_name( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + this.current_version = ( Double ) value; + break; + case Version.ID_INDEX: + this.id = ( Integer ) value; + break; + case Version.MODULE_NAME_INDEX: + this.module_name = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + theClass = Double.class; + break; + case Version.ID_INDEX: + theClass = Integer.class; + break; + case Version.MODULE_NAME_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Version._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Version.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/package.xml b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/package.xml new file mode 100644 index 00000000..e25991a5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/inner/package.xml @@ -0,0 +1,1592 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/AcidentadosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/AcidentadosData.java new file mode 100644 index 00000000..2713cd49 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/AcidentadosData.java @@ -0,0 +1,18 @@ +/* +* AcidentadosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class AcidentadosData extends db.data.siprp.inner.Acidentados +{ + + public AcidentadosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ActualizacaoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ActualizacaoData.java new file mode 100644 index 00000000..316c102d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ActualizacaoData.java @@ -0,0 +1,18 @@ +/* +* ActualizacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class ActualizacaoData extends db.data.siprp.inner.Actualizacao +{ + + public ActualizacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/AnalisesAcidentesData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/AnalisesAcidentesData.java new file mode 100644 index 00000000..5177c7f2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/AnalisesAcidentesData.java @@ -0,0 +1,18 @@ +/* +* AnalisesAcidentesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class AnalisesAcidentesData extends db.data.siprp.inner.AnalisesAcidentes +{ + + public AnalisesAcidentesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/AvisosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/AvisosData.java new file mode 100644 index 00000000..580bbe07 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/AvisosData.java @@ -0,0 +1,18 @@ +/* +* AvisosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class AvisosData extends db.data.siprp.inner.Avisos +{ + + public AvisosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/CausasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/CausasData.java new file mode 100644 index 00000000..0d0ff4a4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/CausasData.java @@ -0,0 +1,18 @@ +/* +* CausasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class CausasData extends db.data.siprp.inner.Causas +{ + + public CausasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ContactosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ContactosData.java new file mode 100644 index 00000000..d841d28a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ContactosData.java @@ -0,0 +1,18 @@ +/* +* ContactosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class ContactosData extends db.data.siprp.inner.Contactos +{ + + public ContactosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ControleData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ControleData.java new file mode 100644 index 00000000..8f919bb0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ControleData.java @@ -0,0 +1,18 @@ +/* +* ControleData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class ControleData extends db.data.siprp.inner.Controle +{ + + public ControleData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/DepartamentosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/DepartamentosData.java new file mode 100644 index 00000000..197c5982 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/DepartamentosData.java @@ -0,0 +1,18 @@ +/* +* DepartamentosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class DepartamentosData extends db.data.siprp.inner.Departamentos +{ + + public DepartamentosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/EmpresasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/EmpresasData.java new file mode 100644 index 00000000..7b7b34ca --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/EmpresasData.java @@ -0,0 +1,18 @@ +/* +* EmpresasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class EmpresasData extends db.data.siprp.inner.Empresas +{ + + public EmpresasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ErrorsData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ErrorsData.java new file mode 100644 index 00000000..2752eb49 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ErrorsData.java @@ -0,0 +1,18 @@ +/* +* ErrorsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class ErrorsData extends db.data.siprp.inner.Errors +{ + + public ErrorsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/EstabelecimentosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/EstabelecimentosData.java new file mode 100644 index 00000000..61ee1210 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/EstabelecimentosData.java @@ -0,0 +1,18 @@ +/* +* EstabelecimentosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class EstabelecimentosData extends db.data.siprp.inner.Estabelecimentos +{ + + public EstabelecimentosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/EstadoMedidasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/EstadoMedidasData.java new file mode 100644 index 00000000..12d62136 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/EstadoMedidasData.java @@ -0,0 +1,18 @@ +/* +* EstadoMedidasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class EstadoMedidasData extends db.data.siprp.inner.EstadoMedidas +{ + + public EstadoMedidasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ExamesData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ExamesData.java new file mode 100644 index 00000000..5710efe5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ExamesData.java @@ -0,0 +1,18 @@ +/* +* ExamesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class ExamesData extends db.data.siprp.inner.Exames +{ + + public ExamesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ExamesPerfisData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ExamesPerfisData.java new file mode 100644 index 00000000..3e709b6b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/ExamesPerfisData.java @@ -0,0 +1,18 @@ +/* +* ExamesPerfisData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class ExamesPerfisData extends db.data.siprp.inner.ExamesPerfis +{ + + public ExamesPerfisData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/HistoricoEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/HistoricoEstabelecimentoData.java new file mode 100644 index 00000000..caaafddc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/HistoricoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HistoricoEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class HistoricoEstabelecimentoData extends db.data.siprp.inner.HistoricoEstabelecimento +{ + + public HistoricoEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/MarcacoesEmpresaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/MarcacoesEmpresaData.java new file mode 100644 index 00000000..79679543 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/MarcacoesEmpresaData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class MarcacoesEmpresaData extends db.data.siprp.inner.MarcacoesEmpresa +{ + + public MarcacoesEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/MarcacoesEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/MarcacoesEstabelecimentoData.java new file mode 100644 index 00000000..a901db91 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/MarcacoesEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class MarcacoesEstabelecimentoData extends db.data.siprp.inner.MarcacoesEstabelecimento +{ + + public MarcacoesEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/MarcacoesTrabalhadorData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/MarcacoesTrabalhadorData.java new file mode 100644 index 00000000..e630fc2e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/MarcacoesTrabalhadorData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesTrabalhadorData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class MarcacoesTrabalhadorData extends db.data.siprp.inner.MarcacoesTrabalhador +{ + + public MarcacoesTrabalhadorData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/MedicosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/MedicosData.java new file mode 100644 index 00000000..3e2ee281 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/MedicosData.java @@ -0,0 +1,18 @@ +/* +* MedicosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class MedicosData extends db.data.siprp.inner.Medicos +{ + + public MedicosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/MedidasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/MedidasData.java new file mode 100644 index 00000000..30a6c6f3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/MedidasData.java @@ -0,0 +1,18 @@ +/* +* MedidasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class MedidasData extends db.data.siprp.inner.Medidas +{ + + public MedidasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/NotNoticiasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/NotNoticiasData.java new file mode 100644 index 00000000..b9598074 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/NotNoticiasData.java @@ -0,0 +1,18 @@ +/* +* NotNoticiasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class NotNoticiasData extends db.data.siprp.inner.NotNoticias +{ + + public NotNoticiasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PermissoesData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PermissoesData.java new file mode 100644 index 00000000..4b7d3356 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PermissoesData.java @@ -0,0 +1,18 @@ +/* +* PermissoesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class PermissoesData extends db.data.siprp.inner.Permissoes +{ + + public PermissoesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PlanoAreasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PlanoAreasData.java new file mode 100644 index 00000000..960a9807 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PlanoAreasData.java @@ -0,0 +1,18 @@ +/* +* PlanoAreasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class PlanoAreasData extends db.data.siprp.inner.PlanoAreas +{ + + public PlanoAreasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PlanoMedidasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PlanoMedidasData.java new file mode 100644 index 00000000..8d105648 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PlanoMedidasData.java @@ -0,0 +1,18 @@ +/* +* PlanoMedidasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class PlanoMedidasData extends db.data.siprp.inner.PlanoMedidas +{ + + public PlanoMedidasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PlanoPostosTrabalhoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PlanoPostosTrabalhoData.java new file mode 100644 index 00000000..a594b298 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PlanoPostosTrabalhoData.java @@ -0,0 +1,18 @@ +/* +* PlanoPostosTrabalhoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class PlanoPostosTrabalhoData extends db.data.siprp.inner.PlanoPostosTrabalho +{ + + public PlanoPostosTrabalhoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PlanoRiscosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PlanoRiscosData.java new file mode 100644 index 00000000..90b3891f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PlanoRiscosData.java @@ -0,0 +1,18 @@ +/* +* PlanoRiscosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class PlanoRiscosData extends db.data.siprp.inner.PlanoRiscos +{ + + public PlanoRiscosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PlanosActuacaoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PlanosActuacaoData.java new file mode 100644 index 00000000..23804955 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PlanosActuacaoData.java @@ -0,0 +1,18 @@ +/* +* PlanosActuacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class PlanosActuacaoData extends db.data.siprp.inner.PlanosActuacao +{ + + public PlanosActuacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PropertiesData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PropertiesData.java new file mode 100644 index 00000000..7f93b5b5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/PropertiesData.java @@ -0,0 +1,18 @@ +/* +* PropertiesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class PropertiesData extends db.data.siprp.inner.Properties +{ + + public PropertiesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/RecomendacoesData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/RecomendacoesData.java new file mode 100644 index 00000000..8a951078 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/RecomendacoesData.java @@ -0,0 +1,18 @@ +/* +* RecomendacoesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class RecomendacoesData extends db.data.siprp.inner.Recomendacoes +{ + + public RecomendacoesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/RiscoValoresTempData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/RiscoValoresTempData.java new file mode 100644 index 00000000..1756a8b0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/RiscoValoresTempData.java @@ -0,0 +1,18 @@ +/* +* RiscoValoresTempData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class RiscoValoresTempData extends db.data.siprp.inner.RiscoValoresTemp +{ + + public RiscoValoresTempData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/RolesData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/RolesData.java new file mode 100644 index 00000000..2ac92c55 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/RolesData.java @@ -0,0 +1,18 @@ +/* +* RolesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class RolesData extends db.data.siprp.inner.Roles +{ + + public RolesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/SeccoesData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/SeccoesData.java new file mode 100644 index 00000000..5b6b39bc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/SeccoesData.java @@ -0,0 +1,18 @@ +/* +* SeccoesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class SeccoesData extends db.data.siprp.inner.Seccoes +{ + + public SeccoesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/TiposExamesCompData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/TiposExamesCompData.java new file mode 100644 index 00000000..f7c0a8f4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/TiposExamesCompData.java @@ -0,0 +1,18 @@ +/* +* TiposExamesCompData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class TiposExamesCompData extends db.data.siprp.inner.TiposExamesComp +{ + + public TiposExamesCompData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/TiposUtilizadoresData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/TiposUtilizadoresData.java new file mode 100644 index 00000000..56f478b7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/TiposUtilizadoresData.java @@ -0,0 +1,18 @@ +/* +* TiposUtilizadoresData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class TiposUtilizadoresData extends db.data.siprp.inner.TiposUtilizadores +{ + + public TiposUtilizadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/TrabalhadoresData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/TrabalhadoresData.java new file mode 100644 index 00000000..81950266 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/TrabalhadoresData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class TrabalhadoresData extends db.data.siprp.inner.Trabalhadores +{ + + public TrabalhadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/UsersData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/UsersData.java new file mode 100644 index 00000000..5a661b86 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/UsersData.java @@ -0,0 +1,18 @@ +/* +* UsersData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class UsersData extends db.data.siprp.inner.Users +{ + + public UsersData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/UtilizadoresData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/UtilizadoresData.java new file mode 100644 index 00000000..3e5a0425 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/UtilizadoresData.java @@ -0,0 +1,18 @@ +/* +* UtilizadoresData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class UtilizadoresData extends db.data.siprp.inner.Utilizadores +{ + + public UtilizadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/VersionData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/VersionData.java new file mode 100644 index 00000000..128a7c4b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp/outer/VersionData.java @@ -0,0 +1,18 @@ +/* +* VersionData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp.outer; + + +public final class VersionData extends db.data.siprp.inner.Version +{ + + public VersionData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Actualizacao.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Actualizacao.java new file mode 100644 index 00000000..aa015d0a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class Actualizacao extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.actualizacao"; + + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/AptAppointment.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/AptAppointment.java new file mode 100644 index 00000000..07ae11cd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/AptAppointment.java @@ -0,0 +1,649 @@ +/* +* AptAppointment.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class AptAppointment extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( AptAppointment.ID, AptAppointment.ID_INDEX ); + FIELD_INDEXES.put( AptAppointment.ID_FULL, AptAppointment.ID_INDEX ); + FIELD_INDEXES.put( AptAppointment.DAY_DATE, AptAppointment.DAY_DATE_INDEX ); + FIELD_INDEXES.put( AptAppointment.DAY_DATE_FULL, AptAppointment.DAY_DATE_INDEX ); + FIELD_INDEXES.put( AptAppointment.START_TIME, AptAppointment.START_TIME_INDEX ); + FIELD_INDEXES.put( AptAppointment.START_TIME_FULL, AptAppointment.START_TIME_INDEX ); + FIELD_INDEXES.put( AptAppointment.END_TIME, AptAppointment.END_TIME_INDEX ); + FIELD_INDEXES.put( AptAppointment.END_TIME_FULL, AptAppointment.END_TIME_INDEX ); + FIELD_INDEXES.put( AptAppointment.NOTES, AptAppointment.NOTES_INDEX ); + FIELD_INDEXES.put( AptAppointment.NOTES_FULL, AptAppointment.NOTES_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AptAppointment.CLASS_IDENTIFIER, AptAppointment.STATE_ID, AptAppointment.TO_STATE_ID ); + FIELD_INDEXES.put( AptAppointment.STATE_ID, AptAppointment.STATE_ID_INDEX ); + FIELD_INDEXES.put( AptAppointment.STATE_ID_FULL, AptAppointment.STATE_ID_INDEX ); + FIELD_INDEXES.put( AptAppointment.TO_STATE_ID, AptAppointment.TO_STATE_ID_INDEX ); + FIELD_INDEXES.put( AptAppointment.DELETED_STAMP, AptAppointment.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( AptAppointment.DELETED_STAMP_FULL, AptAppointment.DELETED_STAMP_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeystate_idToapt_state = + new com.evolute.entity.ForeignKey( AptAppointment.class, AptAppointment.STATE_ID, db.data.siprp_local.outer.AptStateData.class, db.data.siprp_local.outer.AptStateData.ID ); + + public static final String TABLENAME = "apt_appointment"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.apt_appointment"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "apt_appointment.id"; + public static final int ID_INDEX = 0; + public static final String DAY_DATE = "day_date"; + public static final String DAY_DATE_FULL = "apt_appointment.day_date"; + public static final int DAY_DATE_INDEX = 1; + public static final String START_TIME = "start_time"; + public static final String START_TIME_FULL = "apt_appointment.start_time"; + public static final int START_TIME_INDEX = 2; + public static final String END_TIME = "end_time"; + public static final String END_TIME_FULL = "apt_appointment.end_time"; + public static final int END_TIME_INDEX = 3; + public static final String NOTES = "notes"; + public static final String NOTES_FULL = "apt_appointment.notes"; + public static final int NOTES_INDEX = 4; + public static final String STATE_ID = "state_id"; + public static final String STATE_ID_FULL = "apt_appointment.state_id"; + public static final int STATE_ID_INDEX = 5; + public static final String TO_STATE_ID = "to_state_id"; + public static final String TO_STATE_ID_FULL = "apt_appointment.to_state_id"; + public static final int TO_STATE_ID_INDEX = 6; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "apt_appointment.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 7; + + public static final String FIELD_NAMES[] = new String[]{ + DAY_DATE, START_TIME, END_TIME, NOTES, STATE_ID, TO_STATE_ID, DELETED_STAMP, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DAY_DATE, TABLENAME + "." + START_TIME, TABLENAME + "." + END_TIME, TABLENAME + "." + NOTES, TABLENAME + "." + STATE_ID, TABLENAME + "." + TO_STATE_ID, TABLENAME + "." + DELETED_STAMP, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DAY_DATE, START_TIME, END_TIME, NOTES, STATE_ID, DELETED_STAMP, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DAY_DATE, START_TIME, END_TIME, NOTES, STATE_ID, DELETED_STAMP, }; + + private Integer id; + private java.util.Date day_date; + private java.sql.Time start_time; + private java.sql.Time end_time; + private String notes; + private Integer state_id; + private db.data.siprp_local.outer.AptStateData to_state_id; + private java.sql.Timestamp deleted_stamp; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public AptAppointment() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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.ListfromAptOutrasVacina_appointment_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.AptOutrasVacinaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.AptOutrasVacinaData.class , getPrimaryKey().getMap().get("id"), "appointment_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromAptOutrasViajante_appointment_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.AptOutrasViajanteData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.AptOutrasViajanteData.class , getPrimaryKey().getMap().get("id"), "appointment_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromAptSegurancaAlimentar_appointment_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.AptSegurancaAlimentarData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.AptSegurancaAlimentarData.class , getPrimaryKey().getMap().get("id"), "appointment_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromFilFileAppointment_appointment_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.FilFileAppointmentData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.FilFileAppointmentData.class , getPrimaryKey().getMap().get("id"), "appointment_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.Date getDay_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DAY_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.day_date; + } + + public void setDay_date( java.util.Date day_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DAY_DATE, day_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.day_date = day_date; + LAZY_LOADED_OBJECTS.put( DAY_DATE, Boolean.TRUE ); + } + + public java.sql.Time getStart_time() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( START_TIME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.start_time; + } + + public void setStart_time( java.sql.Time start_time ) + { + try + { + setLockedForRefresh( true ); + preProcess( START_TIME, start_time ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.start_time = start_time; + LAZY_LOADED_OBJECTS.put( START_TIME, Boolean.TRUE ); + } + + public java.sql.Time getEnd_time() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( END_TIME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.end_time; + } + + public void setEnd_time( java.sql.Time end_time ) + { + try + { + setLockedForRefresh( true ); + preProcess( END_TIME, end_time ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.end_time = end_time; + LAZY_LOADED_OBJECTS.put( END_TIME, Boolean.TRUE ); + } + + public String getNotes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOTES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.notes; + } + + public void setNotes( String notes ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOTES, notes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.notes = notes; + LAZY_LOADED_OBJECTS.put( NOTES, Boolean.TRUE ); + } + + public Integer getState_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( STATE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.state_id; + } + + public void setState_id( Integer state_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( STATE_ID, state_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.state_id = state_id; + LAZY_LOADED_OBJECTS.put( STATE_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.AptStateData toState_id() + { + try + { + prepare( TO_STATE_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_state_id; + } + + public void setToState_id( db.data.siprp_local.outer.AptStateData to_state_id ) + { + try + { + preProcess( TO_STATE_ID, to_state_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_state_id = to_state_id; + } + + public java.sql.Timestamp getDeleted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_stamp; + } + + public void setDeleted_stamp( java.sql.Timestamp deleted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_STAMP, deleted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_stamp = deleted_stamp; + LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptAppointment.ID_INDEX: + value = getId(); + break; + case AptAppointment.DAY_DATE_INDEX: + value = getDay_date(); + break; + case AptAppointment.START_TIME_INDEX: + value = getStart_time(); + break; + case AptAppointment.END_TIME_INDEX: + value = getEnd_time(); + break; + case AptAppointment.NOTES_INDEX: + value = getNotes(); + break; + case AptAppointment.STATE_ID_INDEX: + value = getState_id(); + break; + case AptAppointment.TO_STATE_ID_INDEX: + value = toState_id(); + break; + case AptAppointment.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptAppointment.ID_INDEX: + value = this.id; + break; + case AptAppointment.DAY_DATE_INDEX: + value = this.day_date; + break; + case AptAppointment.START_TIME_INDEX: + value = this.start_time; + break; + case AptAppointment.END_TIME_INDEX: + value = this.end_time; + break; + case AptAppointment.NOTES_INDEX: + value = this.notes; + break; + case AptAppointment.STATE_ID_INDEX: + value = this.state_id; + break; + case AptAppointment.TO_STATE_ID_INDEX: + value = this.to_state_id; + break; + case AptAppointment.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptAppointment.ID_INDEX: + setId( ( Integer ) value ); + break; + case AptAppointment.DAY_DATE_INDEX: + setDay_date( ( java.util.Date ) value ); + break; + case AptAppointment.START_TIME_INDEX: + setStart_time( ( java.sql.Time ) value ); + break; + case AptAppointment.END_TIME_INDEX: + setEnd_time( ( java.sql.Time ) value ); + break; + case AptAppointment.NOTES_INDEX: + setNotes( ( String ) value ); + break; + case AptAppointment.STATE_ID_INDEX: + setState_id( ( Integer ) value ); + break; + case AptAppointment.TO_STATE_ID_INDEX: + setToState_id( ( db.data.siprp_local.outer.AptStateData ) value ); + break; + case AptAppointment.DELETED_STAMP_INDEX: + setDeleted_stamp( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptAppointment.ID_INDEX: + this.id = ( Integer ) value; + break; + case AptAppointment.DAY_DATE_INDEX: + this.day_date = ( java.util.Date ) value; + break; + case AptAppointment.START_TIME_INDEX: + this.start_time = ( java.sql.Time ) value; + break; + case AptAppointment.END_TIME_INDEX: + this.end_time = ( java.sql.Time ) value; + break; + case AptAppointment.NOTES_INDEX: + this.notes = ( String ) value; + break; + case AptAppointment.STATE_ID_INDEX: + this.state_id = ( Integer ) value; + break; + case AptAppointment.TO_STATE_ID_INDEX: + this.to_state_id = ( db.data.siprp_local.outer.AptStateData ) value; + break; + case AptAppointment.DELETED_STAMP_INDEX: + this.deleted_stamp = ( java.sql.Timestamp ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case AptAppointment.ID_INDEX: + theClass = Integer.class; + break; + case AptAppointment.DAY_DATE_INDEX: + theClass = java.util.Date.class; + break; + case AptAppointment.START_TIME_INDEX: + theClass = java.sql.Time.class; + break; + case AptAppointment.END_TIME_INDEX: + theClass = java.sql.Time.class; + break; + case AptAppointment.NOTES_INDEX: + theClass = String.class; + break; + case AptAppointment.STATE_ID_INDEX: + theClass = Integer.class; + break; + case AptAppointment.TO_STATE_ID_INDEX: + theClass = db.data.siprp_local.outer.AptStateData.class; + break; + case AptAppointment.DELETED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : AptAppointment._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, AptAppointment.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/AptOutrasVacina.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/AptOutrasVacina.java new file mode 100644 index 00000000..da3d82d6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/AptOutrasVacina.java @@ -0,0 +1,533 @@ +/* +* AptOutrasVacina.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class AptOutrasVacina extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( AptOutrasVacina.ID, AptOutrasVacina.ID_INDEX ); + FIELD_INDEXES.put( AptOutrasVacina.ID_FULL, AptOutrasVacina.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AptOutrasVacina.CLASS_IDENTIFIER, AptOutrasVacina.APPOINTMENT_ID, AptOutrasVacina.TO_APPOINTMENT_ID ); + FIELD_INDEXES.put( AptOutrasVacina.APPOINTMENT_ID, AptOutrasVacina.APPOINTMENT_ID_INDEX ); + FIELD_INDEXES.put( AptOutrasVacina.APPOINTMENT_ID_FULL, AptOutrasVacina.APPOINTMENT_ID_INDEX ); + FIELD_INDEXES.put( AptOutrasVacina.TO_APPOINTMENT_ID, AptOutrasVacina.TO_APPOINTMENT_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AptOutrasVacina.CLASS_IDENTIFIER, AptOutrasVacina.TRABALHADOR_ID, AptOutrasVacina.TO_TRABALHADOR_ID ); + FIELD_INDEXES.put( AptOutrasVacina.TRABALHADOR_ID, AptOutrasVacina.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( AptOutrasVacina.TRABALHADOR_ID_FULL, AptOutrasVacina.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( AptOutrasVacina.TO_TRABALHADOR_ID, AptOutrasVacina.TO_TRABALHADOR_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AptOutrasVacina.CLASS_IDENTIFIER, AptOutrasVacina.VACINA_TIPO, AptOutrasVacina.TO_VACINA_TIPO ); + FIELD_INDEXES.put( AptOutrasVacina.VACINA_TIPO, AptOutrasVacina.VACINA_TIPO_INDEX ); + FIELD_INDEXES.put( AptOutrasVacina.VACINA_TIPO_FULL, AptOutrasVacina.VACINA_TIPO_INDEX ); + FIELD_INDEXES.put( AptOutrasVacina.TO_VACINA_TIPO, AptOutrasVacina.TO_VACINA_TIPO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyappointment_idToapt_appointment = + new com.evolute.entity.ForeignKey( AptOutrasVacina.class, AptOutrasVacina.APPOINTMENT_ID, db.data.siprp_local.outer.AptAppointmentData.class, db.data.siprp_local.outer.AptAppointmentData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores = + new com.evolute.entity.ForeignKey( AptOutrasVacina.class, AptOutrasVacina.TRABALHADOR_ID, db.data.siprp_local.outer.TrabalhadoresData.class, db.data.siprp_local.outer.TrabalhadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyvacina_tipoTomed_vacina_tipo = + new com.evolute.entity.ForeignKey( AptOutrasVacina.class, AptOutrasVacina.VACINA_TIPO, db.data.siprp_local.outer.MedVacinaTipoData.class, db.data.siprp_local.outer.MedVacinaTipoData.ORDEM ); + + public static final String TABLENAME = "apt_outras_vacina"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.apt_outras_vacina"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "apt_outras_vacina.id"; + public static final int ID_INDEX = 0; + public static final String APPOINTMENT_ID = "appointment_id"; + public static final String APPOINTMENT_ID_FULL = "apt_outras_vacina.appointment_id"; + public static final int APPOINTMENT_ID_INDEX = 1; + public static final String TO_APPOINTMENT_ID = "to_appointment_id"; + public static final String TO_APPOINTMENT_ID_FULL = "apt_outras_vacina.to_appointment_id"; + public static final int TO_APPOINTMENT_ID_INDEX = 2; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "apt_outras_vacina.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 3; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final String TO_TRABALHADOR_ID_FULL = "apt_outras_vacina.to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 4; + public static final String VACINA_TIPO = "vacina_tipo"; + public static final String VACINA_TIPO_FULL = "apt_outras_vacina.vacina_tipo"; + public static final int VACINA_TIPO_INDEX = 5; + public static final String TO_VACINA_TIPO = "to_vacina_tipo"; + public static final String TO_VACINA_TIPO_FULL = "apt_outras_vacina.to_vacina_tipo"; + public static final int TO_VACINA_TIPO_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + APPOINTMENT_ID, TO_APPOINTMENT_ID, TRABALHADOR_ID, TO_TRABALHADOR_ID, + VACINA_TIPO, TO_VACINA_TIPO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + APPOINTMENT_ID, TABLENAME + "." + TO_APPOINTMENT_ID, TABLENAME + "." + TRABALHADOR_ID, TABLENAME + "." + TO_TRABALHADOR_ID, + TABLENAME + "." + VACINA_TIPO, TABLENAME + "." + TO_VACINA_TIPO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, APPOINTMENT_ID, TRABALHADOR_ID, VACINA_TIPO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, APPOINTMENT_ID, TRABALHADOR_ID, VACINA_TIPO, }; + + private Integer id; + private Integer appointment_id; + private db.data.siprp_local.outer.AptAppointmentData to_appointment_id; + private Integer trabalhador_id; + private db.data.siprp_local.outer.TrabalhadoresData to_trabalhador_id; + private Integer vacina_tipo; + private db.data.siprp_local.outer.MedVacinaTipoData to_vacina_tipo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public AptOutrasVacina() + { + 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 getAppointment_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( APPOINTMENT_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.appointment_id; + } + + public void setAppointment_id( Integer appointment_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( APPOINTMENT_ID, appointment_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.appointment_id = appointment_id; + LAZY_LOADED_OBJECTS.put( APPOINTMENT_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.AptAppointmentData toAppointment_id() + { + try + { + prepare( TO_APPOINTMENT_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_appointment_id; + } + + public void setToAppointment_id( db.data.siprp_local.outer.AptAppointmentData to_appointment_id ) + { + try + { + preProcess( TO_APPOINTMENT_ID, to_appointment_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_appointment_id = to_appointment_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 db.data.siprp_local.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp_local.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 getVacina_tipo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VACINA_TIPO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.vacina_tipo; + } + + public void setVacina_tipo( Integer vacina_tipo ) + { + try + { + setLockedForRefresh( true ); + preProcess( VACINA_TIPO, vacina_tipo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.vacina_tipo = vacina_tipo; + LAZY_LOADED_OBJECTS.put( VACINA_TIPO, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.MedVacinaTipoData toVacina_tipo() + { + try + { + prepare( TO_VACINA_TIPO ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_vacina_tipo; + } + + public void setToVacina_tipo( db.data.siprp_local.outer.MedVacinaTipoData to_vacina_tipo ) + { + try + { + preProcess( TO_VACINA_TIPO, to_vacina_tipo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_vacina_tipo = to_vacina_tipo; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptOutrasVacina.ID_INDEX: + value = getId(); + break; + case AptOutrasVacina.APPOINTMENT_ID_INDEX: + value = getAppointment_id(); + break; + case AptOutrasVacina.TO_APPOINTMENT_ID_INDEX: + value = toAppointment_id(); + break; + case AptOutrasVacina.TRABALHADOR_ID_INDEX: + value = getTrabalhador_id(); + break; + case AptOutrasVacina.TO_TRABALHADOR_ID_INDEX: + value = toTrabalhador_id(); + break; + case AptOutrasVacina.VACINA_TIPO_INDEX: + value = getVacina_tipo(); + break; + case AptOutrasVacina.TO_VACINA_TIPO_INDEX: + value = toVacina_tipo(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptOutrasVacina.ID_INDEX: + value = this.id; + break; + case AptOutrasVacina.APPOINTMENT_ID_INDEX: + value = this.appointment_id; + break; + case AptOutrasVacina.TO_APPOINTMENT_ID_INDEX: + value = this.to_appointment_id; + break; + case AptOutrasVacina.TRABALHADOR_ID_INDEX: + value = this.trabalhador_id; + break; + case AptOutrasVacina.TO_TRABALHADOR_ID_INDEX: + value = this.to_trabalhador_id; + break; + case AptOutrasVacina.VACINA_TIPO_INDEX: + value = this.vacina_tipo; + break; + case AptOutrasVacina.TO_VACINA_TIPO_INDEX: + value = this.to_vacina_tipo; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptOutrasVacina.ID_INDEX: + setId( ( Integer ) value ); + break; + case AptOutrasVacina.APPOINTMENT_ID_INDEX: + setAppointment_id( ( Integer ) value ); + break; + case AptOutrasVacina.TO_APPOINTMENT_ID_INDEX: + setToAppointment_id( ( db.data.siprp_local.outer.AptAppointmentData ) value ); + break; + case AptOutrasVacina.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case AptOutrasVacina.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( db.data.siprp_local.outer.TrabalhadoresData ) value ); + break; + case AptOutrasVacina.VACINA_TIPO_INDEX: + setVacina_tipo( ( Integer ) value ); + break; + case AptOutrasVacina.TO_VACINA_TIPO_INDEX: + setToVacina_tipo( ( db.data.siprp_local.outer.MedVacinaTipoData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptOutrasVacina.ID_INDEX: + this.id = ( Integer ) value; + break; + case AptOutrasVacina.APPOINTMENT_ID_INDEX: + this.appointment_id = ( Integer ) value; + break; + case AptOutrasVacina.TO_APPOINTMENT_ID_INDEX: + this.to_appointment_id = ( db.data.siprp_local.outer.AptAppointmentData ) value; + break; + case AptOutrasVacina.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case AptOutrasVacina.TO_TRABALHADOR_ID_INDEX: + this.to_trabalhador_id = ( db.data.siprp_local.outer.TrabalhadoresData ) value; + break; + case AptOutrasVacina.VACINA_TIPO_INDEX: + this.vacina_tipo = ( Integer ) value; + break; + case AptOutrasVacina.TO_VACINA_TIPO_INDEX: + this.to_vacina_tipo = ( db.data.siprp_local.outer.MedVacinaTipoData ) 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 AptOutrasVacina.ID_INDEX: + theClass = Integer.class; + break; + case AptOutrasVacina.APPOINTMENT_ID_INDEX: + theClass = Integer.class; + break; + case AptOutrasVacina.TO_APPOINTMENT_ID_INDEX: + theClass = db.data.siprp_local.outer.AptAppointmentData.class; + break; + case AptOutrasVacina.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case AptOutrasVacina.TO_TRABALHADOR_ID_INDEX: + theClass = db.data.siprp_local.outer.TrabalhadoresData.class; + break; + case AptOutrasVacina.VACINA_TIPO_INDEX: + theClass = Integer.class; + break; + case AptOutrasVacina.TO_VACINA_TIPO_INDEX: + theClass = db.data.siprp_local.outer.MedVacinaTipoData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : AptOutrasVacina._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, AptOutrasVacina.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/AptOutrasViajante.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/AptOutrasViajante.java new file mode 100644 index 00000000..be0e1679 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/AptOutrasViajante.java @@ -0,0 +1,431 @@ +/* +* AptOutrasViajante.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class AptOutrasViajante extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( AptOutrasViajante.ID, AptOutrasViajante.ID_INDEX ); + FIELD_INDEXES.put( AptOutrasViajante.ID_FULL, AptOutrasViajante.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AptOutrasViajante.CLASS_IDENTIFIER, AptOutrasViajante.APPOINTMENT_ID, AptOutrasViajante.TO_APPOINTMENT_ID ); + FIELD_INDEXES.put( AptOutrasViajante.APPOINTMENT_ID, AptOutrasViajante.APPOINTMENT_ID_INDEX ); + FIELD_INDEXES.put( AptOutrasViajante.APPOINTMENT_ID_FULL, AptOutrasViajante.APPOINTMENT_ID_INDEX ); + FIELD_INDEXES.put( AptOutrasViajante.TO_APPOINTMENT_ID, AptOutrasViajante.TO_APPOINTMENT_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AptOutrasViajante.CLASS_IDENTIFIER, AptOutrasViajante.TRABALHADOR_ID, AptOutrasViajante.TO_TRABALHADOR_ID ); + FIELD_INDEXES.put( AptOutrasViajante.TRABALHADOR_ID, AptOutrasViajante.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( AptOutrasViajante.TRABALHADOR_ID_FULL, AptOutrasViajante.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( AptOutrasViajante.TO_TRABALHADOR_ID, AptOutrasViajante.TO_TRABALHADOR_ID_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyappointment_idToapt_appointment = + new com.evolute.entity.ForeignKey( AptOutrasViajante.class, AptOutrasViajante.APPOINTMENT_ID, db.data.siprp_local.outer.AptAppointmentData.class, db.data.siprp_local.outer.AptAppointmentData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores = + new com.evolute.entity.ForeignKey( AptOutrasViajante.class, AptOutrasViajante.TRABALHADOR_ID, db.data.siprp_local.outer.TrabalhadoresData.class, db.data.siprp_local.outer.TrabalhadoresData.ID ); + + public static final String TABLENAME = "apt_outras_viajante"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.apt_outras_viajante"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "apt_outras_viajante.id"; + public static final int ID_INDEX = 0; + public static final String APPOINTMENT_ID = "appointment_id"; + public static final String APPOINTMENT_ID_FULL = "apt_outras_viajante.appointment_id"; + public static final int APPOINTMENT_ID_INDEX = 1; + public static final String TO_APPOINTMENT_ID = "to_appointment_id"; + public static final String TO_APPOINTMENT_ID_FULL = "apt_outras_viajante.to_appointment_id"; + public static final int TO_APPOINTMENT_ID_INDEX = 2; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "apt_outras_viajante.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 3; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final String TO_TRABALHADOR_ID_FULL = "apt_outras_viajante.to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + APPOINTMENT_ID, TO_APPOINTMENT_ID, TRABALHADOR_ID, TO_TRABALHADOR_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + APPOINTMENT_ID, TABLENAME + "." + TO_APPOINTMENT_ID, TABLENAME + "." + TRABALHADOR_ID, TABLENAME + "." + TO_TRABALHADOR_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, APPOINTMENT_ID, TRABALHADOR_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, APPOINTMENT_ID, TRABALHADOR_ID, }; + + private Integer id; + private Integer appointment_id; + private db.data.siprp_local.outer.AptAppointmentData to_appointment_id; + private Integer trabalhador_id; + private db.data.siprp_local.outer.TrabalhadoresData to_trabalhador_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public AptOutrasViajante() + { + 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 getAppointment_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( APPOINTMENT_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.appointment_id; + } + + public void setAppointment_id( Integer appointment_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( APPOINTMENT_ID, appointment_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.appointment_id = appointment_id; + LAZY_LOADED_OBJECTS.put( APPOINTMENT_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.AptAppointmentData toAppointment_id() + { + try + { + prepare( TO_APPOINTMENT_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_appointment_id; + } + + public void setToAppointment_id( db.data.siprp_local.outer.AptAppointmentData to_appointment_id ) + { + try + { + preProcess( TO_APPOINTMENT_ID, to_appointment_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_appointment_id = to_appointment_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 db.data.siprp_local.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp_local.outer.TrabalhadoresData to_trabalhador_id ) + { + try + { + preProcess( TO_TRABALHADOR_ID, to_trabalhador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_trabalhador_id = to_trabalhador_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptOutrasViajante.ID_INDEX: + value = getId(); + break; + case AptOutrasViajante.APPOINTMENT_ID_INDEX: + value = getAppointment_id(); + break; + case AptOutrasViajante.TO_APPOINTMENT_ID_INDEX: + value = toAppointment_id(); + break; + case AptOutrasViajante.TRABALHADOR_ID_INDEX: + value = getTrabalhador_id(); + break; + case AptOutrasViajante.TO_TRABALHADOR_ID_INDEX: + value = toTrabalhador_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptOutrasViajante.ID_INDEX: + value = this.id; + break; + case AptOutrasViajante.APPOINTMENT_ID_INDEX: + value = this.appointment_id; + break; + case AptOutrasViajante.TO_APPOINTMENT_ID_INDEX: + value = this.to_appointment_id; + break; + case AptOutrasViajante.TRABALHADOR_ID_INDEX: + value = this.trabalhador_id; + break; + case AptOutrasViajante.TO_TRABALHADOR_ID_INDEX: + value = this.to_trabalhador_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptOutrasViajante.ID_INDEX: + setId( ( Integer ) value ); + break; + case AptOutrasViajante.APPOINTMENT_ID_INDEX: + setAppointment_id( ( Integer ) value ); + break; + case AptOutrasViajante.TO_APPOINTMENT_ID_INDEX: + setToAppointment_id( ( db.data.siprp_local.outer.AptAppointmentData ) value ); + break; + case AptOutrasViajante.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case AptOutrasViajante.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( db.data.siprp_local.outer.TrabalhadoresData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptOutrasViajante.ID_INDEX: + this.id = ( Integer ) value; + break; + case AptOutrasViajante.APPOINTMENT_ID_INDEX: + this.appointment_id = ( Integer ) value; + break; + case AptOutrasViajante.TO_APPOINTMENT_ID_INDEX: + this.to_appointment_id = ( db.data.siprp_local.outer.AptAppointmentData ) value; + break; + case AptOutrasViajante.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case AptOutrasViajante.TO_TRABALHADOR_ID_INDEX: + this.to_trabalhador_id = ( db.data.siprp_local.outer.TrabalhadoresData ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case AptOutrasViajante.ID_INDEX: + theClass = Integer.class; + break; + case AptOutrasViajante.APPOINTMENT_ID_INDEX: + theClass = Integer.class; + break; + case AptOutrasViajante.TO_APPOINTMENT_ID_INDEX: + theClass = db.data.siprp_local.outer.AptAppointmentData.class; + break; + case AptOutrasViajante.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case AptOutrasViajante.TO_TRABALHADOR_ID_INDEX: + theClass = db.data.siprp_local.outer.TrabalhadoresData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : AptOutrasViajante._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, AptOutrasViajante.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/AptSegurancaAlimentar.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/AptSegurancaAlimentar.java new file mode 100644 index 00000000..2ed5f8e7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/AptSegurancaAlimentar.java @@ -0,0 +1,483 @@ +/* +* AptSegurancaAlimentar.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class AptSegurancaAlimentar extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( AptSegurancaAlimentar.ID, AptSegurancaAlimentar.ID_INDEX ); + FIELD_INDEXES.put( AptSegurancaAlimentar.ID_FULL, AptSegurancaAlimentar.ID_INDEX ); + FIELD_INDEXES.put( AptSegurancaAlimentar.DELETED_STAMP, AptSegurancaAlimentar.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( AptSegurancaAlimentar.DELETED_STAMP_FULL, AptSegurancaAlimentar.DELETED_STAMP_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AptSegurancaAlimentar.CLASS_IDENTIFIER, AptSegurancaAlimentar.APPOINTMENT_ID, AptSegurancaAlimentar.TO_APPOINTMENT_ID ); + FIELD_INDEXES.put( AptSegurancaAlimentar.APPOINTMENT_ID, AptSegurancaAlimentar.APPOINTMENT_ID_INDEX ); + FIELD_INDEXES.put( AptSegurancaAlimentar.APPOINTMENT_ID_FULL, AptSegurancaAlimentar.APPOINTMENT_ID_INDEX ); + FIELD_INDEXES.put( AptSegurancaAlimentar.TO_APPOINTMENT_ID, AptSegurancaAlimentar.TO_APPOINTMENT_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( AptSegurancaAlimentar.CLASS_IDENTIFIER, AptSegurancaAlimentar.ESTABELECIMENTO_ID, AptSegurancaAlimentar.TO_ESTABELECIMENTO_ID ); + FIELD_INDEXES.put( AptSegurancaAlimentar.ESTABELECIMENTO_ID, AptSegurancaAlimentar.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( AptSegurancaAlimentar.ESTABELECIMENTO_ID_FULL, AptSegurancaAlimentar.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( AptSegurancaAlimentar.TO_ESTABELECIMENTO_ID, AptSegurancaAlimentar.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 ForeignKeyappointment_idToapt_appointment = + new com.evolute.entity.ForeignKey( AptSegurancaAlimentar.class, AptSegurancaAlimentar.APPOINTMENT_ID, db.data.siprp_local.outer.AptAppointmentData.class, db.data.siprp_local.outer.AptAppointmentData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( AptSegurancaAlimentar.class, AptSegurancaAlimentar.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "apt_seguranca_alimentar"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.apt_seguranca_alimentar"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "apt_seguranca_alimentar.id"; + public static final int ID_INDEX = 0; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "apt_seguranca_alimentar.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 1; + public static final String APPOINTMENT_ID = "appointment_id"; + public static final String APPOINTMENT_ID_FULL = "apt_seguranca_alimentar.appointment_id"; + public static final int APPOINTMENT_ID_INDEX = 2; + public static final String TO_APPOINTMENT_ID = "to_appointment_id"; + public static final String TO_APPOINTMENT_ID_FULL = "apt_seguranca_alimentar.to_appointment_id"; + public static final int TO_APPOINTMENT_ID_INDEX = 3; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "apt_seguranca_alimentar.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 4; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID_FULL = "apt_seguranca_alimentar.to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + DELETED_STAMP, APPOINTMENT_ID, TO_APPOINTMENT_ID, ESTABELECIMENTO_ID, + TO_ESTABELECIMENTO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DELETED_STAMP, TABLENAME + "." + APPOINTMENT_ID, TABLENAME + "." + TO_APPOINTMENT_ID, TABLENAME + "." + ESTABELECIMENTO_ID, + TABLENAME + "." + TO_ESTABELECIMENTO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DELETED_STAMP, APPOINTMENT_ID, ESTABELECIMENTO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DELETED_STAMP, APPOINTMENT_ID, ESTABELECIMENTO_ID, }; + + private Integer id; + private java.sql.Timestamp deleted_stamp; + private Integer appointment_id; + private db.data.siprp_local.outer.AptAppointmentData to_appointment_id; + private Integer estabelecimento_id; + private db.data.siprp_local.outer.EstabelecimentosData to_estabelecimento_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public AptSegurancaAlimentar() + { + 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.sql.Timestamp getDeleted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_stamp; + } + + public void setDeleted_stamp( java.sql.Timestamp deleted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_STAMP, deleted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_stamp = deleted_stamp; + LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); + } + + public Integer getAppointment_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( APPOINTMENT_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.appointment_id; + } + + public void setAppointment_id( Integer appointment_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( APPOINTMENT_ID, appointment_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.appointment_id = appointment_id; + LAZY_LOADED_OBJECTS.put( APPOINTMENT_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.AptAppointmentData toAppointment_id() + { + try + { + prepare( TO_APPOINTMENT_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_appointment_id; + } + + public void setToAppointment_id( db.data.siprp_local.outer.AptAppointmentData to_appointment_id ) + { + try + { + preProcess( TO_APPOINTMENT_ID, to_appointment_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_appointment_id = to_appointment_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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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 AptSegurancaAlimentar.ID_INDEX: + value = getId(); + break; + case AptSegurancaAlimentar.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + break; + case AptSegurancaAlimentar.APPOINTMENT_ID_INDEX: + value = getAppointment_id(); + break; + case AptSegurancaAlimentar.TO_APPOINTMENT_ID_INDEX: + value = toAppointment_id(); + break; + case AptSegurancaAlimentar.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case AptSegurancaAlimentar.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 AptSegurancaAlimentar.ID_INDEX: + value = this.id; + break; + case AptSegurancaAlimentar.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + case AptSegurancaAlimentar.APPOINTMENT_ID_INDEX: + value = this.appointment_id; + break; + case AptSegurancaAlimentar.TO_APPOINTMENT_ID_INDEX: + value = this.to_appointment_id; + break; + case AptSegurancaAlimentar.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + case AptSegurancaAlimentar.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 AptSegurancaAlimentar.ID_INDEX: + setId( ( Integer ) value ); + break; + case AptSegurancaAlimentar.DELETED_STAMP_INDEX: + setDeleted_stamp( ( java.sql.Timestamp ) value ); + break; + case AptSegurancaAlimentar.APPOINTMENT_ID_INDEX: + setAppointment_id( ( Integer ) value ); + break; + case AptSegurancaAlimentar.TO_APPOINTMENT_ID_INDEX: + setToAppointment_id( ( db.data.siprp_local.outer.AptAppointmentData ) value ); + break; + case AptSegurancaAlimentar.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case AptSegurancaAlimentar.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp_local.outer.EstabelecimentosData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptSegurancaAlimentar.ID_INDEX: + this.id = ( Integer ) value; + break; + case AptSegurancaAlimentar.DELETED_STAMP_INDEX: + this.deleted_stamp = ( java.sql.Timestamp ) value; + break; + case AptSegurancaAlimentar.APPOINTMENT_ID_INDEX: + this.appointment_id = ( Integer ) value; + break; + case AptSegurancaAlimentar.TO_APPOINTMENT_ID_INDEX: + this.to_appointment_id = ( db.data.siprp_local.outer.AptAppointmentData ) value; + break; + case AptSegurancaAlimentar.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case AptSegurancaAlimentar.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( db.data.siprp_local.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 AptSegurancaAlimentar.ID_INDEX: + theClass = Integer.class; + break; + case AptSegurancaAlimentar.DELETED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + case AptSegurancaAlimentar.APPOINTMENT_ID_INDEX: + theClass = Integer.class; + break; + case AptSegurancaAlimentar.TO_APPOINTMENT_ID_INDEX: + theClass = db.data.siprp_local.outer.AptAppointmentData.class; + break; + case AptSegurancaAlimentar.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case AptSegurancaAlimentar.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.outer.EstabelecimentosData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : AptSegurancaAlimentar._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, AptSegurancaAlimentar.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/AptState.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/AptState.java new file mode 100644 index 00000000..d817c88f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/AptState.java @@ -0,0 +1,296 @@ +/* +* AptState.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class AptState extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( AptState.ID, AptState.ID_INDEX ); + FIELD_INDEXES.put( AptState.ID_FULL, AptState.ID_INDEX ); + FIELD_INDEXES.put( AptState.DESCRIPTION, AptState.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( AptState.DESCRIPTION_FULL, AptState.DESCRIPTION_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "apt_state"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.apt_state"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "apt_state.id"; + public static final int ID_INDEX = 0; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "apt_state.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 AptState() + { + 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.ListfromAptAppointment_state_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.AptAppointmentData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.AptAppointmentData.class , getPrimaryKey().getMap().get("id"), "state_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 AptState.ID_INDEX: + value = getId(); + break; + case AptState.DESCRIPTION_INDEX: + value = getDescription(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptState.ID_INDEX: + value = this.id; + break; + case AptState.DESCRIPTION_INDEX: + value = this.description; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptState.ID_INDEX: + setId( ( Integer ) value ); + break; + case AptState.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case AptState.ID_INDEX: + this.id = ( Integer ) value; + break; + case AptState.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 AptState.ID_INDEX: + theClass = Integer.class; + break; + case AptState.DESCRIPTION_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : AptState._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, AptState.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Avisos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Avisos.java new file mode 100644 index 00000000..86793d5c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Avisos.java @@ -0,0 +1,786 @@ +/* +* Avisos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Avisos extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( Avisos.class, Avisos.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores = + new com.evolute.entity.ForeignKey( Avisos.class, Avisos.TRABALHADOR_ID, db.data.siprp_local.outer.TrabalhadoresData.class, db.data.siprp_local.outer.TrabalhadoresData.ID ); + + public static final String TABLENAME = "avisos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.avisos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "avisos.id"; + public static final int ID_INDEX = 0; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "avisos.tipo"; + public static final int TIPO_INDEX = 1; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "avisos.empresa_id"; + public static final int EMPRESA_ID_INDEX = 2; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final String TO_EMPRESA_ID_FULL = "avisos.to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 3; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "avisos.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 4; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID_FULL = "avisos.to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 5; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "avisos.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 6; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final String TO_TRABALHADOR_ID_FULL = "avisos.to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 7; + public static final String EVENTO_ID = "evento_id"; + public static final String EVENTO_ID_FULL = "avisos.evento_id"; + public static final int EVENTO_ID_INDEX = 8; + public static final String DATA_AVISO = "data_aviso"; + public static final String DATA_AVISO_FULL = "avisos.data_aviso"; + public static final int DATA_AVISO_INDEX = 9; + public static final String DATA_EVENTO = "data_evento"; + public static final String DATA_EVENTO_FULL = "avisos.data_evento"; + public static final int DATA_EVENTO_INDEX = 10; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "avisos.descricao"; + public static final int DESCRICAO_INDEX = 11; + + public static final String FIELD_NAMES[] = new String[]{ + TIPO, EMPRESA_ID, TO_EMPRESA_ID, ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, + TRABALHADOR_ID, TO_TRABALHADOR_ID, EVENTO_ID, DATA_AVISO, DATA_EVENTO, DESCRICAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TIPO, TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID, + TABLENAME + "." + TRABALHADOR_ID, TABLENAME + "." + TO_TRABALHADOR_ID, TABLENAME + "." + EVENTO_ID, TABLENAME + "." + DATA_AVISO, TABLENAME + "." + DATA_EVENTO, TABLENAME + "." + DESCRICAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TIPO, EMPRESA_ID, ESTABELECIMENTO_ID, TRABALHADOR_ID, EVENTO_ID, DATA_AVISO, + DATA_EVENTO, DESCRICAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TIPO, EMPRESA_ID, ESTABELECIMENTO_ID, TRABALHADOR_ID, EVENTO_ID, DATA_AVISO, + DATA_EVENTO, DESCRICAO, }; + + private Integer id; + private Integer tipo; + private Integer empresa_id; + private db.data.siprp_local.outer.EmpresasData to_empresa_id; + private Integer estabelecimento_id; + private db.data.siprp_local.outer.EstabelecimentosData to_estabelecimento_id; + private Integer trabalhador_id; + private db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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 db.data.siprp_local.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.EmpresasData ) value ); + break; + case Avisos.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case Avisos.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp_local.outer.EstabelecimentosData ) value ); + break; + case Avisos.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case Avisos.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( db.data.siprp_local.outer.TrabalhadoresData ) value ); + break; + case Avisos.EVENTO_ID_INDEX: + setEvento_id( ( Integer ) value ); + break; + case Avisos.DATA_AVISO_INDEX: + setData_aviso( ( java.util.Date ) value ); + break; + case Avisos.DATA_EVENTO_INDEX: + setData_evento( ( java.util.Date ) value ); + break; + case Avisos.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Avisos.ID_INDEX: + this.id = ( Integer ) value; + break; + case Avisos.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case Avisos.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case Avisos.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( db.data.siprp_local.outer.EmpresasData ) value; + break; + case Avisos.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case Avisos.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( db.data.siprp_local.outer.EstabelecimentosData ) value; + break; + case Avisos.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case Avisos.TO_TRABALHADOR_ID_INDEX: + this.to_trabalhador_id = ( db.data.siprp_local.outer.TrabalhadoresData ) value; + break; + case Avisos.EVENTO_ID_INDEX: + this.evento_id = ( Integer ) value; + break; + case Avisos.DATA_AVISO_INDEX: + this.data_aviso = ( java.util.Date ) value; + break; + case Avisos.DATA_EVENTO_INDEX: + this.data_evento = ( java.util.Date ) value; + break; + case Avisos.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Avisos.ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TIPO_INDEX: + theClass = Integer.class; + break; + case Avisos.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.outer.EmpresasData.class; + break; + case Avisos.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.outer.EstabelecimentosData.class; + break; + case Avisos.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TO_TRABALHADOR_ID_INDEX: + theClass = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Contactos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Contactos.java new file mode 100644 index 00000000..08e0ad7a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Contactos.java @@ -0,0 +1,649 @@ +/* +* Contactos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Contactos extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + FIELD_INDEXES.put( Contactos.DEPARTAMENTO, Contactos.DEPARTAMENTO_INDEX ); + FIELD_INDEXES.put( Contactos.DEPARTAMENTO_FULL, Contactos.DEPARTAMENTO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "contactos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.contactos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "contactos.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "contactos.nome"; + public static final int NOME_INDEX = 1; + public static final String TELEFONE = "telefone"; + public static final String TELEFONE_FULL = "contactos.telefone"; + public static final int TELEFONE_INDEX = 2; + public static final String TELEMOVEL = "telemovel"; + public static final String TELEMOVEL_FULL = "contactos.telemovel"; + public static final int TELEMOVEL_INDEX = 3; + public static final String FAX = "fax"; + public static final String FAX_FULL = "contactos.fax"; + public static final int FAX_INDEX = 4; + public static final String EMAIL = "email"; + public static final String EMAIL_FULL = "contactos.email"; + public static final int EMAIL_INDEX = 5; + public static final String CARGO = "cargo"; + public static final String CARGO_FULL = "contactos.cargo"; + public static final int CARGO_INDEX = 6; + public static final String DEPARTAMENTO = "departamento"; + public static final String DEPARTAMENTO_FULL = "contactos.departamento"; + public static final int DEPARTAMENTO_INDEX = 7; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, DEPARTAMENTO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + TELEFONE, TABLENAME + "." + TELEMOVEL, TABLENAME + "." + FAX, TABLENAME + "." + EMAIL, TABLENAME + "." + CARGO, TABLENAME + "." + DEPARTAMENTO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, DEPARTAMENTO, }; + + + 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, DEPARTAMENTO, }; + + private Integer id; + private String nome; + private String telefone; + private String telemovel; + private String fax; + private String email; + private String cargo; + private String departamento; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Contactos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 = new java.util.LinkedList< db.data.siprp_local.outer.EmpresasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.EmpresasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.EstabelecimentosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.PrestadoresData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 String getDepartamento() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DEPARTAMENTO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.departamento; + } + + public void setDepartamento( String departamento ) + { + try + { + setLockedForRefresh( true ); + preProcess( DEPARTAMENTO, departamento ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.departamento = departamento; + LAZY_LOADED_OBJECTS.put( DEPARTAMENTO, 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; + case Contactos.DEPARTAMENTO_INDEX: + value = getDepartamento(); + 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; + case Contactos.DEPARTAMENTO_INDEX: + value = this.departamento; + 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; + case Contactos.DEPARTAMENTO_INDEX: + setDepartamento( ( 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; + case Contactos.DEPARTAMENTO_INDEX: + this.departamento = ( 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; + case Contactos.DEPARTAMENTO_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, ( 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurArs.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurArs.java new file mode 100644 index 00000000..00a42a3a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurArs.java @@ -0,0 +1,297 @@ +/* +* CurArs.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurArs extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurArs.ID, CurArs.ID_INDEX ); + FIELD_INDEXES.put( CurArs.ID_FULL, CurArs.ID_INDEX ); + FIELD_INDEXES.put( CurArs.NOME, CurArs.NOME_INDEX ); + FIELD_INDEXES.put( CurArs.NOME_FULL, CurArs.NOME_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "cur_ars"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_ars"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_ars.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "cur_ars.nome"; + public static final int NOME_INDEX = 1; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, }; + + private Integer id; + private String nome; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurArs() + { + 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.ListfromCurFormandos_ars_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurFormandosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurFormandosData.class , getPrimaryKey().getMap().get("id"), "ars_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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurArs.ID_INDEX: + value = getId(); + break; + case CurArs.NOME_INDEX: + value = getNome(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurArs.ID_INDEX: + value = this.id; + break; + case CurArs.NOME_INDEX: + value = this.nome; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurArs.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurArs.NOME_INDEX: + setNome( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurArs.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurArs.NOME_INDEX: + this.nome = ( 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 CurArs.ID_INDEX: + theClass = Integer.class; + break; + case CurArs.NOME_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurArs._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, CurArs.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurAulas.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurAulas.java new file mode 100644 index 00000000..e8632e6a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurAulas.java @@ -0,0 +1,515 @@ +/* +* CurAulas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurAulas extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurAulas.ID, CurAulas.ID_INDEX ); + FIELD_INDEXES.put( CurAulas.ID_FULL, CurAulas.ID_INDEX ); + FIELD_INDEXES.put( CurAulas.INICIO_DATE, CurAulas.INICIO_DATE_INDEX ); + FIELD_INDEXES.put( CurAulas.INICIO_DATE_FULL, CurAulas.INICIO_DATE_INDEX ); + FIELD_INDEXES.put( CurAulas.FIM_DATE, CurAulas.FIM_DATE_INDEX ); + FIELD_INDEXES.put( CurAulas.FIM_DATE_FULL, CurAulas.FIM_DATE_INDEX ); + FIELD_INDEXES.put( CurAulas.DELETED_DATE, CurAulas.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurAulas.DELETED_DATE_FULL, CurAulas.DELETED_DATE_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurAulas.CLASS_IDENTIFIER, CurAulas.CUR_DIA_ID, CurAulas.TO_CUR_DIA_ID ); + FIELD_INDEXES.put( CurAulas.CUR_DIA_ID, CurAulas.CUR_DIA_ID_INDEX ); + FIELD_INDEXES.put( CurAulas.CUR_DIA_ID_FULL, CurAulas.CUR_DIA_ID_INDEX ); + FIELD_INDEXES.put( CurAulas.TO_CUR_DIA_ID, CurAulas.TO_CUR_DIA_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 ForeignKeycur_dia_idTocur_dias = + new com.evolute.entity.ForeignKey( CurAulas.class, CurAulas.CUR_DIA_ID, db.data.siprp_local.outer.CurDiasData.class, db.data.siprp_local.outer.CurDiasData.ID ); + + public static final String TABLENAME = "cur_aulas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_aulas"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_aulas.id"; + public static final int ID_INDEX = 0; + public static final String INICIO_DATE = "inicio_date"; + public static final String INICIO_DATE_FULL = "cur_aulas.inicio_date"; + public static final int INICIO_DATE_INDEX = 1; + public static final String FIM_DATE = "fim_date"; + public static final String FIM_DATE_FULL = "cur_aulas.fim_date"; + public static final int FIM_DATE_INDEX = 2; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_aulas.deleted_date"; + public static final int DELETED_DATE_INDEX = 3; + public static final String CUR_DIA_ID = "cur_dia_id"; + public static final String CUR_DIA_ID_FULL = "cur_aulas.cur_dia_id"; + public static final int CUR_DIA_ID_INDEX = 4; + public static final String TO_CUR_DIA_ID = "to_cur_dia_id"; + public static final String TO_CUR_DIA_ID_FULL = "cur_aulas.to_cur_dia_id"; + public static final int TO_CUR_DIA_ID_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + INICIO_DATE, FIM_DATE, DELETED_DATE, CUR_DIA_ID, TO_CUR_DIA_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + INICIO_DATE, TABLENAME + "." + FIM_DATE, TABLENAME + "." + DELETED_DATE, TABLENAME + "." + CUR_DIA_ID, TABLENAME + "." + TO_CUR_DIA_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, INICIO_DATE, FIM_DATE, DELETED_DATE, CUR_DIA_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, INICIO_DATE, FIM_DATE, DELETED_DATE, CUR_DIA_ID, }; + + private Integer id; + private java.sql.Time inicio_date; + private java.sql.Time fim_date; + private java.sql.Timestamp deleted_date; + private Integer cur_dia_id; + private db.data.siprp_local.outer.CurDiasData to_cur_dia_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurAulas() + { + 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.ListfromCurAulasFormadores_aula_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurAulasFormadoresData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurAulasFormadoresData.class , getPrimaryKey().getMap().get("id"), "aula_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromCurTopicosAulas_aula_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurTopicosAulasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurTopicosAulasData.class , getPrimaryKey().getMap().get("id"), "aula_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.sql.Time getInicio_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( INICIO_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.inicio_date; + } + + public void setInicio_date( java.sql.Time inicio_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( INICIO_DATE, inicio_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.inicio_date = inicio_date; + LAZY_LOADED_OBJECTS.put( INICIO_DATE, Boolean.TRUE ); + } + + public java.sql.Time getFim_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FIM_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.fim_date; + } + + public void setFim_date( java.sql.Time fim_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( FIM_DATE, fim_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.fim_date = fim_date; + LAZY_LOADED_OBJECTS.put( FIM_DATE, 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 getCur_dia_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CUR_DIA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.cur_dia_id; + } + + public void setCur_dia_id( Integer cur_dia_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CUR_DIA_ID, cur_dia_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.cur_dia_id = cur_dia_id; + LAZY_LOADED_OBJECTS.put( CUR_DIA_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurDiasData toCur_dia_id() + { + try + { + prepare( TO_CUR_DIA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_cur_dia_id; + } + + public void setToCur_dia_id( db.data.siprp_local.outer.CurDiasData to_cur_dia_id ) + { + try + { + preProcess( TO_CUR_DIA_ID, to_cur_dia_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_cur_dia_id = to_cur_dia_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurAulas.ID_INDEX: + value = getId(); + break; + case CurAulas.INICIO_DATE_INDEX: + value = getInicio_date(); + break; + case CurAulas.FIM_DATE_INDEX: + value = getFim_date(); + break; + case CurAulas.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case CurAulas.CUR_DIA_ID_INDEX: + value = getCur_dia_id(); + break; + case CurAulas.TO_CUR_DIA_ID_INDEX: + value = toCur_dia_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurAulas.ID_INDEX: + value = this.id; + break; + case CurAulas.INICIO_DATE_INDEX: + value = this.inicio_date; + break; + case CurAulas.FIM_DATE_INDEX: + value = this.fim_date; + break; + case CurAulas.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case CurAulas.CUR_DIA_ID_INDEX: + value = this.cur_dia_id; + break; + case CurAulas.TO_CUR_DIA_ID_INDEX: + value = this.to_cur_dia_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurAulas.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurAulas.INICIO_DATE_INDEX: + setInicio_date( ( java.sql.Time ) value ); + break; + case CurAulas.FIM_DATE_INDEX: + setFim_date( ( java.sql.Time ) value ); + break; + case CurAulas.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case CurAulas.CUR_DIA_ID_INDEX: + setCur_dia_id( ( Integer ) value ); + break; + case CurAulas.TO_CUR_DIA_ID_INDEX: + setToCur_dia_id( ( db.data.siprp_local.outer.CurDiasData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurAulas.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurAulas.INICIO_DATE_INDEX: + this.inicio_date = ( java.sql.Time ) value; + break; + case CurAulas.FIM_DATE_INDEX: + this.fim_date = ( java.sql.Time ) value; + break; + case CurAulas.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case CurAulas.CUR_DIA_ID_INDEX: + this.cur_dia_id = ( Integer ) value; + break; + case CurAulas.TO_CUR_DIA_ID_INDEX: + this.to_cur_dia_id = ( db.data.siprp_local.outer.CurDiasData ) 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 CurAulas.ID_INDEX: + theClass = Integer.class; + break; + case CurAulas.INICIO_DATE_INDEX: + theClass = java.sql.Time.class; + break; + case CurAulas.FIM_DATE_INDEX: + theClass = java.sql.Time.class; + break; + case CurAulas.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurAulas.CUR_DIA_ID_INDEX: + theClass = Integer.class; + break; + case CurAulas.TO_CUR_DIA_ID_INDEX: + theClass = db.data.siprp_local.outer.CurDiasData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurAulas._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, CurAulas.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurAulasFormadores.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurAulasFormadores.java new file mode 100644 index 00000000..a1ed0aae --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurAulasFormadores.java @@ -0,0 +1,431 @@ +/* +* CurAulasFormadores.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurAulasFormadores extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( CurAulasFormadores.CLASS_IDENTIFIER, CurAulasFormadores.AULA_ID, CurAulasFormadores.TO_AULA_ID ); + FIELD_INDEXES.put( CurAulasFormadores.AULA_ID, CurAulasFormadores.AULA_ID_INDEX ); + FIELD_INDEXES.put( CurAulasFormadores.AULA_ID_FULL, CurAulasFormadores.AULA_ID_INDEX ); + FIELD_INDEXES.put( CurAulasFormadores.TO_AULA_ID, CurAulasFormadores.TO_AULA_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurAulasFormadores.CLASS_IDENTIFIER, CurAulasFormadores.FORMADOR_ID, CurAulasFormadores.TO_FORMADOR_ID ); + FIELD_INDEXES.put( CurAulasFormadores.FORMADOR_ID, CurAulasFormadores.FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurAulasFormadores.FORMADOR_ID_FULL, CurAulasFormadores.FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurAulasFormadores.TO_FORMADOR_ID, CurAulasFormadores.TO_FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurAulasFormadores.DELETED_DATE, CurAulasFormadores.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurAulasFormadores.DELETED_DATE_FULL, CurAulasFormadores.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 ForeignKeyaula_idTocur_aulas = + new com.evolute.entity.ForeignKey( CurAulasFormadores.class, CurAulasFormadores.AULA_ID, db.data.siprp_local.outer.CurAulasData.class, db.data.siprp_local.outer.CurAulasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyformador_idTocur_formadores = + new com.evolute.entity.ForeignKey( CurAulasFormadores.class, CurAulasFormadores.FORMADOR_ID, db.data.siprp_local.outer.CurFormadoresData.class, db.data.siprp_local.outer.CurFormadoresData.ID ); + + public static final String TABLENAME = "cur_aulas_formadores"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_aulas_formadores"; + + public static final int _INVALID__INDEX = -1; + public static final String AULA_ID = "aula_id"; + public static final String AULA_ID_FULL = "cur_aulas_formadores.aula_id"; + public static final int AULA_ID_INDEX = 0; + public static final String TO_AULA_ID = "to_aula_id"; + public static final String TO_AULA_ID_FULL = "cur_aulas_formadores.to_aula_id"; + public static final int TO_AULA_ID_INDEX = 1; + public static final String FORMADOR_ID = "formador_id"; + public static final String FORMADOR_ID_FULL = "cur_aulas_formadores.formador_id"; + public static final int FORMADOR_ID_INDEX = 2; + public static final String TO_FORMADOR_ID = "to_formador_id"; + public static final String TO_FORMADOR_ID_FULL = "cur_aulas_formadores.to_formador_id"; + public static final int TO_FORMADOR_ID_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_aulas_formadores.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + AULA_ID, FORMADOR_ID, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + AULA_ID, FORMADOR_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + AULA_ID, FORMADOR_ID, DELETED_DATE, }; + + private Integer aula_id; + private db.data.siprp_local.outer.CurAulasData to_aula_id; + private Integer formador_id; + private db.data.siprp_local.outer.CurFormadoresData to_formador_id; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurAulasFormadores() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false }; + } + + public Integer getAula_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( AULA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.aula_id; + } + + public void setAula_id( Integer aula_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( AULA_ID, aula_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.aula_id = aula_id; + LAZY_LOADED_OBJECTS.put( AULA_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurAulasData toAula_id() + { + try + { + prepare( TO_AULA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_aula_id; + } + + public void setToAula_id( db.data.siprp_local.outer.CurAulasData to_aula_id ) + { + try + { + preProcess( TO_AULA_ID, to_aula_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_aula_id = to_aula_id; + } + + public Integer getFormador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formador_id; + } + + public void setFormador_id( Integer formador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMADOR_ID, formador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formador_id = formador_id; + LAZY_LOADED_OBJECTS.put( FORMADOR_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurFormadoresData toFormador_id() + { + try + { + prepare( TO_FORMADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_formador_id; + } + + public void setToFormador_id( db.data.siprp_local.outer.CurFormadoresData to_formador_id ) + { + try + { + preProcess( TO_FORMADOR_ID, to_formador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_formador_id = to_formador_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 CurAulasFormadores.AULA_ID_INDEX: + value = getAula_id(); + break; + case CurAulasFormadores.TO_AULA_ID_INDEX: + value = toAula_id(); + break; + case CurAulasFormadores.FORMADOR_ID_INDEX: + value = getFormador_id(); + break; + case CurAulasFormadores.TO_FORMADOR_ID_INDEX: + value = toFormador_id(); + break; + case CurAulasFormadores.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurAulasFormadores.AULA_ID_INDEX: + value = this.aula_id; + break; + case CurAulasFormadores.TO_AULA_ID_INDEX: + value = this.to_aula_id; + break; + case CurAulasFormadores.FORMADOR_ID_INDEX: + value = this.formador_id; + break; + case CurAulasFormadores.TO_FORMADOR_ID_INDEX: + value = this.to_formador_id; + break; + case CurAulasFormadores.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurAulasFormadores.AULA_ID_INDEX: + setAula_id( ( Integer ) value ); + break; + case CurAulasFormadores.TO_AULA_ID_INDEX: + setToAula_id( ( db.data.siprp_local.outer.CurAulasData ) value ); + break; + case CurAulasFormadores.FORMADOR_ID_INDEX: + setFormador_id( ( Integer ) value ); + break; + case CurAulasFormadores.TO_FORMADOR_ID_INDEX: + setToFormador_id( ( db.data.siprp_local.outer.CurFormadoresData ) value ); + break; + case CurAulasFormadores.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurAulasFormadores.AULA_ID_INDEX: + this.aula_id = ( Integer ) value; + break; + case CurAulasFormadores.TO_AULA_ID_INDEX: + this.to_aula_id = ( db.data.siprp_local.outer.CurAulasData ) value; + break; + case CurAulasFormadores.FORMADOR_ID_INDEX: + this.formador_id = ( Integer ) value; + break; + case CurAulasFormadores.TO_FORMADOR_ID_INDEX: + this.to_formador_id = ( db.data.siprp_local.outer.CurFormadoresData ) value; + break; + case CurAulasFormadores.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() + { + throw new RuntimeException( "getPrimaryKeyName on CurAulasFormadores is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case CurAulasFormadores.AULA_ID_INDEX: + theClass = Integer.class; + break; + case CurAulasFormadores.TO_AULA_ID_INDEX: + theClass = db.data.siprp_local.outer.CurAulasData.class; + break; + case CurAulasFormadores.FORMADOR_ID_INDEX: + theClass = Integer.class; + break; + case CurAulasFormadores.TO_FORMADOR_ID_INDEX: + theClass = db.data.siprp_local.outer.CurFormadoresData.class; + break; + case CurAulasFormadores.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 : CurAulasFormadores._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, CurAulasFormadores.PK_FIELD_NAMES ); + primaryKey.set( 0, getAula_id() ); + primaryKey.set( 1, getFormador_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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurCursos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurCursos.java new file mode 100644 index 00000000..f8613249 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurCursos.java @@ -0,0 +1,1267 @@ +/* +* CurCursos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurCursos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurCursos.ID, CurCursos.ID_INDEX ); + FIELD_INDEXES.put( CurCursos.ID_FULL, CurCursos.ID_INDEX ); + FIELD_INDEXES.put( CurCursos.NOME, CurCursos.NOME_INDEX ); + FIELD_INDEXES.put( CurCursos.NOME_FULL, CurCursos.NOME_INDEX ); + FIELD_INDEXES.put( CurCursos.DATA, CurCursos.DATA_INDEX ); + FIELD_INDEXES.put( CurCursos.DATA_FULL, CurCursos.DATA_INDEX ); + FIELD_INDEXES.put( CurCursos.INICIO_HORA, CurCursos.INICIO_HORA_INDEX ); + FIELD_INDEXES.put( CurCursos.INICIO_HORA_FULL, CurCursos.INICIO_HORA_INDEX ); + FIELD_INDEXES.put( CurCursos.FIM_HORA, CurCursos.FIM_HORA_INDEX ); + FIELD_INDEXES.put( CurCursos.FIM_HORA_FULL, CurCursos.FIM_HORA_INDEX ); + FIELD_INDEXES.put( CurCursos.LIMITE_INSCRICOES, CurCursos.LIMITE_INSCRICOES_INDEX ); + FIELD_INDEXES.put( CurCursos.LIMITE_INSCRICOES_FULL, CurCursos.LIMITE_INSCRICOES_INDEX ); + FIELD_INDEXES.put( CurCursos.DELETED_DATE, CurCursos.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurCursos.DELETED_DATE_FULL, CurCursos.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurCursos.CODIGO_QUESTIONARIO_ANTES, CurCursos.CODIGO_QUESTIONARIO_ANTES_INDEX ); + FIELD_INDEXES.put( CurCursos.CODIGO_QUESTIONARIO_ANTES_FULL, CurCursos.CODIGO_QUESTIONARIO_ANTES_INDEX ); + FIELD_INDEXES.put( CurCursos.CODIGO_QUESTIONARIO_DURANTE, CurCursos.CODIGO_QUESTIONARIO_DURANTE_INDEX ); + FIELD_INDEXES.put( CurCursos.CODIGO_QUESTIONARIO_DURANTE_FULL, CurCursos.CODIGO_QUESTIONARIO_DURANTE_INDEX ); + FIELD_INDEXES.put( CurCursos.CODIGO_QUESTIONARIO_DEPOIS, CurCursos.CODIGO_QUESTIONARIO_DEPOIS_INDEX ); + FIELD_INDEXES.put( CurCursos.CODIGO_QUESTIONARIO_DEPOIS_FULL, CurCursos.CODIGO_QUESTIONARIO_DEPOIS_INDEX ); + FIELD_INDEXES.put( CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID, CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_INDEX ); + FIELD_INDEXES.put( CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_FULL, CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_INDEX ); + FIELD_INDEXES.put( CurCursos.ARCHIVED_DATE, CurCursos.ARCHIVED_DATE_INDEX ); + FIELD_INDEXES.put( CurCursos.ARCHIVED_DATE_FULL, CurCursos.ARCHIVED_DATE_INDEX ); + FIELD_INDEXES.put( CurCursos.PROFISSIONAL, CurCursos.PROFISSIONAL_INDEX ); + FIELD_INDEXES.put( CurCursos.PROFISSIONAL_FULL, CurCursos.PROFISSIONAL_INDEX ); + FIELD_INDEXES.put( CurCursos.FINANCIADO, CurCursos.FINANCIADO_INDEX ); + FIELD_INDEXES.put( CurCursos.FINANCIADO_FULL, CurCursos.FINANCIADO_INDEX ); + FIELD_INDEXES.put( CurCursos.VALOR, CurCursos.VALOR_INDEX ); + FIELD_INDEXES.put( CurCursos.VALOR_FULL, CurCursos.VALOR_INDEX ); + FIELD_INDEXES.put( CurCursos.RESPONSAVEL_ID, CurCursos.RESPONSAVEL_ID_INDEX ); + FIELD_INDEXES.put( CurCursos.RESPONSAVEL_ID_FULL, CurCursos.RESPONSAVEL_ID_INDEX ); + FIELD_INDEXES.put( CurCursos.DURACAO, CurCursos.DURACAO_INDEX ); + FIELD_INDEXES.put( CurCursos.DURACAO_FULL, CurCursos.DURACAO_INDEX ); + FIELD_INDEXES.put( CurCursos.LIVRO_REGISTO, CurCursos.LIVRO_REGISTO_INDEX ); + FIELD_INDEXES.put( CurCursos.LIVRO_REGISTO_FULL, CurCursos.LIVRO_REGISTO_INDEX ); + FIELD_INDEXES.put( CurCursos.LIVRO_NUMERO, CurCursos.LIVRO_NUMERO_INDEX ); + FIELD_INDEXES.put( CurCursos.LIVRO_NUMERO_FULL, CurCursos.LIVRO_NUMERO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "cur_cursos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_cursos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_cursos.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "cur_cursos.nome"; + public static final int NOME_INDEX = 1; + public static final String DATA = "data"; + public static final String DATA_FULL = "cur_cursos.data"; + public static final int DATA_INDEX = 2; + public static final String INICIO_HORA = "inicio_hora"; + public static final String INICIO_HORA_FULL = "cur_cursos.inicio_hora"; + public static final int INICIO_HORA_INDEX = 3; + public static final String FIM_HORA = "fim_hora"; + public static final String FIM_HORA_FULL = "cur_cursos.fim_hora"; + public static final int FIM_HORA_INDEX = 4; + public static final String LIMITE_INSCRICOES = "limite_inscricoes"; + public static final String LIMITE_INSCRICOES_FULL = "cur_cursos.limite_inscricoes"; + public static final int LIMITE_INSCRICOES_INDEX = 5; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_cursos.deleted_date"; + public static final int DELETED_DATE_INDEX = 6; + public static final String CODIGO_QUESTIONARIO_ANTES = "codigo_questionario_antes"; + public static final String CODIGO_QUESTIONARIO_ANTES_FULL = "cur_cursos.codigo_questionario_antes"; + public static final int CODIGO_QUESTIONARIO_ANTES_INDEX = 7; + public static final String CODIGO_QUESTIONARIO_DURANTE = "codigo_questionario_durante"; + public static final String CODIGO_QUESTIONARIO_DURANTE_FULL = "cur_cursos.codigo_questionario_durante"; + public static final int CODIGO_QUESTIONARIO_DURANTE_INDEX = 8; + public static final String CODIGO_QUESTIONARIO_DEPOIS = "codigo_questionario_depois"; + public static final String CODIGO_QUESTIONARIO_DEPOIS_FULL = "cur_cursos.codigo_questionario_depois"; + public static final int CODIGO_QUESTIONARIO_DEPOIS_INDEX = 9; + public static final String AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID = "aut_impressao_pedido_sub_tipo_id"; + public static final String AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_FULL = "cur_cursos.aut_impressao_pedido_sub_tipo_id"; + public static final int AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_INDEX = 10; + public static final String ARCHIVED_DATE = "archived_date"; + public static final String ARCHIVED_DATE_FULL = "cur_cursos.archived_date"; + public static final int ARCHIVED_DATE_INDEX = 11; + public static final String PROFISSIONAL = "profissional"; + public static final String PROFISSIONAL_FULL = "cur_cursos.profissional"; + public static final int PROFISSIONAL_INDEX = 12; + public static final String FINANCIADO = "financiado"; + public static final String FINANCIADO_FULL = "cur_cursos.financiado"; + public static final int FINANCIADO_INDEX = 13; + public static final String VALOR = "valor"; + public static final String VALOR_FULL = "cur_cursos.valor"; + public static final int VALOR_INDEX = 14; + public static final String RESPONSAVEL_ID = "responsavel_id"; + public static final String RESPONSAVEL_ID_FULL = "cur_cursos.responsavel_id"; + public static final int RESPONSAVEL_ID_INDEX = 15; + public static final String DURACAO = "duracao"; + public static final String DURACAO_FULL = "cur_cursos.duracao"; + public static final int DURACAO_INDEX = 16; + public static final String LIVRO_REGISTO = "livro_registo"; + public static final String LIVRO_REGISTO_FULL = "cur_cursos.livro_registo"; + public static final int LIVRO_REGISTO_INDEX = 17; + public static final String LIVRO_NUMERO = "livro_numero"; + public static final String LIVRO_NUMERO_FULL = "cur_cursos.livro_numero"; + public static final int LIVRO_NUMERO_INDEX = 18; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, DATA, INICIO_HORA, FIM_HORA, LIMITE_INSCRICOES, DELETED_DATE, + CODIGO_QUESTIONARIO_ANTES, CODIGO_QUESTIONARIO_DURANTE, + CODIGO_QUESTIONARIO_DEPOIS, AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID, + ARCHIVED_DATE, PROFISSIONAL, FINANCIADO, VALOR, RESPONSAVEL_ID, DURACAO, + LIVRO_REGISTO, LIVRO_NUMERO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + DATA, TABLENAME + "." + INICIO_HORA, TABLENAME + "." + FIM_HORA, TABLENAME + "." + LIMITE_INSCRICOES, TABLENAME + "." + DELETED_DATE, + TABLENAME + "." + CODIGO_QUESTIONARIO_ANTES, TABLENAME + "." + CODIGO_QUESTIONARIO_DURANTE, + TABLENAME + "." + CODIGO_QUESTIONARIO_DEPOIS, TABLENAME + "." + AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID, + TABLENAME + "." + ARCHIVED_DATE, TABLENAME + "." + PROFISSIONAL, TABLENAME + "." + FINANCIADO, TABLENAME + "." + VALOR, TABLENAME + "." + RESPONSAVEL_ID, TABLENAME + "." + DURACAO, + TABLENAME + "." + LIVRO_REGISTO, TABLENAME + "." + LIVRO_NUMERO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, DATA, INICIO_HORA, FIM_HORA, LIMITE_INSCRICOES, DELETED_DATE, + CODIGO_QUESTIONARIO_ANTES, CODIGO_QUESTIONARIO_DURANTE, + CODIGO_QUESTIONARIO_DEPOIS, AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID, + ARCHIVED_DATE, PROFISSIONAL, FINANCIADO, VALOR, RESPONSAVEL_ID, DURACAO, + LIVRO_REGISTO, LIVRO_NUMERO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, DATA, INICIO_HORA, FIM_HORA, LIMITE_INSCRICOES, DELETED_DATE, + CODIGO_QUESTIONARIO_ANTES, CODIGO_QUESTIONARIO_DURANTE, + CODIGO_QUESTIONARIO_DEPOIS, AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID, + ARCHIVED_DATE, PROFISSIONAL, FINANCIADO, VALOR, RESPONSAVEL_ID, DURACAO, + LIVRO_REGISTO, LIVRO_NUMERO, }; + + private Integer id; + private String nome; + private java.util.Date data; + private java.sql.Time inicio_hora; + private java.sql.Time fim_hora; + private Integer limite_inscricoes; + private java.sql.Timestamp deleted_date; + private String codigo_questionario_antes; + private String codigo_questionario_durante; + private String codigo_questionario_depois; + private Integer aut_impressao_pedido_sub_tipo_id; + private java.sql.Timestamp archived_date; + private Boolean profissional; + private Boolean financiado; + private Double valor; + private Integer responsavel_id; + private String duracao; + private String livro_registo; + private String livro_numero; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurCursos() + { + 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.ListfromCurDias_curso_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurDiasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurDiasData.class , getPrimaryKey().getMap().get("id"), "curso_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromCurFormadoresCursos_curso_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurFormadoresCursosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurFormadoresCursosData.class , getPrimaryKey().getMap().get("id"), "curso_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromCurFormandosCursos_curso_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurFormandosCursosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurFormandosCursosData.class , getPrimaryKey().getMap().get("id"), "curso_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromCurPagamentos_curso_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurPagamentosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurPagamentosData.class , getPrimaryKey().getMap().get("id"), "curso_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromCurPresencas_curso_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurPresencasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurPresencasData.class , getPrimaryKey().getMap().get("id"), "curso_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromCurQuestionarioResposta_curso_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurQuestionarioRespostaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurQuestionarioRespostaData.class , getPrimaryKey().getMap().get("id"), "curso_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromCurTopicos_curso_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurTopicosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurTopicosData.class , getPrimaryKey().getMap().get("id"), "curso_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 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.Time getInicio_hora() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( INICIO_HORA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.inicio_hora; + } + + public void setInicio_hora( java.sql.Time inicio_hora ) + { + try + { + setLockedForRefresh( true ); + preProcess( INICIO_HORA, inicio_hora ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.inicio_hora = inicio_hora; + LAZY_LOADED_OBJECTS.put( INICIO_HORA, Boolean.TRUE ); + } + + public java.sql.Time getFim_hora() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FIM_HORA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.fim_hora; + } + + public void setFim_hora( java.sql.Time fim_hora ) + { + try + { + setLockedForRefresh( true ); + preProcess( FIM_HORA, fim_hora ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.fim_hora = fim_hora; + LAZY_LOADED_OBJECTS.put( FIM_HORA, Boolean.TRUE ); + } + + public Integer getLimite_inscricoes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LIMITE_INSCRICOES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.limite_inscricoes; + } + + public void setLimite_inscricoes( Integer limite_inscricoes ) + { + try + { + setLockedForRefresh( true ); + preProcess( LIMITE_INSCRICOES, limite_inscricoes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.limite_inscricoes = limite_inscricoes; + LAZY_LOADED_OBJECTS.put( LIMITE_INSCRICOES, 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 String getCodigo_questionario_antes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CODIGO_QUESTIONARIO_ANTES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.codigo_questionario_antes; + } + + public void setCodigo_questionario_antes( String codigo_questionario_antes ) + { + try + { + setLockedForRefresh( true ); + preProcess( CODIGO_QUESTIONARIO_ANTES, codigo_questionario_antes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.codigo_questionario_antes = codigo_questionario_antes; + LAZY_LOADED_OBJECTS.put( CODIGO_QUESTIONARIO_ANTES, Boolean.TRUE ); + } + + public String getCodigo_questionario_durante() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CODIGO_QUESTIONARIO_DURANTE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.codigo_questionario_durante; + } + + public void setCodigo_questionario_durante( String codigo_questionario_durante ) + { + try + { + setLockedForRefresh( true ); + preProcess( CODIGO_QUESTIONARIO_DURANTE, codigo_questionario_durante ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.codigo_questionario_durante = codigo_questionario_durante; + LAZY_LOADED_OBJECTS.put( CODIGO_QUESTIONARIO_DURANTE, Boolean.TRUE ); + } + + public String getCodigo_questionario_depois() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CODIGO_QUESTIONARIO_DEPOIS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.codigo_questionario_depois; + } + + public void setCodigo_questionario_depois( String codigo_questionario_depois ) + { + try + { + setLockedForRefresh( true ); + preProcess( CODIGO_QUESTIONARIO_DEPOIS, codigo_questionario_depois ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.codigo_questionario_depois = codigo_questionario_depois; + LAZY_LOADED_OBJECTS.put( CODIGO_QUESTIONARIO_DEPOIS, Boolean.TRUE ); + } + + public Integer getAut_impressao_pedido_sub_tipo_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.aut_impressao_pedido_sub_tipo_id; + } + + public void setAut_impressao_pedido_sub_tipo_id( Integer aut_impressao_pedido_sub_tipo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID, aut_impressao_pedido_sub_tipo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.aut_impressao_pedido_sub_tipo_id = aut_impressao_pedido_sub_tipo_id; + LAZY_LOADED_OBJECTS.put( AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID, Boolean.TRUE ); + } + + public java.sql.Timestamp getArchived_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ARCHIVED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.archived_date; + } + + public void setArchived_date( java.sql.Timestamp archived_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( ARCHIVED_DATE, archived_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.archived_date = archived_date; + LAZY_LOADED_OBJECTS.put( ARCHIVED_DATE, Boolean.TRUE ); + } + + public Boolean getProfissional() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROFISSIONAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.profissional; + } + + public void setProfissional( Boolean profissional ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROFISSIONAL, profissional ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.profissional = profissional; + LAZY_LOADED_OBJECTS.put( PROFISSIONAL, Boolean.TRUE ); + } + + public Boolean getFinanciado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FINANCIADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.financiado; + } + + public void setFinanciado( Boolean financiado ) + { + try + { + setLockedForRefresh( true ); + preProcess( FINANCIADO, financiado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.financiado = financiado; + LAZY_LOADED_OBJECTS.put( FINANCIADO, Boolean.TRUE ); + } + + public Double getValor() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.valor; + } + + public void setValor( Double valor ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALOR, valor ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.valor = valor; + LAZY_LOADED_OBJECTS.put( VALOR, Boolean.TRUE ); + } + + public Integer getResponsavel_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESPONSAVEL_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.responsavel_id; + } + + public void setResponsavel_id( Integer responsavel_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESPONSAVEL_ID, responsavel_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.responsavel_id = responsavel_id; + LAZY_LOADED_OBJECTS.put( RESPONSAVEL_ID, Boolean.TRUE ); + } + + public String getDuracao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DURACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.duracao; + } + + public void setDuracao( String 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 String getLivro_registo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LIVRO_REGISTO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.livro_registo; + } + + public void setLivro_registo( String livro_registo ) + { + try + { + setLockedForRefresh( true ); + preProcess( LIVRO_REGISTO, livro_registo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.livro_registo = livro_registo; + LAZY_LOADED_OBJECTS.put( LIVRO_REGISTO, Boolean.TRUE ); + } + + public String getLivro_numero() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LIVRO_NUMERO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.livro_numero; + } + + public void setLivro_numero( String livro_numero ) + { + try + { + setLockedForRefresh( true ); + preProcess( LIVRO_NUMERO, livro_numero ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.livro_numero = livro_numero; + LAZY_LOADED_OBJECTS.put( LIVRO_NUMERO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurCursos.ID_INDEX: + value = getId(); + break; + case CurCursos.NOME_INDEX: + value = getNome(); + break; + case CurCursos.DATA_INDEX: + value = getData(); + break; + case CurCursos.INICIO_HORA_INDEX: + value = getInicio_hora(); + break; + case CurCursos.FIM_HORA_INDEX: + value = getFim_hora(); + break; + case CurCursos.LIMITE_INSCRICOES_INDEX: + value = getLimite_inscricoes(); + break; + case CurCursos.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case CurCursos.CODIGO_QUESTIONARIO_ANTES_INDEX: + value = getCodigo_questionario_antes(); + break; + case CurCursos.CODIGO_QUESTIONARIO_DURANTE_INDEX: + value = getCodigo_questionario_durante(); + break; + case CurCursos.CODIGO_QUESTIONARIO_DEPOIS_INDEX: + value = getCodigo_questionario_depois(); + break; + case CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_INDEX: + value = getAut_impressao_pedido_sub_tipo_id(); + break; + case CurCursos.ARCHIVED_DATE_INDEX: + value = getArchived_date(); + break; + case CurCursos.PROFISSIONAL_INDEX: + value = getProfissional(); + break; + case CurCursos.FINANCIADO_INDEX: + value = getFinanciado(); + break; + case CurCursos.VALOR_INDEX: + value = getValor(); + break; + case CurCursos.RESPONSAVEL_ID_INDEX: + value = getResponsavel_id(); + break; + case CurCursos.DURACAO_INDEX: + value = getDuracao(); + break; + case CurCursos.LIVRO_REGISTO_INDEX: + value = getLivro_registo(); + break; + case CurCursos.LIVRO_NUMERO_INDEX: + value = getLivro_numero(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurCursos.ID_INDEX: + value = this.id; + break; + case CurCursos.NOME_INDEX: + value = this.nome; + break; + case CurCursos.DATA_INDEX: + value = this.data; + break; + case CurCursos.INICIO_HORA_INDEX: + value = this.inicio_hora; + break; + case CurCursos.FIM_HORA_INDEX: + value = this.fim_hora; + break; + case CurCursos.LIMITE_INSCRICOES_INDEX: + value = this.limite_inscricoes; + break; + case CurCursos.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case CurCursos.CODIGO_QUESTIONARIO_ANTES_INDEX: + value = this.codigo_questionario_antes; + break; + case CurCursos.CODIGO_QUESTIONARIO_DURANTE_INDEX: + value = this.codigo_questionario_durante; + break; + case CurCursos.CODIGO_QUESTIONARIO_DEPOIS_INDEX: + value = this.codigo_questionario_depois; + break; + case CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_INDEX: + value = this.aut_impressao_pedido_sub_tipo_id; + break; + case CurCursos.ARCHIVED_DATE_INDEX: + value = this.archived_date; + break; + case CurCursos.PROFISSIONAL_INDEX: + value = this.profissional; + break; + case CurCursos.FINANCIADO_INDEX: + value = this.financiado; + break; + case CurCursos.VALOR_INDEX: + value = this.valor; + break; + case CurCursos.RESPONSAVEL_ID_INDEX: + value = this.responsavel_id; + break; + case CurCursos.DURACAO_INDEX: + value = this.duracao; + break; + case CurCursos.LIVRO_REGISTO_INDEX: + value = this.livro_registo; + break; + case CurCursos.LIVRO_NUMERO_INDEX: + value = this.livro_numero; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurCursos.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurCursos.NOME_INDEX: + setNome( ( String ) value ); + break; + case CurCursos.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case CurCursos.INICIO_HORA_INDEX: + setInicio_hora( ( java.sql.Time ) value ); + break; + case CurCursos.FIM_HORA_INDEX: + setFim_hora( ( java.sql.Time ) value ); + break; + case CurCursos.LIMITE_INSCRICOES_INDEX: + setLimite_inscricoes( ( Integer ) value ); + break; + case CurCursos.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case CurCursos.CODIGO_QUESTIONARIO_ANTES_INDEX: + setCodigo_questionario_antes( ( String ) value ); + break; + case CurCursos.CODIGO_QUESTIONARIO_DURANTE_INDEX: + setCodigo_questionario_durante( ( String ) value ); + break; + case CurCursos.CODIGO_QUESTIONARIO_DEPOIS_INDEX: + setCodigo_questionario_depois( ( String ) value ); + break; + case CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_INDEX: + setAut_impressao_pedido_sub_tipo_id( ( Integer ) value ); + break; + case CurCursos.ARCHIVED_DATE_INDEX: + setArchived_date( ( java.sql.Timestamp ) value ); + break; + case CurCursos.PROFISSIONAL_INDEX: + setProfissional( ( Boolean ) value ); + break; + case CurCursos.FINANCIADO_INDEX: + setFinanciado( ( Boolean ) value ); + break; + case CurCursos.VALOR_INDEX: + setValor( ( Double ) value ); + break; + case CurCursos.RESPONSAVEL_ID_INDEX: + setResponsavel_id( ( Integer ) value ); + break; + case CurCursos.DURACAO_INDEX: + setDuracao( ( String ) value ); + break; + case CurCursos.LIVRO_REGISTO_INDEX: + setLivro_registo( ( String ) value ); + break; + case CurCursos.LIVRO_NUMERO_INDEX: + setLivro_numero( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurCursos.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurCursos.NOME_INDEX: + this.nome = ( String ) value; + break; + case CurCursos.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case CurCursos.INICIO_HORA_INDEX: + this.inicio_hora = ( java.sql.Time ) value; + break; + case CurCursos.FIM_HORA_INDEX: + this.fim_hora = ( java.sql.Time ) value; + break; + case CurCursos.LIMITE_INSCRICOES_INDEX: + this.limite_inscricoes = ( Integer ) value; + break; + case CurCursos.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case CurCursos.CODIGO_QUESTIONARIO_ANTES_INDEX: + this.codigo_questionario_antes = ( String ) value; + break; + case CurCursos.CODIGO_QUESTIONARIO_DURANTE_INDEX: + this.codigo_questionario_durante = ( String ) value; + break; + case CurCursos.CODIGO_QUESTIONARIO_DEPOIS_INDEX: + this.codigo_questionario_depois = ( String ) value; + break; + case CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_INDEX: + this.aut_impressao_pedido_sub_tipo_id = ( Integer ) value; + break; + case CurCursos.ARCHIVED_DATE_INDEX: + this.archived_date = ( java.sql.Timestamp ) value; + break; + case CurCursos.PROFISSIONAL_INDEX: + this.profissional = ( Boolean ) value; + break; + case CurCursos.FINANCIADO_INDEX: + this.financiado = ( Boolean ) value; + break; + case CurCursos.VALOR_INDEX: + this.valor = ( Double ) value; + break; + case CurCursos.RESPONSAVEL_ID_INDEX: + this.responsavel_id = ( Integer ) value; + break; + case CurCursos.DURACAO_INDEX: + this.duracao = ( String ) value; + break; + case CurCursos.LIVRO_REGISTO_INDEX: + this.livro_registo = ( String ) value; + break; + case CurCursos.LIVRO_NUMERO_INDEX: + this.livro_numero = ( 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 CurCursos.ID_INDEX: + theClass = Integer.class; + break; + case CurCursos.NOME_INDEX: + theClass = String.class; + break; + case CurCursos.DATA_INDEX: + theClass = java.util.Date.class; + break; + case CurCursos.INICIO_HORA_INDEX: + theClass = java.sql.Time.class; + break; + case CurCursos.FIM_HORA_INDEX: + theClass = java.sql.Time.class; + break; + case CurCursos.LIMITE_INSCRICOES_INDEX: + theClass = Integer.class; + break; + case CurCursos.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurCursos.CODIGO_QUESTIONARIO_ANTES_INDEX: + theClass = String.class; + break; + case CurCursos.CODIGO_QUESTIONARIO_DURANTE_INDEX: + theClass = String.class; + break; + case CurCursos.CODIGO_QUESTIONARIO_DEPOIS_INDEX: + theClass = String.class; + break; + case CurCursos.AUT_IMPRESSAO_PEDIDO_SUB_TIPO_ID_INDEX: + theClass = Integer.class; + break; + case CurCursos.ARCHIVED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurCursos.PROFISSIONAL_INDEX: + theClass = Boolean.class; + break; + case CurCursos.FINANCIADO_INDEX: + theClass = Boolean.class; + break; + case CurCursos.VALOR_INDEX: + theClass = Double.class; + break; + case CurCursos.RESPONSAVEL_ID_INDEX: + theClass = Integer.class; + break; + case CurCursos.DURACAO_INDEX: + theClass = String.class; + break; + case CurCursos.LIVRO_REGISTO_INDEX: + theClass = String.class; + break; + case CurCursos.LIVRO_NUMERO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurCursos._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, CurCursos.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurDias.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurDias.java new file mode 100644 index 00000000..00a36784 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurDias.java @@ -0,0 +1,448 @@ +/* +* CurDias.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurDias extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurDias.ID, CurDias.ID_INDEX ); + FIELD_INDEXES.put( CurDias.ID_FULL, CurDias.ID_INDEX ); + FIELD_INDEXES.put( CurDias.DIA_DATE, CurDias.DIA_DATE_INDEX ); + FIELD_INDEXES.put( CurDias.DIA_DATE_FULL, CurDias.DIA_DATE_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurDias.CLASS_IDENTIFIER, CurDias.CURSO_ID, CurDias.TO_CURSO_ID ); + FIELD_INDEXES.put( CurDias.CURSO_ID, CurDias.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurDias.CURSO_ID_FULL, CurDias.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurDias.TO_CURSO_ID, CurDias.TO_CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurDias.DELETED_DATE, CurDias.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurDias.DELETED_DATE_FULL, CurDias.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 ForeignKeycurso_idTocur_cursos = + new com.evolute.entity.ForeignKey( CurDias.class, CurDias.CURSO_ID, db.data.siprp_local.outer.CurCursosData.class, db.data.siprp_local.outer.CurCursosData.ID ); + + public static final String TABLENAME = "cur_dias"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_dias"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_dias.id"; + public static final int ID_INDEX = 0; + public static final String DIA_DATE = "dia_date"; + public static final String DIA_DATE_FULL = "cur_dias.dia_date"; + public static final int DIA_DATE_INDEX = 1; + public static final String CURSO_ID = "curso_id"; + public static final String CURSO_ID_FULL = "cur_dias.curso_id"; + public static final int CURSO_ID_INDEX = 2; + public static final String TO_CURSO_ID = "to_curso_id"; + public static final String TO_CURSO_ID_FULL = "cur_dias.to_curso_id"; + public static final int TO_CURSO_ID_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_dias.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DIA_DATE, CURSO_ID, TO_CURSO_ID, DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DIA_DATE, TABLENAME + "." + CURSO_ID, TABLENAME + "." + TO_CURSO_ID, TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DIA_DATE, CURSO_ID, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DIA_DATE, CURSO_ID, DELETED_DATE, }; + + private Integer id; + private java.util.Date dia_date; + private Integer curso_id; + private db.data.siprp_local.outer.CurCursosData to_curso_id; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurDias() + { + 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.ListfromCurAulas_cur_dia_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurAulasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurAulasData.class , getPrimaryKey().getMap().get("id"), "cur_dia_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.Date getDia_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DIA_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.dia_date; + } + + public void setDia_date( java.util.Date dia_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DIA_DATE, dia_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.dia_date = dia_date; + LAZY_LOADED_OBJECTS.put( DIA_DATE, Boolean.TRUE ); + } + + public Integer getCurso_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURSO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.curso_id; + } + + public void setCurso_id( Integer curso_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURSO_ID, curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.curso_id = curso_id; + LAZY_LOADED_OBJECTS.put( CURSO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurCursosData toCurso_id() + { + try + { + prepare( TO_CURSO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_curso_id; + } + + public void setToCurso_id( db.data.siprp_local.outer.CurCursosData to_curso_id ) + { + try + { + preProcess( TO_CURSO_ID, to_curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_curso_id = to_curso_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 CurDias.ID_INDEX: + value = getId(); + break; + case CurDias.DIA_DATE_INDEX: + value = getDia_date(); + break; + case CurDias.CURSO_ID_INDEX: + value = getCurso_id(); + break; + case CurDias.TO_CURSO_ID_INDEX: + value = toCurso_id(); + break; + case CurDias.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurDias.ID_INDEX: + value = this.id; + break; + case CurDias.DIA_DATE_INDEX: + value = this.dia_date; + break; + case CurDias.CURSO_ID_INDEX: + value = this.curso_id; + break; + case CurDias.TO_CURSO_ID_INDEX: + value = this.to_curso_id; + break; + case CurDias.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurDias.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurDias.DIA_DATE_INDEX: + setDia_date( ( java.util.Date ) value ); + break; + case CurDias.CURSO_ID_INDEX: + setCurso_id( ( Integer ) value ); + break; + case CurDias.TO_CURSO_ID_INDEX: + setToCurso_id( ( db.data.siprp_local.outer.CurCursosData ) value ); + break; + case CurDias.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurDias.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurDias.DIA_DATE_INDEX: + this.dia_date = ( java.util.Date ) value; + break; + case CurDias.CURSO_ID_INDEX: + this.curso_id = ( Integer ) value; + break; + case CurDias.TO_CURSO_ID_INDEX: + this.to_curso_id = ( db.data.siprp_local.outer.CurCursosData ) value; + break; + case CurDias.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 CurDias.ID_INDEX: + theClass = Integer.class; + break; + case CurDias.DIA_DATE_INDEX: + theClass = java.util.Date.class; + break; + case CurDias.CURSO_ID_INDEX: + theClass = Integer.class; + break; + case CurDias.TO_CURSO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurCursosData.class; + break; + case CurDias.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 : CurDias._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, CurDias.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurFormadores.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurFormadores.java new file mode 100644 index 00000000..1f532abd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurFormadores.java @@ -0,0 +1,599 @@ +/* +* CurFormadores.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurFormadores extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurFormadores.ID, CurFormadores.ID_INDEX ); + FIELD_INDEXES.put( CurFormadores.ID_FULL, CurFormadores.ID_INDEX ); + FIELD_INDEXES.put( CurFormadores.DADOS_PESSOAS_ID, CurFormadores.DADOS_PESSOAS_ID_INDEX ); + FIELD_INDEXES.put( CurFormadores.DADOS_PESSOAS_ID_FULL, CurFormadores.DADOS_PESSOAS_ID_INDEX ); + FIELD_INDEXES.put( CurFormadores.DELETED_DATE, CurFormadores.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurFormadores.DELETED_DATE_FULL, CurFormadores.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurFormadores.NOME_PROFISSIONAL, CurFormadores.NOME_PROFISSIONAL_INDEX ); + FIELD_INDEXES.put( CurFormadores.NOME_PROFISSIONAL_FULL, CurFormadores.NOME_PROFISSIONAL_INDEX ); + FIELD_INDEXES.put( CurFormadores.HABILITACAO, CurFormadores.HABILITACAO_INDEX ); + FIELD_INDEXES.put( CurFormadores.HABILITACAO_FULL, CurFormadores.HABILITACAO_INDEX ); + FIELD_INDEXES.put( CurFormadores.CAP, CurFormadores.CAP_INDEX ); + FIELD_INDEXES.put( CurFormadores.CAP_FULL, CurFormadores.CAP_INDEX ); + FIELD_INDEXES.put( CurFormadores.CAP_TSHST, CurFormadores.CAP_TSHST_INDEX ); + FIELD_INDEXES.put( CurFormadores.CAP_TSHST_FULL, CurFormadores.CAP_TSHST_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "cur_formadores"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_formadores"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_formadores.id"; + public static final int ID_INDEX = 0; + public static final String DADOS_PESSOAS_ID = "dados_pessoas_id"; + public static final String DADOS_PESSOAS_ID_FULL = "cur_formadores.dados_pessoas_id"; + public static final int DADOS_PESSOAS_ID_INDEX = 1; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_formadores.deleted_date"; + public static final int DELETED_DATE_INDEX = 2; + public static final String NOME_PROFISSIONAL = "nome_profissional"; + public static final String NOME_PROFISSIONAL_FULL = "cur_formadores.nome_profissional"; + public static final int NOME_PROFISSIONAL_INDEX = 3; + public static final String HABILITACAO = "habilitacao"; + public static final String HABILITACAO_FULL = "cur_formadores.habilitacao"; + public static final int HABILITACAO_INDEX = 4; + public static final String CAP = "cap"; + public static final String CAP_FULL = "cur_formadores.cap"; + public static final int CAP_INDEX = 5; + public static final String CAP_TSHST = "cap_tshst"; + public static final String CAP_TSHST_FULL = "cur_formadores.cap_tshst"; + public static final int CAP_TSHST_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + DADOS_PESSOAS_ID, DELETED_DATE, NOME_PROFISSIONAL, HABILITACAO, CAP, CAP_TSHST, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DADOS_PESSOAS_ID, TABLENAME + "." + DELETED_DATE, TABLENAME + "." + NOME_PROFISSIONAL, TABLENAME + "." + HABILITACAO, TABLENAME + "." + CAP, TABLENAME + "." + CAP_TSHST, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DADOS_PESSOAS_ID, DELETED_DATE, NOME_PROFISSIONAL, HABILITACAO, CAP, CAP_TSHST, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DADOS_PESSOAS_ID, DELETED_DATE, NOME_PROFISSIONAL, HABILITACAO, CAP, CAP_TSHST, }; + + private Integer id; + private Integer dados_pessoas_id; + private java.sql.Timestamp deleted_date; + private String nome_profissional; + private String habilitacao; + private String cap; + private String cap_tshst; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurFormadores() + { + 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.ListfromCurAulasFormadores_formador_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurAulasFormadoresData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurAulasFormadoresData.class , getPrimaryKey().getMap().get("id"), "formador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromCurFormadoresCursos_formador_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurFormadoresCursosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurFormadoresCursosData.class , getPrimaryKey().getMap().get("id"), "formador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromCurPresencas_formador_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurPresencasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurPresencasData.class , getPrimaryKey().getMap().get("id"), "formador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromCurTopicos_formador_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurTopicosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurTopicosData.class , getPrimaryKey().getMap().get("id"), "formador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public Integer getDados_pessoas_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DADOS_PESSOAS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.dados_pessoas_id; + } + + public void setDados_pessoas_id( Integer dados_pessoas_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( DADOS_PESSOAS_ID, dados_pessoas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.dados_pessoas_id = dados_pessoas_id; + LAZY_LOADED_OBJECTS.put( DADOS_PESSOAS_ID, 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 String getNome_profissional() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_PROFISSIONAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_profissional; + } + + public void setNome_profissional( String nome_profissional ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_PROFISSIONAL, nome_profissional ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_profissional = nome_profissional; + LAZY_LOADED_OBJECTS.put( NOME_PROFISSIONAL, Boolean.TRUE ); + } + + public String getHabilitacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HABILITACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.habilitacao; + } + + public void setHabilitacao( String habilitacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( HABILITACAO, habilitacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.habilitacao = habilitacao; + LAZY_LOADED_OBJECTS.put( HABILITACAO, 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 getCap_tshst() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CAP_TSHST ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.cap_tshst; + } + + public void setCap_tshst( String cap_tshst ) + { + try + { + setLockedForRefresh( true ); + preProcess( CAP_TSHST, cap_tshst ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.cap_tshst = cap_tshst; + LAZY_LOADED_OBJECTS.put( CAP_TSHST, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormadores.ID_INDEX: + value = getId(); + break; + case CurFormadores.DADOS_PESSOAS_ID_INDEX: + value = getDados_pessoas_id(); + break; + case CurFormadores.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case CurFormadores.NOME_PROFISSIONAL_INDEX: + value = getNome_profissional(); + break; + case CurFormadores.HABILITACAO_INDEX: + value = getHabilitacao(); + break; + case CurFormadores.CAP_INDEX: + value = getCap(); + break; + case CurFormadores.CAP_TSHST_INDEX: + value = getCap_tshst(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormadores.ID_INDEX: + value = this.id; + break; + case CurFormadores.DADOS_PESSOAS_ID_INDEX: + value = this.dados_pessoas_id; + break; + case CurFormadores.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case CurFormadores.NOME_PROFISSIONAL_INDEX: + value = this.nome_profissional; + break; + case CurFormadores.HABILITACAO_INDEX: + value = this.habilitacao; + break; + case CurFormadores.CAP_INDEX: + value = this.cap; + break; + case CurFormadores.CAP_TSHST_INDEX: + value = this.cap_tshst; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormadores.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurFormadores.DADOS_PESSOAS_ID_INDEX: + setDados_pessoas_id( ( Integer ) value ); + break; + case CurFormadores.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case CurFormadores.NOME_PROFISSIONAL_INDEX: + setNome_profissional( ( String ) value ); + break; + case CurFormadores.HABILITACAO_INDEX: + setHabilitacao( ( String ) value ); + break; + case CurFormadores.CAP_INDEX: + setCap( ( String ) value ); + break; + case CurFormadores.CAP_TSHST_INDEX: + setCap_tshst( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormadores.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurFormadores.DADOS_PESSOAS_ID_INDEX: + this.dados_pessoas_id = ( Integer ) value; + break; + case CurFormadores.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case CurFormadores.NOME_PROFISSIONAL_INDEX: + this.nome_profissional = ( String ) value; + break; + case CurFormadores.HABILITACAO_INDEX: + this.habilitacao = ( String ) value; + break; + case CurFormadores.CAP_INDEX: + this.cap = ( String ) value; + break; + case CurFormadores.CAP_TSHST_INDEX: + this.cap_tshst = ( 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 CurFormadores.ID_INDEX: + theClass = Integer.class; + break; + case CurFormadores.DADOS_PESSOAS_ID_INDEX: + theClass = Integer.class; + break; + case CurFormadores.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurFormadores.NOME_PROFISSIONAL_INDEX: + theClass = String.class; + break; + case CurFormadores.HABILITACAO_INDEX: + theClass = String.class; + break; + case CurFormadores.CAP_INDEX: + theClass = String.class; + break; + case CurFormadores.CAP_TSHST_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurFormadores._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, CurFormadores.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurFormadoresCursos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurFormadoresCursos.java new file mode 100644 index 00000000..9a4824d0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurFormadoresCursos.java @@ -0,0 +1,481 @@ +/* +* CurFormadoresCursos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurFormadoresCursos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( CurFormadoresCursos.CLASS_IDENTIFIER, CurFormadoresCursos.FORMADOR_ID, CurFormadoresCursos.TO_FORMADOR_ID ); + FIELD_INDEXES.put( CurFormadoresCursos.FORMADOR_ID, CurFormadoresCursos.FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurFormadoresCursos.FORMADOR_ID_FULL, CurFormadoresCursos.FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurFormadoresCursos.TO_FORMADOR_ID, CurFormadoresCursos.TO_FORMADOR_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurFormadoresCursos.CLASS_IDENTIFIER, CurFormadoresCursos.CURSO_ID, CurFormadoresCursos.TO_CURSO_ID ); + FIELD_INDEXES.put( CurFormadoresCursos.CURSO_ID, CurFormadoresCursos.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurFormadoresCursos.CURSO_ID_FULL, CurFormadoresCursos.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurFormadoresCursos.TO_CURSO_ID, CurFormadoresCursos.TO_CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurFormadoresCursos.HORAS, CurFormadoresCursos.HORAS_INDEX ); + FIELD_INDEXES.put( CurFormadoresCursos.HORAS_FULL, CurFormadoresCursos.HORAS_INDEX ); + FIELD_INDEXES.put( CurFormadoresCursos.NUMERO_CERTIFICADO, CurFormadoresCursos.NUMERO_CERTIFICADO_INDEX ); + FIELD_INDEXES.put( CurFormadoresCursos.NUMERO_CERTIFICADO_FULL, CurFormadoresCursos.NUMERO_CERTIFICADO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyformador_idTocur_formadores = + new com.evolute.entity.ForeignKey( CurFormadoresCursos.class, CurFormadoresCursos.FORMADOR_ID, db.data.siprp_local.outer.CurFormadoresData.class, db.data.siprp_local.outer.CurFormadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycurso_idTocur_cursos = + new com.evolute.entity.ForeignKey( CurFormadoresCursos.class, CurFormadoresCursos.CURSO_ID, db.data.siprp_local.outer.CurCursosData.class, db.data.siprp_local.outer.CurCursosData.ID ); + + public static final String TABLENAME = "cur_formadores_cursos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_formadores_cursos"; + + public static final int _INVALID__INDEX = -1; + public static final String FORMADOR_ID = "formador_id"; + public static final String FORMADOR_ID_FULL = "cur_formadores_cursos.formador_id"; + public static final int FORMADOR_ID_INDEX = 0; + public static final String TO_FORMADOR_ID = "to_formador_id"; + public static final String TO_FORMADOR_ID_FULL = "cur_formadores_cursos.to_formador_id"; + public static final int TO_FORMADOR_ID_INDEX = 1; + public static final String CURSO_ID = "curso_id"; + public static final String CURSO_ID_FULL = "cur_formadores_cursos.curso_id"; + public static final int CURSO_ID_INDEX = 2; + public static final String TO_CURSO_ID = "to_curso_id"; + public static final String TO_CURSO_ID_FULL = "cur_formadores_cursos.to_curso_id"; + public static final int TO_CURSO_ID_INDEX = 3; + public static final String HORAS = "horas"; + public static final String HORAS_FULL = "cur_formadores_cursos.horas"; + public static final int HORAS_INDEX = 4; + public static final String NUMERO_CERTIFICADO = "numero_certificado"; + public static final String NUMERO_CERTIFICADO_FULL = "cur_formadores_cursos.numero_certificado"; + public static final int NUMERO_CERTIFICADO_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + HORAS, NUMERO_CERTIFICADO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + HORAS, TABLENAME + "." + NUMERO_CERTIFICADO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + FORMADOR_ID, CURSO_ID, HORAS, NUMERO_CERTIFICADO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + FORMADOR_ID, CURSO_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + FORMADOR_ID, CURSO_ID, HORAS, NUMERO_CERTIFICADO, }; + + private Integer formador_id; + private db.data.siprp_local.outer.CurFormadoresData to_formador_id; + private Integer curso_id; + private db.data.siprp_local.outer.CurCursosData to_curso_id; + private Integer horas; + private Integer numero_certificado; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurFormadoresCursos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false, false }; + } + + public Integer getFormador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formador_id; + } + + public void setFormador_id( Integer formador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMADOR_ID, formador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formador_id = formador_id; + LAZY_LOADED_OBJECTS.put( FORMADOR_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurFormadoresData toFormador_id() + { + try + { + prepare( TO_FORMADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_formador_id; + } + + public void setToFormador_id( db.data.siprp_local.outer.CurFormadoresData to_formador_id ) + { + try + { + preProcess( TO_FORMADOR_ID, to_formador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_formador_id = to_formador_id; + } + + public Integer getCurso_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURSO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.curso_id; + } + + public void setCurso_id( Integer curso_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURSO_ID, curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.curso_id = curso_id; + LAZY_LOADED_OBJECTS.put( CURSO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurCursosData toCurso_id() + { + try + { + prepare( TO_CURSO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_curso_id; + } + + public void setToCurso_id( db.data.siprp_local.outer.CurCursosData to_curso_id ) + { + try + { + preProcess( TO_CURSO_ID, to_curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_curso_id = to_curso_id; + } + + public Integer getHoras() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HORAS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.horas; + } + + public void setHoras( Integer horas ) + { + try + { + setLockedForRefresh( true ); + preProcess( HORAS, horas ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.horas = horas; + LAZY_LOADED_OBJECTS.put( HORAS, Boolean.TRUE ); + } + + public Integer getNumero_certificado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NUMERO_CERTIFICADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.numero_certificado; + } + + public void setNumero_certificado( Integer numero_certificado ) + { + try + { + setLockedForRefresh( true ); + preProcess( NUMERO_CERTIFICADO, numero_certificado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.numero_certificado = numero_certificado; + LAZY_LOADED_OBJECTS.put( NUMERO_CERTIFICADO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormadoresCursos.FORMADOR_ID_INDEX: + value = getFormador_id(); + break; + case CurFormadoresCursos.TO_FORMADOR_ID_INDEX: + value = toFormador_id(); + break; + case CurFormadoresCursos.CURSO_ID_INDEX: + value = getCurso_id(); + break; + case CurFormadoresCursos.TO_CURSO_ID_INDEX: + value = toCurso_id(); + break; + case CurFormadoresCursos.HORAS_INDEX: + value = getHoras(); + break; + case CurFormadoresCursos.NUMERO_CERTIFICADO_INDEX: + value = getNumero_certificado(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormadoresCursos.FORMADOR_ID_INDEX: + value = this.formador_id; + break; + case CurFormadoresCursos.TO_FORMADOR_ID_INDEX: + value = this.to_formador_id; + break; + case CurFormadoresCursos.CURSO_ID_INDEX: + value = this.curso_id; + break; + case CurFormadoresCursos.TO_CURSO_ID_INDEX: + value = this.to_curso_id; + break; + case CurFormadoresCursos.HORAS_INDEX: + value = this.horas; + break; + case CurFormadoresCursos.NUMERO_CERTIFICADO_INDEX: + value = this.numero_certificado; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormadoresCursos.FORMADOR_ID_INDEX: + setFormador_id( ( Integer ) value ); + break; + case CurFormadoresCursos.TO_FORMADOR_ID_INDEX: + setToFormador_id( ( db.data.siprp_local.outer.CurFormadoresData ) value ); + break; + case CurFormadoresCursos.CURSO_ID_INDEX: + setCurso_id( ( Integer ) value ); + break; + case CurFormadoresCursos.TO_CURSO_ID_INDEX: + setToCurso_id( ( db.data.siprp_local.outer.CurCursosData ) value ); + break; + case CurFormadoresCursos.HORAS_INDEX: + setHoras( ( Integer ) value ); + break; + case CurFormadoresCursos.NUMERO_CERTIFICADO_INDEX: + setNumero_certificado( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormadoresCursos.FORMADOR_ID_INDEX: + this.formador_id = ( Integer ) value; + break; + case CurFormadoresCursos.TO_FORMADOR_ID_INDEX: + this.to_formador_id = ( db.data.siprp_local.outer.CurFormadoresData ) value; + break; + case CurFormadoresCursos.CURSO_ID_INDEX: + this.curso_id = ( Integer ) value; + break; + case CurFormadoresCursos.TO_CURSO_ID_INDEX: + this.to_curso_id = ( db.data.siprp_local.outer.CurCursosData ) value; + break; + case CurFormadoresCursos.HORAS_INDEX: + this.horas = ( Integer ) value; + break; + case CurFormadoresCursos.NUMERO_CERTIFICADO_INDEX: + this.numero_certificado = ( 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 CurFormadoresCursos is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case CurFormadoresCursos.FORMADOR_ID_INDEX: + theClass = Integer.class; + break; + case CurFormadoresCursos.TO_FORMADOR_ID_INDEX: + theClass = db.data.siprp_local.outer.CurFormadoresData.class; + break; + case CurFormadoresCursos.CURSO_ID_INDEX: + theClass = Integer.class; + break; + case CurFormadoresCursos.TO_CURSO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurCursosData.class; + break; + case CurFormadoresCursos.HORAS_INDEX: + theClass = Integer.class; + break; + case CurFormadoresCursos.NUMERO_CERTIFICADO_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurFormadoresCursos._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, CurFormadoresCursos.PK_FIELD_NAMES ); + primaryKey.set( 0, getFormador_id() ); + primaryKey.set( 1, getCurso_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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurFormandos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurFormandos.java new file mode 100644 index 00000000..f43b1d88 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurFormandos.java @@ -0,0 +1,651 @@ +/* +* CurFormandos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurFormandos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurFormandos.ID, CurFormandos.ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.ID_FULL, CurFormandos.ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.DADOS_PESSOAS_ID, CurFormandos.DADOS_PESSOAS_ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.DADOS_PESSOAS_ID_FULL, CurFormandos.DADOS_PESSOAS_ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.DELETED_DATE, CurFormandos.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurFormandos.DELETED_DATE_FULL, CurFormandos.DELETED_DATE_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurFormandos.CLASS_IDENTIFIER, CurFormandos.HOSPITAL_ID, CurFormandos.TO_HOSPITAL_ID ); + FIELD_INDEXES.put( CurFormandos.HOSPITAL_ID, CurFormandos.HOSPITAL_ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.HOSPITAL_ID_FULL, CurFormandos.HOSPITAL_ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.TO_HOSPITAL_ID, CurFormandos.TO_HOSPITAL_ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.SUB_REGIAO_ID, CurFormandos.SUB_REGIAO_ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.SUB_REGIAO_ID_FULL, CurFormandos.SUB_REGIAO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurFormandos.CLASS_IDENTIFIER, CurFormandos.ARS_ID, CurFormandos.TO_ARS_ID ); + FIELD_INDEXES.put( CurFormandos.ARS_ID, CurFormandos.ARS_ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.ARS_ID_FULL, CurFormandos.ARS_ID_INDEX ); + FIELD_INDEXES.put( CurFormandos.TO_ARS_ID, CurFormandos.TO_ARS_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 ForeignKeyhospital_idTocur_hospitais = + new com.evolute.entity.ForeignKey( CurFormandos.class, CurFormandos.HOSPITAL_ID, db.data.siprp_local.outer.CurHospitaisData.class, db.data.siprp_local.outer.CurHospitaisData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyars_idTocur_ars = + new com.evolute.entity.ForeignKey( CurFormandos.class, CurFormandos.ARS_ID, db.data.siprp_local.outer.CurArsData.class, db.data.siprp_local.outer.CurArsData.ID ); + + public static final String TABLENAME = "cur_formandos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_formandos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_formandos.id"; + public static final int ID_INDEX = 0; + public static final String DADOS_PESSOAS_ID = "dados_pessoas_id"; + public static final String DADOS_PESSOAS_ID_FULL = "cur_formandos.dados_pessoas_id"; + public static final int DADOS_PESSOAS_ID_INDEX = 1; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_formandos.deleted_date"; + public static final int DELETED_DATE_INDEX = 2; + public static final String HOSPITAL_ID = "hospital_id"; + public static final String HOSPITAL_ID_FULL = "cur_formandos.hospital_id"; + public static final int HOSPITAL_ID_INDEX = 3; + public static final String TO_HOSPITAL_ID = "to_hospital_id"; + public static final String TO_HOSPITAL_ID_FULL = "cur_formandos.to_hospital_id"; + public static final int TO_HOSPITAL_ID_INDEX = 4; + public static final String SUB_REGIAO_ID = "sub_regiao_id"; + public static final String SUB_REGIAO_ID_FULL = "cur_formandos.sub_regiao_id"; + public static final int SUB_REGIAO_ID_INDEX = 5; + public static final String ARS_ID = "ars_id"; + public static final String ARS_ID_FULL = "cur_formandos.ars_id"; + public static final int ARS_ID_INDEX = 6; + public static final String TO_ARS_ID = "to_ars_id"; + public static final String TO_ARS_ID_FULL = "cur_formandos.to_ars_id"; + public static final int TO_ARS_ID_INDEX = 7; + + public static final String FIELD_NAMES[] = new String[]{ + DADOS_PESSOAS_ID, DELETED_DATE, HOSPITAL_ID, TO_HOSPITAL_ID, SUB_REGIAO_ID, + ARS_ID, TO_ARS_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DADOS_PESSOAS_ID, TABLENAME + "." + DELETED_DATE, TABLENAME + "." + HOSPITAL_ID, TABLENAME + "." + TO_HOSPITAL_ID, TABLENAME + "." + SUB_REGIAO_ID, + TABLENAME + "." + ARS_ID, TABLENAME + "." + TO_ARS_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DADOS_PESSOAS_ID, DELETED_DATE, HOSPITAL_ID, SUB_REGIAO_ID, ARS_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DADOS_PESSOAS_ID, DELETED_DATE, HOSPITAL_ID, SUB_REGIAO_ID, ARS_ID, }; + + private Integer id; + private Integer dados_pessoas_id; + private java.sql.Timestamp deleted_date; + private Integer hospital_id; + private db.data.siprp_local.outer.CurHospitaisData to_hospital_id; + private Integer sub_regiao_id; + private Integer ars_id; + private db.data.siprp_local.outer.CurArsData to_ars_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurFormandos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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.ListfromCurFormandosCursos_formando_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurFormandosCursosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurFormandosCursosData.class , getPrimaryKey().getMap().get("id"), "formando_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromCurPagamentos_formando_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurPagamentosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurPagamentosData.class , getPrimaryKey().getMap().get("id"), "formando_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromCurPresencas_formando_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurPresencasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurPresencasData.class , getPrimaryKey().getMap().get("id"), "formando_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromCurQuestionarioResposta_formando_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurQuestionarioRespostaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurQuestionarioRespostaData.class , getPrimaryKey().getMap().get("id"), "formando_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public Integer getDados_pessoas_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DADOS_PESSOAS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.dados_pessoas_id; + } + + public void setDados_pessoas_id( Integer dados_pessoas_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( DADOS_PESSOAS_ID, dados_pessoas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.dados_pessoas_id = dados_pessoas_id; + LAZY_LOADED_OBJECTS.put( DADOS_PESSOAS_ID, 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 getHospital_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HOSPITAL_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.hospital_id; + } + + public void setHospital_id( Integer hospital_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( HOSPITAL_ID, hospital_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.hospital_id = hospital_id; + LAZY_LOADED_OBJECTS.put( HOSPITAL_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurHospitaisData toHospital_id() + { + try + { + prepare( TO_HOSPITAL_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_hospital_id; + } + + public void setToHospital_id( db.data.siprp_local.outer.CurHospitaisData to_hospital_id ) + { + try + { + preProcess( TO_HOSPITAL_ID, to_hospital_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_hospital_id = to_hospital_id; + } + + public Integer getSub_regiao_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SUB_REGIAO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.sub_regiao_id; + } + + public void setSub_regiao_id( Integer sub_regiao_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( SUB_REGIAO_ID, sub_regiao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.sub_regiao_id = sub_regiao_id; + LAZY_LOADED_OBJECTS.put( SUB_REGIAO_ID, Boolean.TRUE ); + } + + public Integer getArs_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ARS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ars_id; + } + + public void setArs_id( Integer ars_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ARS_ID, ars_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ars_id = ars_id; + LAZY_LOADED_OBJECTS.put( ARS_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurArsData toArs_id() + { + try + { + prepare( TO_ARS_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_ars_id; + } + + public void setToArs_id( db.data.siprp_local.outer.CurArsData to_ars_id ) + { + try + { + preProcess( TO_ARS_ID, to_ars_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_ars_id = to_ars_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormandos.ID_INDEX: + value = getId(); + break; + case CurFormandos.DADOS_PESSOAS_ID_INDEX: + value = getDados_pessoas_id(); + break; + case CurFormandos.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case CurFormandos.HOSPITAL_ID_INDEX: + value = getHospital_id(); + break; + case CurFormandos.TO_HOSPITAL_ID_INDEX: + value = toHospital_id(); + break; + case CurFormandos.SUB_REGIAO_ID_INDEX: + value = getSub_regiao_id(); + break; + case CurFormandos.ARS_ID_INDEX: + value = getArs_id(); + break; + case CurFormandos.TO_ARS_ID_INDEX: + value = toArs_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormandos.ID_INDEX: + value = this.id; + break; + case CurFormandos.DADOS_PESSOAS_ID_INDEX: + value = this.dados_pessoas_id; + break; + case CurFormandos.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case CurFormandos.HOSPITAL_ID_INDEX: + value = this.hospital_id; + break; + case CurFormandos.TO_HOSPITAL_ID_INDEX: + value = this.to_hospital_id; + break; + case CurFormandos.SUB_REGIAO_ID_INDEX: + value = this.sub_regiao_id; + break; + case CurFormandos.ARS_ID_INDEX: + value = this.ars_id; + break; + case CurFormandos.TO_ARS_ID_INDEX: + value = this.to_ars_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormandos.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurFormandos.DADOS_PESSOAS_ID_INDEX: + setDados_pessoas_id( ( Integer ) value ); + break; + case CurFormandos.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case CurFormandos.HOSPITAL_ID_INDEX: + setHospital_id( ( Integer ) value ); + break; + case CurFormandos.TO_HOSPITAL_ID_INDEX: + setToHospital_id( ( db.data.siprp_local.outer.CurHospitaisData ) value ); + break; + case CurFormandos.SUB_REGIAO_ID_INDEX: + setSub_regiao_id( ( Integer ) value ); + break; + case CurFormandos.ARS_ID_INDEX: + setArs_id( ( Integer ) value ); + break; + case CurFormandos.TO_ARS_ID_INDEX: + setToArs_id( ( db.data.siprp_local.outer.CurArsData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormandos.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurFormandos.DADOS_PESSOAS_ID_INDEX: + this.dados_pessoas_id = ( Integer ) value; + break; + case CurFormandos.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case CurFormandos.HOSPITAL_ID_INDEX: + this.hospital_id = ( Integer ) value; + break; + case CurFormandos.TO_HOSPITAL_ID_INDEX: + this.to_hospital_id = ( db.data.siprp_local.outer.CurHospitaisData ) value; + break; + case CurFormandos.SUB_REGIAO_ID_INDEX: + this.sub_regiao_id = ( Integer ) value; + break; + case CurFormandos.ARS_ID_INDEX: + this.ars_id = ( Integer ) value; + break; + case CurFormandos.TO_ARS_ID_INDEX: + this.to_ars_id = ( db.data.siprp_local.outer.CurArsData ) 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 CurFormandos.ID_INDEX: + theClass = Integer.class; + break; + case CurFormandos.DADOS_PESSOAS_ID_INDEX: + theClass = Integer.class; + break; + case CurFormandos.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurFormandos.HOSPITAL_ID_INDEX: + theClass = Integer.class; + break; + case CurFormandos.TO_HOSPITAL_ID_INDEX: + theClass = db.data.siprp_local.outer.CurHospitaisData.class; + break; + case CurFormandos.SUB_REGIAO_ID_INDEX: + theClass = Integer.class; + break; + case CurFormandos.ARS_ID_INDEX: + theClass = Integer.class; + break; + case CurFormandos.TO_ARS_ID_INDEX: + theClass = db.data.siprp_local.outer.CurArsData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurFormandos._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, CurFormandos.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurFormandosCursos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurFormandosCursos.java new file mode 100644 index 00000000..b61a9546 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurFormandosCursos.java @@ -0,0 +1,583 @@ +/* +* CurFormandosCursos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurFormandosCursos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( CurFormandosCursos.CLASS_IDENTIFIER, CurFormandosCursos.FORMANDO_ID, CurFormandosCursos.TO_FORMANDO_ID ); + FIELD_INDEXES.put( CurFormandosCursos.FORMANDO_ID, CurFormandosCursos.FORMANDO_ID_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.FORMANDO_ID_FULL, CurFormandosCursos.FORMANDO_ID_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.TO_FORMANDO_ID, CurFormandosCursos.TO_FORMANDO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurFormandosCursos.CLASS_IDENTIFIER, CurFormandosCursos.CURSO_ID, CurFormandosCursos.TO_CURSO_ID ); + FIELD_INDEXES.put( CurFormandosCursos.CURSO_ID, CurFormandosCursos.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.CURSO_ID_FULL, CurFormandosCursos.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.TO_CURSO_ID, CurFormandosCursos.TO_CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.INSCRITO_DATE, CurFormandosCursos.INSCRITO_DATE_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.INSCRITO_DATE_FULL, CurFormandosCursos.INSCRITO_DATE_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.REJEITADO_DATE, CurFormandosCursos.REJEITADO_DATE_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.REJEITADO_DATE_FULL, CurFormandosCursos.REJEITADO_DATE_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.DESISTIU_DATE, CurFormandosCursos.DESISTIU_DATE_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.DESISTIU_DATE_FULL, CurFormandosCursos.DESISTIU_DATE_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.NUMERO_CERTIFICADO, CurFormandosCursos.NUMERO_CERTIFICADO_INDEX ); + FIELD_INDEXES.put( CurFormandosCursos.NUMERO_CERTIFICADO_FULL, CurFormandosCursos.NUMERO_CERTIFICADO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyformando_idTocur_formandos = + new com.evolute.entity.ForeignKey( CurFormandosCursos.class, CurFormandosCursos.FORMANDO_ID, db.data.siprp_local.outer.CurFormandosData.class, db.data.siprp_local.outer.CurFormandosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycurso_idTocur_cursos = + new com.evolute.entity.ForeignKey( CurFormandosCursos.class, CurFormandosCursos.CURSO_ID, db.data.siprp_local.outer.CurCursosData.class, db.data.siprp_local.outer.CurCursosData.ID ); + + public static final String TABLENAME = "cur_formandos_cursos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_formandos_cursos"; + + public static final int _INVALID__INDEX = -1; + public static final String FORMANDO_ID = "formando_id"; + public static final String FORMANDO_ID_FULL = "cur_formandos_cursos.formando_id"; + public static final int FORMANDO_ID_INDEX = 0; + public static final String TO_FORMANDO_ID = "to_formando_id"; + public static final String TO_FORMANDO_ID_FULL = "cur_formandos_cursos.to_formando_id"; + public static final int TO_FORMANDO_ID_INDEX = 1; + public static final String CURSO_ID = "curso_id"; + public static final String CURSO_ID_FULL = "cur_formandos_cursos.curso_id"; + public static final int CURSO_ID_INDEX = 2; + public static final String TO_CURSO_ID = "to_curso_id"; + public static final String TO_CURSO_ID_FULL = "cur_formandos_cursos.to_curso_id"; + public static final int TO_CURSO_ID_INDEX = 3; + public static final String INSCRITO_DATE = "inscrito_date"; + public static final String INSCRITO_DATE_FULL = "cur_formandos_cursos.inscrito_date"; + public static final int INSCRITO_DATE_INDEX = 4; + public static final String REJEITADO_DATE = "rejeitado_date"; + public static final String REJEITADO_DATE_FULL = "cur_formandos_cursos.rejeitado_date"; + public static final int REJEITADO_DATE_INDEX = 5; + public static final String DESISTIU_DATE = "desistiu_date"; + public static final String DESISTIU_DATE_FULL = "cur_formandos_cursos.desistiu_date"; + public static final int DESISTIU_DATE_INDEX = 6; + public static final String NUMERO_CERTIFICADO = "numero_certificado"; + public static final String NUMERO_CERTIFICADO_FULL = "cur_formandos_cursos.numero_certificado"; + public static final int NUMERO_CERTIFICADO_INDEX = 7; + + public static final String FIELD_NAMES[] = new String[]{ + INSCRITO_DATE, REJEITADO_DATE, DESISTIU_DATE, NUMERO_CERTIFICADO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + INSCRITO_DATE, TABLENAME + "." + REJEITADO_DATE, TABLENAME + "." + DESISTIU_DATE, TABLENAME + "." + NUMERO_CERTIFICADO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + FORMANDO_ID, CURSO_ID, INSCRITO_DATE, REJEITADO_DATE, DESISTIU_DATE, + NUMERO_CERTIFICADO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + FORMANDO_ID, CURSO_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + FORMANDO_ID, CURSO_ID, INSCRITO_DATE, REJEITADO_DATE, DESISTIU_DATE, + NUMERO_CERTIFICADO, }; + + private Integer formando_id; + private db.data.siprp_local.outer.CurFormandosData to_formando_id; + private Integer curso_id; + private db.data.siprp_local.outer.CurCursosData to_curso_id; + private java.sql.Timestamp inscrito_date; + private java.sql.Timestamp rejeitado_date; + private java.sql.Timestamp desistiu_date; + private Integer numero_certificado; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurFormandosCursos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false, false, false, false }; + } + + public Integer getFormando_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMANDO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formando_id; + } + + public void setFormando_id( Integer formando_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMANDO_ID, formando_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formando_id = formando_id; + LAZY_LOADED_OBJECTS.put( FORMANDO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurFormandosData toFormando_id() + { + try + { + prepare( TO_FORMANDO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_formando_id; + } + + public void setToFormando_id( db.data.siprp_local.outer.CurFormandosData to_formando_id ) + { + try + { + preProcess( TO_FORMANDO_ID, to_formando_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_formando_id = to_formando_id; + } + + public Integer getCurso_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURSO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.curso_id; + } + + public void setCurso_id( Integer curso_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURSO_ID, curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.curso_id = curso_id; + LAZY_LOADED_OBJECTS.put( CURSO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurCursosData toCurso_id() + { + try + { + prepare( TO_CURSO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_curso_id; + } + + public void setToCurso_id( db.data.siprp_local.outer.CurCursosData to_curso_id ) + { + try + { + preProcess( TO_CURSO_ID, to_curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_curso_id = to_curso_id; + } + + public java.sql.Timestamp getInscrito_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( INSCRITO_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.inscrito_date; + } + + public void setInscrito_date( java.sql.Timestamp inscrito_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( INSCRITO_DATE, inscrito_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.inscrito_date = inscrito_date; + LAZY_LOADED_OBJECTS.put( INSCRITO_DATE, Boolean.TRUE ); + } + + public java.sql.Timestamp getRejeitado_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( REJEITADO_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.rejeitado_date; + } + + public void setRejeitado_date( java.sql.Timestamp rejeitado_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( REJEITADO_DATE, rejeitado_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.rejeitado_date = rejeitado_date; + LAZY_LOADED_OBJECTS.put( REJEITADO_DATE, Boolean.TRUE ); + } + + public java.sql.Timestamp getDesistiu_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESISTIU_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.desistiu_date; + } + + public void setDesistiu_date( java.sql.Timestamp desistiu_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DESISTIU_DATE, desistiu_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.desistiu_date = desistiu_date; + LAZY_LOADED_OBJECTS.put( DESISTIU_DATE, Boolean.TRUE ); + } + + public Integer getNumero_certificado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NUMERO_CERTIFICADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.numero_certificado; + } + + public void setNumero_certificado( Integer numero_certificado ) + { + try + { + setLockedForRefresh( true ); + preProcess( NUMERO_CERTIFICADO, numero_certificado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.numero_certificado = numero_certificado; + LAZY_LOADED_OBJECTS.put( NUMERO_CERTIFICADO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormandosCursos.FORMANDO_ID_INDEX: + value = getFormando_id(); + break; + case CurFormandosCursos.TO_FORMANDO_ID_INDEX: + value = toFormando_id(); + break; + case CurFormandosCursos.CURSO_ID_INDEX: + value = getCurso_id(); + break; + case CurFormandosCursos.TO_CURSO_ID_INDEX: + value = toCurso_id(); + break; + case CurFormandosCursos.INSCRITO_DATE_INDEX: + value = getInscrito_date(); + break; + case CurFormandosCursos.REJEITADO_DATE_INDEX: + value = getRejeitado_date(); + break; + case CurFormandosCursos.DESISTIU_DATE_INDEX: + value = getDesistiu_date(); + break; + case CurFormandosCursos.NUMERO_CERTIFICADO_INDEX: + value = getNumero_certificado(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormandosCursos.FORMANDO_ID_INDEX: + value = this.formando_id; + break; + case CurFormandosCursos.TO_FORMANDO_ID_INDEX: + value = this.to_formando_id; + break; + case CurFormandosCursos.CURSO_ID_INDEX: + value = this.curso_id; + break; + case CurFormandosCursos.TO_CURSO_ID_INDEX: + value = this.to_curso_id; + break; + case CurFormandosCursos.INSCRITO_DATE_INDEX: + value = this.inscrito_date; + break; + case CurFormandosCursos.REJEITADO_DATE_INDEX: + value = this.rejeitado_date; + break; + case CurFormandosCursos.DESISTIU_DATE_INDEX: + value = this.desistiu_date; + break; + case CurFormandosCursos.NUMERO_CERTIFICADO_INDEX: + value = this.numero_certificado; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormandosCursos.FORMANDO_ID_INDEX: + setFormando_id( ( Integer ) value ); + break; + case CurFormandosCursos.TO_FORMANDO_ID_INDEX: + setToFormando_id( ( db.data.siprp_local.outer.CurFormandosData ) value ); + break; + case CurFormandosCursos.CURSO_ID_INDEX: + setCurso_id( ( Integer ) value ); + break; + case CurFormandosCursos.TO_CURSO_ID_INDEX: + setToCurso_id( ( db.data.siprp_local.outer.CurCursosData ) value ); + break; + case CurFormandosCursos.INSCRITO_DATE_INDEX: + setInscrito_date( ( java.sql.Timestamp ) value ); + break; + case CurFormandosCursos.REJEITADO_DATE_INDEX: + setRejeitado_date( ( java.sql.Timestamp ) value ); + break; + case CurFormandosCursos.DESISTIU_DATE_INDEX: + setDesistiu_date( ( java.sql.Timestamp ) value ); + break; + case CurFormandosCursos.NUMERO_CERTIFICADO_INDEX: + setNumero_certificado( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurFormandosCursos.FORMANDO_ID_INDEX: + this.formando_id = ( Integer ) value; + break; + case CurFormandosCursos.TO_FORMANDO_ID_INDEX: + this.to_formando_id = ( db.data.siprp_local.outer.CurFormandosData ) value; + break; + case CurFormandosCursos.CURSO_ID_INDEX: + this.curso_id = ( Integer ) value; + break; + case CurFormandosCursos.TO_CURSO_ID_INDEX: + this.to_curso_id = ( db.data.siprp_local.outer.CurCursosData ) value; + break; + case CurFormandosCursos.INSCRITO_DATE_INDEX: + this.inscrito_date = ( java.sql.Timestamp ) value; + break; + case CurFormandosCursos.REJEITADO_DATE_INDEX: + this.rejeitado_date = ( java.sql.Timestamp ) value; + break; + case CurFormandosCursos.DESISTIU_DATE_INDEX: + this.desistiu_date = ( java.sql.Timestamp ) value; + break; + case CurFormandosCursos.NUMERO_CERTIFICADO_INDEX: + this.numero_certificado = ( 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 CurFormandosCursos is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case CurFormandosCursos.FORMANDO_ID_INDEX: + theClass = Integer.class; + break; + case CurFormandosCursos.TO_FORMANDO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurFormandosData.class; + break; + case CurFormandosCursos.CURSO_ID_INDEX: + theClass = Integer.class; + break; + case CurFormandosCursos.TO_CURSO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurCursosData.class; + break; + case CurFormandosCursos.INSCRITO_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurFormandosCursos.REJEITADO_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurFormandosCursos.DESISTIU_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurFormandosCursos.NUMERO_CERTIFICADO_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurFormandosCursos._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, CurFormandosCursos.PK_FIELD_NAMES ); + primaryKey.set( 0, getFormando_id() ); + primaryKey.set( 1, getCurso_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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurHospitais.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurHospitais.java new file mode 100644 index 00000000..ffe6f2a3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurHospitais.java @@ -0,0 +1,296 @@ +/* +* CurHospitais.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurHospitais extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurHospitais.ID, CurHospitais.ID_INDEX ); + FIELD_INDEXES.put( CurHospitais.ID_FULL, CurHospitais.ID_INDEX ); + FIELD_INDEXES.put( CurHospitais.NOME, CurHospitais.NOME_INDEX ); + FIELD_INDEXES.put( CurHospitais.NOME_FULL, CurHospitais.NOME_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "cur_hospitais"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_hospitais"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_hospitais.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "cur_hospitais.nome"; + public static final int NOME_INDEX = 1; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, }; + + private Integer id; + private String nome; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurHospitais() + { + 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.ListfromCurFormandos_hospital_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurFormandosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurFormandosData.class , getPrimaryKey().getMap().get("id"), "hospital_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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurHospitais.ID_INDEX: + value = getId(); + break; + case CurHospitais.NOME_INDEX: + value = getNome(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurHospitais.ID_INDEX: + value = this.id; + break; + case CurHospitais.NOME_INDEX: + value = this.nome; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurHospitais.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurHospitais.NOME_INDEX: + setNome( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurHospitais.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurHospitais.NOME_INDEX: + this.nome = ( 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 CurHospitais.ID_INDEX: + theClass = Integer.class; + break; + case CurHospitais.NOME_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurHospitais._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, CurHospitais.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurNumeroCertificado.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurNumeroCertificado.java new file mode 100644 index 00000000..ce70bcf2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurNumeroCertificado.java @@ -0,0 +1,330 @@ +/* +* CurNumeroCertificado.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurNumeroCertificado extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurNumeroCertificado.ID, CurNumeroCertificado.ID_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificado.ID_FULL, CurNumeroCertificado.ID_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificado.ANO, CurNumeroCertificado.ANO_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificado.ANO_FULL, CurNumeroCertificado.ANO_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificado.ULTIMO_NUMERO, CurNumeroCertificado.ULTIMO_NUMERO_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificado.ULTIMO_NUMERO_FULL, CurNumeroCertificado.ULTIMO_NUMERO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "cur_numero_certificado"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_numero_certificado"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_numero_certificado.id"; + public static final int ID_INDEX = 0; + public static final String ANO = "ano"; + public static final String ANO_FULL = "cur_numero_certificado.ano"; + public static final int ANO_INDEX = 1; + public static final String ULTIMO_NUMERO = "ultimo_numero"; + public static final String ULTIMO_NUMERO_FULL = "cur_numero_certificado.ultimo_numero"; + public static final int ULTIMO_NUMERO_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + ANO, ULTIMO_NUMERO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ANO, TABLENAME + "." + ULTIMO_NUMERO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ANO, ULTIMO_NUMERO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ANO, ULTIMO_NUMERO, }; + + private Integer id; + private Integer ano; + private Integer ultimo_numero; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurNumeroCertificado() + { + 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 Integer getAno() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ANO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ano; + } + + public void setAno( Integer ano ) + { + try + { + setLockedForRefresh( true ); + preProcess( ANO, ano ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ano = ano; + LAZY_LOADED_OBJECTS.put( ANO, Boolean.TRUE ); + } + + public Integer getUltimo_numero() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ULTIMO_NUMERO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ultimo_numero; + } + + public void setUltimo_numero( Integer ultimo_numero ) + { + try + { + setLockedForRefresh( true ); + preProcess( ULTIMO_NUMERO, ultimo_numero ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ultimo_numero = ultimo_numero; + LAZY_LOADED_OBJECTS.put( ULTIMO_NUMERO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurNumeroCertificado.ID_INDEX: + value = getId(); + break; + case CurNumeroCertificado.ANO_INDEX: + value = getAno(); + break; + case CurNumeroCertificado.ULTIMO_NUMERO_INDEX: + value = getUltimo_numero(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurNumeroCertificado.ID_INDEX: + value = this.id; + break; + case CurNumeroCertificado.ANO_INDEX: + value = this.ano; + break; + case CurNumeroCertificado.ULTIMO_NUMERO_INDEX: + value = this.ultimo_numero; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurNumeroCertificado.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurNumeroCertificado.ANO_INDEX: + setAno( ( Integer ) value ); + break; + case CurNumeroCertificado.ULTIMO_NUMERO_INDEX: + setUltimo_numero( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurNumeroCertificado.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurNumeroCertificado.ANO_INDEX: + this.ano = ( Integer ) value; + break; + case CurNumeroCertificado.ULTIMO_NUMERO_INDEX: + this.ultimo_numero = ( 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 CurNumeroCertificado.ID_INDEX: + theClass = Integer.class; + break; + case CurNumeroCertificado.ANO_INDEX: + theClass = Integer.class; + break; + case CurNumeroCertificado.ULTIMO_NUMERO_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurNumeroCertificado._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, CurNumeroCertificado.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurNumeroCertificadoFormador.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurNumeroCertificadoFormador.java new file mode 100644 index 00000000..3182d757 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurNumeroCertificadoFormador.java @@ -0,0 +1,330 @@ +/* +* CurNumeroCertificadoFormador.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurNumeroCertificadoFormador extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurNumeroCertificadoFormador.ID, CurNumeroCertificadoFormador.ID_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificadoFormador.ID_FULL, CurNumeroCertificadoFormador.ID_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificadoFormador.ANO, CurNumeroCertificadoFormador.ANO_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificadoFormador.ANO_FULL, CurNumeroCertificadoFormador.ANO_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificadoFormador.ULTIMO_NUMERO, CurNumeroCertificadoFormador.ULTIMO_NUMERO_INDEX ); + FIELD_INDEXES.put( CurNumeroCertificadoFormador.ULTIMO_NUMERO_FULL, CurNumeroCertificadoFormador.ULTIMO_NUMERO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "cur_numero_certificado_formador"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_numero_certificado_formador"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_numero_certificado_formador.id"; + public static final int ID_INDEX = 0; + public static final String ANO = "ano"; + public static final String ANO_FULL = "cur_numero_certificado_formador.ano"; + public static final int ANO_INDEX = 1; + public static final String ULTIMO_NUMERO = "ultimo_numero"; + public static final String ULTIMO_NUMERO_FULL = "cur_numero_certificado_formador.ultimo_numero"; + public static final int ULTIMO_NUMERO_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + ANO, ULTIMO_NUMERO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ANO, TABLENAME + "." + ULTIMO_NUMERO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ANO, ULTIMO_NUMERO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ANO, ULTIMO_NUMERO, }; + + private Integer id; + private Integer ano; + private Integer ultimo_numero; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurNumeroCertificadoFormador() + { + 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 Integer getAno() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ANO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ano; + } + + public void setAno( Integer ano ) + { + try + { + setLockedForRefresh( true ); + preProcess( ANO, ano ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ano = ano; + LAZY_LOADED_OBJECTS.put( ANO, Boolean.TRUE ); + } + + public Integer getUltimo_numero() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ULTIMO_NUMERO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ultimo_numero; + } + + public void setUltimo_numero( Integer ultimo_numero ) + { + try + { + setLockedForRefresh( true ); + preProcess( ULTIMO_NUMERO, ultimo_numero ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ultimo_numero = ultimo_numero; + LAZY_LOADED_OBJECTS.put( ULTIMO_NUMERO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurNumeroCertificadoFormador.ID_INDEX: + value = getId(); + break; + case CurNumeroCertificadoFormador.ANO_INDEX: + value = getAno(); + break; + case CurNumeroCertificadoFormador.ULTIMO_NUMERO_INDEX: + value = getUltimo_numero(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurNumeroCertificadoFormador.ID_INDEX: + value = this.id; + break; + case CurNumeroCertificadoFormador.ANO_INDEX: + value = this.ano; + break; + case CurNumeroCertificadoFormador.ULTIMO_NUMERO_INDEX: + value = this.ultimo_numero; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurNumeroCertificadoFormador.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurNumeroCertificadoFormador.ANO_INDEX: + setAno( ( Integer ) value ); + break; + case CurNumeroCertificadoFormador.ULTIMO_NUMERO_INDEX: + setUltimo_numero( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurNumeroCertificadoFormador.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurNumeroCertificadoFormador.ANO_INDEX: + this.ano = ( Integer ) value; + break; + case CurNumeroCertificadoFormador.ULTIMO_NUMERO_INDEX: + this.ultimo_numero = ( 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 CurNumeroCertificadoFormador.ID_INDEX: + theClass = Integer.class; + break; + case CurNumeroCertificadoFormador.ANO_INDEX: + theClass = Integer.class; + break; + case CurNumeroCertificadoFormador.ULTIMO_NUMERO_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurNumeroCertificadoFormador._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, CurNumeroCertificadoFormador.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurPagamentos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurPagamentos.java new file mode 100644 index 00000000..9b4b3514 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurPagamentos.java @@ -0,0 +1,683 @@ +/* +* CurPagamentos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurPagamentos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurPagamentos.ID, CurPagamentos.ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.ID_FULL, CurPagamentos.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurPagamentos.CLASS_IDENTIFIER, CurPagamentos.FORMANDO_ID, CurPagamentos.TO_FORMANDO_ID ); + FIELD_INDEXES.put( CurPagamentos.FORMANDO_ID, CurPagamentos.FORMANDO_ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.FORMANDO_ID_FULL, CurPagamentos.FORMANDO_ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.TO_FORMANDO_ID, CurPagamentos.TO_FORMANDO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurPagamentos.CLASS_IDENTIFIER, CurPagamentos.CURSO_ID, CurPagamentos.TO_CURSO_ID ); + FIELD_INDEXES.put( CurPagamentos.CURSO_ID, CurPagamentos.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.CURSO_ID_FULL, CurPagamentos.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.TO_CURSO_ID, CurPagamentos.TO_CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.DATA_DATE, CurPagamentos.DATA_DATE_INDEX ); + FIELD_INDEXES.put( CurPagamentos.DATA_DATE_FULL, CurPagamentos.DATA_DATE_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurPagamentos.CLASS_IDENTIFIER, CurPagamentos.TIPO_ID, CurPagamentos.TO_TIPO_ID ); + FIELD_INDEXES.put( CurPagamentos.TIPO_ID, CurPagamentos.TIPO_ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.TIPO_ID_FULL, CurPagamentos.TIPO_ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.TO_TIPO_ID, CurPagamentos.TO_TIPO_ID_INDEX ); + FIELD_INDEXES.put( CurPagamentos.OBSERVACOES, CurPagamentos.OBSERVACOES_INDEX ); + FIELD_INDEXES.put( CurPagamentos.OBSERVACOES_FULL, CurPagamentos.OBSERVACOES_INDEX ); + FIELD_INDEXES.put( CurPagamentos.VALOR, CurPagamentos.VALOR_INDEX ); + FIELD_INDEXES.put( CurPagamentos.VALOR_FULL, CurPagamentos.VALOR_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyformando_idTocur_formandos = + new com.evolute.entity.ForeignKey( CurPagamentos.class, CurPagamentos.FORMANDO_ID, db.data.siprp_local.outer.CurFormandosData.class, db.data.siprp_local.outer.CurFormandosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycurso_idTocur_cursos = + new com.evolute.entity.ForeignKey( CurPagamentos.class, CurPagamentos.CURSO_ID, db.data.siprp_local.outer.CurCursosData.class, db.data.siprp_local.outer.CurCursosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytipo_idTocur_pagamentos_tipos = + new com.evolute.entity.ForeignKey( CurPagamentos.class, CurPagamentos.TIPO_ID, db.data.siprp_local.outer.CurPagamentosTiposData.class, db.data.siprp_local.outer.CurPagamentosTiposData.ID ); + + public static final String TABLENAME = "cur_pagamentos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_pagamentos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_pagamentos.id"; + public static final int ID_INDEX = 0; + public static final String FORMANDO_ID = "formando_id"; + public static final String FORMANDO_ID_FULL = "cur_pagamentos.formando_id"; + public static final int FORMANDO_ID_INDEX = 1; + public static final String TO_FORMANDO_ID = "to_formando_id"; + public static final String TO_FORMANDO_ID_FULL = "cur_pagamentos.to_formando_id"; + public static final int TO_FORMANDO_ID_INDEX = 2; + public static final String CURSO_ID = "curso_id"; + public static final String CURSO_ID_FULL = "cur_pagamentos.curso_id"; + public static final int CURSO_ID_INDEX = 3; + public static final String TO_CURSO_ID = "to_curso_id"; + public static final String TO_CURSO_ID_FULL = "cur_pagamentos.to_curso_id"; + public static final int TO_CURSO_ID_INDEX = 4; + public static final String DATA_DATE = "data_date"; + public static final String DATA_DATE_FULL = "cur_pagamentos.data_date"; + public static final int DATA_DATE_INDEX = 5; + public static final String TIPO_ID = "tipo_id"; + public static final String TIPO_ID_FULL = "cur_pagamentos.tipo_id"; + public static final int TIPO_ID_INDEX = 6; + public static final String TO_TIPO_ID = "to_tipo_id"; + public static final String TO_TIPO_ID_FULL = "cur_pagamentos.to_tipo_id"; + public static final int TO_TIPO_ID_INDEX = 7; + public static final String OBSERVACOES = "observacoes"; + public static final String OBSERVACOES_FULL = "cur_pagamentos.observacoes"; + public static final int OBSERVACOES_INDEX = 8; + public static final String VALOR = "valor"; + public static final String VALOR_FULL = "cur_pagamentos.valor"; + public static final int VALOR_INDEX = 9; + + public static final String FIELD_NAMES[] = new String[]{ + FORMANDO_ID, TO_FORMANDO_ID, CURSO_ID, TO_CURSO_ID, DATA_DATE, TIPO_ID, TO_TIPO_ID, + OBSERVACOES, VALOR, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + FORMANDO_ID, TABLENAME + "." + TO_FORMANDO_ID, TABLENAME + "." + CURSO_ID, TABLENAME + "." + TO_CURSO_ID, TABLENAME + "." + DATA_DATE, TABLENAME + "." + TIPO_ID, TABLENAME + "." + TO_TIPO_ID, + TABLENAME + "." + OBSERVACOES, TABLENAME + "." + VALOR, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, FORMANDO_ID, CURSO_ID, DATA_DATE, TIPO_ID, OBSERVACOES, VALOR, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, FORMANDO_ID, CURSO_ID, DATA_DATE, TIPO_ID, OBSERVACOES, VALOR, }; + + private Integer id; + private Integer formando_id; + private db.data.siprp_local.outer.CurFormandosData to_formando_id; + private Integer curso_id; + private db.data.siprp_local.outer.CurCursosData to_curso_id; + private java.sql.Timestamp data_date; + private Integer tipo_id; + private db.data.siprp_local.outer.CurPagamentosTiposData to_tipo_id; + private String observacoes; + private Double valor; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurPagamentos() + { + super(); + dirtyProperties = new boolean[]{ 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 getFormando_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMANDO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formando_id; + } + + public void setFormando_id( Integer formando_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMANDO_ID, formando_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formando_id = formando_id; + LAZY_LOADED_OBJECTS.put( FORMANDO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurFormandosData toFormando_id() + { + try + { + prepare( TO_FORMANDO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_formando_id; + } + + public void setToFormando_id( db.data.siprp_local.outer.CurFormandosData to_formando_id ) + { + try + { + preProcess( TO_FORMANDO_ID, to_formando_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_formando_id = to_formando_id; + } + + public Integer getCurso_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURSO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.curso_id; + } + + public void setCurso_id( Integer curso_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURSO_ID, curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.curso_id = curso_id; + LAZY_LOADED_OBJECTS.put( CURSO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurCursosData toCurso_id() + { + try + { + prepare( TO_CURSO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_curso_id; + } + + public void setToCurso_id( db.data.siprp_local.outer.CurCursosData to_curso_id ) + { + try + { + preProcess( TO_CURSO_ID, to_curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_curso_id = to_curso_id; + } + + public java.sql.Timestamp getData_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_date; + } + + public void setData_date( java.sql.Timestamp data_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_DATE, data_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_date = data_date; + LAZY_LOADED_OBJECTS.put( DATA_DATE, 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 db.data.siprp_local.outer.CurPagamentosTiposData 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( db.data.siprp_local.outer.CurPagamentosTiposData 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 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 Double getValor() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.valor; + } + + public void setValor( Double valor ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALOR, valor ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.valor = valor; + LAZY_LOADED_OBJECTS.put( VALOR, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPagamentos.ID_INDEX: + value = getId(); + break; + case CurPagamentos.FORMANDO_ID_INDEX: + value = getFormando_id(); + break; + case CurPagamentos.TO_FORMANDO_ID_INDEX: + value = toFormando_id(); + break; + case CurPagamentos.CURSO_ID_INDEX: + value = getCurso_id(); + break; + case CurPagamentos.TO_CURSO_ID_INDEX: + value = toCurso_id(); + break; + case CurPagamentos.DATA_DATE_INDEX: + value = getData_date(); + break; + case CurPagamentos.TIPO_ID_INDEX: + value = getTipo_id(); + break; + case CurPagamentos.TO_TIPO_ID_INDEX: + value = toTipo_id(); + break; + case CurPagamentos.OBSERVACOES_INDEX: + value = getObservacoes(); + break; + case CurPagamentos.VALOR_INDEX: + value = getValor(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPagamentos.ID_INDEX: + value = this.id; + break; + case CurPagamentos.FORMANDO_ID_INDEX: + value = this.formando_id; + break; + case CurPagamentos.TO_FORMANDO_ID_INDEX: + value = this.to_formando_id; + break; + case CurPagamentos.CURSO_ID_INDEX: + value = this.curso_id; + break; + case CurPagamentos.TO_CURSO_ID_INDEX: + value = this.to_curso_id; + break; + case CurPagamentos.DATA_DATE_INDEX: + value = this.data_date; + break; + case CurPagamentos.TIPO_ID_INDEX: + value = this.tipo_id; + break; + case CurPagamentos.TO_TIPO_ID_INDEX: + value = this.to_tipo_id; + break; + case CurPagamentos.OBSERVACOES_INDEX: + value = this.observacoes; + break; + case CurPagamentos.VALOR_INDEX: + value = this.valor; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPagamentos.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurPagamentos.FORMANDO_ID_INDEX: + setFormando_id( ( Integer ) value ); + break; + case CurPagamentos.TO_FORMANDO_ID_INDEX: + setToFormando_id( ( db.data.siprp_local.outer.CurFormandosData ) value ); + break; + case CurPagamentos.CURSO_ID_INDEX: + setCurso_id( ( Integer ) value ); + break; + case CurPagamentos.TO_CURSO_ID_INDEX: + setToCurso_id( ( db.data.siprp_local.outer.CurCursosData ) value ); + break; + case CurPagamentos.DATA_DATE_INDEX: + setData_date( ( java.sql.Timestamp ) value ); + break; + case CurPagamentos.TIPO_ID_INDEX: + setTipo_id( ( Integer ) value ); + break; + case CurPagamentos.TO_TIPO_ID_INDEX: + setToTipo_id( ( db.data.siprp_local.outer.CurPagamentosTiposData ) value ); + break; + case CurPagamentos.OBSERVACOES_INDEX: + setObservacoes( ( String ) value ); + break; + case CurPagamentos.VALOR_INDEX: + setValor( ( Double ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPagamentos.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurPagamentos.FORMANDO_ID_INDEX: + this.formando_id = ( Integer ) value; + break; + case CurPagamentos.TO_FORMANDO_ID_INDEX: + this.to_formando_id = ( db.data.siprp_local.outer.CurFormandosData ) value; + break; + case CurPagamentos.CURSO_ID_INDEX: + this.curso_id = ( Integer ) value; + break; + case CurPagamentos.TO_CURSO_ID_INDEX: + this.to_curso_id = ( db.data.siprp_local.outer.CurCursosData ) value; + break; + case CurPagamentos.DATA_DATE_INDEX: + this.data_date = ( java.sql.Timestamp ) value; + break; + case CurPagamentos.TIPO_ID_INDEX: + this.tipo_id = ( Integer ) value; + break; + case CurPagamentos.TO_TIPO_ID_INDEX: + this.to_tipo_id = ( db.data.siprp_local.outer.CurPagamentosTiposData ) value; + break; + case CurPagamentos.OBSERVACOES_INDEX: + this.observacoes = ( String ) value; + break; + case CurPagamentos.VALOR_INDEX: + this.valor = ( Double ) 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 CurPagamentos.ID_INDEX: + theClass = Integer.class; + break; + case CurPagamentos.FORMANDO_ID_INDEX: + theClass = Integer.class; + break; + case CurPagamentos.TO_FORMANDO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurFormandosData.class; + break; + case CurPagamentos.CURSO_ID_INDEX: + theClass = Integer.class; + break; + case CurPagamentos.TO_CURSO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurCursosData.class; + break; + case CurPagamentos.DATA_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurPagamentos.TIPO_ID_INDEX: + theClass = Integer.class; + break; + case CurPagamentos.TO_TIPO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurPagamentosTiposData.class; + break; + case CurPagamentos.OBSERVACOES_INDEX: + theClass = String.class; + break; + case CurPagamentos.VALOR_INDEX: + theClass = Double.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurPagamentos._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, CurPagamentos.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurPagamentosTipos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurPagamentosTipos.java new file mode 100644 index 00000000..50b7a0f3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurPagamentosTipos.java @@ -0,0 +1,297 @@ +/* +* CurPagamentosTipos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurPagamentosTipos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurPagamentosTipos.ID, CurPagamentosTipos.ID_INDEX ); + FIELD_INDEXES.put( CurPagamentosTipos.ID_FULL, CurPagamentosTipos.ID_INDEX ); + FIELD_INDEXES.put( CurPagamentosTipos.DESCRICAO, CurPagamentosTipos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( CurPagamentosTipos.DESCRICAO_FULL, CurPagamentosTipos.DESCRICAO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "cur_pagamentos_tipos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_pagamentos_tipos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_pagamentos_tipos.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "cur_pagamentos_tipos.descricao"; + public static final int DESCRICAO_INDEX = 1; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRICAO, }; + + private Integer id; + private String descricao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurPagamentosTipos() + { + 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.ListfromCurPagamentos_tipo_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurPagamentosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurPagamentosData.class , getPrimaryKey().getMap().get("id"), "tipo_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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPagamentosTipos.ID_INDEX: + value = getId(); + break; + case CurPagamentosTipos.DESCRICAO_INDEX: + value = getDescricao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPagamentosTipos.ID_INDEX: + value = this.id; + break; + case CurPagamentosTipos.DESCRICAO_INDEX: + value = this.descricao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPagamentosTipos.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurPagamentosTipos.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPagamentosTipos.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurPagamentosTipos.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 CurPagamentosTipos.ID_INDEX: + theClass = Integer.class; + break; + case CurPagamentosTipos.DESCRICAO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurPagamentosTipos._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, CurPagamentosTipos.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurPresencas.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurPresencas.java new file mode 100644 index 00000000..72d4f402 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurPresencas.java @@ -0,0 +1,633 @@ +/* +* CurPresencas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurPresencas extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurPresencas.ID, CurPresencas.ID_INDEX ); + FIELD_INDEXES.put( CurPresencas.ID_FULL, CurPresencas.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurPresencas.CLASS_IDENTIFIER, CurPresencas.FORMANDO_ID, CurPresencas.TO_FORMANDO_ID ); + FIELD_INDEXES.put( CurPresencas.FORMANDO_ID, CurPresencas.FORMANDO_ID_INDEX ); + FIELD_INDEXES.put( CurPresencas.FORMANDO_ID_FULL, CurPresencas.FORMANDO_ID_INDEX ); + FIELD_INDEXES.put( CurPresencas.TO_FORMANDO_ID, CurPresencas.TO_FORMANDO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurPresencas.CLASS_IDENTIFIER, CurPresencas.FORMADOR_ID, CurPresencas.TO_FORMADOR_ID ); + FIELD_INDEXES.put( CurPresencas.FORMADOR_ID, CurPresencas.FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurPresencas.FORMADOR_ID_FULL, CurPresencas.FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurPresencas.TO_FORMADOR_ID, CurPresencas.TO_FORMADOR_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurPresencas.CLASS_IDENTIFIER, CurPresencas.CURSO_ID, CurPresencas.TO_CURSO_ID ); + FIELD_INDEXES.put( CurPresencas.CURSO_ID, CurPresencas.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurPresencas.CURSO_ID_FULL, CurPresencas.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurPresencas.TO_CURSO_ID, CurPresencas.TO_CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurPresencas.DATA_DATE, CurPresencas.DATA_DATE_INDEX ); + FIELD_INDEXES.put( CurPresencas.DATA_DATE_FULL, CurPresencas.DATA_DATE_INDEX ); + FIELD_INDEXES.put( CurPresencas.DELETED_DATE, CurPresencas.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurPresencas.DELETED_DATE_FULL, CurPresencas.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 ForeignKeyformando_idTocur_formandos = + new com.evolute.entity.ForeignKey( CurPresencas.class, CurPresencas.FORMANDO_ID, db.data.siprp_local.outer.CurFormandosData.class, db.data.siprp_local.outer.CurFormandosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyformador_idTocur_formadores = + new com.evolute.entity.ForeignKey( CurPresencas.class, CurPresencas.FORMADOR_ID, db.data.siprp_local.outer.CurFormadoresData.class, db.data.siprp_local.outer.CurFormadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycurso_idTocur_cursos = + new com.evolute.entity.ForeignKey( CurPresencas.class, CurPresencas.CURSO_ID, db.data.siprp_local.outer.CurCursosData.class, db.data.siprp_local.outer.CurCursosData.ID ); + + public static final String TABLENAME = "cur_presencas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_presencas"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_presencas.id"; + public static final int ID_INDEX = 0; + public static final String FORMANDO_ID = "formando_id"; + public static final String FORMANDO_ID_FULL = "cur_presencas.formando_id"; + public static final int FORMANDO_ID_INDEX = 1; + public static final String TO_FORMANDO_ID = "to_formando_id"; + public static final String TO_FORMANDO_ID_FULL = "cur_presencas.to_formando_id"; + public static final int TO_FORMANDO_ID_INDEX = 2; + public static final String FORMADOR_ID = "formador_id"; + public static final String FORMADOR_ID_FULL = "cur_presencas.formador_id"; + public static final int FORMADOR_ID_INDEX = 3; + public static final String TO_FORMADOR_ID = "to_formador_id"; + public static final String TO_FORMADOR_ID_FULL = "cur_presencas.to_formador_id"; + public static final int TO_FORMADOR_ID_INDEX = 4; + public static final String CURSO_ID = "curso_id"; + public static final String CURSO_ID_FULL = "cur_presencas.curso_id"; + public static final int CURSO_ID_INDEX = 5; + public static final String TO_CURSO_ID = "to_curso_id"; + public static final String TO_CURSO_ID_FULL = "cur_presencas.to_curso_id"; + public static final int TO_CURSO_ID_INDEX = 6; + public static final String DATA_DATE = "data_date"; + public static final String DATA_DATE_FULL = "cur_presencas.data_date"; + public static final int DATA_DATE_INDEX = 7; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_presencas.deleted_date"; + public static final int DELETED_DATE_INDEX = 8; + + public static final String FIELD_NAMES[] = new String[]{ + FORMANDO_ID, TO_FORMANDO_ID, FORMADOR_ID, TO_FORMADOR_ID, CURSO_ID, TO_CURSO_ID, + DATA_DATE, DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + FORMANDO_ID, TABLENAME + "." + TO_FORMANDO_ID, TABLENAME + "." + FORMADOR_ID, TABLENAME + "." + TO_FORMADOR_ID, TABLENAME + "." + CURSO_ID, TABLENAME + "." + TO_CURSO_ID, + TABLENAME + "." + DATA_DATE, TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, FORMANDO_ID, FORMADOR_ID, CURSO_ID, DATA_DATE, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, FORMANDO_ID, FORMADOR_ID, CURSO_ID, DATA_DATE, DELETED_DATE, }; + + private Integer id; + private Integer formando_id; + private db.data.siprp_local.outer.CurFormandosData to_formando_id; + private Integer formador_id; + private db.data.siprp_local.outer.CurFormadoresData to_formador_id; + private Integer curso_id; + private db.data.siprp_local.outer.CurCursosData to_curso_id; + private java.sql.Timestamp data_date; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurPresencas() + { + 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 Integer getFormando_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMANDO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formando_id; + } + + public void setFormando_id( Integer formando_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMANDO_ID, formando_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formando_id = formando_id; + LAZY_LOADED_OBJECTS.put( FORMANDO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurFormandosData toFormando_id() + { + try + { + prepare( TO_FORMANDO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_formando_id; + } + + public void setToFormando_id( db.data.siprp_local.outer.CurFormandosData to_formando_id ) + { + try + { + preProcess( TO_FORMANDO_ID, to_formando_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_formando_id = to_formando_id; + } + + public Integer getFormador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formador_id; + } + + public void setFormador_id( Integer formador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMADOR_ID, formador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formador_id = formador_id; + LAZY_LOADED_OBJECTS.put( FORMADOR_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurFormadoresData toFormador_id() + { + try + { + prepare( TO_FORMADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_formador_id; + } + + public void setToFormador_id( db.data.siprp_local.outer.CurFormadoresData to_formador_id ) + { + try + { + preProcess( TO_FORMADOR_ID, to_formador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_formador_id = to_formador_id; + } + + public Integer getCurso_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURSO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.curso_id; + } + + public void setCurso_id( Integer curso_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURSO_ID, curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.curso_id = curso_id; + LAZY_LOADED_OBJECTS.put( CURSO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurCursosData toCurso_id() + { + try + { + prepare( TO_CURSO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_curso_id; + } + + public void setToCurso_id( db.data.siprp_local.outer.CurCursosData to_curso_id ) + { + try + { + preProcess( TO_CURSO_ID, to_curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_curso_id = to_curso_id; + } + + public java.sql.Timestamp getData_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_date; + } + + public void setData_date( java.sql.Timestamp data_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_DATE, data_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_date = data_date; + LAZY_LOADED_OBJECTS.put( DATA_DATE, 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 CurPresencas.ID_INDEX: + value = getId(); + break; + case CurPresencas.FORMANDO_ID_INDEX: + value = getFormando_id(); + break; + case CurPresencas.TO_FORMANDO_ID_INDEX: + value = toFormando_id(); + break; + case CurPresencas.FORMADOR_ID_INDEX: + value = getFormador_id(); + break; + case CurPresencas.TO_FORMADOR_ID_INDEX: + value = toFormador_id(); + break; + case CurPresencas.CURSO_ID_INDEX: + value = getCurso_id(); + break; + case CurPresencas.TO_CURSO_ID_INDEX: + value = toCurso_id(); + break; + case CurPresencas.DATA_DATE_INDEX: + value = getData_date(); + break; + case CurPresencas.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPresencas.ID_INDEX: + value = this.id; + break; + case CurPresencas.FORMANDO_ID_INDEX: + value = this.formando_id; + break; + case CurPresencas.TO_FORMANDO_ID_INDEX: + value = this.to_formando_id; + break; + case CurPresencas.FORMADOR_ID_INDEX: + value = this.formador_id; + break; + case CurPresencas.TO_FORMADOR_ID_INDEX: + value = this.to_formador_id; + break; + case CurPresencas.CURSO_ID_INDEX: + value = this.curso_id; + break; + case CurPresencas.TO_CURSO_ID_INDEX: + value = this.to_curso_id; + break; + case CurPresencas.DATA_DATE_INDEX: + value = this.data_date; + break; + case CurPresencas.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPresencas.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurPresencas.FORMANDO_ID_INDEX: + setFormando_id( ( Integer ) value ); + break; + case CurPresencas.TO_FORMANDO_ID_INDEX: + setToFormando_id( ( db.data.siprp_local.outer.CurFormandosData ) value ); + break; + case CurPresencas.FORMADOR_ID_INDEX: + setFormador_id( ( Integer ) value ); + break; + case CurPresencas.TO_FORMADOR_ID_INDEX: + setToFormador_id( ( db.data.siprp_local.outer.CurFormadoresData ) value ); + break; + case CurPresencas.CURSO_ID_INDEX: + setCurso_id( ( Integer ) value ); + break; + case CurPresencas.TO_CURSO_ID_INDEX: + setToCurso_id( ( db.data.siprp_local.outer.CurCursosData ) value ); + break; + case CurPresencas.DATA_DATE_INDEX: + setData_date( ( java.sql.Timestamp ) value ); + break; + case CurPresencas.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurPresencas.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurPresencas.FORMANDO_ID_INDEX: + this.formando_id = ( Integer ) value; + break; + case CurPresencas.TO_FORMANDO_ID_INDEX: + this.to_formando_id = ( db.data.siprp_local.outer.CurFormandosData ) value; + break; + case CurPresencas.FORMADOR_ID_INDEX: + this.formador_id = ( Integer ) value; + break; + case CurPresencas.TO_FORMADOR_ID_INDEX: + this.to_formador_id = ( db.data.siprp_local.outer.CurFormadoresData ) value; + break; + case CurPresencas.CURSO_ID_INDEX: + this.curso_id = ( Integer ) value; + break; + case CurPresencas.TO_CURSO_ID_INDEX: + this.to_curso_id = ( db.data.siprp_local.outer.CurCursosData ) value; + break; + case CurPresencas.DATA_DATE_INDEX: + this.data_date = ( java.sql.Timestamp ) value; + break; + case CurPresencas.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 CurPresencas.ID_INDEX: + theClass = Integer.class; + break; + case CurPresencas.FORMANDO_ID_INDEX: + theClass = Integer.class; + break; + case CurPresencas.TO_FORMANDO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurFormandosData.class; + break; + case CurPresencas.FORMADOR_ID_INDEX: + theClass = Integer.class; + break; + case CurPresencas.TO_FORMADOR_ID_INDEX: + theClass = db.data.siprp_local.outer.CurFormadoresData.class; + break; + case CurPresencas.CURSO_ID_INDEX: + theClass = Integer.class; + break; + case CurPresencas.TO_CURSO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurCursosData.class; + break; + case CurPresencas.DATA_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurPresencas.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 : CurPresencas._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, CurPresencas.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurQuestionario.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurQuestionario.java new file mode 100644 index 00000000..8daeac40 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurQuestionario.java @@ -0,0 +1,297 @@ +/* +* CurQuestionario.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurQuestionario extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurQuestionario.ID, CurQuestionario.ID_INDEX ); + FIELD_INDEXES.put( CurQuestionario.ID_FULL, CurQuestionario.ID_INDEX ); + FIELD_INDEXES.put( CurQuestionario.NOME, CurQuestionario.NOME_INDEX ); + FIELD_INDEXES.put( CurQuestionario.NOME_FULL, CurQuestionario.NOME_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "cur_questionario"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_questionario"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_questionario.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "cur_questionario.nome"; + public static final int NOME_INDEX = 1; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, }; + + private Integer id; + private String nome; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurQuestionario() + { + 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.ListfromCurQuestionarioPergunta_questionario_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurQuestionarioPerguntaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurQuestionarioPerguntaData.class , getPrimaryKey().getMap().get("id"), "questionario_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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurQuestionario.ID_INDEX: + value = getId(); + break; + case CurQuestionario.NOME_INDEX: + value = getNome(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurQuestionario.ID_INDEX: + value = this.id; + break; + case CurQuestionario.NOME_INDEX: + value = this.nome; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurQuestionario.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurQuestionario.NOME_INDEX: + setNome( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurQuestionario.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurQuestionario.NOME_INDEX: + this.nome = ( 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 CurQuestionario.ID_INDEX: + theClass = Integer.class; + break; + case CurQuestionario.NOME_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurQuestionario._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, CurQuestionario.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurQuestionarioPergunta.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurQuestionarioPergunta.java new file mode 100644 index 00000000..813f1533 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurQuestionarioPergunta.java @@ -0,0 +1,398 @@ +/* +* CurQuestionarioPergunta.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurQuestionarioPergunta extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurQuestionarioPergunta.ID, CurQuestionarioPergunta.ID_INDEX ); + FIELD_INDEXES.put( CurQuestionarioPergunta.ID_FULL, CurQuestionarioPergunta.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurQuestionarioPergunta.CLASS_IDENTIFIER, CurQuestionarioPergunta.QUESTIONARIO_ID, CurQuestionarioPergunta.TO_QUESTIONARIO_ID ); + FIELD_INDEXES.put( CurQuestionarioPergunta.QUESTIONARIO_ID, CurQuestionarioPergunta.QUESTIONARIO_ID_INDEX ); + FIELD_INDEXES.put( CurQuestionarioPergunta.QUESTIONARIO_ID_FULL, CurQuestionarioPergunta.QUESTIONARIO_ID_INDEX ); + FIELD_INDEXES.put( CurQuestionarioPergunta.TO_QUESTIONARIO_ID, CurQuestionarioPergunta.TO_QUESTIONARIO_ID_INDEX ); + FIELD_INDEXES.put( CurQuestionarioPergunta.DESCRICAO, CurQuestionarioPergunta.DESCRICAO_INDEX ); + FIELD_INDEXES.put( CurQuestionarioPergunta.DESCRICAO_FULL, CurQuestionarioPergunta.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 ForeignKeyquestionario_idTocur_questionario = + new com.evolute.entity.ForeignKey( CurQuestionarioPergunta.class, CurQuestionarioPergunta.QUESTIONARIO_ID, db.data.siprp_local.outer.CurQuestionarioData.class, db.data.siprp_local.outer.CurQuestionarioData.ID ); + + public static final String TABLENAME = "cur_questionario_pergunta"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_questionario_pergunta"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_questionario_pergunta.id"; + public static final int ID_INDEX = 0; + public static final String QUESTIONARIO_ID = "questionario_id"; + public static final String QUESTIONARIO_ID_FULL = "cur_questionario_pergunta.questionario_id"; + public static final int QUESTIONARIO_ID_INDEX = 1; + public static final String TO_QUESTIONARIO_ID = "to_questionario_id"; + public static final String TO_QUESTIONARIO_ID_FULL = "cur_questionario_pergunta.to_questionario_id"; + public static final int TO_QUESTIONARIO_ID_INDEX = 2; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "cur_questionario_pergunta.descricao"; + public static final int DESCRICAO_INDEX = 3; + + public static final String FIELD_NAMES[] = new String[]{ + QUESTIONARIO_ID, TO_QUESTIONARIO_ID, DESCRICAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + QUESTIONARIO_ID, TABLENAME + "." + TO_QUESTIONARIO_ID, TABLENAME + "." + DESCRICAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, QUESTIONARIO_ID, DESCRICAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, QUESTIONARIO_ID, DESCRICAO, }; + + private Integer id; + private Integer questionario_id; + private db.data.siprp_local.outer.CurQuestionarioData to_questionario_id; + private String descricao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurQuestionarioPergunta() + { + 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.ListfromCurQuestionarioResposta_pergunta_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurQuestionarioRespostaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurQuestionarioRespostaData.class , getPrimaryKey().getMap().get("id"), "pergunta_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public Integer getQuestionario_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( QUESTIONARIO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.questionario_id; + } + + public void setQuestionario_id( Integer questionario_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( QUESTIONARIO_ID, questionario_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.questionario_id = questionario_id; + LAZY_LOADED_OBJECTS.put( QUESTIONARIO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurQuestionarioData toQuestionario_id() + { + try + { + prepare( TO_QUESTIONARIO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_questionario_id; + } + + public void setToQuestionario_id( db.data.siprp_local.outer.CurQuestionarioData to_questionario_id ) + { + try + { + preProcess( TO_QUESTIONARIO_ID, to_questionario_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_questionario_id = to_questionario_id; + } + + 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 CurQuestionarioPergunta.ID_INDEX: + value = getId(); + break; + case CurQuestionarioPergunta.QUESTIONARIO_ID_INDEX: + value = getQuestionario_id(); + break; + case CurQuestionarioPergunta.TO_QUESTIONARIO_ID_INDEX: + value = toQuestionario_id(); + break; + case CurQuestionarioPergunta.DESCRICAO_INDEX: + value = getDescricao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurQuestionarioPergunta.ID_INDEX: + value = this.id; + break; + case CurQuestionarioPergunta.QUESTIONARIO_ID_INDEX: + value = this.questionario_id; + break; + case CurQuestionarioPergunta.TO_QUESTIONARIO_ID_INDEX: + value = this.to_questionario_id; + break; + case CurQuestionarioPergunta.DESCRICAO_INDEX: + value = this.descricao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurQuestionarioPergunta.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurQuestionarioPergunta.QUESTIONARIO_ID_INDEX: + setQuestionario_id( ( Integer ) value ); + break; + case CurQuestionarioPergunta.TO_QUESTIONARIO_ID_INDEX: + setToQuestionario_id( ( db.data.siprp_local.outer.CurQuestionarioData ) value ); + break; + case CurQuestionarioPergunta.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurQuestionarioPergunta.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurQuestionarioPergunta.QUESTIONARIO_ID_INDEX: + this.questionario_id = ( Integer ) value; + break; + case CurQuestionarioPergunta.TO_QUESTIONARIO_ID_INDEX: + this.to_questionario_id = ( db.data.siprp_local.outer.CurQuestionarioData ) value; + break; + case CurQuestionarioPergunta.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 CurQuestionarioPergunta.ID_INDEX: + theClass = Integer.class; + break; + case CurQuestionarioPergunta.QUESTIONARIO_ID_INDEX: + theClass = Integer.class; + break; + case CurQuestionarioPergunta.TO_QUESTIONARIO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurQuestionarioData.class; + break; + case CurQuestionarioPergunta.DESCRICAO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurQuestionarioPergunta._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, CurQuestionarioPergunta.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurQuestionarioResposta.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurQuestionarioResposta.java new file mode 100644 index 00000000..8ebddefd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurQuestionarioResposta.java @@ -0,0 +1,583 @@ +/* +* CurQuestionarioResposta.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurQuestionarioResposta extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurQuestionarioResposta.ID, CurQuestionarioResposta.ID_INDEX ); + FIELD_INDEXES.put( CurQuestionarioResposta.ID_FULL, CurQuestionarioResposta.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurQuestionarioResposta.CLASS_IDENTIFIER, CurQuestionarioResposta.PERGUNTA_ID, CurQuestionarioResposta.TO_PERGUNTA_ID ); + FIELD_INDEXES.put( CurQuestionarioResposta.PERGUNTA_ID, CurQuestionarioResposta.PERGUNTA_ID_INDEX ); + FIELD_INDEXES.put( CurQuestionarioResposta.PERGUNTA_ID_FULL, CurQuestionarioResposta.PERGUNTA_ID_INDEX ); + FIELD_INDEXES.put( CurQuestionarioResposta.TO_PERGUNTA_ID, CurQuestionarioResposta.TO_PERGUNTA_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurQuestionarioResposta.CLASS_IDENTIFIER, CurQuestionarioResposta.FORMANDO_ID, CurQuestionarioResposta.TO_FORMANDO_ID ); + FIELD_INDEXES.put( CurQuestionarioResposta.FORMANDO_ID, CurQuestionarioResposta.FORMANDO_ID_INDEX ); + FIELD_INDEXES.put( CurQuestionarioResposta.FORMANDO_ID_FULL, CurQuestionarioResposta.FORMANDO_ID_INDEX ); + FIELD_INDEXES.put( CurQuestionarioResposta.TO_FORMANDO_ID, CurQuestionarioResposta.TO_FORMANDO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurQuestionarioResposta.CLASS_IDENTIFIER, CurQuestionarioResposta.CURSO_ID, CurQuestionarioResposta.TO_CURSO_ID ); + FIELD_INDEXES.put( CurQuestionarioResposta.CURSO_ID, CurQuestionarioResposta.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurQuestionarioResposta.CURSO_ID_FULL, CurQuestionarioResposta.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurQuestionarioResposta.TO_CURSO_ID, CurQuestionarioResposta.TO_CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurQuestionarioResposta.RESPOSTA, CurQuestionarioResposta.RESPOSTA_INDEX ); + FIELD_INDEXES.put( CurQuestionarioResposta.RESPOSTA_FULL, CurQuestionarioResposta.RESPOSTA_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeypergunta_idTocur_questionario_pergunta = + new com.evolute.entity.ForeignKey( CurQuestionarioResposta.class, CurQuestionarioResposta.PERGUNTA_ID, db.data.siprp_local.outer.CurQuestionarioPerguntaData.class, db.data.siprp_local.outer.CurQuestionarioPerguntaData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyformando_idTocur_formandos = + new com.evolute.entity.ForeignKey( CurQuestionarioResposta.class, CurQuestionarioResposta.FORMANDO_ID, db.data.siprp_local.outer.CurFormandosData.class, db.data.siprp_local.outer.CurFormandosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycurso_idTocur_cursos = + new com.evolute.entity.ForeignKey( CurQuestionarioResposta.class, CurQuestionarioResposta.CURSO_ID, db.data.siprp_local.outer.CurCursosData.class, db.data.siprp_local.outer.CurCursosData.ID ); + + public static final String TABLENAME = "cur_questionario_resposta"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_questionario_resposta"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_questionario_resposta.id"; + public static final int ID_INDEX = 0; + public static final String PERGUNTA_ID = "pergunta_id"; + public static final String PERGUNTA_ID_FULL = "cur_questionario_resposta.pergunta_id"; + public static final int PERGUNTA_ID_INDEX = 1; + public static final String TO_PERGUNTA_ID = "to_pergunta_id"; + public static final String TO_PERGUNTA_ID_FULL = "cur_questionario_resposta.to_pergunta_id"; + public static final int TO_PERGUNTA_ID_INDEX = 2; + public static final String FORMANDO_ID = "formando_id"; + public static final String FORMANDO_ID_FULL = "cur_questionario_resposta.formando_id"; + public static final int FORMANDO_ID_INDEX = 3; + public static final String TO_FORMANDO_ID = "to_formando_id"; + public static final String TO_FORMANDO_ID_FULL = "cur_questionario_resposta.to_formando_id"; + public static final int TO_FORMANDO_ID_INDEX = 4; + public static final String CURSO_ID = "curso_id"; + public static final String CURSO_ID_FULL = "cur_questionario_resposta.curso_id"; + public static final int CURSO_ID_INDEX = 5; + public static final String TO_CURSO_ID = "to_curso_id"; + public static final String TO_CURSO_ID_FULL = "cur_questionario_resposta.to_curso_id"; + public static final int TO_CURSO_ID_INDEX = 6; + public static final String RESPOSTA = "resposta"; + public static final String RESPOSTA_FULL = "cur_questionario_resposta.resposta"; + public static final int RESPOSTA_INDEX = 7; + + public static final String FIELD_NAMES[] = new String[]{ + PERGUNTA_ID, TO_PERGUNTA_ID, FORMANDO_ID, TO_FORMANDO_ID, CURSO_ID, TO_CURSO_ID, + RESPOSTA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + PERGUNTA_ID, TABLENAME + "." + TO_PERGUNTA_ID, TABLENAME + "." + FORMANDO_ID, TABLENAME + "." + TO_FORMANDO_ID, TABLENAME + "." + CURSO_ID, TABLENAME + "." + TO_CURSO_ID, + TABLENAME + "." + RESPOSTA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, PERGUNTA_ID, FORMANDO_ID, CURSO_ID, RESPOSTA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, PERGUNTA_ID, FORMANDO_ID, CURSO_ID, RESPOSTA, }; + + private Integer id; + private Integer pergunta_id; + private db.data.siprp_local.outer.CurQuestionarioPerguntaData to_pergunta_id; + private Integer formando_id; + private db.data.siprp_local.outer.CurFormandosData to_formando_id; + private Integer curso_id; + private db.data.siprp_local.outer.CurCursosData to_curso_id; + private Integer resposta; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurQuestionarioResposta() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 getPergunta_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PERGUNTA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.pergunta_id; + } + + public void setPergunta_id( Integer pergunta_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PERGUNTA_ID, pergunta_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.pergunta_id = pergunta_id; + LAZY_LOADED_OBJECTS.put( PERGUNTA_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurQuestionarioPerguntaData toPergunta_id() + { + try + { + prepare( TO_PERGUNTA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_pergunta_id; + } + + public void setToPergunta_id( db.data.siprp_local.outer.CurQuestionarioPerguntaData to_pergunta_id ) + { + try + { + preProcess( TO_PERGUNTA_ID, to_pergunta_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_pergunta_id = to_pergunta_id; + } + + public Integer getFormando_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMANDO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formando_id; + } + + public void setFormando_id( Integer formando_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMANDO_ID, formando_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formando_id = formando_id; + LAZY_LOADED_OBJECTS.put( FORMANDO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurFormandosData toFormando_id() + { + try + { + prepare( TO_FORMANDO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_formando_id; + } + + public void setToFormando_id( db.data.siprp_local.outer.CurFormandosData to_formando_id ) + { + try + { + preProcess( TO_FORMANDO_ID, to_formando_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_formando_id = to_formando_id; + } + + public Integer getCurso_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURSO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.curso_id; + } + + public void setCurso_id( Integer curso_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURSO_ID, curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.curso_id = curso_id; + LAZY_LOADED_OBJECTS.put( CURSO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurCursosData toCurso_id() + { + try + { + prepare( TO_CURSO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_curso_id; + } + + public void setToCurso_id( db.data.siprp_local.outer.CurCursosData to_curso_id ) + { + try + { + preProcess( TO_CURSO_ID, to_curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_curso_id = to_curso_id; + } + + public Integer getResposta() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESPOSTA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.resposta; + } + + public void setResposta( Integer resposta ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESPOSTA, resposta ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.resposta = resposta; + LAZY_LOADED_OBJECTS.put( RESPOSTA, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurQuestionarioResposta.ID_INDEX: + value = getId(); + break; + case CurQuestionarioResposta.PERGUNTA_ID_INDEX: + value = getPergunta_id(); + break; + case CurQuestionarioResposta.TO_PERGUNTA_ID_INDEX: + value = toPergunta_id(); + break; + case CurQuestionarioResposta.FORMANDO_ID_INDEX: + value = getFormando_id(); + break; + case CurQuestionarioResposta.TO_FORMANDO_ID_INDEX: + value = toFormando_id(); + break; + case CurQuestionarioResposta.CURSO_ID_INDEX: + value = getCurso_id(); + break; + case CurQuestionarioResposta.TO_CURSO_ID_INDEX: + value = toCurso_id(); + break; + case CurQuestionarioResposta.RESPOSTA_INDEX: + value = getResposta(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurQuestionarioResposta.ID_INDEX: + value = this.id; + break; + case CurQuestionarioResposta.PERGUNTA_ID_INDEX: + value = this.pergunta_id; + break; + case CurQuestionarioResposta.TO_PERGUNTA_ID_INDEX: + value = this.to_pergunta_id; + break; + case CurQuestionarioResposta.FORMANDO_ID_INDEX: + value = this.formando_id; + break; + case CurQuestionarioResposta.TO_FORMANDO_ID_INDEX: + value = this.to_formando_id; + break; + case CurQuestionarioResposta.CURSO_ID_INDEX: + value = this.curso_id; + break; + case CurQuestionarioResposta.TO_CURSO_ID_INDEX: + value = this.to_curso_id; + break; + case CurQuestionarioResposta.RESPOSTA_INDEX: + value = this.resposta; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurQuestionarioResposta.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurQuestionarioResposta.PERGUNTA_ID_INDEX: + setPergunta_id( ( Integer ) value ); + break; + case CurQuestionarioResposta.TO_PERGUNTA_ID_INDEX: + setToPergunta_id( ( db.data.siprp_local.outer.CurQuestionarioPerguntaData ) value ); + break; + case CurQuestionarioResposta.FORMANDO_ID_INDEX: + setFormando_id( ( Integer ) value ); + break; + case CurQuestionarioResposta.TO_FORMANDO_ID_INDEX: + setToFormando_id( ( db.data.siprp_local.outer.CurFormandosData ) value ); + break; + case CurQuestionarioResposta.CURSO_ID_INDEX: + setCurso_id( ( Integer ) value ); + break; + case CurQuestionarioResposta.TO_CURSO_ID_INDEX: + setToCurso_id( ( db.data.siprp_local.outer.CurCursosData ) value ); + break; + case CurQuestionarioResposta.RESPOSTA_INDEX: + setResposta( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurQuestionarioResposta.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurQuestionarioResposta.PERGUNTA_ID_INDEX: + this.pergunta_id = ( Integer ) value; + break; + case CurQuestionarioResposta.TO_PERGUNTA_ID_INDEX: + this.to_pergunta_id = ( db.data.siprp_local.outer.CurQuestionarioPerguntaData ) value; + break; + case CurQuestionarioResposta.FORMANDO_ID_INDEX: + this.formando_id = ( Integer ) value; + break; + case CurQuestionarioResposta.TO_FORMANDO_ID_INDEX: + this.to_formando_id = ( db.data.siprp_local.outer.CurFormandosData ) value; + break; + case CurQuestionarioResposta.CURSO_ID_INDEX: + this.curso_id = ( Integer ) value; + break; + case CurQuestionarioResposta.TO_CURSO_ID_INDEX: + this.to_curso_id = ( db.data.siprp_local.outer.CurCursosData ) value; + break; + case CurQuestionarioResposta.RESPOSTA_INDEX: + this.resposta = ( 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 CurQuestionarioResposta.ID_INDEX: + theClass = Integer.class; + break; + case CurQuestionarioResposta.PERGUNTA_ID_INDEX: + theClass = Integer.class; + break; + case CurQuestionarioResposta.TO_PERGUNTA_ID_INDEX: + theClass = db.data.siprp_local.outer.CurQuestionarioPerguntaData.class; + break; + case CurQuestionarioResposta.FORMANDO_ID_INDEX: + theClass = Integer.class; + break; + case CurQuestionarioResposta.TO_FORMANDO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurFormandosData.class; + break; + case CurQuestionarioResposta.CURSO_ID_INDEX: + theClass = Integer.class; + break; + case CurQuestionarioResposta.TO_CURSO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurCursosData.class; + break; + case CurQuestionarioResposta.RESPOSTA_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurQuestionarioResposta._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, CurQuestionarioResposta.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurTopicos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurTopicos.java new file mode 100644 index 00000000..c9f21a2b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurTopicos.java @@ -0,0 +1,717 @@ +/* +* CurTopicos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurTopicos extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( CurTopicos.ID, CurTopicos.ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.ID_FULL, CurTopicos.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurTopicos.CLASS_IDENTIFIER, CurTopicos.PARENT_ID, CurTopicos.TO_PARENT_ID ); + FIELD_INDEXES.put( CurTopicos.PARENT_ID, CurTopicos.PARENT_ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.PARENT_ID_FULL, CurTopicos.PARENT_ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.TO_PARENT_ID, CurTopicos.TO_PARENT_ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.DESCRICAO, CurTopicos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( CurTopicos.DESCRICAO_FULL, CurTopicos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( CurTopicos.ORDEM, CurTopicos.ORDEM_INDEX ); + FIELD_INDEXES.put( CurTopicos.ORDEM_FULL, CurTopicos.ORDEM_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurTopicos.CLASS_IDENTIFIER, CurTopicos.CURSO_ID, CurTopicos.TO_CURSO_ID ); + FIELD_INDEXES.put( CurTopicos.CURSO_ID, CurTopicos.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.CURSO_ID_FULL, CurTopicos.CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.TO_CURSO_ID, CurTopicos.TO_CURSO_ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.DELETED_DATE, CurTopicos.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurTopicos.DELETED_DATE_FULL, CurTopicos.DELETED_DATE_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurTopicos.CLASS_IDENTIFIER, CurTopicos.FORMADOR_ID, CurTopicos.TO_FORMADOR_ID ); + FIELD_INDEXES.put( CurTopicos.FORMADOR_ID, CurTopicos.FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.FORMADOR_ID_FULL, CurTopicos.FORMADOR_ID_INDEX ); + FIELD_INDEXES.put( CurTopicos.TO_FORMADOR_ID, CurTopicos.TO_FORMADOR_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 ForeignKeyparent_idTocur_topicos = + new com.evolute.entity.ForeignKey( CurTopicos.class, CurTopicos.PARENT_ID, db.data.siprp_local.outer.CurTopicosData.class, db.data.siprp_local.outer.CurTopicosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycurso_idTocur_cursos = + new com.evolute.entity.ForeignKey( CurTopicos.class, CurTopicos.CURSO_ID, db.data.siprp_local.outer.CurCursosData.class, db.data.siprp_local.outer.CurCursosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyformador_idTocur_formadores = + new com.evolute.entity.ForeignKey( CurTopicos.class, CurTopicos.FORMADOR_ID, db.data.siprp_local.outer.CurFormadoresData.class, db.data.siprp_local.outer.CurFormadoresData.ID ); + + public static final String TABLENAME = "cur_topicos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_topicos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "cur_topicos.id"; + public static final int ID_INDEX = 0; + public static final String PARENT_ID = "parent_id"; + public static final String PARENT_ID_FULL = "cur_topicos.parent_id"; + public static final int PARENT_ID_INDEX = 1; + public static final String TO_PARENT_ID = "to_parent_id"; + public static final String TO_PARENT_ID_FULL = "cur_topicos.to_parent_id"; + public static final int TO_PARENT_ID_INDEX = 2; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "cur_topicos.descricao"; + public static final int DESCRICAO_INDEX = 3; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "cur_topicos.ordem"; + public static final int ORDEM_INDEX = 4; + public static final String CURSO_ID = "curso_id"; + public static final String CURSO_ID_FULL = "cur_topicos.curso_id"; + public static final int CURSO_ID_INDEX = 5; + public static final String TO_CURSO_ID = "to_curso_id"; + public static final String TO_CURSO_ID_FULL = "cur_topicos.to_curso_id"; + public static final int TO_CURSO_ID_INDEX = 6; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_topicos.deleted_date"; + public static final int DELETED_DATE_INDEX = 7; + public static final String FORMADOR_ID = "formador_id"; + public static final String FORMADOR_ID_FULL = "cur_topicos.formador_id"; + public static final int FORMADOR_ID_INDEX = 8; + public static final String TO_FORMADOR_ID = "to_formador_id"; + public static final String TO_FORMADOR_ID_FULL = "cur_topicos.to_formador_id"; + public static final int TO_FORMADOR_ID_INDEX = 9; + + public static final String FIELD_NAMES[] = new String[]{ + PARENT_ID, TO_PARENT_ID, DESCRICAO, ORDEM, CURSO_ID, TO_CURSO_ID, DELETED_DATE, + FORMADOR_ID, TO_FORMADOR_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + PARENT_ID, TABLENAME + "." + TO_PARENT_ID, TABLENAME + "." + DESCRICAO, TABLENAME + "." + ORDEM, TABLENAME + "." + CURSO_ID, TABLENAME + "." + TO_CURSO_ID, TABLENAME + "." + DELETED_DATE, + TABLENAME + "." + FORMADOR_ID, TABLENAME + "." + TO_FORMADOR_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, PARENT_ID, DESCRICAO, ORDEM, CURSO_ID, DELETED_DATE, FORMADOR_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, PARENT_ID, DESCRICAO, ORDEM, CURSO_ID, DELETED_DATE, FORMADOR_ID, }; + + private Integer id; + private Integer parent_id; + private db.data.siprp_local.outer.CurTopicosData to_parent_id; + private String descricao; + private Integer ordem; + private Integer curso_id; + private db.data.siprp_local.outer.CurCursosData to_curso_id; + private java.sql.Timestamp deleted_date; + private Integer formador_id; + private db.data.siprp_local.outer.CurFormadoresData to_formador_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurTopicos() + { + super(); + dirtyProperties = new boolean[]{ 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.ListfromCurTopicos_parent_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurTopicosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurTopicosData.class , getPrimaryKey().getMap().get("id"), "parent_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromCurTopicosAulas_topico_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.CurTopicosAulasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.CurTopicosAulasData.class , getPrimaryKey().getMap().get("id"), "topico_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public Integer getParent_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PARENT_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.parent_id; + } + + public void setParent_id( Integer parent_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PARENT_ID, parent_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.parent_id = parent_id; + LAZY_LOADED_OBJECTS.put( PARENT_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurTopicosData toParent_id() + { + try + { + prepare( TO_PARENT_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_parent_id; + } + + public void setToParent_id( db.data.siprp_local.outer.CurTopicosData to_parent_id ) + { + try + { + preProcess( TO_PARENT_ID, to_parent_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_parent_id = to_parent_id; + } + + 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 Integer getCurso_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURSO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.curso_id; + } + + public void setCurso_id( Integer curso_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURSO_ID, curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.curso_id = curso_id; + LAZY_LOADED_OBJECTS.put( CURSO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurCursosData toCurso_id() + { + try + { + prepare( TO_CURSO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_curso_id; + } + + public void setToCurso_id( db.data.siprp_local.outer.CurCursosData to_curso_id ) + { + try + { + preProcess( TO_CURSO_ID, to_curso_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_curso_id = to_curso_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 Integer getFormador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formador_id; + } + + public void setFormador_id( Integer formador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMADOR_ID, formador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formador_id = formador_id; + LAZY_LOADED_OBJECTS.put( FORMADOR_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurFormadoresData toFormador_id() + { + try + { + prepare( TO_FORMADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_formador_id; + } + + public void setToFormador_id( db.data.siprp_local.outer.CurFormadoresData to_formador_id ) + { + try + { + preProcess( TO_FORMADOR_ID, to_formador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_formador_id = to_formador_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurTopicos.ID_INDEX: + value = getId(); + break; + case CurTopicos.PARENT_ID_INDEX: + value = getParent_id(); + break; + case CurTopicos.TO_PARENT_ID_INDEX: + value = toParent_id(); + break; + case CurTopicos.DESCRICAO_INDEX: + value = getDescricao(); + break; + case CurTopicos.ORDEM_INDEX: + value = getOrdem(); + break; + case CurTopicos.CURSO_ID_INDEX: + value = getCurso_id(); + break; + case CurTopicos.TO_CURSO_ID_INDEX: + value = toCurso_id(); + break; + case CurTopicos.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case CurTopicos.FORMADOR_ID_INDEX: + value = getFormador_id(); + break; + case CurTopicos.TO_FORMADOR_ID_INDEX: + value = toFormador_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurTopicos.ID_INDEX: + value = this.id; + break; + case CurTopicos.PARENT_ID_INDEX: + value = this.parent_id; + break; + case CurTopicos.TO_PARENT_ID_INDEX: + value = this.to_parent_id; + break; + case CurTopicos.DESCRICAO_INDEX: + value = this.descricao; + break; + case CurTopicos.ORDEM_INDEX: + value = this.ordem; + break; + case CurTopicos.CURSO_ID_INDEX: + value = this.curso_id; + break; + case CurTopicos.TO_CURSO_ID_INDEX: + value = this.to_curso_id; + break; + case CurTopicos.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case CurTopicos.FORMADOR_ID_INDEX: + value = this.formador_id; + break; + case CurTopicos.TO_FORMADOR_ID_INDEX: + value = this.to_formador_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurTopicos.ID_INDEX: + setId( ( Integer ) value ); + break; + case CurTopicos.PARENT_ID_INDEX: + setParent_id( ( Integer ) value ); + break; + case CurTopicos.TO_PARENT_ID_INDEX: + setToParent_id( ( db.data.siprp_local.outer.CurTopicosData ) value ); + break; + case CurTopicos.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case CurTopicos.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + case CurTopicos.CURSO_ID_INDEX: + setCurso_id( ( Integer ) value ); + break; + case CurTopicos.TO_CURSO_ID_INDEX: + setToCurso_id( ( db.data.siprp_local.outer.CurCursosData ) value ); + break; + case CurTopicos.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case CurTopicos.FORMADOR_ID_INDEX: + setFormador_id( ( Integer ) value ); + break; + case CurTopicos.TO_FORMADOR_ID_INDEX: + setToFormador_id( ( db.data.siprp_local.outer.CurFormadoresData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurTopicos.ID_INDEX: + this.id = ( Integer ) value; + break; + case CurTopicos.PARENT_ID_INDEX: + this.parent_id = ( Integer ) value; + break; + case CurTopicos.TO_PARENT_ID_INDEX: + this.to_parent_id = ( db.data.siprp_local.outer.CurTopicosData ) value; + break; + case CurTopicos.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case CurTopicos.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + case CurTopicos.CURSO_ID_INDEX: + this.curso_id = ( Integer ) value; + break; + case CurTopicos.TO_CURSO_ID_INDEX: + this.to_curso_id = ( db.data.siprp_local.outer.CurCursosData ) value; + break; + case CurTopicos.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case CurTopicos.FORMADOR_ID_INDEX: + this.formador_id = ( Integer ) value; + break; + case CurTopicos.TO_FORMADOR_ID_INDEX: + this.to_formador_id = ( db.data.siprp_local.outer.CurFormadoresData ) 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 CurTopicos.ID_INDEX: + theClass = Integer.class; + break; + case CurTopicos.PARENT_ID_INDEX: + theClass = Integer.class; + break; + case CurTopicos.TO_PARENT_ID_INDEX: + theClass = db.data.siprp_local.outer.CurTopicosData.class; + break; + case CurTopicos.DESCRICAO_INDEX: + theClass = String.class; + break; + case CurTopicos.ORDEM_INDEX: + theClass = Integer.class; + break; + case CurTopicos.CURSO_ID_INDEX: + theClass = Integer.class; + break; + case CurTopicos.TO_CURSO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurCursosData.class; + break; + case CurTopicos.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case CurTopicos.FORMADOR_ID_INDEX: + theClass = Integer.class; + break; + case CurTopicos.TO_FORMADOR_ID_INDEX: + theClass = db.data.siprp_local.outer.CurFormadoresData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : CurTopicos._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, CurTopicos.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurTopicosAulas.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurTopicosAulas.java new file mode 100644 index 00000000..3c5effb7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/CurTopicosAulas.java @@ -0,0 +1,431 @@ +/* +* CurTopicosAulas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class CurTopicosAulas extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( CurTopicosAulas.CLASS_IDENTIFIER, CurTopicosAulas.TOPICO_ID, CurTopicosAulas.TO_TOPICO_ID ); + FIELD_INDEXES.put( CurTopicosAulas.TOPICO_ID, CurTopicosAulas.TOPICO_ID_INDEX ); + FIELD_INDEXES.put( CurTopicosAulas.TOPICO_ID_FULL, CurTopicosAulas.TOPICO_ID_INDEX ); + FIELD_INDEXES.put( CurTopicosAulas.TO_TOPICO_ID, CurTopicosAulas.TO_TOPICO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( CurTopicosAulas.CLASS_IDENTIFIER, CurTopicosAulas.AULA_ID, CurTopicosAulas.TO_AULA_ID ); + FIELD_INDEXES.put( CurTopicosAulas.AULA_ID, CurTopicosAulas.AULA_ID_INDEX ); + FIELD_INDEXES.put( CurTopicosAulas.AULA_ID_FULL, CurTopicosAulas.AULA_ID_INDEX ); + FIELD_INDEXES.put( CurTopicosAulas.TO_AULA_ID, CurTopicosAulas.TO_AULA_ID_INDEX ); + FIELD_INDEXES.put( CurTopicosAulas.DELETED_DATE, CurTopicosAulas.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( CurTopicosAulas.DELETED_DATE_FULL, CurTopicosAulas.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 ForeignKeytopico_idTocur_topicos = + new com.evolute.entity.ForeignKey( CurTopicosAulas.class, CurTopicosAulas.TOPICO_ID, db.data.siprp_local.outer.CurTopicosData.class, db.data.siprp_local.outer.CurTopicosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyaula_idTocur_aulas = + new com.evolute.entity.ForeignKey( CurTopicosAulas.class, CurTopicosAulas.AULA_ID, db.data.siprp_local.outer.CurAulasData.class, db.data.siprp_local.outer.CurAulasData.ID ); + + public static final String TABLENAME = "cur_topicos_aulas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.cur_topicos_aulas"; + + public static final int _INVALID__INDEX = -1; + public static final String TOPICO_ID = "topico_id"; + public static final String TOPICO_ID_FULL = "cur_topicos_aulas.topico_id"; + public static final int TOPICO_ID_INDEX = 0; + public static final String TO_TOPICO_ID = "to_topico_id"; + public static final String TO_TOPICO_ID_FULL = "cur_topicos_aulas.to_topico_id"; + public static final int TO_TOPICO_ID_INDEX = 1; + public static final String AULA_ID = "aula_id"; + public static final String AULA_ID_FULL = "cur_topicos_aulas.aula_id"; + public static final int AULA_ID_INDEX = 2; + public static final String TO_AULA_ID = "to_aula_id"; + public static final String TO_AULA_ID_FULL = "cur_topicos_aulas.to_aula_id"; + public static final int TO_AULA_ID_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "cur_topicos_aulas.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + TOPICO_ID, AULA_ID, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + TOPICO_ID, AULA_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + TOPICO_ID, AULA_ID, DELETED_DATE, }; + + private Integer topico_id; + private db.data.siprp_local.outer.CurTopicosData to_topico_id; + private Integer aula_id; + private db.data.siprp_local.outer.CurAulasData to_aula_id; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public CurTopicosAulas() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false }; + } + + public Integer getTopico_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TOPICO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.topico_id; + } + + public void setTopico_id( Integer topico_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TOPICO_ID, topico_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.topico_id = topico_id; + LAZY_LOADED_OBJECTS.put( TOPICO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurTopicosData toTopico_id() + { + try + { + prepare( TO_TOPICO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_topico_id; + } + + public void setToTopico_id( db.data.siprp_local.outer.CurTopicosData to_topico_id ) + { + try + { + preProcess( TO_TOPICO_ID, to_topico_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_topico_id = to_topico_id; + } + + public Integer getAula_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( AULA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.aula_id; + } + + public void setAula_id( Integer aula_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( AULA_ID, aula_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.aula_id = aula_id; + LAZY_LOADED_OBJECTS.put( AULA_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.CurAulasData toAula_id() + { + try + { + prepare( TO_AULA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_aula_id; + } + + public void setToAula_id( db.data.siprp_local.outer.CurAulasData to_aula_id ) + { + try + { + preProcess( TO_AULA_ID, to_aula_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_aula_id = to_aula_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 CurTopicosAulas.TOPICO_ID_INDEX: + value = getTopico_id(); + break; + case CurTopicosAulas.TO_TOPICO_ID_INDEX: + value = toTopico_id(); + break; + case CurTopicosAulas.AULA_ID_INDEX: + value = getAula_id(); + break; + case CurTopicosAulas.TO_AULA_ID_INDEX: + value = toAula_id(); + break; + case CurTopicosAulas.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurTopicosAulas.TOPICO_ID_INDEX: + value = this.topico_id; + break; + case CurTopicosAulas.TO_TOPICO_ID_INDEX: + value = this.to_topico_id; + break; + case CurTopicosAulas.AULA_ID_INDEX: + value = this.aula_id; + break; + case CurTopicosAulas.TO_AULA_ID_INDEX: + value = this.to_aula_id; + break; + case CurTopicosAulas.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurTopicosAulas.TOPICO_ID_INDEX: + setTopico_id( ( Integer ) value ); + break; + case CurTopicosAulas.TO_TOPICO_ID_INDEX: + setToTopico_id( ( db.data.siprp_local.outer.CurTopicosData ) value ); + break; + case CurTopicosAulas.AULA_ID_INDEX: + setAula_id( ( Integer ) value ); + break; + case CurTopicosAulas.TO_AULA_ID_INDEX: + setToAula_id( ( db.data.siprp_local.outer.CurAulasData ) value ); + break; + case CurTopicosAulas.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case CurTopicosAulas.TOPICO_ID_INDEX: + this.topico_id = ( Integer ) value; + break; + case CurTopicosAulas.TO_TOPICO_ID_INDEX: + this.to_topico_id = ( db.data.siprp_local.outer.CurTopicosData ) value; + break; + case CurTopicosAulas.AULA_ID_INDEX: + this.aula_id = ( Integer ) value; + break; + case CurTopicosAulas.TO_AULA_ID_INDEX: + this.to_aula_id = ( db.data.siprp_local.outer.CurAulasData ) value; + break; + case CurTopicosAulas.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() + { + throw new RuntimeException( "getPrimaryKeyName on CurTopicosAulas is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case CurTopicosAulas.TOPICO_ID_INDEX: + theClass = Integer.class; + break; + case CurTopicosAulas.TO_TOPICO_ID_INDEX: + theClass = db.data.siprp_local.outer.CurTopicosData.class; + break; + case CurTopicosAulas.AULA_ID_INDEX: + theClass = Integer.class; + break; + case CurTopicosAulas.TO_AULA_ID_INDEX: + theClass = db.data.siprp_local.outer.CurAulasData.class; + break; + case CurTopicosAulas.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 : CurTopicosAulas._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, CurTopicosAulas.PK_FIELD_NAMES ); + primaryKey.set( 0, getTopico_id() ); + primaryKey.set( 1, getAula_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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EcdOficial.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EcdOficial.java new file mode 100644 index 00000000..5405e773 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EcdOficial.java @@ -0,0 +1,448 @@ +/* +* EcdOficial.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EcdOficial extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.ecd_oficial"; + + 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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresEcdData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EmailPlanoDeActuacao.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EmailPlanoDeActuacao.java new file mode 100644 index 00000000..a44a0108 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EmailPlanoDeActuacao.java @@ -0,0 +1,381 @@ +/* +* EmailPlanoDeActuacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EmailPlanoDeActuacao extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "email_plano_de_actuacao"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.email_plano_de_actuacao"; + + 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 String TO_ESTABELECIMENTO_ID_FULL = "email_plano_de_actuacao.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 db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EmpresaPrecoPeriodicidadeTipo.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EmpresaPrecoPeriodicidadeTipo.java new file mode 100644 index 00000000..3484aadf --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EmpresaPrecoPeriodicidadeTipo.java @@ -0,0 +1,297 @@ +/* +* EmpresaPrecoPeriodicidadeTipo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EmpresaPrecoPeriodicidadeTipo extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EmpresaPrecoPeriodicidadeTipo.ID, EmpresaPrecoPeriodicidadeTipo.ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoPeriodicidadeTipo.ID_FULL, EmpresaPrecoPeriodicidadeTipo.ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoPeriodicidadeTipo.NOME, EmpresaPrecoPeriodicidadeTipo.NOME_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoPeriodicidadeTipo.NOME_FULL, EmpresaPrecoPeriodicidadeTipo.NOME_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "empresa_preco_periodicidade_tipo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.empresa_preco_periodicidade_tipo"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "empresa_preco_periodicidade_tipo.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "empresa_preco_periodicidade_tipo.nome"; + public static final int NOME_INDEX = 1; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, }; + + private Integer id; + private String nome; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EmpresaPrecoPeriodicidadeTipo() + { + 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.ListfromEmpresaPrecoServico_empresa_preco_periodicidade_tipo_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.EmpresaPrecoServicoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.EmpresaPrecoServicoData.class , getPrimaryKey().getMap().get("id"), "empresa_preco_periodicidade_tipo_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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoPeriodicidadeTipo.ID_INDEX: + value = getId(); + break; + case EmpresaPrecoPeriodicidadeTipo.NOME_INDEX: + value = getNome(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoPeriodicidadeTipo.ID_INDEX: + value = this.id; + break; + case EmpresaPrecoPeriodicidadeTipo.NOME_INDEX: + value = this.nome; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoPeriodicidadeTipo.ID_INDEX: + setId( ( Integer ) value ); + break; + case EmpresaPrecoPeriodicidadeTipo.NOME_INDEX: + setNome( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoPeriodicidadeTipo.ID_INDEX: + this.id = ( Integer ) value; + break; + case EmpresaPrecoPeriodicidadeTipo.NOME_INDEX: + this.nome = ( 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 EmpresaPrecoPeriodicidadeTipo.ID_INDEX: + theClass = Integer.class; + break; + case EmpresaPrecoPeriodicidadeTipo.NOME_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EmpresaPrecoPeriodicidadeTipo._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, EmpresaPrecoPeriodicidadeTipo.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EmpresaPrecoServico.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EmpresaPrecoServico.java new file mode 100644 index 00000000..7fc39103 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EmpresaPrecoServico.java @@ -0,0 +1,739 @@ +/* +* EmpresaPrecoServico.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EmpresaPrecoServico extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EmpresaPrecoServico.ID, EmpresaPrecoServico.ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.ID_FULL, EmpresaPrecoServico.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( EmpresaPrecoServico.CLASS_IDENTIFIER, EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID, EmpresaPrecoServico.TO_EMPRESA_PRECO_SERVICO_TIPO_ID ); + FIELD_INDEXES.put( EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID, EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID_FULL, EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.TO_EMPRESA_PRECO_SERVICO_TIPO_ID, EmpresaPrecoServico.TO_EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( EmpresaPrecoServico.CLASS_IDENTIFIER, EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, EmpresaPrecoServico.TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID ); + FIELD_INDEXES.put( EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_FULL, EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, EmpresaPrecoServico.TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.TIPO_OUTRO, EmpresaPrecoServico.TIPO_OUTRO_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.TIPO_OUTRO_FULL, EmpresaPrecoServico.TIPO_OUTRO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( EmpresaPrecoServico.CLASS_IDENTIFIER, EmpresaPrecoServico.EMPRESA_ID, EmpresaPrecoServico.TO_EMPRESA_ID ); + FIELD_INDEXES.put( EmpresaPrecoServico.EMPRESA_ID, EmpresaPrecoServico.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.EMPRESA_ID_FULL, EmpresaPrecoServico.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.TO_EMPRESA_ID, EmpresaPrecoServico.TO_EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.VALOR, EmpresaPrecoServico.VALOR_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.VALOR_FULL, EmpresaPrecoServico.VALOR_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.INICIADO, EmpresaPrecoServico.INICIADO_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.INICIADO_FULL, EmpresaPrecoServico.INICIADO_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.ACTIVO, EmpresaPrecoServico.ACTIVO_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServico.ACTIVO_FULL, EmpresaPrecoServico.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 ForeignKeyempresa_preco_servico_tipo_idToempresa_preco_servico_tipo = + new com.evolute.entity.ForeignKey( EmpresaPrecoServico.class, EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID, db.data.siprp_local.outer.EmpresaPrecoServicoTipoData.class, db.data.siprp_local.outer.EmpresaPrecoServicoTipoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_preco_periodicidade_tipo_idToempresa_preco_periodicidade_tipo = + new com.evolute.entity.ForeignKey( EmpresaPrecoServico.class, EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, db.data.siprp_local.outer.EmpresaPrecoPeriodicidadeTipoData.class, db.data.siprp_local.outer.EmpresaPrecoPeriodicidadeTipoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( EmpresaPrecoServico.class, EmpresaPrecoServico.EMPRESA_ID, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final String TABLENAME = "empresa_preco_servico"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.empresa_preco_servico"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "empresa_preco_servico.id"; + public static final int ID_INDEX = 0; + public static final String EMPRESA_PRECO_SERVICO_TIPO_ID = "empresa_preco_servico_tipo_id"; + public static final String EMPRESA_PRECO_SERVICO_TIPO_ID_FULL = "empresa_preco_servico.empresa_preco_servico_tipo_id"; + public static final int EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX = 1; + public static final String TO_EMPRESA_PRECO_SERVICO_TIPO_ID = "to_empresa_preco_servico_tipo_id"; + public static final String TO_EMPRESA_PRECO_SERVICO_TIPO_ID_FULL = "empresa_preco_servico.to_empresa_preco_servico_tipo_id"; + public static final int TO_EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX = 2; + public static final String EMPRESA_PRECO_PERIODICIDADE_TIPO_ID = "empresa_preco_periodicidade_tipo_id"; + public static final String EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_FULL = "empresa_preco_servico.empresa_preco_periodicidade_tipo_id"; + public static final int EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX = 3; + public static final String TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID = "to_empresa_preco_periodicidade_tipo_id"; + public static final String TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_FULL = "empresa_preco_servico.to_empresa_preco_periodicidade_tipo_id"; + public static final int TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX = 4; + public static final String TIPO_OUTRO = "tipo_outro"; + public static final String TIPO_OUTRO_FULL = "empresa_preco_servico.tipo_outro"; + public static final int TIPO_OUTRO_INDEX = 5; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "empresa_preco_servico.empresa_id"; + public static final int EMPRESA_ID_INDEX = 6; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final String TO_EMPRESA_ID_FULL = "empresa_preco_servico.to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 7; + public static final String VALOR = "valor"; + public static final String VALOR_FULL = "empresa_preco_servico.valor"; + public static final int VALOR_INDEX = 8; + public static final String INICIADO = "iniciado"; + public static final String INICIADO_FULL = "empresa_preco_servico.iniciado"; + public static final int INICIADO_INDEX = 9; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "empresa_preco_servico.activo"; + public static final int ACTIVO_INDEX = 10; + + public static final String FIELD_NAMES[] = new String[]{ + EMPRESA_PRECO_SERVICO_TIPO_ID, TO_EMPRESA_PRECO_SERVICO_TIPO_ID, + EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, + TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, TIPO_OUTRO, EMPRESA_ID, + TO_EMPRESA_ID, VALOR, INICIADO, ACTIVO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + EMPRESA_PRECO_SERVICO_TIPO_ID, TABLENAME + "." + TO_EMPRESA_PRECO_SERVICO_TIPO_ID, + TABLENAME + "." + EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, + TABLENAME + "." + TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, TABLENAME + "." + TIPO_OUTRO, TABLENAME + "." + EMPRESA_ID, + TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + VALOR, TABLENAME + "." + INICIADO, TABLENAME + "." + ACTIVO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, EMPRESA_PRECO_SERVICO_TIPO_ID, EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, + TIPO_OUTRO, EMPRESA_ID, VALOR, INICIADO, ACTIVO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, EMPRESA_PRECO_SERVICO_TIPO_ID, EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, + TIPO_OUTRO, EMPRESA_ID, VALOR, INICIADO, ACTIVO, }; + + private Integer id; + private Integer empresa_preco_servico_tipo_id; + private db.data.siprp_local.outer.EmpresaPrecoServicoTipoData to_empresa_preco_servico_tipo_id; + private Integer empresa_preco_periodicidade_tipo_id; + private db.data.siprp_local.outer.EmpresaPrecoPeriodicidadeTipoData to_empresa_preco_periodicidade_tipo_id; + private String tipo_outro; + private Integer empresa_id; + private db.data.siprp_local.outer.EmpresasData to_empresa_id; + private Double valor; + private java.sql.Timestamp iniciado; + private Boolean activo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EmpresaPrecoServico() + { + 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 Integer getEmpresa_preco_servico_tipo_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( EMPRESA_PRECO_SERVICO_TIPO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.empresa_preco_servico_tipo_id; + } + + public void setEmpresa_preco_servico_tipo_id( Integer empresa_preco_servico_tipo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( EMPRESA_PRECO_SERVICO_TIPO_ID, empresa_preco_servico_tipo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.empresa_preco_servico_tipo_id = empresa_preco_servico_tipo_id; + LAZY_LOADED_OBJECTS.put( EMPRESA_PRECO_SERVICO_TIPO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EmpresaPrecoServicoTipoData toEmpresa_preco_servico_tipo_id() + { + try + { + prepare( TO_EMPRESA_PRECO_SERVICO_TIPO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_preco_servico_tipo_id; + } + + public void setToEmpresa_preco_servico_tipo_id( db.data.siprp_local.outer.EmpresaPrecoServicoTipoData to_empresa_preco_servico_tipo_id ) + { + try + { + preProcess( TO_EMPRESA_PRECO_SERVICO_TIPO_ID, to_empresa_preco_servico_tipo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_empresa_preco_servico_tipo_id = to_empresa_preco_servico_tipo_id; + } + + public Integer getEmpresa_preco_periodicidade_tipo_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( EMPRESA_PRECO_PERIODICIDADE_TIPO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.empresa_preco_periodicidade_tipo_id; + } + + public void setEmpresa_preco_periodicidade_tipo_id( Integer empresa_preco_periodicidade_tipo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, empresa_preco_periodicidade_tipo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.empresa_preco_periodicidade_tipo_id = empresa_preco_periodicidade_tipo_id; + LAZY_LOADED_OBJECTS.put( EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EmpresaPrecoPeriodicidadeTipoData toEmpresa_preco_periodicidade_tipo_id() + { + try + { + prepare( TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_preco_periodicidade_tipo_id; + } + + public void setToEmpresa_preco_periodicidade_tipo_id( db.data.siprp_local.outer.EmpresaPrecoPeriodicidadeTipoData to_empresa_preco_periodicidade_tipo_id ) + { + try + { + preProcess( TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID, to_empresa_preco_periodicidade_tipo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_empresa_preco_periodicidade_tipo_id = to_empresa_preco_periodicidade_tipo_id; + } + + public String getTipo_outro() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TIPO_OUTRO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tipo_outro; + } + + public void setTipo_outro( String tipo_outro ) + { + try + { + setLockedForRefresh( true ); + preProcess( TIPO_OUTRO, tipo_outro ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tipo_outro = tipo_outro; + LAZY_LOADED_OBJECTS.put( TIPO_OUTRO, 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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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 Double getValor() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.valor; + } + + public void setValor( Double valor ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALOR, valor ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.valor = valor; + LAZY_LOADED_OBJECTS.put( VALOR, Boolean.TRUE ); + } + + public java.sql.Timestamp getIniciado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( INICIADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.iniciado; + } + + public void setIniciado( java.sql.Timestamp iniciado ) + { + try + { + setLockedForRefresh( true ); + preProcess( INICIADO, iniciado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.iniciado = iniciado; + LAZY_LOADED_OBJECTS.put( INICIADO, Boolean.TRUE ); + } + + public Boolean getActivo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACTIVO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.activo; + } + + public void setActivo( Boolean 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 EmpresaPrecoServico.ID_INDEX: + value = getId(); + break; + case EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + value = getEmpresa_preco_servico_tipo_id(); + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + value = toEmpresa_preco_servico_tipo_id(); + break; + case EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + value = getEmpresa_preco_periodicidade_tipo_id(); + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + value = toEmpresa_preco_periodicidade_tipo_id(); + break; + case EmpresaPrecoServico.TIPO_OUTRO_INDEX: + value = getTipo_outro(); + break; + case EmpresaPrecoServico.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case EmpresaPrecoServico.TO_EMPRESA_ID_INDEX: + value = toEmpresa_id(); + break; + case EmpresaPrecoServico.VALOR_INDEX: + value = getValor(); + break; + case EmpresaPrecoServico.INICIADO_INDEX: + value = getIniciado(); + break; + case EmpresaPrecoServico.ACTIVO_INDEX: + value = getActivo(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoServico.ID_INDEX: + value = this.id; + break; + case EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + value = this.empresa_preco_servico_tipo_id; + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + value = this.to_empresa_preco_servico_tipo_id; + break; + case EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + value = this.empresa_preco_periodicidade_tipo_id; + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + value = this.to_empresa_preco_periodicidade_tipo_id; + break; + case EmpresaPrecoServico.TIPO_OUTRO_INDEX: + value = this.tipo_outro; + break; + case EmpresaPrecoServico.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case EmpresaPrecoServico.TO_EMPRESA_ID_INDEX: + value = this.to_empresa_id; + break; + case EmpresaPrecoServico.VALOR_INDEX: + value = this.valor; + break; + case EmpresaPrecoServico.INICIADO_INDEX: + value = this.iniciado; + break; + case EmpresaPrecoServico.ACTIVO_INDEX: + value = this.activo; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoServico.ID_INDEX: + setId( ( Integer ) value ); + break; + case EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + setEmpresa_preco_servico_tipo_id( ( Integer ) value ); + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + setToEmpresa_preco_servico_tipo_id( ( db.data.siprp_local.outer.EmpresaPrecoServicoTipoData ) value ); + break; + case EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + setEmpresa_preco_periodicidade_tipo_id( ( Integer ) value ); + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + setToEmpresa_preco_periodicidade_tipo_id( ( db.data.siprp_local.outer.EmpresaPrecoPeriodicidadeTipoData ) value ); + break; + case EmpresaPrecoServico.TIPO_OUTRO_INDEX: + setTipo_outro( ( String ) value ); + break; + case EmpresaPrecoServico.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case EmpresaPrecoServico.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( db.data.siprp_local.outer.EmpresasData ) value ); + break; + case EmpresaPrecoServico.VALOR_INDEX: + setValor( ( Double ) value ); + break; + case EmpresaPrecoServico.INICIADO_INDEX: + setIniciado( ( java.sql.Timestamp ) value ); + break; + case EmpresaPrecoServico.ACTIVO_INDEX: + setActivo( ( Boolean ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoServico.ID_INDEX: + this.id = ( Integer ) value; + break; + case EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + this.empresa_preco_servico_tipo_id = ( Integer ) value; + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + this.to_empresa_preco_servico_tipo_id = ( db.data.siprp_local.outer.EmpresaPrecoServicoTipoData ) value; + break; + case EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + this.empresa_preco_periodicidade_tipo_id = ( Integer ) value; + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + this.to_empresa_preco_periodicidade_tipo_id = ( db.data.siprp_local.outer.EmpresaPrecoPeriodicidadeTipoData ) value; + break; + case EmpresaPrecoServico.TIPO_OUTRO_INDEX: + this.tipo_outro = ( String ) value; + break; + case EmpresaPrecoServico.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case EmpresaPrecoServico.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( db.data.siprp_local.outer.EmpresasData ) value; + break; + case EmpresaPrecoServico.VALOR_INDEX: + this.valor = ( Double ) value; + break; + case EmpresaPrecoServico.INICIADO_INDEX: + this.iniciado = ( java.sql.Timestamp ) value; + break; + case EmpresaPrecoServico.ACTIVO_INDEX: + this.activo = ( 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 EmpresaPrecoServico.ID_INDEX: + theClass = Integer.class; + break; + case EmpresaPrecoServico.EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + theClass = Integer.class; + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_SERVICO_TIPO_ID_INDEX: + theClass = db.data.siprp_local.outer.EmpresaPrecoServicoTipoData.class; + break; + case EmpresaPrecoServico.EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + theClass = Integer.class; + break; + case EmpresaPrecoServico.TO_EMPRESA_PRECO_PERIODICIDADE_TIPO_ID_INDEX: + theClass = db.data.siprp_local.outer.EmpresaPrecoPeriodicidadeTipoData.class; + break; + case EmpresaPrecoServico.TIPO_OUTRO_INDEX: + theClass = String.class; + break; + case EmpresaPrecoServico.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case EmpresaPrecoServico.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.outer.EmpresasData.class; + break; + case EmpresaPrecoServico.VALOR_INDEX: + theClass = Double.class; + break; + case EmpresaPrecoServico.INICIADO_INDEX: + theClass = java.sql.Timestamp.class; + break; + case EmpresaPrecoServico.ACTIVO_INDEX: + theClass = Boolean.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EmpresaPrecoServico._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, EmpresaPrecoServico.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EmpresaPrecoServicoTipo.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EmpresaPrecoServicoTipo.java new file mode 100644 index 00000000..2e4a8ec7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EmpresaPrecoServicoTipo.java @@ -0,0 +1,297 @@ +/* +* EmpresaPrecoServicoTipo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EmpresaPrecoServicoTipo extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EmpresaPrecoServicoTipo.ID, EmpresaPrecoServicoTipo.ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServicoTipo.ID_FULL, EmpresaPrecoServicoTipo.ID_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServicoTipo.NOME, EmpresaPrecoServicoTipo.NOME_INDEX ); + FIELD_INDEXES.put( EmpresaPrecoServicoTipo.NOME_FULL, EmpresaPrecoServicoTipo.NOME_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "empresa_preco_servico_tipo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.empresa_preco_servico_tipo"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "empresa_preco_servico_tipo.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "empresa_preco_servico_tipo.nome"; + public static final int NOME_INDEX = 1; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, }; + + private Integer id; + private String nome; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EmpresaPrecoServicoTipo() + { + 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.ListfromEmpresaPrecoServico_empresa_preco_servico_tipo_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.EmpresaPrecoServicoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.EmpresaPrecoServicoData.class , getPrimaryKey().getMap().get("id"), "empresa_preco_servico_tipo_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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoServicoTipo.ID_INDEX: + value = getId(); + break; + case EmpresaPrecoServicoTipo.NOME_INDEX: + value = getNome(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoServicoTipo.ID_INDEX: + value = this.id; + break; + case EmpresaPrecoServicoTipo.NOME_INDEX: + value = this.nome; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoServicoTipo.ID_INDEX: + setId( ( Integer ) value ); + break; + case EmpresaPrecoServicoTipo.NOME_INDEX: + setNome( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmpresaPrecoServicoTipo.ID_INDEX: + this.id = ( Integer ) value; + break; + case EmpresaPrecoServicoTipo.NOME_INDEX: + this.nome = ( 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 EmpresaPrecoServicoTipo.ID_INDEX: + theClass = Integer.class; + break; + case EmpresaPrecoServicoTipo.NOME_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EmpresaPrecoServicoTipo._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, EmpresaPrecoServicoTipo.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Empresas.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Empresas.java new file mode 100644 index 00000000..eefab0ba --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Empresas.java @@ -0,0 +1,2776 @@ +/* +* Empresas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Empresas extends com.evolute.entity.evo.EvoDataObject +{ + 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.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 ); + FIELD_INDEXES.put( Empresas.CODIGO_RELATORIO_UNICO, Empresas.CODIGO_RELATORIO_UNICO_INDEX ); + FIELD_INDEXES.put( Empresas.CODIGO_RELATORIO_UNICO_FULL, Empresas.CODIGO_RELATORIO_UNICO_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, db.data.siprp_local.outer.ContactosData.class, db.data.siprp_local.outer.ContactosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycontacto_2Tocontactos = + new com.evolute.entity.ForeignKey( Empresas.class, Empresas.CONTACTO_2, db.data.siprp_local.outer.ContactosData.class, db.data.siprp_local.outer.ContactosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_logo_idToimage = + new com.evolute.entity.ForeignKey( Empresas.class, Empresas.EMPRESA_LOGO_ID, db.data.siprp_local.outer.ImageData.class, db.data.siprp_local.outer.ImageData.ID ); + + public static final String TABLENAME = "empresas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.empresas"; + + 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 String TO_CONTACTO_1_FULL = "empresas.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 String TO_CONTACTO_2_FULL = "empresas.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 PERIODICIDADE = "periodicidade"; + public static final String PERIODICIDADE_FULL = "empresas.periodicidade"; + public static final int PERIODICIDADE_INDEX = 32; + public static final String ACTIVIDADE = "actividade"; + public static final String ACTIVIDADE_FULL = "empresas.actividade"; + public static final int ACTIVIDADE_INDEX = 33; + public static final String ACTUALIZACAO = "actualizacao"; + public static final String ACTUALIZACAO_FULL = "empresas.actualizacao"; + public static final int ACTUALIZACAO_INDEX = 34; + 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 = 35; + 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 = 36; + 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 = 37; + 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 = 38; + 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 = 39; + 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 = 40; + public static final String DURACAO = "duracao"; + public static final String DURACAO_FULL = "empresas.duracao"; + public static final int DURACAO_INDEX = 41; + 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 = 42; + 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 = 43; + public static final String TO_EMPRESA_LOGO_ID = "to_empresa_logo_id"; + public static final String TO_EMPRESA_LOGO_ID_FULL = "empresas.to_empresa_logo_id"; + public static final int TO_EMPRESA_LOGO_ID_INDEX = 44; + 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 = 45; + public static final String CODIGO_RELATORIO_UNICO = "codigo_relatorio_unico"; + public static final String CODIGO_RELATORIO_UNICO_FULL = "empresas.codigo_relatorio_unico"; + public static final int CODIGO_RELATORIO_UNICO_INDEX = 46; + + 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, 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, CODIGO_RELATORIO_UNICO, }; + + 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 + "." + 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, TABLENAME + "." + CODIGO_RELATORIO_UNICO, }; + + 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, 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, CODIGO_RELATORIO_UNICO, }; + + + 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, 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, CODIGO_RELATORIO_UNICO, }; + + 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 db.data.siprp_local.outer.ContactosData to_contacto_1; + private Integer contacto_2; + private db.data.siprp_local.outer.ContactosData to_contacto_2; + private java.util.Date data_relatorio_anual; + 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 db.data.siprp_local.outer.ImageData to_empresa_logo_id; + private Boolean imprimir_tabela_alargada; + private String codigo_relatorio_unico; + + 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 }; + } + + 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 = new java.util.LinkedList< db.data.siprp_local.outer.AvisosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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.ListfromEmpresaPrecoServico_empresa_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.EmpresaPrecoServicoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.EmpresaPrecoServicoData.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 = new java.util.LinkedList< db.data.siprp_local.outer.EstabelecimentosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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.ListfromFilFileEmpresa_empresa_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.FilFileEmpresaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.FilFileEmpresaData.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsAreaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsEmailEmpresaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsLegislacaoEmpresaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsNormalizacaoEmpresaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsRiscoEmpresaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.LembretesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.MarcacoesEmpresaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.PrtElementosProtocoloData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 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 db.data.siprp_local.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( db.data.siprp_local.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 String getCodigo_relatorio_unico() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CODIGO_RELATORIO_UNICO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.codigo_relatorio_unico; + } + + public void setCodigo_relatorio_unico( String codigo_relatorio_unico ) + { + try + { + setLockedForRefresh( true ); + preProcess( CODIGO_RELATORIO_UNICO, codigo_relatorio_unico ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.codigo_relatorio_unico = codigo_relatorio_unico; + LAZY_LOADED_OBJECTS.put( CODIGO_RELATORIO_UNICO, 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.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; + case Empresas.CODIGO_RELATORIO_UNICO_INDEX: + value = getCodigo_relatorio_unico(); + 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.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; + case Empresas.CODIGO_RELATORIO_UNICO_INDEX: + value = this.codigo_relatorio_unico; + 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( ( db.data.siprp_local.outer.ContactosData ) value ); + break; + case Empresas.CONTACTO_2_INDEX: + setContacto_2( ( Integer ) value ); + break; + case Empresas.TO_CONTACTO_2_INDEX: + setToContacto_2( ( db.data.siprp_local.outer.ContactosData ) value ); + break; + case Empresas.DATA_RELATORIO_ANUAL_INDEX: + setData_relatorio_anual( ( java.util.Date ) 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( ( db.data.siprp_local.outer.ImageData ) value ); + break; + case Empresas.IMPRIMIR_TABELA_ALARGADA_INDEX: + setImprimir_tabela_alargada( ( Boolean ) value ); + break; + case Empresas.CODIGO_RELATORIO_UNICO_INDEX: + setCodigo_relatorio_unico( ( String ) 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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.outer.ContactosData ) value; + break; + case Empresas.DATA_RELATORIO_ANUAL_INDEX: + this.data_relatorio_anual = ( java.util.Date ) 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 = ( db.data.siprp_local.outer.ImageData ) value; + break; + case Empresas.IMPRIMIR_TABELA_ALARGADA_INDEX: + this.imprimir_tabela_alargada = ( Boolean ) value; + break; + case Empresas.CODIGO_RELATORIO_UNICO_INDEX: + this.codigo_relatorio_unico = ( 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 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 = db.data.siprp_local.outer.ContactosData.class; + break; + case Empresas.CONTACTO_2_INDEX: + theClass = Integer.class; + break; + case Empresas.TO_CONTACTO_2_INDEX: + theClass = db.data.siprp_local.outer.ContactosData.class; + break; + case Empresas.DATA_RELATORIO_ANUAL_INDEX: + theClass = java.util.Date.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 = db.data.siprp_local.outer.ImageData.class; + break; + case Empresas.IMPRIMIR_TABELA_ALARGADA_INDEX: + theClass = Boolean.class; + break; + case Empresas.CODIGO_RELATORIO_UNICO_INDEX: + theClass = String.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, ( 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Errors.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Errors.java new file mode 100644 index 00000000..0649e573 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class Errors extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.errors"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "errors.id"; + public static final int ID_INDEX = 0; + public static final String DATE = "date"; + public static final String DATE_FULL = "errors.date"; + public static final int DATE_INDEX = 1; + public static final String TYPE = "type"; + public static final String TYPE_FULL = "errors.type"; + public static final int TYPE_INDEX = 2; + public static final String ENVIRONMENT = "environment"; + public static final String ENVIRONMENT_FULL = "errors.environment"; + public static final int ENVIRONMENT_INDEX = 3; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "errors.description"; + public static final int DESCRIPTION_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DATE, TYPE, ENVIRONMENT, DESCRIPTION, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATE, TABLENAME + "." + TYPE, TABLENAME + "." + ENVIRONMENT, TABLENAME + "." + DESCRIPTION, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATE, TYPE, ENVIRONMENT, DESCRIPTION, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATE, TYPE, ENVIRONMENT, DESCRIPTION, }; + + private Integer id; + private java.sql.Timestamp date; + private String type; + private String environment; + private String description; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Errors() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Estabelecimentos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Estabelecimentos.java new file mode 100644 index 00000000..5f258172 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Estabelecimentos.java @@ -0,0 +1,1380 @@ +/* +* Estabelecimentos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Estabelecimentos extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedico_idTomedicos = + new com.evolute.entity.ForeignKey( Estabelecimentos.class, Estabelecimentos.MEDICO_ID, db.data.siprp_local.outer.MedicosData.class, db.data.siprp_local.outer.MedicosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_consulta_idToprestadores = + new com.evolute.entity.ForeignKey( Estabelecimentos.class, Estabelecimentos.PRESTADOR_CONSULTA_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_ecds_idToprestadores = + new com.evolute.entity.ForeignKey( Estabelecimentos.class, Estabelecimentos.PRESTADOR_ECDS_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycontacto_idTocontactos = + new com.evolute.entity.ForeignKey( Estabelecimentos.class, Estabelecimentos.CONTACTO_ID, db.data.siprp_local.outer.ContactosData.class, db.data.siprp_local.outer.ContactosData.ID ); + + public static final String TABLENAME = "estabelecimentos"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.estabelecimentos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "estabelecimentos.id"; + public static final int ID_INDEX = 0; + public static final String 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 String TO_EMPRESA_ID_FULL = "estabelecimentos.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 String TO_MEDICO_ID_FULL = "estabelecimentos.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 String TO_PRESTADOR_CONSULTA_ID_FULL = "estabelecimentos.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 String TO_PRESTADOR_ECDS_ID_FULL = "estabelecimentos.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 String TO_CONTACTO_ID_FULL = "estabelecimentos.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 db.data.siprp_local.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 db.data.siprp_local.outer.MedicosData to_medico_id; + private Integer prestador_consulta_id; + private db.data.siprp_local.outer.PrestadoresData to_prestador_consulta_id; + private Integer prestador_ecds_id; + private db.data.siprp_local.outer.PrestadoresData to_prestador_ecds_id; + private Integer contacto_id; + private db.data.siprp_local.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.ListfromAptSegurancaAlimentar_estabelecimento_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.AptSegurancaAlimentarData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.AptSegurancaAlimentarData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromAvisos_estabelecimento_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.AvisosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.EmailPlanoDeActuacaoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HistoricoEstabelecimentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsEmailEstabelecimentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsLegislacaoEstabelecimentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsNormalizacaoEstabelecimentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsPostoEstabelecimentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.LembretesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.MarcacoesEstabelecimentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.outer.PrestadoresData ) value ); + break; + case Estabelecimentos.CONTACTO_ID_INDEX: + setContacto_id( ( Integer ) value ); + break; + case Estabelecimentos.TO_CONTACTO_ID_INDEX: + setToContacto_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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 = db.data.siprp_local.outer.MedicosData.class; + break; + case Estabelecimentos.PRESTADOR_CONSULTA_ID_INDEX: + theClass = Integer.class; + break; + case Estabelecimentos.TO_PRESTADOR_CONSULTA_ID_INDEX: + theClass = db.data.siprp_local.outer.PrestadoresData.class; + break; + case Estabelecimentos.PRESTADOR_ECDS_ID_INDEX: + theClass = Integer.class; + break; + case Estabelecimentos.TO_PRESTADOR_ECDS_ID_INDEX: + theClass = db.data.siprp_local.outer.PrestadoresData.class; + break; + case Estabelecimentos.CONTACTO_ID_INDEX: + theClass = Integer.class; + break; + case Estabelecimentos.TO_CONTACTO_ID_INDEX: + theClass = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Etiquetas.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Etiquetas.java new file mode 100644 index 00000000..676abf37 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class Etiquetas extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.etiquetas"; + + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoPessoa.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoPessoa.java new file mode 100644 index 00000000..b69fad50 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoPessoa.java @@ -0,0 +1,920 @@ +/* +* EvoPessoa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EvoPessoa extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EvoPessoa.ID, EvoPessoa.ID_INDEX ); + FIELD_INDEXES.put( EvoPessoa.ID_FULL, EvoPessoa.ID_INDEX ); + FIELD_INDEXES.put( EvoPessoa.NOME, EvoPessoa.NOME_INDEX ); + FIELD_INDEXES.put( EvoPessoa.NOME_FULL, EvoPessoa.NOME_INDEX ); + FIELD_INDEXES.put( EvoPessoa.MORADA, EvoPessoa.MORADA_INDEX ); + FIELD_INDEXES.put( EvoPessoa.MORADA_FULL, EvoPessoa.MORADA_INDEX ); + FIELD_INDEXES.put( EvoPessoa.CIDADE, EvoPessoa.CIDADE_INDEX ); + FIELD_INDEXES.put( EvoPessoa.CIDADE_FULL, EvoPessoa.CIDADE_INDEX ); + FIELD_INDEXES.put( EvoPessoa.LOCALIDADE, EvoPessoa.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( EvoPessoa.LOCALIDADE_FULL, EvoPessoa.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( EvoPessoa.CODIGO_POSTAL, EvoPessoa.CODIGO_POSTAL_INDEX ); + FIELD_INDEXES.put( EvoPessoa.CODIGO_POSTAL_FULL, EvoPessoa.CODIGO_POSTAL_INDEX ); + FIELD_INDEXES.put( EvoPessoa.EMAIL, EvoPessoa.EMAIL_INDEX ); + FIELD_INDEXES.put( EvoPessoa.EMAIL_FULL, EvoPessoa.EMAIL_INDEX ); + FIELD_INDEXES.put( EvoPessoa.TELEFONE, EvoPessoa.TELEFONE_INDEX ); + FIELD_INDEXES.put( EvoPessoa.TELEFONE_FULL, EvoPessoa.TELEFONE_INDEX ); + FIELD_INDEXES.put( EvoPessoa.TELEMOVEL, EvoPessoa.TELEMOVEL_INDEX ); + FIELD_INDEXES.put( EvoPessoa.TELEMOVEL_FULL, EvoPessoa.TELEMOVEL_INDEX ); + FIELD_INDEXES.put( EvoPessoa.DATA_NASCIMENTO, EvoPessoa.DATA_NASCIMENTO_INDEX ); + FIELD_INDEXES.put( EvoPessoa.DATA_NASCIMENTO_FULL, EvoPessoa.DATA_NASCIMENTO_INDEX ); + FIELD_INDEXES.put( EvoPessoa.NATURALIDADE, EvoPessoa.NATURALIDADE_INDEX ); + FIELD_INDEXES.put( EvoPessoa.NATURALIDADE_FULL, EvoPessoa.NATURALIDADE_INDEX ); + FIELD_INDEXES.put( EvoPessoa.NACIONALIDADE_ID, EvoPessoa.NACIONALIDADE_ID_INDEX ); + FIELD_INDEXES.put( EvoPessoa.NACIONALIDADE_ID_FULL, EvoPessoa.NACIONALIDADE_ID_INDEX ); + FIELD_INDEXES.put( EvoPessoa.SEXO, EvoPessoa.SEXO_INDEX ); + FIELD_INDEXES.put( EvoPessoa.SEXO_FULL, EvoPessoa.SEXO_INDEX ); + FIELD_INDEXES.put( EvoPessoa.PROFISSAO, EvoPessoa.PROFISSAO_INDEX ); + FIELD_INDEXES.put( EvoPessoa.PROFISSAO_FULL, EvoPessoa.PROFISSAO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "evo_pessoa"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.evo_pessoa"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "evo_pessoa.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "evo_pessoa.nome"; + public static final int NOME_INDEX = 1; + public static final String MORADA = "morada"; + public static final String MORADA_FULL = "evo_pessoa.morada"; + public static final int MORADA_INDEX = 2; + public static final String CIDADE = "cidade"; + public static final String CIDADE_FULL = "evo_pessoa.cidade"; + public static final int CIDADE_INDEX = 3; + public static final String LOCALIDADE = "localidade"; + public static final String LOCALIDADE_FULL = "evo_pessoa.localidade"; + public static final int LOCALIDADE_INDEX = 4; + public static final String CODIGO_POSTAL = "codigo_postal"; + public static final String CODIGO_POSTAL_FULL = "evo_pessoa.codigo_postal"; + public static final int CODIGO_POSTAL_INDEX = 5; + public static final String EMAIL = "email"; + public static final String EMAIL_FULL = "evo_pessoa.email"; + public static final int EMAIL_INDEX = 6; + public static final String TELEFONE = "telefone"; + public static final String TELEFONE_FULL = "evo_pessoa.telefone"; + public static final int TELEFONE_INDEX = 7; + public static final String TELEMOVEL = "telemovel"; + public static final String TELEMOVEL_FULL = "evo_pessoa.telemovel"; + public static final int TELEMOVEL_INDEX = 8; + public static final String DATA_NASCIMENTO = "data_nascimento"; + public static final String DATA_NASCIMENTO_FULL = "evo_pessoa.data_nascimento"; + public static final int DATA_NASCIMENTO_INDEX = 9; + public static final String NATURALIDADE = "naturalidade"; + public static final String NATURALIDADE_FULL = "evo_pessoa.naturalidade"; + public static final int NATURALIDADE_INDEX = 10; + public static final String NACIONALIDADE_ID = "nacionalidade_id"; + public static final String NACIONALIDADE_ID_FULL = "evo_pessoa.nacionalidade_id"; + public static final int NACIONALIDADE_ID_INDEX = 11; + public static final String SEXO = "sexo"; + public static final String SEXO_FULL = "evo_pessoa.sexo"; + public static final int SEXO_INDEX = 12; + public static final String PROFISSAO = "profissao"; + public static final String PROFISSAO_FULL = "evo_pessoa.profissao"; + public static final int PROFISSAO_INDEX = 13; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, MORADA, CIDADE, LOCALIDADE, CODIGO_POSTAL, EMAIL, TELEFONE, TELEMOVEL, + DATA_NASCIMENTO, NATURALIDADE, NACIONALIDADE_ID, SEXO, PROFISSAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + MORADA, TABLENAME + "." + CIDADE, TABLENAME + "." + LOCALIDADE, TABLENAME + "." + CODIGO_POSTAL, TABLENAME + "." + EMAIL, TABLENAME + "." + TELEFONE, TABLENAME + "." + TELEMOVEL, + TABLENAME + "." + DATA_NASCIMENTO, TABLENAME + "." + NATURALIDADE, TABLENAME + "." + NACIONALIDADE_ID, TABLENAME + "." + SEXO, TABLENAME + "." + PROFISSAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, MORADA, CIDADE, LOCALIDADE, CODIGO_POSTAL, EMAIL, TELEFONE, TELEMOVEL, + DATA_NASCIMENTO, NATURALIDADE, NACIONALIDADE_ID, SEXO, PROFISSAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, MORADA, CIDADE, LOCALIDADE, CODIGO_POSTAL, EMAIL, TELEFONE, TELEMOVEL, + DATA_NASCIMENTO, NATURALIDADE, NACIONALIDADE_ID, SEXO, PROFISSAO, }; + + private Integer id; + private String nome; + private String morada; + private String cidade; + private String localidade; + private String codigo_postal; + private String email; + private String telefone; + private Integer telemovel; + private java.util.Date data_nascimento; + private String naturalidade; + private Integer nacionalidade_id; + private String sexo; + private String profissao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EvoPessoa() + { + 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.ListfromPesPessoaDocumento_pessoa_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.PesPessoaDocumentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.PesPessoaDocumentoData.class , getPrimaryKey().getMap().get("id"), "pessoa_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromTrabalhadores_pessoa_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.TrabalhadoresData.class , getPrimaryKey().getMap().get("id"), "pessoa_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 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 getCidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.cidade; + } + + public void setCidade( String cidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( CIDADE, cidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.cidade = cidade; + LAZY_LOADED_OBJECTS.put( CIDADE, 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 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 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 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 Integer getTelemovel() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TELEMOVEL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.telemovel; + } + + public void setTelemovel( Integer 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 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 getNaturalidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NATURALIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.naturalidade; + } + + public void setNaturalidade( String naturalidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( NATURALIDADE, naturalidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.naturalidade = naturalidade; + LAZY_LOADED_OBJECTS.put( NATURALIDADE, Boolean.TRUE ); + } + + public Integer getNacionalidade_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NACIONALIDADE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nacionalidade_id; + } + + public void setNacionalidade_id( Integer nacionalidade_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( NACIONALIDADE_ID, nacionalidade_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nacionalidade_id = nacionalidade_id; + LAZY_LOADED_OBJECTS.put( NACIONALIDADE_ID, 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 String getProfissao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROFISSAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.profissao; + } + + public void setProfissao( String profissao ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROFISSAO, profissao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.profissao = profissao; + LAZY_LOADED_OBJECTS.put( PROFISSAO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoPessoa.ID_INDEX: + value = getId(); + break; + case EvoPessoa.NOME_INDEX: + value = getNome(); + break; + case EvoPessoa.MORADA_INDEX: + value = getMorada(); + break; + case EvoPessoa.CIDADE_INDEX: + value = getCidade(); + break; + case EvoPessoa.LOCALIDADE_INDEX: + value = getLocalidade(); + break; + case EvoPessoa.CODIGO_POSTAL_INDEX: + value = getCodigo_postal(); + break; + case EvoPessoa.EMAIL_INDEX: + value = getEmail(); + break; + case EvoPessoa.TELEFONE_INDEX: + value = getTelefone(); + break; + case EvoPessoa.TELEMOVEL_INDEX: + value = getTelemovel(); + break; + case EvoPessoa.DATA_NASCIMENTO_INDEX: + value = getData_nascimento(); + break; + case EvoPessoa.NATURALIDADE_INDEX: + value = getNaturalidade(); + break; + case EvoPessoa.NACIONALIDADE_ID_INDEX: + value = getNacionalidade_id(); + break; + case EvoPessoa.SEXO_INDEX: + value = getSexo(); + break; + case EvoPessoa.PROFISSAO_INDEX: + value = getProfissao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoPessoa.ID_INDEX: + value = this.id; + break; + case EvoPessoa.NOME_INDEX: + value = this.nome; + break; + case EvoPessoa.MORADA_INDEX: + value = this.morada; + break; + case EvoPessoa.CIDADE_INDEX: + value = this.cidade; + break; + case EvoPessoa.LOCALIDADE_INDEX: + value = this.localidade; + break; + case EvoPessoa.CODIGO_POSTAL_INDEX: + value = this.codigo_postal; + break; + case EvoPessoa.EMAIL_INDEX: + value = this.email; + break; + case EvoPessoa.TELEFONE_INDEX: + value = this.telefone; + break; + case EvoPessoa.TELEMOVEL_INDEX: + value = this.telemovel; + break; + case EvoPessoa.DATA_NASCIMENTO_INDEX: + value = this.data_nascimento; + break; + case EvoPessoa.NATURALIDADE_INDEX: + value = this.naturalidade; + break; + case EvoPessoa.NACIONALIDADE_ID_INDEX: + value = this.nacionalidade_id; + break; + case EvoPessoa.SEXO_INDEX: + value = this.sexo; + break; + case EvoPessoa.PROFISSAO_INDEX: + value = this.profissao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoPessoa.ID_INDEX: + setId( ( Integer ) value ); + break; + case EvoPessoa.NOME_INDEX: + setNome( ( String ) value ); + break; + case EvoPessoa.MORADA_INDEX: + setMorada( ( String ) value ); + break; + case EvoPessoa.CIDADE_INDEX: + setCidade( ( String ) value ); + break; + case EvoPessoa.LOCALIDADE_INDEX: + setLocalidade( ( String ) value ); + break; + case EvoPessoa.CODIGO_POSTAL_INDEX: + setCodigo_postal( ( String ) value ); + break; + case EvoPessoa.EMAIL_INDEX: + setEmail( ( String ) value ); + break; + case EvoPessoa.TELEFONE_INDEX: + setTelefone( ( String ) value ); + break; + case EvoPessoa.TELEMOVEL_INDEX: + setTelemovel( ( Integer ) value ); + break; + case EvoPessoa.DATA_NASCIMENTO_INDEX: + setData_nascimento( ( java.util.Date ) value ); + break; + case EvoPessoa.NATURALIDADE_INDEX: + setNaturalidade( ( String ) value ); + break; + case EvoPessoa.NACIONALIDADE_ID_INDEX: + setNacionalidade_id( ( Integer ) value ); + break; + case EvoPessoa.SEXO_INDEX: + setSexo( ( String ) value ); + break; + case EvoPessoa.PROFISSAO_INDEX: + setProfissao( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoPessoa.ID_INDEX: + this.id = ( Integer ) value; + break; + case EvoPessoa.NOME_INDEX: + this.nome = ( String ) value; + break; + case EvoPessoa.MORADA_INDEX: + this.morada = ( String ) value; + break; + case EvoPessoa.CIDADE_INDEX: + this.cidade = ( String ) value; + break; + case EvoPessoa.LOCALIDADE_INDEX: + this.localidade = ( String ) value; + break; + case EvoPessoa.CODIGO_POSTAL_INDEX: + this.codigo_postal = ( String ) value; + break; + case EvoPessoa.EMAIL_INDEX: + this.email = ( String ) value; + break; + case EvoPessoa.TELEFONE_INDEX: + this.telefone = ( String ) value; + break; + case EvoPessoa.TELEMOVEL_INDEX: + this.telemovel = ( Integer ) value; + break; + case EvoPessoa.DATA_NASCIMENTO_INDEX: + this.data_nascimento = ( java.util.Date ) value; + break; + case EvoPessoa.NATURALIDADE_INDEX: + this.naturalidade = ( String ) value; + break; + case EvoPessoa.NACIONALIDADE_ID_INDEX: + this.nacionalidade_id = ( Integer ) value; + break; + case EvoPessoa.SEXO_INDEX: + this.sexo = ( String ) value; + break; + case EvoPessoa.PROFISSAO_INDEX: + this.profissao = ( 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 EvoPessoa.ID_INDEX: + theClass = Integer.class; + break; + case EvoPessoa.NOME_INDEX: + theClass = String.class; + break; + case EvoPessoa.MORADA_INDEX: + theClass = String.class; + break; + case EvoPessoa.CIDADE_INDEX: + theClass = String.class; + break; + case EvoPessoa.LOCALIDADE_INDEX: + theClass = String.class; + break; + case EvoPessoa.CODIGO_POSTAL_INDEX: + theClass = String.class; + break; + case EvoPessoa.EMAIL_INDEX: + theClass = String.class; + break; + case EvoPessoa.TELEFONE_INDEX: + theClass = String.class; + break; + case EvoPessoa.TELEMOVEL_INDEX: + theClass = Integer.class; + break; + case EvoPessoa.DATA_NASCIMENTO_INDEX: + theClass = java.util.Date.class; + break; + case EvoPessoa.NATURALIDADE_INDEX: + theClass = String.class; + break; + case EvoPessoa.NACIONALIDADE_ID_INDEX: + theClass = Integer.class; + break; + case EvoPessoa.SEXO_INDEX: + theClass = String.class; + break; + case EvoPessoa.PROFISSAO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EvoPessoa._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, EvoPessoa.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUpdate.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUpdate.java new file mode 100644 index 00000000..e3bab506 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUpdate.java @@ -0,0 +1,330 @@ +/* +* EvoUpdate.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EvoUpdate extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EvoUpdate.ID, EvoUpdate.ID_INDEX ); + FIELD_INDEXES.put( EvoUpdate.ID_FULL, EvoUpdate.ID_INDEX ); + FIELD_INDEXES.put( EvoUpdate.TIME, EvoUpdate.TIME_INDEX ); + FIELD_INDEXES.put( EvoUpdate.TIME_FULL, EvoUpdate.TIME_INDEX ); + FIELD_INDEXES.put( EvoUpdate.DUMMY, EvoUpdate.DUMMY_INDEX ); + FIELD_INDEXES.put( EvoUpdate.DUMMY_FULL, EvoUpdate.DUMMY_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "evo_update"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.evo_update"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "evo_update.id"; + public static final int ID_INDEX = 0; + public static final String TIME = "time"; + public static final String TIME_FULL = "evo_update.time"; + public static final int TIME_INDEX = 1; + public static final String DUMMY = "dummy"; + public static final String DUMMY_FULL = "evo_update.dummy"; + public static final int DUMMY_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + TIME, DUMMY, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TIME, TABLENAME + "." + DUMMY, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TIME, DUMMY, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TIME, DUMMY, }; + + private Integer id; + private java.sql.Timestamp time; + private Integer dummy; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EvoUpdate() + { + 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.sql.Timestamp getTime() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TIME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.time; + } + + public void setTime( java.sql.Timestamp time ) + { + try + { + setLockedForRefresh( true ); + preProcess( TIME, time ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.time = time; + LAZY_LOADED_OBJECTS.put( TIME, Boolean.TRUE ); + } + + public Integer getDummy() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DUMMY ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.dummy; + } + + public void setDummy( Integer dummy ) + { + try + { + setLockedForRefresh( true ); + preProcess( DUMMY, dummy ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.dummy = dummy; + LAZY_LOADED_OBJECTS.put( DUMMY, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUpdate.ID_INDEX: + value = getId(); + break; + case EvoUpdate.TIME_INDEX: + value = getTime(); + break; + case EvoUpdate.DUMMY_INDEX: + value = getDummy(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUpdate.ID_INDEX: + value = this.id; + break; + case EvoUpdate.TIME_INDEX: + value = this.time; + break; + case EvoUpdate.DUMMY_INDEX: + value = this.dummy; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUpdate.ID_INDEX: + setId( ( Integer ) value ); + break; + case EvoUpdate.TIME_INDEX: + setTime( ( java.sql.Timestamp ) value ); + break; + case EvoUpdate.DUMMY_INDEX: + setDummy( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUpdate.ID_INDEX: + this.id = ( Integer ) value; + break; + case EvoUpdate.TIME_INDEX: + this.time = ( java.sql.Timestamp ) value; + break; + case EvoUpdate.DUMMY_INDEX: + this.dummy = ( 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 EvoUpdate.ID_INDEX: + theClass = Integer.class; + break; + case EvoUpdate.TIME_INDEX: + theClass = java.sql.Timestamp.class; + break; + case EvoUpdate.DUMMY_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EvoUpdate._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, EvoUpdate.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrPermission.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrPermission.java new file mode 100644 index 00000000..4a0d7263 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrPermission.java @@ -0,0 +1,448 @@ +/* +* EvoUsrPermission.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EvoUsrPermission extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EvoUsrPermission.ID, EvoUsrPermission.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.ID_FULL, EvoUsrPermission.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.CLASS_, EvoUsrPermission.CLASS__INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.CLASS__FULL, EvoUsrPermission.CLASS__INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.KEY, EvoUsrPermission.KEY_INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.KEY_FULL, EvoUsrPermission.KEY_INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.DESCRIPTION, EvoUsrPermission.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.DESCRIPTION_FULL, EvoUsrPermission.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.DELETED_DATE, EvoUsrPermission.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( EvoUsrPermission.DELETED_DATE_FULL, EvoUsrPermission.DELETED_DATE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "evo_usr_permission"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.evo_usr_permission"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "evo_usr_permission.id"; + public static final int ID_INDEX = 0; + public static final String CLASS_ = "class"; + public static final String CLASS__FULL = "evo_usr_permission.class"; + public static final int CLASS__INDEX = 1; + public static final String KEY = "key"; + public static final String KEY_FULL = "evo_usr_permission.key"; + public static final int KEY_INDEX = 2; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "evo_usr_permission.description"; + public static final int DESCRIPTION_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "evo_usr_permission.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + CLASS_, KEY, DESCRIPTION, DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + CLASS_, TABLENAME + "." + KEY, TABLENAME + "." + DESCRIPTION, TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, CLASS_, KEY, DESCRIPTION, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, CLASS_, KEY, DESCRIPTION, DELETED_DATE, }; + + private Integer id; + private String class_; + private String key; + private String description; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EvoUsrPermission() + { + 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.ListfromEvoUsrRolesPermissions_permission_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.EvoUsrRolesPermissionsData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.EvoUsrRolesPermissionsData.class , getPrimaryKey().getMap().get("id"), "permission_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public String getClass_() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CLASS_ ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.class_; + } + + public void setClass_( String class_ ) + { + try + { + setLockedForRefresh( true ); + preProcess( CLASS_, class_ ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.class_ = class_; + LAZY_LOADED_OBJECTS.put( CLASS_, Boolean.TRUE ); + } + + public String getKey() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( KEY ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.key; + } + + public void setKey( String key ) + { + try + { + setLockedForRefresh( true ); + preProcess( KEY, key ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.key = key; + LAZY_LOADED_OBJECTS.put( KEY, 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 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 EvoUsrPermission.ID_INDEX: + value = getId(); + break; + case EvoUsrPermission.CLASS__INDEX: + value = getClass_(); + break; + case EvoUsrPermission.KEY_INDEX: + value = getKey(); + break; + case EvoUsrPermission.DESCRIPTION_INDEX: + value = getDescription(); + break; + case EvoUsrPermission.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrPermission.ID_INDEX: + value = this.id; + break; + case EvoUsrPermission.CLASS__INDEX: + value = this.class_; + break; + case EvoUsrPermission.KEY_INDEX: + value = this.key; + break; + case EvoUsrPermission.DESCRIPTION_INDEX: + value = this.description; + break; + case EvoUsrPermission.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrPermission.ID_INDEX: + setId( ( Integer ) value ); + break; + case EvoUsrPermission.CLASS__INDEX: + setClass_( ( String ) value ); + break; + case EvoUsrPermission.KEY_INDEX: + setKey( ( String ) value ); + break; + case EvoUsrPermission.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + case EvoUsrPermission.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrPermission.ID_INDEX: + this.id = ( Integer ) value; + break; + case EvoUsrPermission.CLASS__INDEX: + this.class_ = ( String ) value; + break; + case EvoUsrPermission.KEY_INDEX: + this.key = ( String ) value; + break; + case EvoUsrPermission.DESCRIPTION_INDEX: + this.description = ( String ) value; + break; + case EvoUsrPermission.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 EvoUsrPermission.ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrPermission.CLASS__INDEX: + theClass = String.class; + break; + case EvoUsrPermission.KEY_INDEX: + theClass = String.class; + break; + case EvoUsrPermission.DESCRIPTION_INDEX: + theClass = String.class; + break; + case EvoUsrPermission.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 : EvoUsrPermission._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, EvoUsrPermission.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrPreferences.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrPreferences.java new file mode 100644 index 00000000..1c79a8f0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrPreferences.java @@ -0,0 +1,481 @@ +/* +* EvoUsrPreferences.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EvoUsrPreferences extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EvoUsrPreferences.ID, EvoUsrPreferences.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrPreferences.ID_FULL, EvoUsrPreferences.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrPreferences.DELETED_STAMP, EvoUsrPreferences.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( EvoUsrPreferences.DELETED_STAMP_FULL, EvoUsrPreferences.DELETED_STAMP_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( EvoUsrPreferences.CLASS_IDENTIFIER, EvoUsrPreferences.USER_ID, EvoUsrPreferences.TO_USER_ID ); + FIELD_INDEXES.put( EvoUsrPreferences.USER_ID, EvoUsrPreferences.USER_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrPreferences.USER_ID_FULL, EvoUsrPreferences.USER_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrPreferences.TO_USER_ID, EvoUsrPreferences.TO_USER_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrPreferences.PROPERTY, EvoUsrPreferences.PROPERTY_INDEX ); + FIELD_INDEXES.put( EvoUsrPreferences.PROPERTY_FULL, EvoUsrPreferences.PROPERTY_INDEX ); + FIELD_INDEXES.put( EvoUsrPreferences.VALUE, EvoUsrPreferences.VALUE_INDEX ); + FIELD_INDEXES.put( EvoUsrPreferences.VALUE_FULL, EvoUsrPreferences.VALUE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyuser_idToevo_usr_user = + new com.evolute.entity.ForeignKey( EvoUsrPreferences.class, EvoUsrPreferences.USER_ID, db.data.siprp_local.outer.EvoUsrUserData.class, db.data.siprp_local.outer.EvoUsrUserData.ID ); + + public static final String TABLENAME = "evo_usr_preferences"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.evo_usr_preferences"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "evo_usr_preferences.id"; + public static final int ID_INDEX = 0; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "evo_usr_preferences.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 1; + public static final String USER_ID = "user_id"; + public static final String USER_ID_FULL = "evo_usr_preferences.user_id"; + public static final int USER_ID_INDEX = 2; + public static final String TO_USER_ID = "to_user_id"; + public static final String TO_USER_ID_FULL = "evo_usr_preferences.to_user_id"; + public static final int TO_USER_ID_INDEX = 3; + public static final String PROPERTY = "property"; + public static final String PROPERTY_FULL = "evo_usr_preferences.property"; + public static final int PROPERTY_INDEX = 4; + public static final String VALUE = "value"; + public static final String VALUE_FULL = "evo_usr_preferences.value"; + public static final int VALUE_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + DELETED_STAMP, USER_ID, TO_USER_ID, PROPERTY, VALUE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DELETED_STAMP, TABLENAME + "." + USER_ID, TABLENAME + "." + TO_USER_ID, TABLENAME + "." + PROPERTY, TABLENAME + "." + VALUE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DELETED_STAMP, USER_ID, PROPERTY, VALUE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DELETED_STAMP, USER_ID, PROPERTY, VALUE, }; + + private Integer id; + private java.sql.Timestamp deleted_stamp; + private Integer user_id; + private db.data.siprp_local.outer.EvoUsrUserData to_user_id; + private String property; + private String value; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EvoUsrPreferences() + { + 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.sql.Timestamp getDeleted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_stamp; + } + + public void setDeleted_stamp( java.sql.Timestamp deleted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_STAMP, deleted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_stamp = deleted_stamp; + LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); + } + + public Integer getUser_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( USER_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.user_id; + } + + public void setUser_id( Integer user_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( USER_ID, user_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.user_id = user_id; + LAZY_LOADED_OBJECTS.put( USER_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EvoUsrUserData toUser_id() + { + try + { + prepare( TO_USER_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_user_id; + } + + public void setToUser_id( db.data.siprp_local.outer.EvoUsrUserData to_user_id ) + { + try + { + preProcess( TO_USER_ID, to_user_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_user_id = to_user_id; + } + + public String getProperty() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROPERTY ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.property; + } + + public void setProperty( String property ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROPERTY, property ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.property = property; + LAZY_LOADED_OBJECTS.put( PROPERTY, Boolean.TRUE ); + } + + public String getValue() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALUE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.value; + } + + public void setValue( String value ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALUE, value ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.value = value; + LAZY_LOADED_OBJECTS.put( VALUE, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrPreferences.ID_INDEX: + value = getId(); + break; + case EvoUsrPreferences.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + break; + case EvoUsrPreferences.USER_ID_INDEX: + value = getUser_id(); + break; + case EvoUsrPreferences.TO_USER_ID_INDEX: + value = toUser_id(); + break; + case EvoUsrPreferences.PROPERTY_INDEX: + value = getProperty(); + break; + case EvoUsrPreferences.VALUE_INDEX: + value = getValue(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrPreferences.ID_INDEX: + value = this.id; + break; + case EvoUsrPreferences.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + case EvoUsrPreferences.USER_ID_INDEX: + value = this.user_id; + break; + case EvoUsrPreferences.TO_USER_ID_INDEX: + value = this.to_user_id; + break; + case EvoUsrPreferences.PROPERTY_INDEX: + value = this.property; + break; + case EvoUsrPreferences.VALUE_INDEX: + value = this.value; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrPreferences.ID_INDEX: + setId( ( Integer ) value ); + break; + case EvoUsrPreferences.DELETED_STAMP_INDEX: + setDeleted_stamp( ( java.sql.Timestamp ) value ); + break; + case EvoUsrPreferences.USER_ID_INDEX: + setUser_id( ( Integer ) value ); + break; + case EvoUsrPreferences.TO_USER_ID_INDEX: + setToUser_id( ( db.data.siprp_local.outer.EvoUsrUserData ) value ); + break; + case EvoUsrPreferences.PROPERTY_INDEX: + setProperty( ( String ) value ); + break; + case EvoUsrPreferences.VALUE_INDEX: + setValue( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrPreferences.ID_INDEX: + this.id = ( Integer ) value; + break; + case EvoUsrPreferences.DELETED_STAMP_INDEX: + this.deleted_stamp = ( java.sql.Timestamp ) value; + break; + case EvoUsrPreferences.USER_ID_INDEX: + this.user_id = ( Integer ) value; + break; + case EvoUsrPreferences.TO_USER_ID_INDEX: + this.to_user_id = ( db.data.siprp_local.outer.EvoUsrUserData ) value; + break; + case EvoUsrPreferences.PROPERTY_INDEX: + this.property = ( String ) value; + break; + case EvoUsrPreferences.VALUE_INDEX: + this.value = ( 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 EvoUsrPreferences.ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrPreferences.DELETED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + case EvoUsrPreferences.USER_ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrPreferences.TO_USER_ID_INDEX: + theClass = db.data.siprp_local.outer.EvoUsrUserData.class; + break; + case EvoUsrPreferences.PROPERTY_INDEX: + theClass = String.class; + break; + case EvoUsrPreferences.VALUE_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EvoUsrPreferences._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, EvoUsrPreferences.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrRole.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrRole.java new file mode 100644 index 00000000..fe1dd2bb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrRole.java @@ -0,0 +1,364 @@ +/* +* EvoUsrRole.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EvoUsrRole extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EvoUsrRole.ID, EvoUsrRole.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRole.ID_FULL, EvoUsrRole.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRole.NAME, EvoUsrRole.NAME_INDEX ); + FIELD_INDEXES.put( EvoUsrRole.NAME_FULL, EvoUsrRole.NAME_INDEX ); + FIELD_INDEXES.put( EvoUsrRole.DELETED_STAMP, EvoUsrRole.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( EvoUsrRole.DELETED_STAMP_FULL, EvoUsrRole.DELETED_STAMP_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "evo_usr_role"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.evo_usr_role"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "evo_usr_role.id"; + public static final int ID_INDEX = 0; + public static final String NAME = "name"; + public static final String NAME_FULL = "evo_usr_role.name"; + public static final int NAME_INDEX = 1; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "evo_usr_role.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + NAME, DELETED_STAMP, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NAME, TABLENAME + "." + DELETED_STAMP, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NAME, DELETED_STAMP, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NAME, DELETED_STAMP, }; + + private Integer id; + private String name; + private java.sql.Timestamp deleted_stamp; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EvoUsrRole() + { + 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.ListfromEvoUsrRolesPermissions_role_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.EvoUsrRolesPermissionsData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.EvoUsrRolesPermissionsData.class , getPrimaryKey().getMap().get("id"), "role_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromEvoUsrUsersRoles_role_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.EvoUsrUsersRolesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.EvoUsrUsersRolesData.class , getPrimaryKey().getMap().get("id"), "role_id" ); + } + 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 java.sql.Timestamp getDeleted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_stamp; + } + + public void setDeleted_stamp( java.sql.Timestamp deleted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_STAMP, deleted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_stamp = deleted_stamp; + LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrRole.ID_INDEX: + value = getId(); + break; + case EvoUsrRole.NAME_INDEX: + value = getName(); + break; + case EvoUsrRole.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrRole.ID_INDEX: + value = this.id; + break; + case EvoUsrRole.NAME_INDEX: + value = this.name; + break; + case EvoUsrRole.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrRole.ID_INDEX: + setId( ( Integer ) value ); + break; + case EvoUsrRole.NAME_INDEX: + setName( ( String ) value ); + break; + case EvoUsrRole.DELETED_STAMP_INDEX: + setDeleted_stamp( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrRole.ID_INDEX: + this.id = ( Integer ) value; + break; + case EvoUsrRole.NAME_INDEX: + this.name = ( String ) value; + break; + case EvoUsrRole.DELETED_STAMP_INDEX: + this.deleted_stamp = ( java.sql.Timestamp ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case EvoUsrRole.ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrRole.NAME_INDEX: + theClass = String.class; + break; + case EvoUsrRole.DELETED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EvoUsrRole._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, EvoUsrRole.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrRolesPermissions.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrRolesPermissions.java new file mode 100644 index 00000000..960ed704 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrRolesPermissions.java @@ -0,0 +1,481 @@ +/* +* EvoUsrRolesPermissions.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EvoUsrRolesPermissions extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( EvoUsrRolesPermissions.CLASS_IDENTIFIER, EvoUsrRolesPermissions.ROLE_ID, EvoUsrRolesPermissions.TO_ROLE_ID ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.ROLE_ID, EvoUsrRolesPermissions.ROLE_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.ROLE_ID_FULL, EvoUsrRolesPermissions.ROLE_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.TO_ROLE_ID, EvoUsrRolesPermissions.TO_ROLE_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( EvoUsrRolesPermissions.CLASS_IDENTIFIER, EvoUsrRolesPermissions.PERMISSION_ID, EvoUsrRolesPermissions.TO_PERMISSION_ID ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.PERMISSION_ID, EvoUsrRolesPermissions.PERMISSION_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.PERMISSION_ID_FULL, EvoUsrRolesPermissions.PERMISSION_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.TO_PERMISSION_ID, EvoUsrRolesPermissions.TO_PERMISSION_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.ID, EvoUsrRolesPermissions.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.ID_FULL, EvoUsrRolesPermissions.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.REMOVE, EvoUsrRolesPermissions.REMOVE_INDEX ); + FIELD_INDEXES.put( EvoUsrRolesPermissions.REMOVE_FULL, EvoUsrRolesPermissions.REMOVE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyrole_idToevo_usr_role = + new com.evolute.entity.ForeignKey( EvoUsrRolesPermissions.class, EvoUsrRolesPermissions.ROLE_ID, db.data.siprp_local.outer.EvoUsrRoleData.class, db.data.siprp_local.outer.EvoUsrRoleData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeypermission_idToevo_usr_permission = + new com.evolute.entity.ForeignKey( EvoUsrRolesPermissions.class, EvoUsrRolesPermissions.PERMISSION_ID, db.data.siprp_local.outer.EvoUsrPermissionData.class, db.data.siprp_local.outer.EvoUsrPermissionData.ID ); + + public static final String TABLENAME = "evo_usr_roles_permissions"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.evo_usr_roles_permissions"; + + public static final int _INVALID__INDEX = -1; + public static final String ROLE_ID = "role_id"; + public static final String ROLE_ID_FULL = "evo_usr_roles_permissions.role_id"; + public static final int ROLE_ID_INDEX = 0; + public static final String TO_ROLE_ID = "to_role_id"; + public static final String TO_ROLE_ID_FULL = "evo_usr_roles_permissions.to_role_id"; + public static final int TO_ROLE_ID_INDEX = 1; + public static final String PERMISSION_ID = "permission_id"; + public static final String PERMISSION_ID_FULL = "evo_usr_roles_permissions.permission_id"; + public static final int PERMISSION_ID_INDEX = 2; + public static final String TO_PERMISSION_ID = "to_permission_id"; + public static final String TO_PERMISSION_ID_FULL = "evo_usr_roles_permissions.to_permission_id"; + public static final int TO_PERMISSION_ID_INDEX = 3; + public static final String ID = "id"; + public static final String ID_FULL = "evo_usr_roles_permissions.id"; + public static final int ID_INDEX = 4; + public static final String REMOVE = "remove"; + public static final String REMOVE_FULL = "evo_usr_roles_permissions.remove"; + public static final int REMOVE_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + ROLE_ID, TO_ROLE_ID, PERMISSION_ID, TO_PERMISSION_ID, REMOVE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ROLE_ID, TABLENAME + "." + TO_ROLE_ID, TABLENAME + "." + PERMISSION_ID, TABLENAME + "." + TO_PERMISSION_ID, TABLENAME + "." + REMOVE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ROLE_ID, PERMISSION_ID, ID, REMOVE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ROLE_ID, PERMISSION_ID, ID, REMOVE, }; + + private Integer role_id; + private db.data.siprp_local.outer.EvoUsrRoleData to_role_id; + private Integer permission_id; + private db.data.siprp_local.outer.EvoUsrPermissionData to_permission_id; + private Integer id; + private Boolean remove; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EvoUsrRolesPermissions() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false, false }; + } + + public Integer getRole_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ROLE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.role_id; + } + + public void setRole_id( Integer role_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ROLE_ID, role_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.role_id = role_id; + LAZY_LOADED_OBJECTS.put( ROLE_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EvoUsrRoleData toRole_id() + { + try + { + prepare( TO_ROLE_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_role_id; + } + + public void setToRole_id( db.data.siprp_local.outer.EvoUsrRoleData to_role_id ) + { + try + { + preProcess( TO_ROLE_ID, to_role_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_role_id = to_role_id; + } + + public Integer getPermission_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PERMISSION_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.permission_id; + } + + public void setPermission_id( Integer permission_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PERMISSION_ID, permission_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.permission_id = permission_id; + LAZY_LOADED_OBJECTS.put( PERMISSION_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EvoUsrPermissionData toPermission_id() + { + try + { + prepare( TO_PERMISSION_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_permission_id; + } + + public void setToPermission_id( db.data.siprp_local.outer.EvoUsrPermissionData to_permission_id ) + { + try + { + preProcess( TO_PERMISSION_ID, to_permission_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_permission_id = to_permission_id; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 Boolean getRemove() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( REMOVE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.remove; + } + + public void setRemove( Boolean remove ) + { + try + { + setLockedForRefresh( true ); + preProcess( REMOVE, remove ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.remove = remove; + LAZY_LOADED_OBJECTS.put( REMOVE, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrRolesPermissions.ROLE_ID_INDEX: + value = getRole_id(); + break; + case EvoUsrRolesPermissions.TO_ROLE_ID_INDEX: + value = toRole_id(); + break; + case EvoUsrRolesPermissions.PERMISSION_ID_INDEX: + value = getPermission_id(); + break; + case EvoUsrRolesPermissions.TO_PERMISSION_ID_INDEX: + value = toPermission_id(); + break; + case EvoUsrRolesPermissions.ID_INDEX: + value = getId(); + break; + case EvoUsrRolesPermissions.REMOVE_INDEX: + value = getRemove(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrRolesPermissions.ROLE_ID_INDEX: + value = this.role_id; + break; + case EvoUsrRolesPermissions.TO_ROLE_ID_INDEX: + value = this.to_role_id; + break; + case EvoUsrRolesPermissions.PERMISSION_ID_INDEX: + value = this.permission_id; + break; + case EvoUsrRolesPermissions.TO_PERMISSION_ID_INDEX: + value = this.to_permission_id; + break; + case EvoUsrRolesPermissions.ID_INDEX: + value = this.id; + break; + case EvoUsrRolesPermissions.REMOVE_INDEX: + value = this.remove; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrRolesPermissions.ROLE_ID_INDEX: + setRole_id( ( Integer ) value ); + break; + case EvoUsrRolesPermissions.TO_ROLE_ID_INDEX: + setToRole_id( ( db.data.siprp_local.outer.EvoUsrRoleData ) value ); + break; + case EvoUsrRolesPermissions.PERMISSION_ID_INDEX: + setPermission_id( ( Integer ) value ); + break; + case EvoUsrRolesPermissions.TO_PERMISSION_ID_INDEX: + setToPermission_id( ( db.data.siprp_local.outer.EvoUsrPermissionData ) value ); + break; + case EvoUsrRolesPermissions.ID_INDEX: + setId( ( Integer ) value ); + break; + case EvoUsrRolesPermissions.REMOVE_INDEX: + setRemove( ( Boolean ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrRolesPermissions.ROLE_ID_INDEX: + this.role_id = ( Integer ) value; + break; + case EvoUsrRolesPermissions.TO_ROLE_ID_INDEX: + this.to_role_id = ( db.data.siprp_local.outer.EvoUsrRoleData ) value; + break; + case EvoUsrRolesPermissions.PERMISSION_ID_INDEX: + this.permission_id = ( Integer ) value; + break; + case EvoUsrRolesPermissions.TO_PERMISSION_ID_INDEX: + this.to_permission_id = ( db.data.siprp_local.outer.EvoUsrPermissionData ) value; + break; + case EvoUsrRolesPermissions.ID_INDEX: + this.id = ( Integer ) value; + break; + case EvoUsrRolesPermissions.REMOVE_INDEX: + this.remove = ( 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 EvoUsrRolesPermissions.ROLE_ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrRolesPermissions.TO_ROLE_ID_INDEX: + theClass = db.data.siprp_local.outer.EvoUsrRoleData.class; + break; + case EvoUsrRolesPermissions.PERMISSION_ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrRolesPermissions.TO_PERMISSION_ID_INDEX: + theClass = db.data.siprp_local.outer.EvoUsrPermissionData.class; + break; + case EvoUsrRolesPermissions.ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrRolesPermissions.REMOVE_INDEX: + theClass = Boolean.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EvoUsrRolesPermissions._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, EvoUsrRolesPermissions.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrUser.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrUser.java new file mode 100644 index 00000000..141cd7f9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrUser.java @@ -0,0 +1,887 @@ +/* +* EvoUsrUser.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EvoUsrUser extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EvoUsrUser.ID, EvoUsrUser.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.ID_FULL, EvoUsrUser.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.LOGIN, EvoUsrUser.LOGIN_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.LOGIN_FULL, EvoUsrUser.LOGIN_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.NAME, EvoUsrUser.NAME_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.NAME_FULL, EvoUsrUser.NAME_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.CREATED_STAMP, EvoUsrUser.CREATED_STAMP_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.CREATED_STAMP_FULL, EvoUsrUser.CREATED_STAMP_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.DELETED_STAMP, EvoUsrUser.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.DELETED_STAMP_FULL, EvoUsrUser.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.PASSWORD, EvoUsrUser.PASSWORD_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.PASSWORD_FULL, EvoUsrUser.PASSWORD_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.PERSON_ID, EvoUsrUser.PERSON_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.PERSON_ID_FULL, EvoUsrUser.PERSON_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.DEVEL, EvoUsrUser.DEVEL_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.DEVEL_FULL, EvoUsrUser.DEVEL_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.ACTIVE, EvoUsrUser.ACTIVE_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.ACTIVE_FULL, EvoUsrUser.ACTIVE_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.EMAIL, EvoUsrUser.EMAIL_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.EMAIL_FULL, EvoUsrUser.EMAIL_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.TELEMOVEL, EvoUsrUser.TELEMOVEL_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.TELEMOVEL_FULL, EvoUsrUser.TELEMOVEL_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.TELEFONE, EvoUsrUser.TELEFONE_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.TELEFONE_FULL, EvoUsrUser.TELEFONE_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.USER_LEVEL, EvoUsrUser.USER_LEVEL_INDEX ); + FIELD_INDEXES.put( EvoUsrUser.USER_LEVEL_FULL, EvoUsrUser.USER_LEVEL_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "evo_usr_user"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.evo_usr_user"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "evo_usr_user.id"; + public static final int ID_INDEX = 0; + public static final String LOGIN = "login"; + public static final String LOGIN_FULL = "evo_usr_user.login"; + public static final int LOGIN_INDEX = 1; + public static final String NAME = "name"; + public static final String NAME_FULL = "evo_usr_user.name"; + public static final int NAME_INDEX = 2; + public static final String CREATED_STAMP = "created_stamp"; + public static final String CREATED_STAMP_FULL = "evo_usr_user.created_stamp"; + public static final int CREATED_STAMP_INDEX = 3; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "evo_usr_user.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 4; + public static final String PASSWORD = "password"; + public static final String PASSWORD_FULL = "evo_usr_user.password"; + public static final int PASSWORD_INDEX = 5; + public static final String PERSON_ID = "person_id"; + public static final String PERSON_ID_FULL = "evo_usr_user.person_id"; + public static final int PERSON_ID_INDEX = 6; + public static final String DEVEL = "devel"; + public static final String DEVEL_FULL = "evo_usr_user.devel"; + public static final int DEVEL_INDEX = 7; + public static final String ACTIVE = "active"; + public static final String ACTIVE_FULL = "evo_usr_user.active"; + public static final int ACTIVE_INDEX = 8; + public static final String EMAIL = "email"; + public static final String EMAIL_FULL = "evo_usr_user.email"; + public static final int EMAIL_INDEX = 9; + public static final String TELEMOVEL = "telemovel"; + public static final String TELEMOVEL_FULL = "evo_usr_user.telemovel"; + public static final int TELEMOVEL_INDEX = 10; + public static final String TELEFONE = "telefone"; + public static final String TELEFONE_FULL = "evo_usr_user.telefone"; + public static final int TELEFONE_INDEX = 11; + public static final String USER_LEVEL = "user_level"; + public static final String USER_LEVEL_FULL = "evo_usr_user.user_level"; + public static final int USER_LEVEL_INDEX = 12; + + public static final String FIELD_NAMES[] = new String[]{ + LOGIN, NAME, CREATED_STAMP, DELETED_STAMP, PASSWORD, PERSON_ID, DEVEL, ACTIVE, EMAIL, + TELEMOVEL, TELEFONE, USER_LEVEL, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + LOGIN, TABLENAME + "." + NAME, TABLENAME + "." + CREATED_STAMP, TABLENAME + "." + DELETED_STAMP, TABLENAME + "." + PASSWORD, TABLENAME + "." + PERSON_ID, TABLENAME + "." + DEVEL, TABLENAME + "." + ACTIVE, TABLENAME + "." + EMAIL, + TABLENAME + "." + TELEMOVEL, TABLENAME + "." + TELEFONE, TABLENAME + "." + USER_LEVEL, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, LOGIN, NAME, CREATED_STAMP, DELETED_STAMP, PASSWORD, PERSON_ID, DEVEL, ACTIVE, EMAIL, + TELEMOVEL, TELEFONE, USER_LEVEL, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, LOGIN, NAME, CREATED_STAMP, DELETED_STAMP, PASSWORD, PERSON_ID, DEVEL, ACTIVE, EMAIL, + TELEMOVEL, TELEFONE, USER_LEVEL, }; + + private Integer id; + private String login; + private String name; + private java.sql.Timestamp created_stamp; + private java.sql.Timestamp deleted_stamp; + private String password; + private Integer person_id; + private Boolean devel; + private Boolean active; + private String email; + private Integer telemovel; + private Integer telefone; + private Integer user_level; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EvoUsrUser() + { + 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.ListfromEvoUsrPreferences_user_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.EvoUsrPreferencesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.EvoUsrPreferencesData.class , getPrimaryKey().getMap().get("id"), "user_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromEvoUsrUsersRoles_user_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.EvoUsrUsersRolesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.EvoUsrUsersRolesData.class , getPrimaryKey().getMap().get("id"), "user_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromFilFile_user_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.FilFileData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.FilFileData.class , getPrimaryKey().getMap().get("id"), "user_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public String getLogin() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LOGIN ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.login; + } + + public void setLogin( String login ) + { + try + { + setLockedForRefresh( true ); + preProcess( LOGIN, login ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.login = login; + LAZY_LOADED_OBJECTS.put( LOGIN, Boolean.TRUE ); + } + + 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 java.sql.Timestamp getCreated_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CREATED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.created_stamp; + } + + public void setCreated_stamp( java.sql.Timestamp created_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( CREATED_STAMP, created_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.created_stamp = created_stamp; + LAZY_LOADED_OBJECTS.put( CREATED_STAMP, Boolean.TRUE ); + } + + public java.sql.Timestamp getDeleted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_stamp; + } + + public void setDeleted_stamp( java.sql.Timestamp deleted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_STAMP, deleted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_stamp = deleted_stamp; + LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); + } + + public String getPassword() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PASSWORD ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.password; + } + + public void setPassword( String password ) + { + try + { + setLockedForRefresh( true ); + preProcess( PASSWORD, password ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.password = password; + LAZY_LOADED_OBJECTS.put( PASSWORD, Boolean.TRUE ); + } + + public Integer getPerson_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PERSON_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.person_id; + } + + public void setPerson_id( Integer person_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PERSON_ID, person_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.person_id = person_id; + LAZY_LOADED_OBJECTS.put( PERSON_ID, Boolean.TRUE ); + } + + public Boolean getDevel() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DEVEL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.devel; + } + + public void setDevel( Boolean devel ) + { + try + { + setLockedForRefresh( true ); + preProcess( DEVEL, devel ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.devel = devel; + LAZY_LOADED_OBJECTS.put( DEVEL, Boolean.TRUE ); + } + + public Boolean getActive() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACTIVE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.active; + } + + public void setActive( Boolean active ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACTIVE, active ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.active = active; + LAZY_LOADED_OBJECTS.put( ACTIVE, 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 Integer getTelemovel() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TELEMOVEL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.telemovel; + } + + public void setTelemovel( Integer 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 Integer getTelefone() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TELEFONE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.telefone; + } + + public void setTelefone( Integer 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 Integer getUser_level() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( USER_LEVEL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.user_level; + } + + public void setUser_level( Integer user_level ) + { + try + { + setLockedForRefresh( true ); + preProcess( USER_LEVEL, user_level ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.user_level = user_level; + LAZY_LOADED_OBJECTS.put( USER_LEVEL, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrUser.ID_INDEX: + value = getId(); + break; + case EvoUsrUser.LOGIN_INDEX: + value = getLogin(); + break; + case EvoUsrUser.NAME_INDEX: + value = getName(); + break; + case EvoUsrUser.CREATED_STAMP_INDEX: + value = getCreated_stamp(); + break; + case EvoUsrUser.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + break; + case EvoUsrUser.PASSWORD_INDEX: + value = getPassword(); + break; + case EvoUsrUser.PERSON_ID_INDEX: + value = getPerson_id(); + break; + case EvoUsrUser.DEVEL_INDEX: + value = getDevel(); + break; + case EvoUsrUser.ACTIVE_INDEX: + value = getActive(); + break; + case EvoUsrUser.EMAIL_INDEX: + value = getEmail(); + break; + case EvoUsrUser.TELEMOVEL_INDEX: + value = getTelemovel(); + break; + case EvoUsrUser.TELEFONE_INDEX: + value = getTelefone(); + break; + case EvoUsrUser.USER_LEVEL_INDEX: + value = getUser_level(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrUser.ID_INDEX: + value = this.id; + break; + case EvoUsrUser.LOGIN_INDEX: + value = this.login; + break; + case EvoUsrUser.NAME_INDEX: + value = this.name; + break; + case EvoUsrUser.CREATED_STAMP_INDEX: + value = this.created_stamp; + break; + case EvoUsrUser.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + case EvoUsrUser.PASSWORD_INDEX: + value = this.password; + break; + case EvoUsrUser.PERSON_ID_INDEX: + value = this.person_id; + break; + case EvoUsrUser.DEVEL_INDEX: + value = this.devel; + break; + case EvoUsrUser.ACTIVE_INDEX: + value = this.active; + break; + case EvoUsrUser.EMAIL_INDEX: + value = this.email; + break; + case EvoUsrUser.TELEMOVEL_INDEX: + value = this.telemovel; + break; + case EvoUsrUser.TELEFONE_INDEX: + value = this.telefone; + break; + case EvoUsrUser.USER_LEVEL_INDEX: + value = this.user_level; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrUser.ID_INDEX: + setId( ( Integer ) value ); + break; + case EvoUsrUser.LOGIN_INDEX: + setLogin( ( String ) value ); + break; + case EvoUsrUser.NAME_INDEX: + setName( ( String ) value ); + break; + case EvoUsrUser.CREATED_STAMP_INDEX: + setCreated_stamp( ( java.sql.Timestamp ) value ); + break; + case EvoUsrUser.DELETED_STAMP_INDEX: + setDeleted_stamp( ( java.sql.Timestamp ) value ); + break; + case EvoUsrUser.PASSWORD_INDEX: + setPassword( ( String ) value ); + break; + case EvoUsrUser.PERSON_ID_INDEX: + setPerson_id( ( Integer ) value ); + break; + case EvoUsrUser.DEVEL_INDEX: + setDevel( ( Boolean ) value ); + break; + case EvoUsrUser.ACTIVE_INDEX: + setActive( ( Boolean ) value ); + break; + case EvoUsrUser.EMAIL_INDEX: + setEmail( ( String ) value ); + break; + case EvoUsrUser.TELEMOVEL_INDEX: + setTelemovel( ( Integer ) value ); + break; + case EvoUsrUser.TELEFONE_INDEX: + setTelefone( ( Integer ) value ); + break; + case EvoUsrUser.USER_LEVEL_INDEX: + setUser_level( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrUser.ID_INDEX: + this.id = ( Integer ) value; + break; + case EvoUsrUser.LOGIN_INDEX: + this.login = ( String ) value; + break; + case EvoUsrUser.NAME_INDEX: + this.name = ( String ) value; + break; + case EvoUsrUser.CREATED_STAMP_INDEX: + this.created_stamp = ( java.sql.Timestamp ) value; + break; + case EvoUsrUser.DELETED_STAMP_INDEX: + this.deleted_stamp = ( java.sql.Timestamp ) value; + break; + case EvoUsrUser.PASSWORD_INDEX: + this.password = ( String ) value; + break; + case EvoUsrUser.PERSON_ID_INDEX: + this.person_id = ( Integer ) value; + break; + case EvoUsrUser.DEVEL_INDEX: + this.devel = ( Boolean ) value; + break; + case EvoUsrUser.ACTIVE_INDEX: + this.active = ( Boolean ) value; + break; + case EvoUsrUser.EMAIL_INDEX: + this.email = ( String ) value; + break; + case EvoUsrUser.TELEMOVEL_INDEX: + this.telemovel = ( Integer ) value; + break; + case EvoUsrUser.TELEFONE_INDEX: + this.telefone = ( Integer ) value; + break; + case EvoUsrUser.USER_LEVEL_INDEX: + this.user_level = ( 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 EvoUsrUser.ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrUser.LOGIN_INDEX: + theClass = String.class; + break; + case EvoUsrUser.NAME_INDEX: + theClass = String.class; + break; + case EvoUsrUser.CREATED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + case EvoUsrUser.DELETED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + case EvoUsrUser.PASSWORD_INDEX: + theClass = String.class; + break; + case EvoUsrUser.PERSON_ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrUser.DEVEL_INDEX: + theClass = Boolean.class; + break; + case EvoUsrUser.ACTIVE_INDEX: + theClass = Boolean.class; + break; + case EvoUsrUser.EMAIL_INDEX: + theClass = String.class; + break; + case EvoUsrUser.TELEMOVEL_INDEX: + theClass = Integer.class; + break; + case EvoUsrUser.TELEFONE_INDEX: + theClass = Integer.class; + break; + case EvoUsrUser.USER_LEVEL_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EvoUsrUser._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, EvoUsrUser.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrUsersRoles.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrUsersRoles.java new file mode 100644 index 00000000..e2604c41 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/EvoUsrUsersRoles.java @@ -0,0 +1,431 @@ +/* +* EvoUsrUsersRoles.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class EvoUsrUsersRoles extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( EvoUsrUsersRoles.CLASS_IDENTIFIER, EvoUsrUsersRoles.USER_ID, EvoUsrUsersRoles.TO_USER_ID ); + FIELD_INDEXES.put( EvoUsrUsersRoles.USER_ID, EvoUsrUsersRoles.USER_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUsersRoles.USER_ID_FULL, EvoUsrUsersRoles.USER_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUsersRoles.TO_USER_ID, EvoUsrUsersRoles.TO_USER_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( EvoUsrUsersRoles.CLASS_IDENTIFIER, EvoUsrUsersRoles.ROLE_ID, EvoUsrUsersRoles.TO_ROLE_ID ); + FIELD_INDEXES.put( EvoUsrUsersRoles.ROLE_ID, EvoUsrUsersRoles.ROLE_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUsersRoles.ROLE_ID_FULL, EvoUsrUsersRoles.ROLE_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUsersRoles.TO_ROLE_ID, EvoUsrUsersRoles.TO_ROLE_ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUsersRoles.ID, EvoUsrUsersRoles.ID_INDEX ); + FIELD_INDEXES.put( EvoUsrUsersRoles.ID_FULL, EvoUsrUsersRoles.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 ForeignKeyuser_idToevo_usr_user = + new com.evolute.entity.ForeignKey( EvoUsrUsersRoles.class, EvoUsrUsersRoles.USER_ID, db.data.siprp_local.outer.EvoUsrUserData.class, db.data.siprp_local.outer.EvoUsrUserData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyrole_idToevo_usr_role = + new com.evolute.entity.ForeignKey( EvoUsrUsersRoles.class, EvoUsrUsersRoles.ROLE_ID, db.data.siprp_local.outer.EvoUsrRoleData.class, db.data.siprp_local.outer.EvoUsrRoleData.ID ); + + public static final String TABLENAME = "evo_usr_users_roles"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.evo_usr_users_roles"; + + public static final int _INVALID__INDEX = -1; + public static final String USER_ID = "user_id"; + public static final String USER_ID_FULL = "evo_usr_users_roles.user_id"; + public static final int USER_ID_INDEX = 0; + public static final String TO_USER_ID = "to_user_id"; + public static final String TO_USER_ID_FULL = "evo_usr_users_roles.to_user_id"; + public static final int TO_USER_ID_INDEX = 1; + public static final String ROLE_ID = "role_id"; + public static final String ROLE_ID_FULL = "evo_usr_users_roles.role_id"; + public static final int ROLE_ID_INDEX = 2; + public static final String TO_ROLE_ID = "to_role_id"; + public static final String TO_ROLE_ID_FULL = "evo_usr_users_roles.to_role_id"; + public static final int TO_ROLE_ID_INDEX = 3; + public static final String ID = "id"; + public static final String ID_FULL = "evo_usr_users_roles.id"; + public static final int ID_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + USER_ID, TO_USER_ID, ROLE_ID, TO_ROLE_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + USER_ID, TABLENAME + "." + TO_USER_ID, TABLENAME + "." + ROLE_ID, TABLENAME + "." + TO_ROLE_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + USER_ID, ROLE_ID, ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + USER_ID, ROLE_ID, ID, }; + + private Integer user_id; + private db.data.siprp_local.outer.EvoUsrUserData to_user_id; + private Integer role_id; + private db.data.siprp_local.outer.EvoUsrRoleData to_role_id; + private Integer id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EvoUsrUsersRoles() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false }; + } + + public Integer getUser_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( USER_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.user_id; + } + + public void setUser_id( Integer user_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( USER_ID, user_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.user_id = user_id; + LAZY_LOADED_OBJECTS.put( USER_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EvoUsrUserData toUser_id() + { + try + { + prepare( TO_USER_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_user_id; + } + + public void setToUser_id( db.data.siprp_local.outer.EvoUsrUserData to_user_id ) + { + try + { + preProcess( TO_USER_ID, to_user_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_user_id = to_user_id; + } + + public Integer getRole_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ROLE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.role_id; + } + + public void setRole_id( Integer role_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ROLE_ID, role_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.role_id = role_id; + LAZY_LOADED_OBJECTS.put( ROLE_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EvoUsrRoleData toRole_id() + { + try + { + prepare( TO_ROLE_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_role_id; + } + + public void setToRole_id( db.data.siprp_local.outer.EvoUsrRoleData to_role_id ) + { + try + { + preProcess( TO_ROLE_ID, to_role_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_role_id = to_role_id; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 EvoUsrUsersRoles.USER_ID_INDEX: + value = getUser_id(); + break; + case EvoUsrUsersRoles.TO_USER_ID_INDEX: + value = toUser_id(); + break; + case EvoUsrUsersRoles.ROLE_ID_INDEX: + value = getRole_id(); + break; + case EvoUsrUsersRoles.TO_ROLE_ID_INDEX: + value = toRole_id(); + break; + case EvoUsrUsersRoles.ID_INDEX: + value = getId(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrUsersRoles.USER_ID_INDEX: + value = this.user_id; + break; + case EvoUsrUsersRoles.TO_USER_ID_INDEX: + value = this.to_user_id; + break; + case EvoUsrUsersRoles.ROLE_ID_INDEX: + value = this.role_id; + break; + case EvoUsrUsersRoles.TO_ROLE_ID_INDEX: + value = this.to_role_id; + break; + case EvoUsrUsersRoles.ID_INDEX: + value = this.id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrUsersRoles.USER_ID_INDEX: + setUser_id( ( Integer ) value ); + break; + case EvoUsrUsersRoles.TO_USER_ID_INDEX: + setToUser_id( ( db.data.siprp_local.outer.EvoUsrUserData ) value ); + break; + case EvoUsrUsersRoles.ROLE_ID_INDEX: + setRole_id( ( Integer ) value ); + break; + case EvoUsrUsersRoles.TO_ROLE_ID_INDEX: + setToRole_id( ( db.data.siprp_local.outer.EvoUsrRoleData ) value ); + break; + case EvoUsrUsersRoles.ID_INDEX: + setId( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EvoUsrUsersRoles.USER_ID_INDEX: + this.user_id = ( Integer ) value; + break; + case EvoUsrUsersRoles.TO_USER_ID_INDEX: + this.to_user_id = ( db.data.siprp_local.outer.EvoUsrUserData ) value; + break; + case EvoUsrUsersRoles.ROLE_ID_INDEX: + this.role_id = ( Integer ) value; + break; + case EvoUsrUsersRoles.TO_ROLE_ID_INDEX: + this.to_role_id = ( db.data.siprp_local.outer.EvoUsrRoleData ) value; + break; + case EvoUsrUsersRoles.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 EvoUsrUsersRoles.USER_ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrUsersRoles.TO_USER_ID_INDEX: + theClass = db.data.siprp_local.outer.EvoUsrUserData.class; + break; + case EvoUsrUsersRoles.ROLE_ID_INDEX: + theClass = Integer.class; + break; + case EvoUsrUsersRoles.TO_ROLE_ID_INDEX: + theClass = db.data.siprp_local.outer.EvoUsrRoleData.class; + break; + case EvoUsrUsersRoles.ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EvoUsrUsersRoles._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, EvoUsrUsersRoles.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Exames.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Exames.java new file mode 100644 index 00000000..00b2ffab --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Exames.java @@ -0,0 +1,1241 @@ +/* +* Exames.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Exames extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + FIELD_INDEXES.put( Exames.IMPRESSO_STAMP, Exames.IMPRESSO_STAMP_INDEX ); + FIELD_INDEXES.put( Exames.IMPRESSO_STAMP_FULL, Exames.IMPRESSO_STAMP_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, db.data.siprp_local.outer.TrabalhadoresData.class, db.data.siprp_local.outer.TrabalhadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedico_idTomedicos = + new com.evolute.entity.ForeignKey( Exames.class, Exames.MEDICO_ID, db.data.siprp_local.outer.MedicosData.class, db.data.siprp_local.outer.MedicosData.ID ); + + public static final String TABLENAME = "exames"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.exames"; + + 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 String TO_TRABALHADOR_ID_FULL = "exames.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 String TO_MEDICO_ID_FULL = "exames.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 IMPRESSO_STAMP = "impresso_stamp"; + public static final String IMPRESSO_STAMP_FULL = "exames.impresso_stamp"; + public static final int IMPRESSO_STAMP_INDEX = 19; + + 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, + IMPRESSO_STAMP, }; + + 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, + TABLENAME + "." + IMPRESSO_STAMP, }; + + 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, IMPRESSO_STAMP, }; + + + 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, IMPRESSO_STAMP, }; + + 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 db.data.siprp_local.outer.TrabalhadoresData to_trabalhador_id; + private Integer medico_id; + private db.data.siprp_local.outer.MedicosData to_medico_id; + private byte[] pdf; + private byte[] fo; + private java.sql.Timestamp impresso_stamp; + + 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, + 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_exame_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.LembretesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.LembretesData.class , getPrimaryKey().getMap().get("id"), "exame_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromTrabalhadoresFichasAptidao_exame_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresFichasAptidaoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 java.sql.Timestamp getImpresso_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMPRESSO_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.impresso_stamp; + } + + public void setImpresso_stamp( java.sql.Timestamp impresso_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMPRESSO_STAMP, impresso_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.impresso_stamp = impresso_stamp; + LAZY_LOADED_OBJECTS.put( IMPRESSO_STAMP, 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; + case Exames.IMPRESSO_STAMP_INDEX: + value = getImpresso_stamp(); + 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; + case Exames.IMPRESSO_STAMP_INDEX: + value = this.impresso_stamp; + 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( ( db.data.siprp_local.outer.TrabalhadoresData ) value ); + break; + case Exames.MEDICO_ID_INDEX: + setMedico_id( ( Integer ) value ); + break; + case Exames.TO_MEDICO_ID_INDEX: + setToMedico_id( ( db.data.siprp_local.outer.MedicosData ) value ); + break; + case Exames.PDF_INDEX: + setPdf( ( byte[] ) value ); + break; + case Exames.FO_INDEX: + setFo( ( byte[] ) value ); + break; + case Exames.IMPRESSO_STAMP_INDEX: + setImpresso_stamp( ( java.sql.Timestamp ) 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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.outer.MedicosData ) value; + break; + case Exames.PDF_INDEX: + this.pdf = ( byte[] ) value; + break; + case Exames.FO_INDEX: + this.fo = ( byte[] ) value; + break; + case Exames.IMPRESSO_STAMP_INDEX: + this.impresso_stamp = ( java.sql.Timestamp ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case 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 = db.data.siprp_local.outer.TrabalhadoresData.class; + break; + case Exames.MEDICO_ID_INDEX: + theClass = Integer.class; + break; + case Exames.TO_MEDICO_ID_INDEX: + theClass = db.data.siprp_local.outer.MedicosData.class; + break; + case Exames.PDF_INDEX: + theClass = byte[].class; + break; + case Exames.FO_INDEX: + theClass = byte[].class; + break; + case Exames.IMPRESSO_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : 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, ( 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( 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/ExamesPerfis.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/ExamesPerfis.java new file mode 100644 index 00000000..678703c9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/ExamesPerfis.java @@ -0,0 +1,431 @@ +/* +* ExamesPerfis.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class ExamesPerfis extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TiposExamesCompData.class, db.data.siprp_local.outer.TiposExamesCompData.ID ); + + public static final String TABLENAME = "exames_perfis"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.exames_perfis"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "exames_perfis.id"; + public static final int ID_INDEX = 0; + public static final String PERFIL = "perfil"; + public static final String PERFIL_FULL = "exames_perfis.perfil"; + public static final int PERFIL_INDEX = 1; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "exames_perfis.tipo"; + public static final int TIPO_INDEX = 2; + public static final String TO_TIPO = "to_tipo"; + public static final String TO_TIPO_FULL = "exames_perfis.to_tipo"; + public static final int TO_TIPO_INDEX = 3; + public static final String MULTIPLICADOR = "multiplicador"; + public static final String MULTIPLICADOR_FULL = "exames_perfis.multiplicador"; + public static final int MULTIPLICADOR_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + PERFIL, TIPO, TO_TIPO, MULTIPLICADOR, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + PERFIL, TABLENAME + "." + TIPO, TABLENAME + "." + TO_TIPO, TABLENAME + "." + MULTIPLICADOR, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, PERFIL, TIPO, MULTIPLICADOR, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, PERFIL, TIPO, MULTIPLICADOR, }; + + private Integer id; + private Integer perfil; + private Integer tipo; + private db.data.siprp_local.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 db.data.siprp_local.outer.TiposExamesCompData toTipo() + { + try + { + prepare( TO_TIPO ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_tipo; + } + + public void setToTipo( db.data.siprp_local.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( ( db.data.siprp_local.outer.TiposExamesCompData ) value ); + break; + case ExamesPerfis.MULTIPLICADOR_INDEX: + setMultiplicador( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case ExamesPerfis.ID_INDEX: + this.id = ( Integer ) value; + break; + case ExamesPerfis.PERFIL_INDEX: + this.perfil = ( Integer ) value; + break; + case ExamesPerfis.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case ExamesPerfis.TO_TIPO_INDEX: + this.to_tipo = ( db.data.siprp_local.outer.TiposExamesCompData ) value; + break; + case ExamesPerfis.MULTIPLICADOR_INDEX: + this.multiplicador = ( Integer ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case ExamesPerfis.ID_INDEX: + theClass = Integer.class; + break; + case ExamesPerfis.PERFIL_INDEX: + theClass = Integer.class; + break; + case ExamesPerfis.TIPO_INDEX: + theClass = Integer.class; + break; + case ExamesPerfis.TO_TIPO_INDEX: + theClass = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/ExamesPortaria.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/ExamesPortaria.java new file mode 100644 index 00000000..9fdfb973 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class ExamesPortaria extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.exames_portaria"; + + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/FilCategorias.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/FilCategorias.java new file mode 100644 index 00000000..0902e79d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/FilCategorias.java @@ -0,0 +1,448 @@ +/* +* FilCategorias.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class FilCategorias extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( FilCategorias.ID, FilCategorias.ID_INDEX ); + FIELD_INDEXES.put( FilCategorias.ID_FULL, FilCategorias.ID_INDEX ); + FIELD_INDEXES.put( FilCategorias.CODIGO, FilCategorias.CODIGO_INDEX ); + FIELD_INDEXES.put( FilCategorias.CODIGO_FULL, FilCategorias.CODIGO_INDEX ); + FIELD_INDEXES.put( FilCategorias.DESCRICAO, FilCategorias.DESCRICAO_INDEX ); + FIELD_INDEXES.put( FilCategorias.DESCRICAO_FULL, FilCategorias.DESCRICAO_INDEX ); + FIELD_INDEXES.put( FilCategorias.ORDEM, FilCategorias.ORDEM_INDEX ); + FIELD_INDEXES.put( FilCategorias.ORDEM_FULL, FilCategorias.ORDEM_INDEX ); + FIELD_INDEXES.put( FilCategorias.DELETED_STAMP, FilCategorias.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( FilCategorias.DELETED_STAMP_FULL, FilCategorias.DELETED_STAMP_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "fil_categorias"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.fil_categorias"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "fil_categorias.id"; + public static final int ID_INDEX = 0; + public static final String CODIGO = "codigo"; + public static final String CODIGO_FULL = "fil_categorias.codigo"; + public static final int CODIGO_INDEX = 1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "fil_categorias.descricao"; + public static final int DESCRICAO_INDEX = 2; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "fil_categorias.ordem"; + public static final int ORDEM_INDEX = 3; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "fil_categorias.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + CODIGO, DESCRICAO, ORDEM, DELETED_STAMP, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + CODIGO, TABLENAME + "." + DESCRICAO, TABLENAME + "." + ORDEM, TABLENAME + "." + DELETED_STAMP, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, CODIGO, DESCRICAO, ORDEM, DELETED_STAMP, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, CODIGO, DESCRICAO, ORDEM, DELETED_STAMP, }; + + private Integer id; + private String codigo; + private String descricao; + private Integer ordem; + private java.sql.Timestamp deleted_stamp; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public FilCategorias() + { + 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.ListfromFilFileEmpresa_categoria_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.FilFileEmpresaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.FilFileEmpresaData.class , getPrimaryKey().getMap().get("id"), "categoria_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 java.sql.Timestamp getDeleted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_stamp; + } + + public void setDeleted_stamp( java.sql.Timestamp deleted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_STAMP, deleted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_stamp = deleted_stamp; + LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilCategorias.ID_INDEX: + value = getId(); + break; + case FilCategorias.CODIGO_INDEX: + value = getCodigo(); + break; + case FilCategorias.DESCRICAO_INDEX: + value = getDescricao(); + break; + case FilCategorias.ORDEM_INDEX: + value = getOrdem(); + break; + case FilCategorias.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilCategorias.ID_INDEX: + value = this.id; + break; + case FilCategorias.CODIGO_INDEX: + value = this.codigo; + break; + case FilCategorias.DESCRICAO_INDEX: + value = this.descricao; + break; + case FilCategorias.ORDEM_INDEX: + value = this.ordem; + break; + case FilCategorias.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilCategorias.ID_INDEX: + setId( ( Integer ) value ); + break; + case FilCategorias.CODIGO_INDEX: + setCodigo( ( String ) value ); + break; + case FilCategorias.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case FilCategorias.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + case FilCategorias.DELETED_STAMP_INDEX: + setDeleted_stamp( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilCategorias.ID_INDEX: + this.id = ( Integer ) value; + break; + case FilCategorias.CODIGO_INDEX: + this.codigo = ( String ) value; + break; + case FilCategorias.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case FilCategorias.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + case FilCategorias.DELETED_STAMP_INDEX: + this.deleted_stamp = ( java.sql.Timestamp ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case FilCategorias.ID_INDEX: + theClass = Integer.class; + break; + case FilCategorias.CODIGO_INDEX: + theClass = String.class; + break; + case FilCategorias.DESCRICAO_INDEX: + theClass = String.class; + break; + case FilCategorias.ORDEM_INDEX: + theClass = Integer.class; + break; + case FilCategorias.DELETED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : FilCategorias._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, FilCategorias.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/FilFile.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/FilFile.java new file mode 100644 index 00000000..ed157da4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/FilFile.java @@ -0,0 +1,691 @@ +/* +* FilFile.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class FilFile extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( FilFile.ID, FilFile.ID_INDEX ); + FIELD_INDEXES.put( FilFile.ID_FULL, FilFile.ID_INDEX ); + FIELD_INDEXES.put( FilFile.DELETED_STAMP, FilFile.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( FilFile.DELETED_STAMP_FULL, FilFile.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( FilFile.NAME, FilFile.NAME_INDEX ); + FIELD_INDEXES.put( FilFile.NAME_FULL, FilFile.NAME_INDEX ); + FIELD_INDEXES.put( FilFile.MIME_TYPE, FilFile.MIME_TYPE_INDEX ); + FIELD_INDEXES.put( FilFile.MIME_TYPE_FULL, FilFile.MIME_TYPE_INDEX ); + FIELD_INDEXES.put( FilFile.INSERTED_STAMP, FilFile.INSERTED_STAMP_INDEX ); + FIELD_INDEXES.put( FilFile.INSERTED_STAMP_FULL, FilFile.INSERTED_STAMP_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( FilFile.CLASS_IDENTIFIER, FilFile.USER_ID, FilFile.TO_USER_ID ); + FIELD_INDEXES.put( FilFile.USER_ID, FilFile.USER_ID_INDEX ); + FIELD_INDEXES.put( FilFile.USER_ID_FULL, FilFile.USER_ID_INDEX ); + FIELD_INDEXES.put( FilFile.TO_USER_ID, FilFile.TO_USER_ID_INDEX ); + FIELD_INDEXES.put( FilFile.FILE_DATA, FilFile.FILE_DATA_INDEX ); + FIELD_INDEXES.put( FilFile.FILE_DATA_FULL, FilFile.FILE_DATA_INDEX ); + FIELD_INDEXES.put( FilFile.DETAILS, FilFile.DETAILS_INDEX ); + FIELD_INDEXES.put( FilFile.DETAILS_FULL, FilFile.DETAILS_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyuser_idToevo_usr_user = + new com.evolute.entity.ForeignKey( FilFile.class, FilFile.USER_ID, db.data.siprp_local.outer.EvoUsrUserData.class, db.data.siprp_local.outer.EvoUsrUserData.ID ); + + public static final String TABLENAME = "fil_file"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.fil_file"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "fil_file.id"; + public static final int ID_INDEX = 0; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "fil_file.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 1; + public static final String NAME = "name"; + public static final String NAME_FULL = "fil_file.name"; + public static final int NAME_INDEX = 2; + public static final String MIME_TYPE = "mime_type"; + public static final String MIME_TYPE_FULL = "fil_file.mime_type"; + public static final int MIME_TYPE_INDEX = 3; + public static final String INSERTED_STAMP = "inserted_stamp"; + public static final String INSERTED_STAMP_FULL = "fil_file.inserted_stamp"; + public static final int INSERTED_STAMP_INDEX = 4; + public static final String USER_ID = "user_id"; + public static final String USER_ID_FULL = "fil_file.user_id"; + public static final int USER_ID_INDEX = 5; + public static final String TO_USER_ID = "to_user_id"; + public static final String TO_USER_ID_FULL = "fil_file.to_user_id"; + public static final int TO_USER_ID_INDEX = 6; + public static final String FILE_DATA = "file_data"; + public static final String FILE_DATA_FULL = "fil_file.file_data"; + public static final int FILE_DATA_INDEX = 7; + public static final String DETAILS = "details"; + public static final String DETAILS_FULL = "fil_file.details"; + public static final int DETAILS_INDEX = 8; + + public static final String FIELD_NAMES[] = new String[]{ + DELETED_STAMP, NAME, MIME_TYPE, INSERTED_STAMP, USER_ID, TO_USER_ID, FILE_DATA, + DETAILS, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DELETED_STAMP, TABLENAME + "." + NAME, TABLENAME + "." + MIME_TYPE, TABLENAME + "." + INSERTED_STAMP, TABLENAME + "." + USER_ID, TABLENAME + "." + TO_USER_ID, TABLENAME + "." + FILE_DATA, + TABLENAME + "." + DETAILS, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DELETED_STAMP, NAME, MIME_TYPE, INSERTED_STAMP, USER_ID, FILE_DATA, DETAILS, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DELETED_STAMP, NAME, MIME_TYPE, INSERTED_STAMP, USER_ID, DETAILS, }; + + private Integer id; + private java.sql.Timestamp deleted_stamp; + private String name; + private String mime_type; + private java.sql.Timestamp inserted_stamp; + private Integer user_id; + private db.data.siprp_local.outer.EvoUsrUserData to_user_id; + private byte[] file_data; + private String details; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public FilFile() + { + 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.ListfromFilFileAppointment_file_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.FilFileAppointmentData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.FilFileAppointmentData.class , getPrimaryKey().getMap().get("id"), "file_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromFilFileEmpresa_file_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.FilFileEmpresaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.FilFileEmpresaData.class , getPrimaryKey().getMap().get("id"), "file_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromFilFileMarcacoesEstabelecimento_file_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.FilFileMarcacoesEstabelecimentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.FilFileMarcacoesEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "file_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.sql.Timestamp getDeleted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_stamp; + } + + public void setDeleted_stamp( java.sql.Timestamp deleted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_STAMP, deleted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_stamp = deleted_stamp; + LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); + } + + public 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 String getMime_type() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MIME_TYPE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.mime_type; + } + + public void setMime_type( String mime_type ) + { + try + { + setLockedForRefresh( true ); + preProcess( MIME_TYPE, mime_type ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.mime_type = mime_type; + LAZY_LOADED_OBJECTS.put( MIME_TYPE, Boolean.TRUE ); + } + + public java.sql.Timestamp getInserted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( INSERTED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.inserted_stamp; + } + + public void setInserted_stamp( java.sql.Timestamp inserted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( INSERTED_STAMP, inserted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.inserted_stamp = inserted_stamp; + LAZY_LOADED_OBJECTS.put( INSERTED_STAMP, Boolean.TRUE ); + } + + public Integer getUser_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( USER_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.user_id; + } + + public void setUser_id( Integer user_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( USER_ID, user_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.user_id = user_id; + LAZY_LOADED_OBJECTS.put( USER_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EvoUsrUserData toUser_id() + { + try + { + prepare( TO_USER_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_user_id; + } + + public void setToUser_id( db.data.siprp_local.outer.EvoUsrUserData to_user_id ) + { + try + { + preProcess( TO_USER_ID, to_user_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_user_id = to_user_id; + } + + public byte[] getFile_data() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FILE_DATA ); + Boolean isLazyLoaded = isPropertyLoaded( FILE_DATA ); + if ( ! isLazyLoaded ) + { + this.file_data = ( byte[] ) getProvider().loadFieldFromDatabase( FILE_DATA, this ); + LAZY_LOADED_OBJECTS.put( FILE_DATA, Boolean.TRUE ); + } + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.file_data; + } + + public void setFile_data( byte[] file_data ) + { + try + { + setLockedForRefresh( true ); + preProcess( FILE_DATA, file_data ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.file_data = file_data; + LAZY_LOADED_OBJECTS.put( FILE_DATA, Boolean.TRUE ); + } + + public String getDetails() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DETAILS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.details; + } + + public void setDetails( String details ) + { + try + { + setLockedForRefresh( true ); + preProcess( DETAILS, details ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.details = details; + LAZY_LOADED_OBJECTS.put( DETAILS, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFile.ID_INDEX: + value = getId(); + break; + case FilFile.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + break; + case FilFile.NAME_INDEX: + value = getName(); + break; + case FilFile.MIME_TYPE_INDEX: + value = getMime_type(); + break; + case FilFile.INSERTED_STAMP_INDEX: + value = getInserted_stamp(); + break; + case FilFile.USER_ID_INDEX: + value = getUser_id(); + break; + case FilFile.TO_USER_ID_INDEX: + value = toUser_id(); + break; + case FilFile.FILE_DATA_INDEX: + value = getFile_data(); + break; + case FilFile.DETAILS_INDEX: + value = getDetails(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFile.ID_INDEX: + value = this.id; + break; + case FilFile.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + case FilFile.NAME_INDEX: + value = this.name; + break; + case FilFile.MIME_TYPE_INDEX: + value = this.mime_type; + break; + case FilFile.INSERTED_STAMP_INDEX: + value = this.inserted_stamp; + break; + case FilFile.USER_ID_INDEX: + value = this.user_id; + break; + case FilFile.TO_USER_ID_INDEX: + value = this.to_user_id; + break; + case FilFile.FILE_DATA_INDEX: + value = this.file_data; + break; + case FilFile.DETAILS_INDEX: + value = this.details; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFile.ID_INDEX: + setId( ( Integer ) value ); + break; + case FilFile.DELETED_STAMP_INDEX: + setDeleted_stamp( ( java.sql.Timestamp ) value ); + break; + case FilFile.NAME_INDEX: + setName( ( String ) value ); + break; + case FilFile.MIME_TYPE_INDEX: + setMime_type( ( String ) value ); + break; + case FilFile.INSERTED_STAMP_INDEX: + setInserted_stamp( ( java.sql.Timestamp ) value ); + break; + case FilFile.USER_ID_INDEX: + setUser_id( ( Integer ) value ); + break; + case FilFile.TO_USER_ID_INDEX: + setToUser_id( ( db.data.siprp_local.outer.EvoUsrUserData ) value ); + break; + case FilFile.FILE_DATA_INDEX: + setFile_data( ( byte[] ) value ); + break; + case FilFile.DETAILS_INDEX: + setDetails( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFile.ID_INDEX: + this.id = ( Integer ) value; + break; + case FilFile.DELETED_STAMP_INDEX: + this.deleted_stamp = ( java.sql.Timestamp ) value; + break; + case FilFile.NAME_INDEX: + this.name = ( String ) value; + break; + case FilFile.MIME_TYPE_INDEX: + this.mime_type = ( String ) value; + break; + case FilFile.INSERTED_STAMP_INDEX: + this.inserted_stamp = ( java.sql.Timestamp ) value; + break; + case FilFile.USER_ID_INDEX: + this.user_id = ( Integer ) value; + break; + case FilFile.TO_USER_ID_INDEX: + this.to_user_id = ( db.data.siprp_local.outer.EvoUsrUserData ) value; + break; + case FilFile.FILE_DATA_INDEX: + this.file_data = ( byte[] ) value; + break; + case FilFile.DETAILS_INDEX: + this.details = ( 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 FilFile.ID_INDEX: + theClass = Integer.class; + break; + case FilFile.DELETED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + case FilFile.NAME_INDEX: + theClass = String.class; + break; + case FilFile.MIME_TYPE_INDEX: + theClass = String.class; + break; + case FilFile.INSERTED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + case FilFile.USER_ID_INDEX: + theClass = Integer.class; + break; + case FilFile.TO_USER_ID_INDEX: + theClass = db.data.siprp_local.outer.EvoUsrUserData.class; + break; + case FilFile.FILE_DATA_INDEX: + theClass = byte[].class; + break; + case FilFile.DETAILS_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : FilFile._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, FilFile.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( FILE_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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/FilFileAppointment.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/FilFileAppointment.java new file mode 100644 index 00000000..de1b902d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/FilFileAppointment.java @@ -0,0 +1,431 @@ +/* +* FilFileAppointment.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class FilFileAppointment extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( FilFileAppointment.ID, FilFileAppointment.ID_INDEX ); + FIELD_INDEXES.put( FilFileAppointment.ID_FULL, FilFileAppointment.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( FilFileAppointment.CLASS_IDENTIFIER, FilFileAppointment.FILE_ID, FilFileAppointment.TO_FILE_ID ); + FIELD_INDEXES.put( FilFileAppointment.FILE_ID, FilFileAppointment.FILE_ID_INDEX ); + FIELD_INDEXES.put( FilFileAppointment.FILE_ID_FULL, FilFileAppointment.FILE_ID_INDEX ); + FIELD_INDEXES.put( FilFileAppointment.TO_FILE_ID, FilFileAppointment.TO_FILE_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( FilFileAppointment.CLASS_IDENTIFIER, FilFileAppointment.APPOINTMENT_ID, FilFileAppointment.TO_APPOINTMENT_ID ); + FIELD_INDEXES.put( FilFileAppointment.APPOINTMENT_ID, FilFileAppointment.APPOINTMENT_ID_INDEX ); + FIELD_INDEXES.put( FilFileAppointment.APPOINTMENT_ID_FULL, FilFileAppointment.APPOINTMENT_ID_INDEX ); + FIELD_INDEXES.put( FilFileAppointment.TO_APPOINTMENT_ID, FilFileAppointment.TO_APPOINTMENT_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 ForeignKeyfile_idTofil_file = + new com.evolute.entity.ForeignKey( FilFileAppointment.class, FilFileAppointment.FILE_ID, db.data.siprp_local.outer.FilFileData.class, db.data.siprp_local.outer.FilFileData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyappointment_idToapt_appointment = + new com.evolute.entity.ForeignKey( FilFileAppointment.class, FilFileAppointment.APPOINTMENT_ID, db.data.siprp_local.outer.AptAppointmentData.class, db.data.siprp_local.outer.AptAppointmentData.ID ); + + public static final String TABLENAME = "fil_file_appointment"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.fil_file_appointment"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "fil_file_appointment.id"; + public static final int ID_INDEX = 0; + public static final String FILE_ID = "file_id"; + public static final String FILE_ID_FULL = "fil_file_appointment.file_id"; + public static final int FILE_ID_INDEX = 1; + public static final String TO_FILE_ID = "to_file_id"; + public static final String TO_FILE_ID_FULL = "fil_file_appointment.to_file_id"; + public static final int TO_FILE_ID_INDEX = 2; + public static final String APPOINTMENT_ID = "appointment_id"; + public static final String APPOINTMENT_ID_FULL = "fil_file_appointment.appointment_id"; + public static final int APPOINTMENT_ID_INDEX = 3; + public static final String TO_APPOINTMENT_ID = "to_appointment_id"; + public static final String TO_APPOINTMENT_ID_FULL = "fil_file_appointment.to_appointment_id"; + public static final int TO_APPOINTMENT_ID_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + FILE_ID, TO_FILE_ID, APPOINTMENT_ID, TO_APPOINTMENT_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + FILE_ID, TABLENAME + "." + TO_FILE_ID, TABLENAME + "." + APPOINTMENT_ID, TABLENAME + "." + TO_APPOINTMENT_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, FILE_ID, APPOINTMENT_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, FILE_ID, APPOINTMENT_ID, }; + + private Integer id; + private Integer file_id; + private db.data.siprp_local.outer.FilFileData to_file_id; + private Integer appointment_id; + private db.data.siprp_local.outer.AptAppointmentData to_appointment_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public FilFileAppointment() + { + 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 getFile_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FILE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.file_id; + } + + public void setFile_id( Integer file_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FILE_ID, file_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.file_id = file_id; + LAZY_LOADED_OBJECTS.put( FILE_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.FilFileData toFile_id() + { + try + { + prepare( TO_FILE_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_file_id; + } + + public void setToFile_id( db.data.siprp_local.outer.FilFileData to_file_id ) + { + try + { + preProcess( TO_FILE_ID, to_file_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_file_id = to_file_id; + } + + public Integer getAppointment_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( APPOINTMENT_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.appointment_id; + } + + public void setAppointment_id( Integer appointment_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( APPOINTMENT_ID, appointment_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.appointment_id = appointment_id; + LAZY_LOADED_OBJECTS.put( APPOINTMENT_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.AptAppointmentData toAppointment_id() + { + try + { + prepare( TO_APPOINTMENT_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_appointment_id; + } + + public void setToAppointment_id( db.data.siprp_local.outer.AptAppointmentData to_appointment_id ) + { + try + { + preProcess( TO_APPOINTMENT_ID, to_appointment_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_appointment_id = to_appointment_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFileAppointment.ID_INDEX: + value = getId(); + break; + case FilFileAppointment.FILE_ID_INDEX: + value = getFile_id(); + break; + case FilFileAppointment.TO_FILE_ID_INDEX: + value = toFile_id(); + break; + case FilFileAppointment.APPOINTMENT_ID_INDEX: + value = getAppointment_id(); + break; + case FilFileAppointment.TO_APPOINTMENT_ID_INDEX: + value = toAppointment_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFileAppointment.ID_INDEX: + value = this.id; + break; + case FilFileAppointment.FILE_ID_INDEX: + value = this.file_id; + break; + case FilFileAppointment.TO_FILE_ID_INDEX: + value = this.to_file_id; + break; + case FilFileAppointment.APPOINTMENT_ID_INDEX: + value = this.appointment_id; + break; + case FilFileAppointment.TO_APPOINTMENT_ID_INDEX: + value = this.to_appointment_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFileAppointment.ID_INDEX: + setId( ( Integer ) value ); + break; + case FilFileAppointment.FILE_ID_INDEX: + setFile_id( ( Integer ) value ); + break; + case FilFileAppointment.TO_FILE_ID_INDEX: + setToFile_id( ( db.data.siprp_local.outer.FilFileData ) value ); + break; + case FilFileAppointment.APPOINTMENT_ID_INDEX: + setAppointment_id( ( Integer ) value ); + break; + case FilFileAppointment.TO_APPOINTMENT_ID_INDEX: + setToAppointment_id( ( db.data.siprp_local.outer.AptAppointmentData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFileAppointment.ID_INDEX: + this.id = ( Integer ) value; + break; + case FilFileAppointment.FILE_ID_INDEX: + this.file_id = ( Integer ) value; + break; + case FilFileAppointment.TO_FILE_ID_INDEX: + this.to_file_id = ( db.data.siprp_local.outer.FilFileData ) value; + break; + case FilFileAppointment.APPOINTMENT_ID_INDEX: + this.appointment_id = ( Integer ) value; + break; + case FilFileAppointment.TO_APPOINTMENT_ID_INDEX: + this.to_appointment_id = ( db.data.siprp_local.outer.AptAppointmentData ) 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 FilFileAppointment.ID_INDEX: + theClass = Integer.class; + break; + case FilFileAppointment.FILE_ID_INDEX: + theClass = Integer.class; + break; + case FilFileAppointment.TO_FILE_ID_INDEX: + theClass = db.data.siprp_local.outer.FilFileData.class; + break; + case FilFileAppointment.APPOINTMENT_ID_INDEX: + theClass = Integer.class; + break; + case FilFileAppointment.TO_APPOINTMENT_ID_INDEX: + theClass = db.data.siprp_local.outer.AptAppointmentData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : FilFileAppointment._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, FilFileAppointment.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/FilFileEmpresa.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/FilFileEmpresa.java new file mode 100644 index 00000000..a8cbe864 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/FilFileEmpresa.java @@ -0,0 +1,531 @@ +/* +* FilFileEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class FilFileEmpresa extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( FilFileEmpresa.ID, FilFileEmpresa.ID_INDEX ); + FIELD_INDEXES.put( FilFileEmpresa.ID_FULL, FilFileEmpresa.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( FilFileEmpresa.CLASS_IDENTIFIER, FilFileEmpresa.FILE_ID, FilFileEmpresa.TO_FILE_ID ); + FIELD_INDEXES.put( FilFileEmpresa.FILE_ID, FilFileEmpresa.FILE_ID_INDEX ); + FIELD_INDEXES.put( FilFileEmpresa.FILE_ID_FULL, FilFileEmpresa.FILE_ID_INDEX ); + FIELD_INDEXES.put( FilFileEmpresa.TO_FILE_ID, FilFileEmpresa.TO_FILE_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( FilFileEmpresa.CLASS_IDENTIFIER, FilFileEmpresa.EMPRESA_ID, FilFileEmpresa.TO_EMPRESA_ID ); + FIELD_INDEXES.put( FilFileEmpresa.EMPRESA_ID, FilFileEmpresa.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( FilFileEmpresa.EMPRESA_ID_FULL, FilFileEmpresa.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( FilFileEmpresa.TO_EMPRESA_ID, FilFileEmpresa.TO_EMPRESA_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( FilFileEmpresa.CLASS_IDENTIFIER, FilFileEmpresa.CATEGORIA_ID, FilFileEmpresa.TO_CATEGORIA_ID ); + FIELD_INDEXES.put( FilFileEmpresa.CATEGORIA_ID, FilFileEmpresa.CATEGORIA_ID_INDEX ); + FIELD_INDEXES.put( FilFileEmpresa.CATEGORIA_ID_FULL, FilFileEmpresa.CATEGORIA_ID_INDEX ); + FIELD_INDEXES.put( FilFileEmpresa.TO_CATEGORIA_ID, FilFileEmpresa.TO_CATEGORIA_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 ForeignKeyfile_idTofil_file = + new com.evolute.entity.ForeignKey( FilFileEmpresa.class, FilFileEmpresa.FILE_ID, db.data.siprp_local.outer.FilFileData.class, db.data.siprp_local.outer.FilFileData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( FilFileEmpresa.class, FilFileEmpresa.EMPRESA_ID, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycategoria_idTofil_categorias = + new com.evolute.entity.ForeignKey( FilFileEmpresa.class, FilFileEmpresa.CATEGORIA_ID, db.data.siprp_local.outer.FilCategoriasData.class, db.data.siprp_local.outer.FilCategoriasData.ID ); + + public static final String TABLENAME = "fil_file_empresa"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.fil_file_empresa"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "fil_file_empresa.id"; + public static final int ID_INDEX = 0; + public static final String FILE_ID = "file_id"; + public static final String FILE_ID_FULL = "fil_file_empresa.file_id"; + public static final int FILE_ID_INDEX = 1; + public static final String TO_FILE_ID = "to_file_id"; + public static final String TO_FILE_ID_FULL = "fil_file_empresa.to_file_id"; + public static final int TO_FILE_ID_INDEX = 2; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "fil_file_empresa.empresa_id"; + public static final int EMPRESA_ID_INDEX = 3; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final String TO_EMPRESA_ID_FULL = "fil_file_empresa.to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 4; + public static final String CATEGORIA_ID = "categoria_id"; + public static final String CATEGORIA_ID_FULL = "fil_file_empresa.categoria_id"; + public static final int CATEGORIA_ID_INDEX = 5; + public static final String TO_CATEGORIA_ID = "to_categoria_id"; + public static final String TO_CATEGORIA_ID_FULL = "fil_file_empresa.to_categoria_id"; + public static final int TO_CATEGORIA_ID_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + FILE_ID, TO_FILE_ID, EMPRESA_ID, TO_EMPRESA_ID, CATEGORIA_ID, TO_CATEGORIA_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + FILE_ID, TABLENAME + "." + TO_FILE_ID, TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + CATEGORIA_ID, TABLENAME + "." + TO_CATEGORIA_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, FILE_ID, EMPRESA_ID, CATEGORIA_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, FILE_ID, EMPRESA_ID, CATEGORIA_ID, }; + + private Integer id; + private Integer file_id; + private db.data.siprp_local.outer.FilFileData to_file_id; + private Integer empresa_id; + private db.data.siprp_local.outer.EmpresasData to_empresa_id; + private Integer categoria_id; + private db.data.siprp_local.outer.FilCategoriasData to_categoria_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public FilFileEmpresa() + { + 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 getFile_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FILE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.file_id; + } + + public void setFile_id( Integer file_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FILE_ID, file_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.file_id = file_id; + LAZY_LOADED_OBJECTS.put( FILE_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.FilFileData toFile_id() + { + try + { + prepare( TO_FILE_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_file_id; + } + + public void setToFile_id( db.data.siprp_local.outer.FilFileData to_file_id ) + { + try + { + preProcess( TO_FILE_ID, to_file_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_file_id = to_file_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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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 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 db.data.siprp_local.outer.FilCategoriasData 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( db.data.siprp_local.outer.FilCategoriasData 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFileEmpresa.ID_INDEX: + value = getId(); + break; + case FilFileEmpresa.FILE_ID_INDEX: + value = getFile_id(); + break; + case FilFileEmpresa.TO_FILE_ID_INDEX: + value = toFile_id(); + break; + case FilFileEmpresa.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case FilFileEmpresa.TO_EMPRESA_ID_INDEX: + value = toEmpresa_id(); + break; + case FilFileEmpresa.CATEGORIA_ID_INDEX: + value = getCategoria_id(); + break; + case FilFileEmpresa.TO_CATEGORIA_ID_INDEX: + value = toCategoria_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFileEmpresa.ID_INDEX: + value = this.id; + break; + case FilFileEmpresa.FILE_ID_INDEX: + value = this.file_id; + break; + case FilFileEmpresa.TO_FILE_ID_INDEX: + value = this.to_file_id; + break; + case FilFileEmpresa.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case FilFileEmpresa.TO_EMPRESA_ID_INDEX: + value = this.to_empresa_id; + break; + case FilFileEmpresa.CATEGORIA_ID_INDEX: + value = this.categoria_id; + break; + case FilFileEmpresa.TO_CATEGORIA_ID_INDEX: + value = this.to_categoria_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFileEmpresa.ID_INDEX: + setId( ( Integer ) value ); + break; + case FilFileEmpresa.FILE_ID_INDEX: + setFile_id( ( Integer ) value ); + break; + case FilFileEmpresa.TO_FILE_ID_INDEX: + setToFile_id( ( db.data.siprp_local.outer.FilFileData ) value ); + break; + case FilFileEmpresa.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case FilFileEmpresa.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( db.data.siprp_local.outer.EmpresasData ) value ); + break; + case FilFileEmpresa.CATEGORIA_ID_INDEX: + setCategoria_id( ( Integer ) value ); + break; + case FilFileEmpresa.TO_CATEGORIA_ID_INDEX: + setToCategoria_id( ( db.data.siprp_local.outer.FilCategoriasData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFileEmpresa.ID_INDEX: + this.id = ( Integer ) value; + break; + case FilFileEmpresa.FILE_ID_INDEX: + this.file_id = ( Integer ) value; + break; + case FilFileEmpresa.TO_FILE_ID_INDEX: + this.to_file_id = ( db.data.siprp_local.outer.FilFileData ) value; + break; + case FilFileEmpresa.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case FilFileEmpresa.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( db.data.siprp_local.outer.EmpresasData ) value; + break; + case FilFileEmpresa.CATEGORIA_ID_INDEX: + this.categoria_id = ( Integer ) value; + break; + case FilFileEmpresa.TO_CATEGORIA_ID_INDEX: + this.to_categoria_id = ( db.data.siprp_local.outer.FilCategoriasData ) 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 FilFileEmpresa.ID_INDEX: + theClass = Integer.class; + break; + case FilFileEmpresa.FILE_ID_INDEX: + theClass = Integer.class; + break; + case FilFileEmpresa.TO_FILE_ID_INDEX: + theClass = db.data.siprp_local.outer.FilFileData.class; + break; + case FilFileEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case FilFileEmpresa.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.outer.EmpresasData.class; + break; + case FilFileEmpresa.CATEGORIA_ID_INDEX: + theClass = Integer.class; + break; + case FilFileEmpresa.TO_CATEGORIA_ID_INDEX: + theClass = db.data.siprp_local.outer.FilCategoriasData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : FilFileEmpresa._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, FilFileEmpresa.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/FilFileMarcacoesEstabelecimento.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/FilFileMarcacoesEstabelecimento.java new file mode 100644 index 00000000..b4712f22 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/FilFileMarcacoesEstabelecimento.java @@ -0,0 +1,431 @@ +/* +* FilFileMarcacoesEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class FilFileMarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( FilFileMarcacoesEstabelecimento.ID, FilFileMarcacoesEstabelecimento.ID_INDEX ); + FIELD_INDEXES.put( FilFileMarcacoesEstabelecimento.ID_FULL, FilFileMarcacoesEstabelecimento.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( FilFileMarcacoesEstabelecimento.CLASS_IDENTIFIER, FilFileMarcacoesEstabelecimento.FILE_ID, FilFileMarcacoesEstabelecimento.TO_FILE_ID ); + FIELD_INDEXES.put( FilFileMarcacoesEstabelecimento.FILE_ID, FilFileMarcacoesEstabelecimento.FILE_ID_INDEX ); + FIELD_INDEXES.put( FilFileMarcacoesEstabelecimento.FILE_ID_FULL, FilFileMarcacoesEstabelecimento.FILE_ID_INDEX ); + FIELD_INDEXES.put( FilFileMarcacoesEstabelecimento.TO_FILE_ID, FilFileMarcacoesEstabelecimento.TO_FILE_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( FilFileMarcacoesEstabelecimento.CLASS_IDENTIFIER, FilFileMarcacoesEstabelecimento.MARCACAO_ID, FilFileMarcacoesEstabelecimento.TO_MARCACAO_ID ); + FIELD_INDEXES.put( FilFileMarcacoesEstabelecimento.MARCACAO_ID, FilFileMarcacoesEstabelecimento.MARCACAO_ID_INDEX ); + FIELD_INDEXES.put( FilFileMarcacoesEstabelecimento.MARCACAO_ID_FULL, FilFileMarcacoesEstabelecimento.MARCACAO_ID_INDEX ); + FIELD_INDEXES.put( FilFileMarcacoesEstabelecimento.TO_MARCACAO_ID, FilFileMarcacoesEstabelecimento.TO_MARCACAO_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 ForeignKeyfile_idTofil_file = + new com.evolute.entity.ForeignKey( FilFileMarcacoesEstabelecimento.class, FilFileMarcacoesEstabelecimento.FILE_ID, db.data.siprp_local.outer.FilFileData.class, db.data.siprp_local.outer.FilFileData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymarcacao_idTomarcacoes_estabelecimento = + new com.evolute.entity.ForeignKey( FilFileMarcacoesEstabelecimento.class, FilFileMarcacoesEstabelecimento.MARCACAO_ID, db.data.siprp_local.outer.MarcacoesEstabelecimentoData.class, db.data.siprp_local.outer.MarcacoesEstabelecimentoData.ID ); + + public static final String TABLENAME = "fil_file_marcacoes_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.fil_file_marcacoes_estabelecimento"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "fil_file_marcacoes_estabelecimento.id"; + public static final int ID_INDEX = 0; + public static final String FILE_ID = "file_id"; + public static final String FILE_ID_FULL = "fil_file_marcacoes_estabelecimento.file_id"; + public static final int FILE_ID_INDEX = 1; + public static final String TO_FILE_ID = "to_file_id"; + public static final String TO_FILE_ID_FULL = "fil_file_marcacoes_estabelecimento.to_file_id"; + public static final int TO_FILE_ID_INDEX = 2; + public static final String MARCACAO_ID = "marcacao_id"; + public static final String MARCACAO_ID_FULL = "fil_file_marcacoes_estabelecimento.marcacao_id"; + public static final int MARCACAO_ID_INDEX = 3; + public static final String TO_MARCACAO_ID = "to_marcacao_id"; + public static final String TO_MARCACAO_ID_FULL = "fil_file_marcacoes_estabelecimento.to_marcacao_id"; + public static final int TO_MARCACAO_ID_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + FILE_ID, TO_FILE_ID, MARCACAO_ID, TO_MARCACAO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + FILE_ID, TABLENAME + "." + TO_FILE_ID, TABLENAME + "." + MARCACAO_ID, TABLENAME + "." + TO_MARCACAO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, FILE_ID, MARCACAO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, FILE_ID, MARCACAO_ID, }; + + private Integer id; + private Integer file_id; + private db.data.siprp_local.outer.FilFileData to_file_id; + private Integer marcacao_id; + private db.data.siprp_local.outer.MarcacoesEstabelecimentoData to_marcacao_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public FilFileMarcacoesEstabelecimento() + { + 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 getFile_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FILE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.file_id; + } + + public void setFile_id( Integer file_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( FILE_ID, file_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.file_id = file_id; + LAZY_LOADED_OBJECTS.put( FILE_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.FilFileData toFile_id() + { + try + { + prepare( TO_FILE_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_file_id; + } + + public void setToFile_id( db.data.siprp_local.outer.FilFileData to_file_id ) + { + try + { + preProcess( TO_FILE_ID, to_file_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_file_id = to_file_id; + } + + 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 db.data.siprp_local.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( db.data.siprp_local.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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFileMarcacoesEstabelecimento.ID_INDEX: + value = getId(); + break; + case FilFileMarcacoesEstabelecimento.FILE_ID_INDEX: + value = getFile_id(); + break; + case FilFileMarcacoesEstabelecimento.TO_FILE_ID_INDEX: + value = toFile_id(); + break; + case FilFileMarcacoesEstabelecimento.MARCACAO_ID_INDEX: + value = getMarcacao_id(); + break; + case FilFileMarcacoesEstabelecimento.TO_MARCACAO_ID_INDEX: + value = toMarcacao_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFileMarcacoesEstabelecimento.ID_INDEX: + value = this.id; + break; + case FilFileMarcacoesEstabelecimento.FILE_ID_INDEX: + value = this.file_id; + break; + case FilFileMarcacoesEstabelecimento.TO_FILE_ID_INDEX: + value = this.to_file_id; + break; + case FilFileMarcacoesEstabelecimento.MARCACAO_ID_INDEX: + value = this.marcacao_id; + break; + case FilFileMarcacoesEstabelecimento.TO_MARCACAO_ID_INDEX: + value = this.to_marcacao_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFileMarcacoesEstabelecimento.ID_INDEX: + setId( ( Integer ) value ); + break; + case FilFileMarcacoesEstabelecimento.FILE_ID_INDEX: + setFile_id( ( Integer ) value ); + break; + case FilFileMarcacoesEstabelecimento.TO_FILE_ID_INDEX: + setToFile_id( ( db.data.siprp_local.outer.FilFileData ) value ); + break; + case FilFileMarcacoesEstabelecimento.MARCACAO_ID_INDEX: + setMarcacao_id( ( Integer ) value ); + break; + case FilFileMarcacoesEstabelecimento.TO_MARCACAO_ID_INDEX: + setToMarcacao_id( ( db.data.siprp_local.outer.MarcacoesEstabelecimentoData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case FilFileMarcacoesEstabelecimento.ID_INDEX: + this.id = ( Integer ) value; + break; + case FilFileMarcacoesEstabelecimento.FILE_ID_INDEX: + this.file_id = ( Integer ) value; + break; + case FilFileMarcacoesEstabelecimento.TO_FILE_ID_INDEX: + this.to_file_id = ( db.data.siprp_local.outer.FilFileData ) value; + break; + case FilFileMarcacoesEstabelecimento.MARCACAO_ID_INDEX: + this.marcacao_id = ( Integer ) value; + break; + case FilFileMarcacoesEstabelecimento.TO_MARCACAO_ID_INDEX: + this.to_marcacao_id = ( db.data.siprp_local.outer.MarcacoesEstabelecimentoData ) 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 FilFileMarcacoesEstabelecimento.ID_INDEX: + theClass = Integer.class; + break; + case FilFileMarcacoesEstabelecimento.FILE_ID_INDEX: + theClass = Integer.class; + break; + case FilFileMarcacoesEstabelecimento.TO_FILE_ID_INDEX: + theClass = db.data.siprp_local.outer.FilFileData.class; + break; + case FilFileMarcacoesEstabelecimento.MARCACAO_ID_INDEX: + theClass = Integer.class; + break; + case FilFileMarcacoesEstabelecimento.TO_MARCACAO_ID_INDEX: + theClass = db.data.siprp_local.outer.MarcacoesEstabelecimentoData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : FilFileMarcacoesEstabelecimento._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, FilFileMarcacoesEstabelecimento.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HistoricoEstabelecimento.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HistoricoEstabelecimento.java new file mode 100644 index 00000000..f4e8a424 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HistoricoEstabelecimento.java @@ -0,0 +1,431 @@ +/* +* HistoricoEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HistoricoEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "historico_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.historico_estabelecimento"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "historico_estabelecimento.id"; + public static final int ID_INDEX = 0; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "historico_estabelecimento.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 1; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID_FULL = "historico_estabelecimento.to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 2; + public static final String DATA = "data"; + public static final String DATA_FULL = "historico_estabelecimento.data"; + public static final int DATA_INDEX = 3; + public static final String TEXTO = "texto"; + public static final String TEXTO_FULL = "historico_estabelecimento.texto"; + public static final int TEXTO_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, DATA, TEXTO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID, TABLENAME + "." + DATA, TABLENAME + "." + TEXTO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ESTABELECIMENTO_ID, DATA, TEXTO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ESTABELECIMENTO_ID, DATA, TEXTO, }; + + private Integer id; + private Integer estabelecimento_id; + private db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.EstabelecimentosData ) value ); + break; + case HistoricoEstabelecimento.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case HistoricoEstabelecimento.TEXTO_INDEX: + setTexto( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HistoricoEstabelecimento.ID_INDEX: + this.id = ( Integer ) value; + break; + case HistoricoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case HistoricoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( db.data.siprp_local.outer.EstabelecimentosData ) value; + break; + case HistoricoEstabelecimento.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case HistoricoEstabelecimento.TEXTO_INDEX: + this.texto = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HistoricoEstabelecimento.ID_INDEX: + theClass = Integer.class; + break; + case HistoricoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case HistoricoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsArea.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsArea.java new file mode 100644 index 00000000..618d8e0a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsArea.java @@ -0,0 +1,498 @@ +/* +* HsArea.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsArea extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final String TABLENAME = "hs_area"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_area"; + + 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 String TO_EMPRESA_ID_FULL = "hs_area.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 db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsPostoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsEmail.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsEmail.java new file mode 100644 index 00000000..5aca9f82 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsEmail.java @@ -0,0 +1,314 @@ +/* +* HsEmail.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsEmail extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.hs_email"; + + 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 = new java.util.LinkedList< db.data.siprp_local.outer.HsEmailEmpresaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsEmailEstabelecimentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsEmailEmpresa.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsEmailEmpresa.java new file mode 100644 index 00000000..b3a462e0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsEmailEmpresa.java @@ -0,0 +1,381 @@ +/* +* HsEmailEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsEmailEmpresa extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsEmailData.class, db.data.siprp_local.outer.HsEmailData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( HsEmailEmpresa.class, HsEmailEmpresa.EMPRESA_ID, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final String TABLENAME = "hs_email_empresa"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_email_empresa"; + + 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 String TO_EMAIL_ID_FULL = "hs_email_empresa.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 String TO_EMPRESA_ID_FULL = "hs_email_empresa.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 db.data.siprp_local.outer.HsEmailData to_email_id; + private Integer empresa_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsEmailData ) value ); + break; + case HsEmailEmpresa.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case HsEmailEmpresa.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsEmailData.class; + break; + case HsEmailEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case HsEmailEmpresa.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsEmailEstabelecimento.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsEmailEstabelecimento.java new file mode 100644 index 00000000..379b3617 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsEmailEstabelecimento.java @@ -0,0 +1,381 @@ +/* +* HsEmailEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsEmailEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsEmailData.class, db.data.siprp_local.outer.HsEmailData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( HsEmailEstabelecimento.class, HsEmailEstabelecimento.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "hs_email_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_email_estabelecimento"; + + 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 String TO_EMAIL_ID_FULL = "hs_email_estabelecimento.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 String TO_ESTABELECIMENTO_ID_FULL = "hs_email_estabelecimento.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 db.data.siprp_local.outer.HsEmailData to_email_id; + private Integer estabelecimento_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsEmailData ) value ); + break; + case HsEmailEstabelecimento.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case HsEmailEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsEmailData.class; + break; + case HsEmailEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case HsEmailEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsEquipamento.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsEquipamento.java new file mode 100644 index 00000000..0fb4aa02 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class HsEquipamento extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.hs_equipamento"; + + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsLegislacao.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsLegislacao.java new file mode 100644 index 00000000..390d8743 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsLegislacao.java @@ -0,0 +1,465 @@ +/* +* HsLegislacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsLegislacao extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsLegislacaoCategoriaData.class, db.data.siprp_local.outer.HsLegislacaoCategoriaData.ID ); + + public static final String TABLENAME = "hs_legislacao"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_legislacao"; + + 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 String TO_CATEGORIA_ID_FULL = "hs_legislacao.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 db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsLegislacaoEmpresaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsLegislacaoEstabelecimentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsLegislacaoCategoria.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsLegislacaoCategoria.java new file mode 100644 index 00000000..014158c1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsLegislacaoCategoria.java @@ -0,0 +1,347 @@ +/* +* HsLegislacaoCategoria.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsLegislacaoCategoria extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.hs_legislacao_categoria"; + + 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 = new java.util.LinkedList< db.data.siprp_local.outer.HsLegislacaoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsLegislacaoEmpresa.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsLegislacaoEmpresa.java new file mode 100644 index 00000000..69c5d8d8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsLegislacaoEmpresa.java @@ -0,0 +1,381 @@ +/* +* HsLegislacaoEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsLegislacaoEmpresa extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsLegislacaoData.class, db.data.siprp_local.outer.HsLegislacaoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( HsLegislacaoEmpresa.class, HsLegislacaoEmpresa.EMPRESA_ID, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final String TABLENAME = "hs_legislacao_empresa"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_legislacao_empresa"; + + 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 String TO_LEGISLACAO_ID_FULL = "hs_legislacao_empresa.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 String TO_EMPRESA_ID_FULL = "hs_legislacao_empresa.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 db.data.siprp_local.outer.HsLegislacaoData to_legislacao_id; + private Integer empresa_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsLegislacaoData ) value ); + break; + case HsLegislacaoEmpresa.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case HsLegislacaoEmpresa.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsLegislacaoData.class; + break; + case HsLegislacaoEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case HsLegislacaoEmpresa.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsLegislacaoEstabelecimento.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsLegislacaoEstabelecimento.java new file mode 100644 index 00000000..6fa4757e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsLegislacaoEstabelecimento.java @@ -0,0 +1,431 @@ +/* +* HsLegislacaoEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsLegislacaoEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsLegislacaoData.class, db.data.siprp_local.outer.HsLegislacaoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( HsLegislacaoEstabelecimento.class, HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "hs_legislacao_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_legislacao_estabelecimento"; + + 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 String TO_LEGISLACAO_ID_FULL = "hs_legislacao_estabelecimento.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 String TO_ESTABELECIMENTO_ID_FULL = "hs_legislacao_estabelecimento.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 db.data.siprp_local.outer.HsLegislacaoData to_legislacao_id; + private Integer estabelecimento_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsLegislacaoData ) value ); + break; + case HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case HsLegislacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsLegislacaoData.class; + break; + case HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case HsLegislacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsMedida.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsMedida.java new file mode 100644 index 00000000..d46d0bae --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsMedida.java @@ -0,0 +1,415 @@ +/* +* HsMedida.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsMedida extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.hs_medida"; + + 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 = new java.util.LinkedList< db.data.siprp_local.outer.HsPostoMedidaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsRiscoMedidaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsNormalizacao.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsNormalizacao.java new file mode 100644 index 00000000..087f7b02 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsNormalizacao.java @@ -0,0 +1,465 @@ +/* +* HsNormalizacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsNormalizacao extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.hs_normalizacao"; + + 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 = new java.util.LinkedList< db.data.siprp_local.outer.HsNormalizacaoEmpresaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsNormalizacaoEstabelecimentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsNormalizacaoEmpresa.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsNormalizacaoEmpresa.java new file mode 100644 index 00000000..02f17fb3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsNormalizacaoEmpresa.java @@ -0,0 +1,381 @@ +/* +* HsNormalizacaoEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsNormalizacaoEmpresa extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsNormalizacaoData.class, db.data.siprp_local.outer.HsNormalizacaoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( HsNormalizacaoEmpresa.class, HsNormalizacaoEmpresa.EMPRESA_ID, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final String TABLENAME = "hs_normalizacao_empresa"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_normalizacao_empresa"; + + 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 String TO_NORMALIZACAO_ID_FULL = "hs_normalizacao_empresa.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 String TO_EMPRESA_ID_FULL = "hs_normalizacao_empresa.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 db.data.siprp_local.outer.HsNormalizacaoData to_normalizacao_id; + private Integer empresa_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsNormalizacaoData ) value ); + break; + case HsNormalizacaoEmpresa.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case HsNormalizacaoEmpresa.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsNormalizacaoData.class; + break; + case HsNormalizacaoEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case HsNormalizacaoEmpresa.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsNormalizacaoEstabelecimento.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsNormalizacaoEstabelecimento.java new file mode 100644 index 00000000..3335fd46 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsNormalizacaoEstabelecimento.java @@ -0,0 +1,381 @@ +/* +* HsNormalizacaoEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsNormalizacaoEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsNormalizacaoData.class, db.data.siprp_local.outer.HsNormalizacaoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( HsNormalizacaoEstabelecimento.class, HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "hs_normalizacao_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_normalizacao_estabelecimento"; + + 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 String TO_NORMALIZACAO_ID_FULL = "hs_normalizacao_estabelecimento.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 String TO_ESTABELECIMENTO_ID_FULL = "hs_normalizacao_estabelecimento.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 db.data.siprp_local.outer.HsNormalizacaoData to_normalizacao_id; + private Integer estabelecimento_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsNormalizacaoData ) value ); + break; + case HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case HsNormalizacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsNormalizacaoData.class; + break; + case HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case HsNormalizacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsPosto.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsPosto.java new file mode 100644 index 00000000..d9b0dbb8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsPosto.java @@ -0,0 +1,532 @@ +/* +* HsPosto.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsPosto extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsAreaData.class, db.data.siprp_local.outer.HsAreaData.ID ); + + public static final String TABLENAME = "hs_posto"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_posto"; + + 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 String TO_AREA_ID_FULL = "hs_posto.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 db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsPostoEstabelecimentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsPostoMedidaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsPostoRiscoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsPostoEstabelecimento.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsPostoEstabelecimento.java new file mode 100644 index 00000000..93b4854e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsPostoEstabelecimento.java @@ -0,0 +1,381 @@ +/* +* HsPostoEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsPostoEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsPostoData.class, db.data.siprp_local.outer.HsPostoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( HsPostoEstabelecimento.class, HsPostoEstabelecimento.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "hs_posto_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_posto_estabelecimento"; + + 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 String TO_POSTO_ID_FULL = "hs_posto_estabelecimento.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 String TO_ESTABELECIMENTO_ID_FULL = "hs_posto_estabelecimento.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 db.data.siprp_local.outer.HsPostoData to_posto_id; + private Integer estabelecimento_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsPostoData ) value ); + break; + case HsPostoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case HsPostoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsPostoData.class; + break; + case HsPostoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case HsPostoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsPostoMedida.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsPostoMedida.java new file mode 100644 index 00000000..1a602619 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsPostoMedida.java @@ -0,0 +1,381 @@ +/* +* HsPostoMedida.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsPostoMedida extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsPostoData.class, db.data.siprp_local.outer.HsPostoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedida_idTohs_medida = + new com.evolute.entity.ForeignKey( HsPostoMedida.class, HsPostoMedida.MEDIDA_ID, db.data.siprp_local.outer.HsMedidaData.class, db.data.siprp_local.outer.HsMedidaData.ID ); + + public static final String TABLENAME = "hs_posto_medida"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_posto_medida"; + + 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 String TO_POSTO_ID_FULL = "hs_posto_medida.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 String TO_MEDIDA_ID_FULL = "hs_posto_medida.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 db.data.siprp_local.outer.HsPostoData to_posto_id; + private Integer medida_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsPostoData ) value ); + break; + case HsPostoMedida.MEDIDA_ID_INDEX: + setMedida_id( ( Integer ) value ); + break; + case HsPostoMedida.TO_MEDIDA_ID_INDEX: + setToMedida_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsPostoData.class; + break; + case HsPostoMedida.MEDIDA_ID_INDEX: + theClass = Integer.class; + break; + case HsPostoMedida.TO_MEDIDA_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsPostoRisco.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsPostoRisco.java new file mode 100644 index 00000000..6463e6f0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsPostoRisco.java @@ -0,0 +1,685 @@ +/* +* HsPostoRisco.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsPostoRisco extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsPostoData.class, db.data.siprp_local.outer.HsPostoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyrisco_idTohs_risco = + new com.evolute.entity.ForeignKey( HsPostoRisco.class, HsPostoRisco.RISCO_ID, db.data.siprp_local.outer.HsRiscoData.class, db.data.siprp_local.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, db.data.siprp_local.outer.HsRelatorioRiscoValorQualitativoData.class, db.data.siprp_local.outer.HsRelatorioRiscoValorQualitativoData.ID ); + + public static final String TABLENAME = "hs_posto_risco"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_posto_risco"; + + 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 String TO_POSTO_ID_FULL = "hs_posto_risco.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 String TO_RISCO_ID_FULL = "hs_posto_risco.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 String TO_VALOR_QUALITATIVO_FULL = "hs_posto_risco.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 db.data.siprp_local.outer.HsPostoData to_posto_id; + private Integer risco_id; + private db.data.siprp_local.outer.HsRiscoData to_risco_id; + private Integer probabilidade; + private Integer severidade; + private Integer valor_qualitativo; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsPostoData ) value ); + break; + case HsPostoRisco.RISCO_ID_INDEX: + setRisco_id( ( Integer ) value ); + break; + case HsPostoRisco.TO_RISCO_ID_INDEX: + setToRisco_id( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsPostoData.class; + break; + case HsPostoRisco.RISCO_ID_INDEX: + theClass = Integer.class; + break; + case HsPostoRisco.TO_RISCO_ID_INDEX: + theClass = db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorio.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorio.java new file mode 100644 index 00000000..c1ba5915 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorio.java @@ -0,0 +1,975 @@ +/* +* HsRelatorio.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorio extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.MarcacoesEstabelecimentoData.class, db.data.siprp_local.outer.MarcacoesEstabelecimentoData.ID ); + + public static final String TABLENAME = "hs_relatorio"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio"; + + 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 String TO_MARCACAO_ID_FULL = "hs_relatorio.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 db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsRelatorioAreaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsRelatorioEquipamentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsRelatorioLegislacaoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsRelatorioNormalizacaoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsRelatorioRiscoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioArea.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioArea.java new file mode 100644 index 00000000..f3fb96cf --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioArea.java @@ -0,0 +1,548 @@ +/* +* HsRelatorioArea.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioArea extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioData.class, db.data.siprp_local.outer.HsRelatorioData.ID ); + + public static final String TABLENAME = "hs_relatorio_area"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_area"; + + 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 String TO_RELATORIO_ID_FULL = "hs_relatorio_area.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 db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsRelatorioPostoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioEquipamento.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioEquipamento.java new file mode 100644 index 00000000..82cee441 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioEquipamento.java @@ -0,0 +1,583 @@ +/* +* HsRelatorioEquipamento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioEquipamento extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioData.class, db.data.siprp_local.outer.HsRelatorioData.ID ); + + public static final String TABLENAME = "hs_relatorio_equipamento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_equipamento"; + + 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 String TO_HS_RELATORIO_ID_FULL = "hs_relatorio_equipamento.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 db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioLegislacao.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioLegislacao.java new file mode 100644 index 00000000..8df82bc7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioLegislacao.java @@ -0,0 +1,533 @@ +/* +* HsRelatorioLegislacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioLegislacao extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioData.class, db.data.siprp_local.outer.HsRelatorioData.ID ); + + public static final String TABLENAME = "hs_relatorio_legislacao"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_legislacao"; + + 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 String TO_HS_RELATORIO_ID_FULL = "hs_relatorio_legislacao.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 db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioMedida.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioMedida.java new file mode 100644 index 00000000..2f8537fd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioMedida.java @@ -0,0 +1,550 @@ +/* +* HsRelatorioMedida.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioMedida extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioRiscoData.class, db.data.siprp_local.outer.HsRelatorioRiscoData.ID ); + + public static final String TABLENAME = "hs_relatorio_medida"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_medida"; + + 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 String TO_RISCO_ID_FULL = "hs_relatorio_medida.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 db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsRelatorioPostoMedidaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioNormalizacao.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioNormalizacao.java new file mode 100644 index 00000000..f586b86c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioNormalizacao.java @@ -0,0 +1,533 @@ +/* +* HsRelatorioNormalizacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioNormalizacao extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioData.class, db.data.siprp_local.outer.HsRelatorioData.ID ); + + public static final String TABLENAME = "hs_relatorio_normalizacao"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_normalizacao"; + + 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 String TO_HS_RELATORIO_ID_FULL = "hs_relatorio_normalizacao.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 db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioPosto.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioPosto.java new file mode 100644 index 00000000..2462e104 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioPosto.java @@ -0,0 +1,565 @@ +/* +* HsRelatorioPosto.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioPosto extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioAreaData.class, db.data.siprp_local.outer.HsRelatorioAreaData.ID ); + + public static final String TABLENAME = "hs_relatorio_posto"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_posto"; + + 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 String TO_AREA_ID_FULL = "hs_relatorio_posto.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 db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsRelatorioPostoMedidaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsRelatorioPostoRiscoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioPostoMedida.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioPostoMedida.java new file mode 100644 index 00000000..ae0bf156 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioPostoMedida.java @@ -0,0 +1,431 @@ +/* +* HsRelatorioPostoMedida.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioPostoMedida extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioPostoData.class, db.data.siprp_local.outer.HsRelatorioPostoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedida_idTohs_relatorio_medida = + new com.evolute.entity.ForeignKey( HsRelatorioPostoMedida.class, HsRelatorioPostoMedida.MEDIDA_ID, db.data.siprp_local.outer.HsRelatorioMedidaData.class, db.data.siprp_local.outer.HsRelatorioMedidaData.ID ); + + public static final String TABLENAME = "hs_relatorio_posto_medida"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_posto_medida"; + + 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 String TO_POSTO_ID_FULL = "hs_relatorio_posto_medida.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 String TO_MEDIDA_ID_FULL = "hs_relatorio_posto_medida.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 db.data.siprp_local.outer.HsRelatorioPostoData to_posto_id; + private Integer medida_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsRelatorioPostoData ) value ); + break; + case HsRelatorioPostoMedida.MEDIDA_ID_INDEX: + setMedida_id( ( Integer ) value ); + break; + case HsRelatorioPostoMedida.TO_MEDIDA_ID_INDEX: + setToMedida_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsRelatorioPostoData.class; + break; + case HsRelatorioPostoMedida.MEDIDA_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioPostoMedida.TO_MEDIDA_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioPostoRisco.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioPostoRisco.java new file mode 100644 index 00000000..642653dc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioPostoRisco.java @@ -0,0 +1,633 @@ +/* +* HsRelatorioPostoRisco.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioPostoRisco extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRelatorioPostoData.class, db.data.siprp_local.outer.HsRelatorioPostoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyrisco_idTohs_relatorio_risco = + new com.evolute.entity.ForeignKey( HsRelatorioPostoRisco.class, HsRelatorioPostoRisco.RISCO_ID, db.data.siprp_local.outer.HsRelatorioRiscoData.class, db.data.siprp_local.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, db.data.siprp_local.outer.HsRelatorioRiscoValorQualitativoData.class, db.data.siprp_local.outer.HsRelatorioRiscoValorQualitativoData.ID ); + + public static final String TABLENAME = "hs_relatorio_posto_risco"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_posto_risco"; + + 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 String TO_POSTO_ID_FULL = "hs_relatorio_posto_risco.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 String TO_RISCO_ID_FULL = "hs_relatorio_posto_risco.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 String TO_VALOR_QUALITATIVO_ID_FULL = "hs_relatorio_posto_risco.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 db.data.siprp_local.outer.HsRelatorioPostoData to_posto_id; + private Integer risco_id; + private db.data.siprp_local.outer.HsRelatorioRiscoData to_risco_id; + private Integer probabilidade; + private Integer severidade; + private Integer valor_qualitativo_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsRelatorioPostoData ) value ); + break; + case HsRelatorioPostoRisco.RISCO_ID_INDEX: + setRisco_id( ( Integer ) value ); + break; + case HsRelatorioPostoRisco.TO_RISCO_ID_INDEX: + setToRisco_id( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsRelatorioPostoData.class; + break; + case HsRelatorioPostoRisco.RISCO_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioPostoRisco.TO_RISCO_ID_INDEX: + theClass = db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioRisco.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioRisco.java new file mode 100644 index 00000000..cfa5374b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioRisco.java @@ -0,0 +1,567 @@ +/* +* HsRelatorioRisco.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioRisco extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + FIELD_INDEXES.put( HsRelatorioRisco.IS_PATRIMONIAL, HsRelatorioRisco.IS_PATRIMONIAL_INDEX ); + FIELD_INDEXES.put( HsRelatorioRisco.IS_PATRIMONIAL_FULL, HsRelatorioRisco.IS_PATRIMONIAL_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, db.data.siprp_local.outer.HsRelatorioData.class, db.data.siprp_local.outer.HsRelatorioData.ID ); + + public static final String TABLENAME = "hs_relatorio_risco"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_relatorio_risco"; + + 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 String TO_RELATORIO_ID_FULL = "hs_relatorio_risco.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 IS_PATRIMONIAL = "is_patrimonial"; + public static final String IS_PATRIMONIAL_FULL = "hs_relatorio_risco.is_patrimonial"; + public static final int IS_PATRIMONIAL_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + RELATORIO_ID, TO_RELATORIO_ID, DESCRIPTION, DELETED_DATE, HS_RISCO_ID, + IS_PATRIMONIAL, }; + + 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, + TABLENAME + "." + IS_PATRIMONIAL, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, RELATORIO_ID, DESCRIPTION, DELETED_DATE, HS_RISCO_ID, IS_PATRIMONIAL, }; + + + 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, IS_PATRIMONIAL, }; + + private Integer id; + private Integer relatorio_id; + private db.data.siprp_local.outer.HsRelatorioData to_relatorio_id; + private String description; + private java.sql.Timestamp deleted_date; + private Integer hs_risco_id; + private Boolean is_patrimonial; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRelatorioRisco() + { + 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.ListfromHsRelatorioMedida_risco_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.HsRelatorioMedidaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsRelatorioPostoRiscoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 Boolean getIs_patrimonial() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IS_PATRIMONIAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.is_patrimonial; + } + + public void setIs_patrimonial( Boolean is_patrimonial ) + { + try + { + setLockedForRefresh( true ); + preProcess( IS_PATRIMONIAL, is_patrimonial ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.is_patrimonial = is_patrimonial; + LAZY_LOADED_OBJECTS.put( IS_PATRIMONIAL, 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; + case HsRelatorioRisco.IS_PATRIMONIAL_INDEX: + value = getIs_patrimonial(); + 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; + case HsRelatorioRisco.IS_PATRIMONIAL_INDEX: + value = this.is_patrimonial; + 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( ( db.data.siprp_local.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; + case HsRelatorioRisco.IS_PATRIMONIAL_INDEX: + setIs_patrimonial( ( Boolean ) 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 = ( db.data.siprp_local.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; + case HsRelatorioRisco.IS_PATRIMONIAL_INDEX: + this.is_patrimonial = ( 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 HsRelatorioRisco.ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioRisco.RELATORIO_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioRisco.TO_RELATORIO_ID_INDEX: + theClass = db.data.siprp_local.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; + case HsRelatorioRisco.IS_PATRIMONIAL_INDEX: + theClass = Boolean.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioRiscoValorQualitativo.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioRiscoValorQualitativo.java new file mode 100644 index 00000000..d65d8e0f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRelatorioRiscoValorQualitativo.java @@ -0,0 +1,314 @@ +/* +* HsRelatorioRiscoValorQualitativo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRelatorioRiscoValorQualitativo extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.hs_relatorio_risco_valor_qualitativo"; + + 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 = new java.util.LinkedList< db.data.siprp_local.outer.HsPostoRiscoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsRelatorioPostoRiscoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRisco.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRisco.java new file mode 100644 index 00000000..186b1c86 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRisco.java @@ -0,0 +1,532 @@ +/* +* HsRisco.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRisco extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + FIELD_INDEXES.put( HsRisco.IS_PATRIMONIAL, HsRisco.IS_PATRIMONIAL_INDEX ); + FIELD_INDEXES.put( HsRisco.IS_PATRIMONIAL_FULL, HsRisco.IS_PATRIMONIAL_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, db.data.siprp_local.outer.HsRiscoTemaData.class, db.data.siprp_local.outer.HsRiscoTemaData.ID ); + + public static final String TABLENAME = "hs_risco"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_risco"; + + 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 String TO_TEMA_ID_FULL = "hs_risco.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 IS_PATRIMONIAL = "is_patrimonial"; + public static final String IS_PATRIMONIAL_FULL = "hs_risco.is_patrimonial"; + public static final int IS_PATRIMONIAL_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + TEMA_ID, TO_TEMA_ID, DESCRIPTION, DELETED_DATE, IS_PATRIMONIAL, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TEMA_ID, TABLENAME + "." + TO_TEMA_ID, TABLENAME + "." + DESCRIPTION, TABLENAME + "." + DELETED_DATE, TABLENAME + "." + IS_PATRIMONIAL, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TEMA_ID, DESCRIPTION, DELETED_DATE, IS_PATRIMONIAL, }; + + + 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, IS_PATRIMONIAL, }; + + private Integer id; + private Integer tema_id; + private db.data.siprp_local.outer.HsRiscoTemaData to_tema_id; + private String description; + private java.sql.Timestamp deleted_date; + private Boolean is_patrimonial; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRisco() + { + 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.ListfromHsPostoRisco_risco_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.HsPostoRiscoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsRiscoEmpresaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.HsRiscoMedidaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 Boolean getIs_patrimonial() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IS_PATRIMONIAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.is_patrimonial; + } + + public void setIs_patrimonial( Boolean is_patrimonial ) + { + try + { + setLockedForRefresh( true ); + preProcess( IS_PATRIMONIAL, is_patrimonial ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.is_patrimonial = is_patrimonial; + LAZY_LOADED_OBJECTS.put( IS_PATRIMONIAL, 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; + case HsRisco.IS_PATRIMONIAL_INDEX: + value = getIs_patrimonial(); + 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; + case HsRisco.IS_PATRIMONIAL_INDEX: + value = this.is_patrimonial; + 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( ( db.data.siprp_local.outer.HsRiscoTemaData ) value ); + break; + case HsRisco.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + case HsRisco.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case HsRisco.IS_PATRIMONIAL_INDEX: + setIs_patrimonial( ( Boolean ) 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 = ( db.data.siprp_local.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; + case HsRisco.IS_PATRIMONIAL_INDEX: + this.is_patrimonial = ( 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 HsRisco.ID_INDEX: + theClass = Integer.class; + break; + case HsRisco.TEMA_ID_INDEX: + theClass = Integer.class; + break; + case HsRisco.TO_TEMA_ID_INDEX: + theClass = db.data.siprp_local.outer.HsRiscoTemaData.class; + break; + case HsRisco.DESCRIPTION_INDEX: + theClass = String.class; + break; + case HsRisco.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case HsRisco.IS_PATRIMONIAL_INDEX: + theClass = Boolean.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRiscoEmpresa.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRiscoEmpresa.java new file mode 100644 index 00000000..b8b38a4b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRiscoEmpresa.java @@ -0,0 +1,381 @@ +/* +* HsRiscoEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRiscoEmpresa extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRiscoData.class, db.data.siprp_local.outer.HsRiscoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( HsRiscoEmpresa.class, HsRiscoEmpresa.EMPRESA_ID, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final String TABLENAME = "hs_risco_empresa"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_risco_empresa"; + + 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 String TO_RISCO_ID_FULL = "hs_risco_empresa.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 String TO_EMPRESA_ID_FULL = "hs_risco_empresa.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 db.data.siprp_local.outer.HsRiscoData to_risco_id; + private Integer empresa_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsRiscoData ) value ); + break; + case HsRiscoEmpresa.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case HsRiscoEmpresa.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsRiscoData.class; + break; + case HsRiscoEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case HsRiscoEmpresa.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRiscoMedida.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRiscoMedida.java new file mode 100644 index 00000000..6a9c6901 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRiscoMedida.java @@ -0,0 +1,381 @@ +/* +* HsRiscoMedida.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRiscoMedida extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.HsRiscoData.class, db.data.siprp_local.outer.HsRiscoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedida_idTohs_medida = + new com.evolute.entity.ForeignKey( HsRiscoMedida.class, HsRiscoMedida.MEDIDA_ID, db.data.siprp_local.outer.HsMedidaData.class, db.data.siprp_local.outer.HsMedidaData.ID ); + + public static final String TABLENAME = "hs_risco_medida"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.hs_risco_medida"; + + 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 String TO_RISCO_ID_FULL = "hs_risco_medida.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 String TO_MEDIDA_ID_FULL = "hs_risco_medida.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 db.data.siprp_local.outer.HsRiscoData to_risco_id; + private Integer medida_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.outer.HsRiscoData ) value ); + break; + case HsRiscoMedida.MEDIDA_ID_INDEX: + setMedida_id( ( Integer ) value ); + break; + case HsRiscoMedida.TO_MEDIDA_ID_INDEX: + setToMedida_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.HsRiscoData.class; + break; + case HsRiscoMedida.MEDIDA_ID_INDEX: + theClass = Integer.class; + break; + case HsRiscoMedida.TO_MEDIDA_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRiscoTema.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRiscoTema.java new file mode 100644 index 00000000..208a9ebc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/HsRiscoTema.java @@ -0,0 +1,347 @@ +/* +* HsRiscoTema.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class HsRiscoTema extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.hs_risco_tema"; + + 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 = new java.util.LinkedList< db.data.siprp_local.outer.HsRiscoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Ids.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Ids.java new file mode 100644 index 00000000..42cc4252 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/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 db.data.siprp_local.inner; + + +public class Ids extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.ids"; + + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Image.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Image.java new file mode 100644 index 00000000..b10fcdf5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Image.java @@ -0,0 +1,371 @@ +/* +* Image.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Image extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.image"; + + 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 = new java.util.LinkedList< db.data.siprp_local.outer.EmpresasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.MarcacoesTecnicosHstData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Lembretes.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Lembretes.java new file mode 100644 index 00000000..fd63650e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Lembretes.java @@ -0,0 +1,1708 @@ +/* +* Lembretes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Lembretes extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + 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.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 ); + com.evolute.entity.evo.EvoDataObject.register( Lembretes.CLASS_IDENTIFIER, Lembretes.EXAME_ID, Lembretes.TO_EXAME_ID ); + FIELD_INDEXES.put( Lembretes.EXAME_ID, Lembretes.EXAME_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.EXAME_ID_FULL, Lembretes.EXAME_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.TO_EXAME_ID, Lembretes.TO_EXAME_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Lembretes.CLASS_IDENTIFIER, Lembretes.MARCACOES_EMPRESA_ID, Lembretes.TO_MARCACOES_EMPRESA_ID ); + FIELD_INDEXES.put( Lembretes.MARCACOES_EMPRESA_ID, Lembretes.MARCACOES_EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.MARCACOES_EMPRESA_ID_FULL, Lembretes.MARCACOES_EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.TO_MARCACOES_EMPRESA_ID, Lembretes.TO_MARCACOES_EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.DATA_ALVO, Lembretes.DATA_ALVO_INDEX ); + FIELD_INDEXES.put( Lembretes.DATA_ALVO_FULL, Lembretes.DATA_ALVO_INDEX ); + FIELD_INDEXES.put( Lembretes.DATA_OLD, Lembretes.DATA_OLD_INDEX ); + FIELD_INDEXES.put( Lembretes.DATA_OLD_FULL, Lembretes.DATA_OLD_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( Lembretes.class, Lembretes.EMPRESA_ID, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( Lembretes.class, Lembretes.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores = + new com.evolute.entity.ForeignKey( Lembretes.class, Lembretes.TRABALHADOR_ID, db.data.siprp_local.outer.TrabalhadoresData.class, db.data.siprp_local.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, db.data.siprp_local.outer.MarcacoesEstabelecimentoData.class, db.data.siprp_local.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, db.data.siprp_local.outer.MarcacoesTrabalhadorData.class, db.data.siprp_local.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, db.data.siprp_local.outer.TrabalhadoresConsultasDatasData.class, db.data.siprp_local.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, db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.class, db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyexame_idToexames = + new com.evolute.entity.ForeignKey( Lembretes.class, Lembretes.EXAME_ID, db.data.siprp_local.outer.ExamesData.class, db.data.siprp_local.outer.ExamesData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymarcacoes_empresa_idTomarcacoes_empresa = + new com.evolute.entity.ForeignKey( Lembretes.class, Lembretes.MARCACOES_EMPRESA_ID, db.data.siprp_local.outer.MarcacoesEmpresaData.class, db.data.siprp_local.outer.MarcacoesEmpresaData.ID ); + + public static final String TABLENAME = "lembretes"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.lembretes"; + + 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 DATA = "data"; + public static final String DATA_FULL = "lembretes.data"; + public static final int DATA_INDEX = 2; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "lembretes.descricao"; + public static final int DESCRICAO_INDEX = 3; + public static final String TEXTO = "texto"; + public static final String TEXTO_FULL = "lembretes.texto"; + public static final int TEXTO_INDEX = 4; + 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 = 5; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final String TO_EMPRESA_ID_FULL = "lembretes.to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 6; + 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 = 7; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID_FULL = "lembretes.to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 8; + 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 = 9; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final String TO_TRABALHADOR_ID_FULL = "lembretes.to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 10; + 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 = 11; + public static final String TO_MARCACAO_ESTABELECIMENTO_ID = "to_marcacao_estabelecimento_id"; + public static final String TO_MARCACAO_ESTABELECIMENTO_ID_FULL = "lembretes.to_marcacao_estabelecimento_id"; + public static final int TO_MARCACAO_ESTABELECIMENTO_ID_INDEX = 12; + 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 = 13; + public static final String TO_MARCACAO_TRABALHADOR_ID = "to_marcacao_trabalhador_id"; + public static final String TO_MARCACAO_TRABALHADOR_ID_FULL = "lembretes.to_marcacao_trabalhador_id"; + public static final int TO_MARCACAO_TRABALHADOR_ID_INDEX = 14; + 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 = 15; + 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 = 16; + 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 = 17; + 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 = 18; + 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 = 19; + public static final String TO_TRABALHADORES_CONSULTAS_DATAS_ID = "to_trabalhadores_consultas_datas_id"; + public static final String TO_TRABALHADORES_CONSULTAS_DATAS_ID_FULL = "lembretes.to_trabalhadores_consultas_datas_id"; + public static final int TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX = 20; + 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 = 21; + public static final String TO_TRABALHADORES_ECDS_DATAS_ID = "to_trabalhadores_ecds_datas_id"; + public static final String TO_TRABALHADORES_ECDS_DATAS_ID_FULL = "lembretes.to_trabalhadores_ecds_datas_id"; + public static final int TO_TRABALHADORES_ECDS_DATAS_ID_INDEX = 22; + 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 = 23; + public static final String EXAME_ID = "exame_id"; + public static final String EXAME_ID_FULL = "lembretes.exame_id"; + public static final int EXAME_ID_INDEX = 24; + public static final String TO_EXAME_ID = "to_exame_id"; + public static final String TO_EXAME_ID_FULL = "lembretes.to_exame_id"; + public static final int TO_EXAME_ID_INDEX = 25; + public static final String MARCACOES_EMPRESA_ID = "marcacoes_empresa_id"; + public static final String MARCACOES_EMPRESA_ID_FULL = "lembretes.marcacoes_empresa_id"; + public static final int MARCACOES_EMPRESA_ID_INDEX = 26; + public static final String TO_MARCACOES_EMPRESA_ID = "to_marcacoes_empresa_id"; + public static final String TO_MARCACOES_EMPRESA_ID_FULL = "lembretes.to_marcacoes_empresa_id"; + public static final int TO_MARCACOES_EMPRESA_ID_INDEX = 27; + public static final String DATA_ALVO = "data_alvo"; + public static final String DATA_ALVO_FULL = "lembretes.data_alvo"; + public static final int DATA_ALVO_INDEX = 28; + public static final String DATA_OLD = "data_old"; + public static final String DATA_OLD_FULL = "lembretes.data_old"; + public static final int DATA_OLD_INDEX = 29; + + public static final String FIELD_NAMES[] = new String[]{ + 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, + EXAME_ID, TO_EXAME_ID, MARCACOES_EMPRESA_ID, TO_MARCACOES_EMPRESA_ID, + DATA_ALVO, DATA_OLD, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + 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, + TABLENAME + "." + EXAME_ID, TABLENAME + "." + TO_EXAME_ID, TABLENAME + "." + MARCACOES_EMPRESA_ID, TABLENAME + "." + TO_MARCACOES_EMPRESA_ID, + TABLENAME + "." + DATA_ALVO, TABLENAME + "." + DATA_OLD, }; + + 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, EXAME_ID, MARCACOES_EMPRESA_ID, DATA_ALVO, DATA_OLD, }; + + + 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, EXAME_ID, MARCACOES_EMPRESA_ID, DATA_ALVO, DATA_OLD, }; + + private Integer id; + private Integer tipo_id; + private java.util.Date data; + private String descricao; + private String texto; + private Integer empresa_id; + private db.data.siprp_local.outer.EmpresasData to_empresa_id; + private Integer estabelecimento_id; + private db.data.siprp_local.outer.EstabelecimentosData to_estabelecimento_id; + private Integer trabalhador_id; + private db.data.siprp_local.outer.TrabalhadoresData to_trabalhador_id; + private Integer marcacao_estabelecimento_id; + private db.data.siprp_local.outer.MarcacoesEstabelecimentoData to_marcacao_estabelecimento_id; + private Integer marcacao_trabalhador_id; + private db.data.siprp_local.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 db.data.siprp_local.outer.TrabalhadoresConsultasDatasData to_trabalhadores_consultas_datas_id; + private Integer trabalhadores_ecds_datas_id; + private db.data.siprp_local.outer.TrabalhadoresEcdsDatasData to_trabalhadores_ecds_datas_id; + private java.sql.Timestamp deleted_date; + private Integer exame_id; + private db.data.siprp_local.outer.ExamesData to_exame_id; + private Integer marcacoes_empresa_id; + private db.data.siprp_local.outer.MarcacoesEmpresaData to_marcacoes_empresa_id; + private java.util.Date data_alvo; + private java.util.Date data_old; + + 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, 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 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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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 db.data.siprp_local.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 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 db.data.siprp_local.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( db.data.siprp_local.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 Integer getMarcacoes_empresa_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MARCACOES_EMPRESA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.marcacoes_empresa_id; + } + + public void setMarcacoes_empresa_id( Integer marcacoes_empresa_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( MARCACOES_EMPRESA_ID, marcacoes_empresa_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.marcacoes_empresa_id = marcacoes_empresa_id; + LAZY_LOADED_OBJECTS.put( MARCACOES_EMPRESA_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.MarcacoesEmpresaData toMarcacoes_empresa_id() + { + try + { + prepare( TO_MARCACOES_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_marcacoes_empresa_id; + } + + public void setToMarcacoes_empresa_id( db.data.siprp_local.outer.MarcacoesEmpresaData to_marcacoes_empresa_id ) + { + try + { + preProcess( TO_MARCACOES_EMPRESA_ID, to_marcacoes_empresa_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_marcacoes_empresa_id = to_marcacoes_empresa_id; + } + + public java.util.Date getData_alvo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ALVO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_alvo; + } + + public void setData_alvo( java.util.Date data_alvo ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ALVO, data_alvo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_alvo = data_alvo; + LAZY_LOADED_OBJECTS.put( DATA_ALVO, Boolean.TRUE ); + } + + public java.util.Date getData_old() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_OLD ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_old; + } + + public void setData_old( java.util.Date data_old ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_OLD, data_old ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_old = data_old; + LAZY_LOADED_OBJECTS.put( DATA_OLD, 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.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; + case Lembretes.EXAME_ID_INDEX: + value = getExame_id(); + break; + case Lembretes.TO_EXAME_ID_INDEX: + value = toExame_id(); + break; + case Lembretes.MARCACOES_EMPRESA_ID_INDEX: + value = getMarcacoes_empresa_id(); + break; + case Lembretes.TO_MARCACOES_EMPRESA_ID_INDEX: + value = toMarcacoes_empresa_id(); + break; + case Lembretes.DATA_ALVO_INDEX: + value = getData_alvo(); + break; + case Lembretes.DATA_OLD_INDEX: + value = getData_old(); + 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.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; + case Lembretes.EXAME_ID_INDEX: + value = this.exame_id; + break; + case Lembretes.TO_EXAME_ID_INDEX: + value = this.to_exame_id; + break; + case Lembretes.MARCACOES_EMPRESA_ID_INDEX: + value = this.marcacoes_empresa_id; + break; + case Lembretes.TO_MARCACOES_EMPRESA_ID_INDEX: + value = this.to_marcacoes_empresa_id; + break; + case Lembretes.DATA_ALVO_INDEX: + value = this.data_alvo; + break; + case Lembretes.DATA_OLD_INDEX: + value = this.data_old; + 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.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( ( db.data.siprp_local.outer.EmpresasData ) value ); + break; + case Lembretes.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case Lembretes.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( db.data.siprp_local.outer.EstabelecimentosData ) value ); + break; + case Lembretes.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case Lembretes.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.outer.TrabalhadoresEcdsDatasData ) value ); + break; + case Lembretes.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case Lembretes.EXAME_ID_INDEX: + setExame_id( ( Integer ) value ); + break; + case Lembretes.TO_EXAME_ID_INDEX: + setToExame_id( ( db.data.siprp_local.outer.ExamesData ) value ); + break; + case Lembretes.MARCACOES_EMPRESA_ID_INDEX: + setMarcacoes_empresa_id( ( Integer ) value ); + break; + case Lembretes.TO_MARCACOES_EMPRESA_ID_INDEX: + setToMarcacoes_empresa_id( ( db.data.siprp_local.outer.MarcacoesEmpresaData ) value ); + break; + case Lembretes.DATA_ALVO_INDEX: + setData_alvo( ( java.util.Date ) value ); + break; + case Lembretes.DATA_OLD_INDEX: + setData_old( ( java.util.Date ) 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.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.outer.TrabalhadoresEcdsDatasData ) value; + break; + case Lembretes.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case Lembretes.EXAME_ID_INDEX: + this.exame_id = ( Integer ) value; + break; + case Lembretes.TO_EXAME_ID_INDEX: + this.to_exame_id = ( db.data.siprp_local.outer.ExamesData ) value; + break; + case Lembretes.MARCACOES_EMPRESA_ID_INDEX: + this.marcacoes_empresa_id = ( Integer ) value; + break; + case Lembretes.TO_MARCACOES_EMPRESA_ID_INDEX: + this.to_marcacoes_empresa_id = ( db.data.siprp_local.outer.MarcacoesEmpresaData ) value; + break; + case Lembretes.DATA_ALVO_INDEX: + this.data_alvo = ( java.util.Date ) value; + break; + case Lembretes.DATA_OLD_INDEX: + this.data_old = ( 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 Lembretes.ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TIPO_ID_INDEX: + theClass = Integer.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 = db.data.siprp_local.outer.EmpresasData.class; + break; + case Lembretes.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.outer.EstabelecimentosData.class; + break; + case Lembretes.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_TRABALHADOR_ID_INDEX: + theClass = db.data.siprp_local.outer.TrabalhadoresData.class; + break; + case Lembretes.MARCACAO_ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_MARCACAO_ESTABELECIMENTO_ID_INDEX: + theClass = db.data.siprp_local.outer.MarcacoesEstabelecimentoData.class; + break; + case Lembretes.MARCACAO_TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_MARCACAO_TRABALHADOR_ID_INDEX: + theClass = db.data.siprp_local.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 = db.data.siprp_local.outer.TrabalhadoresConsultasDatasData.class; + break; + case Lembretes.TRABALHADORES_ECDS_DATAS_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + theClass = db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.class; + break; + case Lembretes.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case Lembretes.EXAME_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_EXAME_ID_INDEX: + theClass = db.data.siprp_local.outer.ExamesData.class; + break; + case Lembretes.MARCACOES_EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_MARCACOES_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.outer.MarcacoesEmpresaData.class; + break; + case Lembretes.DATA_ALVO_INDEX: + theClass = java.util.Date.class; + break; + case Lembretes.DATA_OLD_INDEX: + theClass = java.util.Date.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/LembretesTipos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/LembretesTipos.java new file mode 100644 index 00000000..3febd3e2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/LembretesTipos.java @@ -0,0 +1,431 @@ +/* +* LembretesTipos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class LembretesTipos extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.lembretes_tipos"; + + 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 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesEmpresa.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesEmpresa.java new file mode 100644 index 00000000..c51b43ce --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesEmpresa.java @@ -0,0 +1,498 @@ +/* +* MarcacoesEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class MarcacoesEmpresa extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final String TABLENAME = "marcacoes_empresa"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.marcacoes_empresa"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_empresa.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_empresa.data"; + public static final int DATA_INDEX = 1; + public static final String TEXTO = "texto"; + public static final String TEXTO_FULL = "marcacoes_empresa.texto"; + public static final int TEXTO_INDEX = 2; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "marcacoes_empresa.empresa_id"; + public static final int EMPRESA_ID_INDEX = 3; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final String TO_EMPRESA_ID_FULL = "marcacoes_empresa.to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 4; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "marcacoes_empresa.realizada"; + public static final int REALIZADA_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, TEXTO, EMPRESA_ID, TO_EMPRESA_ID, REALIZADA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA, TABLENAME + "." + TEXTO, TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + REALIZADA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, TEXTO, EMPRESA_ID, REALIZADA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA, TEXTO, EMPRESA_ID, REALIZADA, }; + + private Integer id; + private java.util.Date data; + private String texto; + private Integer empresa_id; + private db.data.siprp_local.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.ListfromLembretes_marcacoes_empresa_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.LembretesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.LembretesData.class , getPrimaryKey().getMap().get("id"), "marcacoes_empresa_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 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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.EmpresasData ) value ); + break; + case MarcacoesEmpresa.REALIZADA_INDEX: + setRealizada( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesEmpresa.ID_INDEX: + this.id = ( Integer ) value; + break; + case MarcacoesEmpresa.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case MarcacoesEmpresa.TEXTO_INDEX: + this.texto = ( String ) value; + break; + case MarcacoesEmpresa.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case MarcacoesEmpresa.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( db.data.siprp_local.outer.EmpresasData ) value; + break; + case MarcacoesEmpresa.REALIZADA_INDEX: + this.realizada = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case MarcacoesEmpresa.ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesEmpresa.DATA_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesEmpresa.TEXTO_INDEX: + theClass = String.class; + break; + case MarcacoesEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesEmpresa.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesEstabelecimento.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesEstabelecimento.java new file mode 100644 index 00000000..533e3e4c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesEstabelecimento.java @@ -0,0 +1,889 @@ +/* +* MarcacoesEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytecnico_hstTomarcacoes_tecnicos_hst = + new com.evolute.entity.ForeignKey( MarcacoesEstabelecimento.class, MarcacoesEstabelecimento.TECNICO_HST, db.data.siprp_local.outer.MarcacoesTecnicosHstData.class, db.data.siprp_local.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, db.data.siprp_local.outer.MarcacoesTecnicosHstData.class, db.data.siprp_local.outer.MarcacoesTecnicosHstData.ID ); + + public static final String TABLENAME = "marcacoes_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.marcacoes_estabelecimento"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_estabelecimento.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_estabelecimento.data"; + public static final int DATA_INDEX = 1; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "marcacoes_estabelecimento.realizada"; + public static final int REALIZADA_INDEX = 2; + public static final String DATA_EMAIL = "data_email"; + public static final String DATA_EMAIL_FULL = "marcacoes_estabelecimento.data_email"; + public static final int DATA_EMAIL_INDEX = 3; + public static final String DATA_RELATORIO = "data_relatorio"; + public static final String DATA_RELATORIO_FULL = "marcacoes_estabelecimento.data_relatorio"; + public static final int DATA_RELATORIO_INDEX = 4; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "marcacoes_estabelecimento.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 5; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final String TO_ESTABELECIMENTO_ID_FULL = "marcacoes_estabelecimento.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 String TO_TECNICO_HST_FULL = "marcacoes_estabelecimento.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 String TO_TECNICO_SUPERIOR_HST_FULL = "marcacoes_estabelecimento.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 db.data.siprp_local.outer.EstabelecimentosData to_estabelecimento_id; + private Integer estado; + private Integer tecnico_hst; + private db.data.siprp_local.outer.MarcacoesTecnicosHstData to_tecnico_hst; + private String observacoes; + private Integer tecnico_superior_hst; + private db.data.siprp_local.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.ListfromFilFileMarcacoesEstabelecimento_marcacao_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.FilFileMarcacoesEstabelecimentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.FilFileMarcacoesEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "marcacao_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromHsRelatorio_marcacao_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.HsRelatorioData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.LembretesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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 = db.data.siprp_local.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 = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesGruposRealizados.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesGruposRealizados.java new file mode 100644 index 00000000..1f95dc3c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesGruposRealizados.java @@ -0,0 +1,537 @@ +/* +* MarcacoesGruposRealizados.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class MarcacoesGruposRealizados extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.MarcacoesTrabalhadorData.class, db.data.siprp_local.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, db.data.siprp_local.outer.PrtGruposProtocoloData.class, db.data.siprp_local.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, db.data.siprp_local.outer.MarcacoesTrabalhadorEstadosData.class, db.data.siprp_local.outer.MarcacoesTrabalhadorEstadosData.ID ); + + public static final String TABLENAME = "marcacoes_grupos_realizados"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.marcacoes_grupos_realizados"; + + 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 String TO_MARCACAO_TRABALHADOR_ID_FULL = "marcacoes_grupos_realizados.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 String TO_GRUPO_PROTOCOLO_ID_FULL = "marcacoes_grupos_realizados.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 String TO_MARCACOES_TRABALHADOR_ESTADO_ID_FULL = "marcacoes_grupos_realizados.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 db.data.siprp_local.outer.MarcacoesTrabalhadorData to_marcacao_trabalhador_id; + private Integer grupo_protocolo_id; + private db.data.siprp_local.outer.PrtGruposProtocoloData to_grupo_protocolo_id; + private Integer marcacoes_trabalhador_estado_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.MarcacoesTrabalhadorData.class; + break; + case MarcacoesGruposRealizados.GRUPO_PROTOCOLO_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesGruposRealizados.TO_GRUPO_PROTOCOLO_ID_INDEX: + theClass = db.data.siprp_local.outer.PrtGruposProtocoloData.class; + break; + case MarcacoesGruposRealizados.MARCACOES_TRABALHADOR_ESTADO_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesGruposRealizados.TO_MARCACOES_TRABALHADOR_ESTADO_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesTecnicosHst.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesTecnicosHst.java new file mode 100644 index 00000000..d7628ac5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesTecnicosHst.java @@ -0,0 +1,769 @@ +/* +* MarcacoesTecnicosHst.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class MarcacoesTecnicosHst extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.ImageData.class, db.data.siprp_local.outer.ImageData.ID ); + + public static final String TABLENAME = "marcacoes_tecnicos_hst"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.marcacoes_tecnicos_hst"; + + 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 String TO_ASSINATURA_FULL = "marcacoes_tecnicos_hst.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 db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.MarcacoesEstabelecimentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.MarcacoesEstabelecimentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesTrabalhador.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesTrabalhador.java new file mode 100644 index 00000000..190e67da --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesTrabalhador.java @@ -0,0 +1,1039 @@ +/* +* MarcacoesTrabalhador.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class MarcacoesTrabalhador extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + FIELD_INDEXES.put( MarcacoesTrabalhador.MEDICO_ID, MarcacoesTrabalhador.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.MEDICO_ID_FULL, MarcacoesTrabalhador.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.INSERTED_STAMP, MarcacoesTrabalhador.INSERTED_STAMP_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.INSERTED_STAMP_FULL, MarcacoesTrabalhador.INSERTED_STAMP_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.DELETED_STAMP, MarcacoesTrabalhador.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.DELETED_STAMP_FULL, MarcacoesTrabalhador.DELETED_STAMP_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores = + new com.evolute.entity.ForeignKey( MarcacoesTrabalhador.class, MarcacoesTrabalhador.TRABALHADOR_ID, db.data.siprp_local.outer.TrabalhadoresData.class, db.data.siprp_local.outer.TrabalhadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( MarcacoesTrabalhador.class, MarcacoesTrabalhador.PRESTADOR_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "marcacoes_trabalhador"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.marcacoes_trabalhador"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_trabalhador.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_trabalhador.data"; + public static final int DATA_INDEX = 1; + public static final String REALIZADA = "realizada"; + public static final String REALIZADA_FULL = "marcacoes_trabalhador.realizada"; + public static final int REALIZADA_INDEX = 2; + public static final String DATA_EMAIL = "data_email"; + public static final String DATA_EMAIL_FULL = "marcacoes_trabalhador.data_email"; + public static final int DATA_EMAIL_INDEX = 3; + public static final String DATA_RELATORIO = "data_relatorio"; + public static final String DATA_RELATORIO_FULL = "marcacoes_trabalhador.data_relatorio"; + public static final int DATA_RELATORIO_INDEX = 4; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "marcacoes_trabalhador.tipo"; + public static final int TIPO_INDEX = 5; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "marcacoes_trabalhador.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 6; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final String TO_TRABALHADOR_ID_FULL = "marcacoes_trabalhador.to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 7; + public static final String 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 String TO_PRESTADOR_ID_FULL = "marcacoes_trabalhador.to_prestador_id"; + public static final int TO_PRESTADOR_ID_INDEX = 12; + public static final String MEDICO_ID = "medico_id"; + public static final String MEDICO_ID_FULL = "marcacoes_trabalhador.medico_id"; + public static final int MEDICO_ID_INDEX = 13; + public static final String INSERTED_STAMP = "inserted_stamp"; + public static final String INSERTED_STAMP_FULL = "marcacoes_trabalhador.inserted_stamp"; + public static final int INSERTED_STAMP_INDEX = 14; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "marcacoes_trabalhador.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 15; + + 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, + MEDICO_ID, INSERTED_STAMP, DELETED_STAMP, }; + + 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, + TABLENAME + "." + MEDICO_ID, TABLENAME + "." + INSERTED_STAMP, TABLENAME + "." + DELETED_STAMP, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR_ID, MOTIVO, ESTADO, + OBSERVACOES, PRESTADOR_ID, MEDICO_ID, INSERTED_STAMP, DELETED_STAMP, }; + + + 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, MEDICO_ID, INSERTED_STAMP, DELETED_STAMP, }; + + private Integer id; + private java.util.Date data; + private String realizada; + private java.util.Date data_email; + private java.util.Date data_relatorio; + private Integer tipo; + private Integer trabalhador_id; + private db.data.siprp_local.outer.TrabalhadoresData to_trabalhador_id; + private Integer motivo; + private Integer estado; + private String observacoes; + private Integer prestador_id; + private db.data.siprp_local.outer.PrestadoresData to_prestador_id; + private Integer medico_id; + private java.sql.Timestamp inserted_stamp; + private java.sql.Timestamp deleted_stamp; + + 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, 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 = new java.util.LinkedList< db.data.siprp_local.outer.LembretesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.MarcacoesGruposRealizadosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.MarcacoesTrabalhadorEstadosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 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 java.sql.Timestamp getInserted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( INSERTED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.inserted_stamp; + } + + public void setInserted_stamp( java.sql.Timestamp inserted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( INSERTED_STAMP, inserted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.inserted_stamp = inserted_stamp; + LAZY_LOADED_OBJECTS.put( INSERTED_STAMP, Boolean.TRUE ); + } + + public java.sql.Timestamp getDeleted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_stamp; + } + + public void setDeleted_stamp( java.sql.Timestamp deleted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_STAMP, deleted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_stamp = deleted_stamp; + LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case 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; + case MarcacoesTrabalhador.MEDICO_ID_INDEX: + value = getMedico_id(); + break; + case MarcacoesTrabalhador.INSERTED_STAMP_INDEX: + value = getInserted_stamp(); + break; + case MarcacoesTrabalhador.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + 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; + case MarcacoesTrabalhador.MEDICO_ID_INDEX: + value = this.medico_id; + break; + case MarcacoesTrabalhador.INSERTED_STAMP_INDEX: + value = this.inserted_stamp; + break; + case MarcacoesTrabalhador.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTrabalhador.ID_INDEX: + setId( ( Integer ) value ); + break; + case MarcacoesTrabalhador.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case MarcacoesTrabalhador.REALIZADA_INDEX: + setRealizada( ( String ) value ); + break; + case MarcacoesTrabalhador.DATA_EMAIL_INDEX: + setData_email( ( java.util.Date ) value ); + break; + case MarcacoesTrabalhador.DATA_RELATORIO_INDEX: + setData_relatorio( ( java.util.Date ) value ); + break; + case MarcacoesTrabalhador.TIPO_INDEX: + setTipo( ( Integer ) value ); + break; + case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( db.data.siprp_local.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( ( db.data.siprp_local.outer.PrestadoresData ) value ); + break; + case MarcacoesTrabalhador.MEDICO_ID_INDEX: + setMedico_id( ( Integer ) value ); + break; + case MarcacoesTrabalhador.INSERTED_STAMP_INDEX: + setInserted_stamp( ( java.sql.Timestamp ) value ); + break; + case MarcacoesTrabalhador.DELETED_STAMP_INDEX: + setDeleted_stamp( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTrabalhador.ID_INDEX: + this.id = ( Integer ) value; + break; + case MarcacoesTrabalhador.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case MarcacoesTrabalhador.REALIZADA_INDEX: + this.realizada = ( String ) value; + break; + case MarcacoesTrabalhador.DATA_EMAIL_INDEX: + this.data_email = ( java.util.Date ) value; + break; + case MarcacoesTrabalhador.DATA_RELATORIO_INDEX: + this.data_relatorio = ( java.util.Date ) value; + break; + case MarcacoesTrabalhador.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX: + this.to_trabalhador_id = ( db.data.siprp_local.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 = ( db.data.siprp_local.outer.PrestadoresData ) value; + break; + case MarcacoesTrabalhador.MEDICO_ID_INDEX: + this.medico_id = ( Integer ) value; + break; + case MarcacoesTrabalhador.INSERTED_STAMP_INDEX: + this.inserted_stamp = ( java.sql.Timestamp ) value; + break; + case MarcacoesTrabalhador.DELETED_STAMP_INDEX: + this.deleted_stamp = ( java.sql.Timestamp ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case MarcacoesTrabalhador.ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.DATA_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesTrabalhador.REALIZADA_INDEX: + theClass = String.class; + break; + case MarcacoesTrabalhador.DATA_EMAIL_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesTrabalhador.DATA_RELATORIO_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesTrabalhador.TIPO_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX: + theClass = db.data.siprp_local.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 = db.data.siprp_local.outer.PrestadoresData.class; + break; + case MarcacoesTrabalhador.MEDICO_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.INSERTED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + case MarcacoesTrabalhador.DELETED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : 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, ( 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesTrabalhadorEstados.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesTrabalhadorEstados.java new file mode 100644 index 00000000..a3030fdb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MarcacoesTrabalhadorEstados.java @@ -0,0 +1,548 @@ +/* +* MarcacoesTrabalhadorEstados.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class MarcacoesTrabalhadorEstados extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.MarcacoesTrabalhadorData.class, db.data.siprp_local.outer.MarcacoesTrabalhadorData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( MarcacoesTrabalhadorEstados.class, MarcacoesTrabalhadorEstados.PRESTADOR_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "marcacoes_trabalhador_estados"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.marcacoes_trabalhador_estados"; + + 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 String TO_MARCACAO_ID_FULL = "marcacoes_trabalhador_estados.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 String TO_PRESTADOR_ID_FULL = "marcacoes_trabalhador_estados.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 db.data.siprp_local.outer.MarcacoesTrabalhadorData to_marcacao_id; + private Integer prestador_id; + private db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.MarcacoesGruposRealizadosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.outer.MarcacoesTrabalhadorData ) value ); + break; + case MarcacoesTrabalhadorEstados.PRESTADOR_ID_INDEX: + setPrestador_id( ( Integer ) value ); + break; + case MarcacoesTrabalhadorEstados.TO_PRESTADOR_ID_INDEX: + setToPrestador_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.MarcacoesTrabalhadorData.class; + break; + case MarcacoesTrabalhadorEstados.PRESTADOR_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhadorEstados.TO_PRESTADOR_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MedVacinaTipo.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MedVacinaTipo.java new file mode 100644 index 00000000..94f2f542 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/MedVacinaTipo.java @@ -0,0 +1,448 @@ +/* +* MedVacinaTipo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class MedVacinaTipo extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( MedVacinaTipo.ID, MedVacinaTipo.ID_INDEX ); + FIELD_INDEXES.put( MedVacinaTipo.ID_FULL, MedVacinaTipo.ID_INDEX ); + FIELD_INDEXES.put( MedVacinaTipo.CODIGO, MedVacinaTipo.CODIGO_INDEX ); + FIELD_INDEXES.put( MedVacinaTipo.CODIGO_FULL, MedVacinaTipo.CODIGO_INDEX ); + FIELD_INDEXES.put( MedVacinaTipo.DESCRICAO, MedVacinaTipo.DESCRICAO_INDEX ); + FIELD_INDEXES.put( MedVacinaTipo.DESCRICAO_FULL, MedVacinaTipo.DESCRICAO_INDEX ); + FIELD_INDEXES.put( MedVacinaTipo.ORDEM, MedVacinaTipo.ORDEM_INDEX ); + FIELD_INDEXES.put( MedVacinaTipo.ORDEM_FULL, MedVacinaTipo.ORDEM_INDEX ); + FIELD_INDEXES.put( MedVacinaTipo.DELETED_STAMP, MedVacinaTipo.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( MedVacinaTipo.DELETED_STAMP_FULL, MedVacinaTipo.DELETED_STAMP_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "med_vacina_tipo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.med_vacina_tipo"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "med_vacina_tipo.id"; + public static final int ID_INDEX = 0; + public static final String CODIGO = "codigo"; + public static final String CODIGO_FULL = "med_vacina_tipo.codigo"; + public static final int CODIGO_INDEX = 1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "med_vacina_tipo.descricao"; + public static final int DESCRICAO_INDEX = 2; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "med_vacina_tipo.ordem"; + public static final int ORDEM_INDEX = 3; + public static final String DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "med_vacina_tipo.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + CODIGO, DESCRICAO, ORDEM, DELETED_STAMP, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + CODIGO, TABLENAME + "." + DESCRICAO, TABLENAME + "." + ORDEM, TABLENAME + "." + DELETED_STAMP, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, CODIGO, DESCRICAO, ORDEM, DELETED_STAMP, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, CODIGO, DESCRICAO, ORDEM, DELETED_STAMP, }; + + private Integer id; + private String codigo; + private String descricao; + private Integer ordem; + private java.sql.Timestamp deleted_stamp; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public MedVacinaTipo() + { + 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 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 java.util.ListfromAptOutrasVacina_vacina_tipo() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.AptOutrasVacinaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.AptOutrasVacinaData.class , getPrimaryKey().getMap().get("ordem"), "vacina_tipo" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.sql.Timestamp getDeleted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_stamp; + } + + public void setDeleted_stamp( java.sql.Timestamp deleted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_STAMP, deleted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_stamp = deleted_stamp; + LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MedVacinaTipo.ID_INDEX: + value = getId(); + break; + case MedVacinaTipo.CODIGO_INDEX: + value = getCodigo(); + break; + case MedVacinaTipo.DESCRICAO_INDEX: + value = getDescricao(); + break; + case MedVacinaTipo.ORDEM_INDEX: + value = getOrdem(); + break; + case MedVacinaTipo.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MedVacinaTipo.ID_INDEX: + value = this.id; + break; + case MedVacinaTipo.CODIGO_INDEX: + value = this.codigo; + break; + case MedVacinaTipo.DESCRICAO_INDEX: + value = this.descricao; + break; + case MedVacinaTipo.ORDEM_INDEX: + value = this.ordem; + break; + case MedVacinaTipo.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MedVacinaTipo.ID_INDEX: + setId( ( Integer ) value ); + break; + case MedVacinaTipo.CODIGO_INDEX: + setCodigo( ( String ) value ); + break; + case MedVacinaTipo.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case MedVacinaTipo.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + case MedVacinaTipo.DELETED_STAMP_INDEX: + setDeleted_stamp( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MedVacinaTipo.ID_INDEX: + this.id = ( Integer ) value; + break; + case MedVacinaTipo.CODIGO_INDEX: + this.codigo = ( String ) value; + break; + case MedVacinaTipo.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case MedVacinaTipo.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + case MedVacinaTipo.DELETED_STAMP_INDEX: + this.deleted_stamp = ( java.sql.Timestamp ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case MedVacinaTipo.ID_INDEX: + theClass = Integer.class; + break; + case MedVacinaTipo.CODIGO_INDEX: + theClass = String.class; + break; + case MedVacinaTipo.DESCRICAO_INDEX: + theClass = String.class; + break; + case MedVacinaTipo.ORDEM_INDEX: + theClass = Integer.class; + break; + case MedVacinaTipo.DELETED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : MedVacinaTipo._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, MedVacinaTipo.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Medicos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Medicos.java new file mode 100644 index 00000000..121f742a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Medicos.java @@ -0,0 +1,415 @@ +/* +* Medicos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Medicos extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.medicos"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "medicos.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "medicos.nome"; + public static final int NOME_INDEX = 1; + public static final String NUMERO_CEDULA = "numero_cedula"; + public static final String NUMERO_CEDULA_FULL = "medicos.numero_cedula"; + public static final int NUMERO_CEDULA_INDEX = 2; + public static final String INACTIVO = "inactivo"; + public static final String INACTIVO_FULL = "medicos.inactivo"; + public static final int INACTIVO_INDEX = 3; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, NUMERO_CEDULA, INACTIVO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + NUMERO_CEDULA, TABLENAME + "." + INACTIVO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, NUMERO_CEDULA, INACTIVO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, NUMERO_CEDULA, INACTIVO, }; + + private Integer id; + private String nome; + private String numero_cedula; + private String inactivo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Medicos() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 = new java.util.LinkedList< db.data.siprp_local.outer.EstabelecimentosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.ExamesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Paises.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Paises.java new file mode 100644 index 00000000..338dd7ba --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Paises.java @@ -0,0 +1,583 @@ +/* +* Paises.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Paises extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Paises.ID, Paises.ID_INDEX ); + FIELD_INDEXES.put( Paises.ID_FULL, Paises.ID_INDEX ); + FIELD_INDEXES.put( Paises.DESCRICAO, Paises.DESCRICAO_INDEX ); + FIELD_INDEXES.put( Paises.DESCRICAO_FULL, Paises.DESCRICAO_INDEX ); + FIELD_INDEXES.put( Paises.DESCRICAO_PLAIN, Paises.DESCRICAO_PLAIN_INDEX ); + FIELD_INDEXES.put( Paises.DESCRICAO_PLAIN_FULL, Paises.DESCRICAO_PLAIN_INDEX ); + FIELD_INDEXES.put( Paises.ORDEM, Paises.ORDEM_INDEX ); + FIELD_INDEXES.put( Paises.ORDEM_FULL, Paises.ORDEM_INDEX ); + FIELD_INDEXES.put( Paises.ACTIVO, Paises.ACTIVO_INDEX ); + FIELD_INDEXES.put( Paises.ACTIVO_FULL, Paises.ACTIVO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Paises.CLASS_IDENTIFIER, Paises.CONTINENTE_ID, Paises.TO_CONTINENTE_ID ); + FIELD_INDEXES.put( Paises.CONTINENTE_ID, Paises.CONTINENTE_ID_INDEX ); + FIELD_INDEXES.put( Paises.CONTINENTE_ID_FULL, Paises.CONTINENTE_ID_INDEX ); + FIELD_INDEXES.put( Paises.TO_CONTINENTE_ID, Paises.TO_CONTINENTE_ID_INDEX ); + FIELD_INDEXES.put( Paises.NACIONALIDADE, Paises.NACIONALIDADE_INDEX ); + FIELD_INDEXES.put( Paises.NACIONALIDADE_FULL, Paises.NACIONALIDADE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeycontinente_idTopaises_continentes = + new com.evolute.entity.ForeignKey( Paises.class, Paises.CONTINENTE_ID, db.data.siprp_local.outer.PaisesContinentesData.class, db.data.siprp_local.outer.PaisesContinentesData.ID ); + + public static final String TABLENAME = "paises"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.paises"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "paises.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "paises.descricao"; + public static final int DESCRICAO_INDEX = 1; + public static final String DESCRICAO_PLAIN = "descricao_plain"; + public static final String DESCRICAO_PLAIN_FULL = "paises.descricao_plain"; + public static final int DESCRICAO_PLAIN_INDEX = 2; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "paises.ordem"; + public static final int ORDEM_INDEX = 3; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "paises.activo"; + public static final int ACTIVO_INDEX = 4; + public static final String CONTINENTE_ID = "continente_id"; + public static final String CONTINENTE_ID_FULL = "paises.continente_id"; + public static final int CONTINENTE_ID_INDEX = 5; + public static final String TO_CONTINENTE_ID = "to_continente_id"; + public static final String TO_CONTINENTE_ID_FULL = "paises.to_continente_id"; + public static final int TO_CONTINENTE_ID_INDEX = 6; + public static final String NACIONALIDADE = "nacionalidade"; + public static final String NACIONALIDADE_FULL = "paises.nacionalidade"; + public static final int NACIONALIDADE_INDEX = 7; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, DESCRICAO_PLAIN, ORDEM, ACTIVO, CONTINENTE_ID, TO_CONTINENTE_ID, + NACIONALIDADE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + DESCRICAO_PLAIN, TABLENAME + "." + ORDEM, TABLENAME + "." + ACTIVO, TABLENAME + "." + CONTINENTE_ID, TABLENAME + "." + TO_CONTINENTE_ID, + TABLENAME + "." + NACIONALIDADE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, DESCRICAO_PLAIN, ORDEM, ACTIVO, CONTINENTE_ID, NACIONALIDADE, }; + + + 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, CONTINENTE_ID, NACIONALIDADE, }; + + private Integer id; + private String descricao; + private String descricao_plain; + private Integer ordem; + private String activo; + private Integer continente_id; + private db.data.siprp_local.outer.PaisesContinentesData to_continente_id; + private String nacionalidade; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Paises() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 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 Integer getContinente_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONTINENTE_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.continente_id; + } + + public void setContinente_id( Integer continente_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONTINENTE_ID, continente_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.continente_id = continente_id; + LAZY_LOADED_OBJECTS.put( CONTINENTE_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.PaisesContinentesData toContinente_id() + { + try + { + prepare( TO_CONTINENTE_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_continente_id; + } + + public void setToContinente_id( db.data.siprp_local.outer.PaisesContinentesData to_continente_id ) + { + try + { + preProcess( TO_CONTINENTE_ID, to_continente_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_continente_id = to_continente_id; + } + + 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Paises.ID_INDEX: + value = getId(); + break; + case Paises.DESCRICAO_INDEX: + value = getDescricao(); + break; + case Paises.DESCRICAO_PLAIN_INDEX: + value = getDescricao_plain(); + break; + case Paises.ORDEM_INDEX: + value = getOrdem(); + break; + case Paises.ACTIVO_INDEX: + value = getActivo(); + break; + case Paises.CONTINENTE_ID_INDEX: + value = getContinente_id(); + break; + case Paises.TO_CONTINENTE_ID_INDEX: + value = toContinente_id(); + break; + case Paises.NACIONALIDADE_INDEX: + value = getNacionalidade(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Paises.ID_INDEX: + value = this.id; + break; + case Paises.DESCRICAO_INDEX: + value = this.descricao; + break; + case Paises.DESCRICAO_PLAIN_INDEX: + value = this.descricao_plain; + break; + case Paises.ORDEM_INDEX: + value = this.ordem; + break; + case Paises.ACTIVO_INDEX: + value = this.activo; + break; + case Paises.CONTINENTE_ID_INDEX: + value = this.continente_id; + break; + case Paises.TO_CONTINENTE_ID_INDEX: + value = this.to_continente_id; + break; + case Paises.NACIONALIDADE_INDEX: + value = this.nacionalidade; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Paises.ID_INDEX: + setId( ( Integer ) value ); + break; + case Paises.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case Paises.DESCRICAO_PLAIN_INDEX: + setDescricao_plain( ( String ) value ); + break; + case Paises.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + case Paises.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + case Paises.CONTINENTE_ID_INDEX: + setContinente_id( ( Integer ) value ); + break; + case Paises.TO_CONTINENTE_ID_INDEX: + setToContinente_id( ( db.data.siprp_local.outer.PaisesContinentesData ) value ); + break; + case Paises.NACIONALIDADE_INDEX: + setNacionalidade( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Paises.ID_INDEX: + this.id = ( Integer ) value; + break; + case Paises.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case Paises.DESCRICAO_PLAIN_INDEX: + this.descricao_plain = ( String ) value; + break; + case Paises.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + case Paises.ACTIVO_INDEX: + this.activo = ( String ) value; + break; + case Paises.CONTINENTE_ID_INDEX: + this.continente_id = ( Integer ) value; + break; + case Paises.TO_CONTINENTE_ID_INDEX: + this.to_continente_id = ( db.data.siprp_local.outer.PaisesContinentesData ) value; + break; + case Paises.NACIONALIDADE_INDEX: + this.nacionalidade = ( 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 Paises.ID_INDEX: + theClass = Integer.class; + break; + case Paises.DESCRICAO_INDEX: + theClass = String.class; + break; + case Paises.DESCRICAO_PLAIN_INDEX: + theClass = String.class; + break; + case Paises.ORDEM_INDEX: + theClass = Integer.class; + break; + case Paises.ACTIVO_INDEX: + theClass = String.class; + break; + case Paises.CONTINENTE_ID_INDEX: + theClass = Integer.class; + break; + case Paises.TO_CONTINENTE_ID_INDEX: + theClass = db.data.siprp_local.outer.PaisesContinentesData.class; + break; + case Paises.NACIONALIDADE_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Paises._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, Paises.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PaisesContinentes.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PaisesContinentes.java new file mode 100644 index 00000000..86e29073 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PaisesContinentes.java @@ -0,0 +1,448 @@ +/* +* PaisesContinentes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class PaisesContinentes extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PaisesContinentes.ID, PaisesContinentes.ID_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.ID_FULL, PaisesContinentes.ID_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.DESCRICAO, PaisesContinentes.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.DESCRICAO_FULL, PaisesContinentes.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.DESCRICAO_PLAIN, PaisesContinentes.DESCRICAO_PLAIN_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.DESCRICAO_PLAIN_FULL, PaisesContinentes.DESCRICAO_PLAIN_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.ORDEM, PaisesContinentes.ORDEM_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.ORDEM_FULL, PaisesContinentes.ORDEM_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.ACTIVO, PaisesContinentes.ACTIVO_INDEX ); + FIELD_INDEXES.put( PaisesContinentes.ACTIVO_FULL, PaisesContinentes.ACTIVO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "paises_continentes"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.paises_continentes"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "paises_continentes.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "paises_continentes.descricao"; + public static final int DESCRICAO_INDEX = 1; + public static final String DESCRICAO_PLAIN = "descricao_plain"; + public static final String DESCRICAO_PLAIN_FULL = "paises_continentes.descricao_plain"; + public static final int DESCRICAO_PLAIN_INDEX = 2; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "paises_continentes.ordem"; + public static final int ORDEM_INDEX = 3; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "paises_continentes.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 PaisesContinentes() + { + 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.ListfromPaises_continente_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.PaisesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.PaisesData.class , getPrimaryKey().getMap().get("id"), "continente_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 PaisesContinentes.ID_INDEX: + value = getId(); + break; + case PaisesContinentes.DESCRICAO_INDEX: + value = getDescricao(); + break; + case PaisesContinentes.DESCRICAO_PLAIN_INDEX: + value = getDescricao_plain(); + break; + case PaisesContinentes.ORDEM_INDEX: + value = getOrdem(); + break; + case PaisesContinentes.ACTIVO_INDEX: + value = getActivo(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PaisesContinentes.ID_INDEX: + value = this.id; + break; + case PaisesContinentes.DESCRICAO_INDEX: + value = this.descricao; + break; + case PaisesContinentes.DESCRICAO_PLAIN_INDEX: + value = this.descricao_plain; + break; + case PaisesContinentes.ORDEM_INDEX: + value = this.ordem; + break; + case PaisesContinentes.ACTIVO_INDEX: + value = this.activo; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PaisesContinentes.ID_INDEX: + setId( ( Integer ) value ); + break; + case PaisesContinentes.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case PaisesContinentes.DESCRICAO_PLAIN_INDEX: + setDescricao_plain( ( String ) value ); + break; + case PaisesContinentes.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + case PaisesContinentes.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PaisesContinentes.ID_INDEX: + this.id = ( Integer ) value; + break; + case PaisesContinentes.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case PaisesContinentes.DESCRICAO_PLAIN_INDEX: + this.descricao_plain = ( String ) value; + break; + case PaisesContinentes.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + case PaisesContinentes.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 PaisesContinentes.ID_INDEX: + theClass = Integer.class; + break; + case PaisesContinentes.DESCRICAO_INDEX: + theClass = String.class; + break; + case PaisesContinentes.DESCRICAO_PLAIN_INDEX: + theClass = String.class; + break; + case PaisesContinentes.ORDEM_INDEX: + theClass = Integer.class; + break; + case PaisesContinentes.ACTIVO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PaisesContinentes._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, PaisesContinentes.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PesDocumento.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PesDocumento.java new file mode 100644 index 00000000..ef863f41 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PesDocumento.java @@ -0,0 +1,548 @@ +/* +* PesDocumento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class PesDocumento extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PesDocumento.ID, PesDocumento.ID_INDEX ); + FIELD_INDEXES.put( PesDocumento.ID_FULL, PesDocumento.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PesDocumento.CLASS_IDENTIFIER, PesDocumento.TIPO_ID, PesDocumento.TO_TIPO_ID ); + FIELD_INDEXES.put( PesDocumento.TIPO_ID, PesDocumento.TIPO_ID_INDEX ); + FIELD_INDEXES.put( PesDocumento.TIPO_ID_FULL, PesDocumento.TIPO_ID_INDEX ); + FIELD_INDEXES.put( PesDocumento.TO_TIPO_ID, PesDocumento.TO_TIPO_ID_INDEX ); + FIELD_INDEXES.put( PesDocumento.NUMERO, PesDocumento.NUMERO_INDEX ); + FIELD_INDEXES.put( PesDocumento.NUMERO_FULL, PesDocumento.NUMERO_INDEX ); + FIELD_INDEXES.put( PesDocumento.LOCAL_EMISSAO, PesDocumento.LOCAL_EMISSAO_INDEX ); + FIELD_INDEXES.put( PesDocumento.LOCAL_EMISSAO_FULL, PesDocumento.LOCAL_EMISSAO_INDEX ); + FIELD_INDEXES.put( PesDocumento.DATA_EMISSAO, PesDocumento.DATA_EMISSAO_INDEX ); + FIELD_INDEXES.put( PesDocumento.DATA_EMISSAO_FULL, PesDocumento.DATA_EMISSAO_INDEX ); + FIELD_INDEXES.put( PesDocumento.DATA_VALIDADE, PesDocumento.DATA_VALIDADE_INDEX ); + FIELD_INDEXES.put( PesDocumento.DATA_VALIDADE_FULL, PesDocumento.DATA_VALIDADE_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_idTopes_documento_tipo = + new com.evolute.entity.ForeignKey( PesDocumento.class, PesDocumento.TIPO_ID, db.data.siprp_local.outer.PesDocumentoTipoData.class, db.data.siprp_local.outer.PesDocumentoTipoData.ID ); + + public static final String TABLENAME = "pes_documento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.pes_documento"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "pes_documento.id"; + public static final int ID_INDEX = 0; + public static final String TIPO_ID = "tipo_id"; + public static final String TIPO_ID_FULL = "pes_documento.tipo_id"; + public static final int TIPO_ID_INDEX = 1; + public static final String TO_TIPO_ID = "to_tipo_id"; + public static final String TO_TIPO_ID_FULL = "pes_documento.to_tipo_id"; + public static final int TO_TIPO_ID_INDEX = 2; + public static final String NUMERO = "numero"; + public static final String NUMERO_FULL = "pes_documento.numero"; + public static final int NUMERO_INDEX = 3; + public static final String LOCAL_EMISSAO = "local_emissao"; + public static final String LOCAL_EMISSAO_FULL = "pes_documento.local_emissao"; + public static final int LOCAL_EMISSAO_INDEX = 4; + public static final String DATA_EMISSAO = "data_emissao"; + public static final String DATA_EMISSAO_FULL = "pes_documento.data_emissao"; + public static final int DATA_EMISSAO_INDEX = 5; + public static final String DATA_VALIDADE = "data_validade"; + public static final String DATA_VALIDADE_FULL = "pes_documento.data_validade"; + public static final int DATA_VALIDADE_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + TIPO_ID, TO_TIPO_ID, NUMERO, LOCAL_EMISSAO, DATA_EMISSAO, DATA_VALIDADE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TIPO_ID, TABLENAME + "." + TO_TIPO_ID, TABLENAME + "." + NUMERO, TABLENAME + "." + LOCAL_EMISSAO, TABLENAME + "." + DATA_EMISSAO, TABLENAME + "." + DATA_VALIDADE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TIPO_ID, NUMERO, LOCAL_EMISSAO, DATA_EMISSAO, DATA_VALIDADE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TIPO_ID, NUMERO, LOCAL_EMISSAO, DATA_EMISSAO, DATA_VALIDADE, }; + + private Integer id; + private Integer tipo_id; + private db.data.siprp_local.outer.PesDocumentoTipoData to_tipo_id; + private String numero; + private String local_emissao; + private java.util.Date data_emissao; + private java.util.Date data_validade; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PesDocumento() + { + 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.ListfromPesPessoaDocumento_documento_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.PesPessoaDocumentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.PesPessoaDocumentoData.class , getPrimaryKey().getMap().get("id"), "documento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + 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 db.data.siprp_local.outer.PesDocumentoTipoData 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( db.data.siprp_local.outer.PesDocumentoTipoData 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 String getNumero() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NUMERO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.numero; + } + + public void setNumero( String numero ) + { + try + { + setLockedForRefresh( true ); + preProcess( NUMERO, numero ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.numero = numero; + LAZY_LOADED_OBJECTS.put( NUMERO, Boolean.TRUE ); + } + + public String getLocal_emissao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LOCAL_EMISSAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.local_emissao; + } + + public void setLocal_emissao( String local_emissao ) + { + try + { + setLockedForRefresh( true ); + preProcess( LOCAL_EMISSAO, local_emissao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.local_emissao = local_emissao; + LAZY_LOADED_OBJECTS.put( LOCAL_EMISSAO, Boolean.TRUE ); + } + + public java.util.Date getData_emissao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_EMISSAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_emissao; + } + + public void setData_emissao( java.util.Date data_emissao ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_EMISSAO, data_emissao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_emissao = data_emissao; + LAZY_LOADED_OBJECTS.put( DATA_EMISSAO, Boolean.TRUE ); + } + + public java.util.Date getData_validade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_VALIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_validade; + } + + public void setData_validade( java.util.Date data_validade ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_VALIDADE, data_validade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_validade = data_validade; + LAZY_LOADED_OBJECTS.put( DATA_VALIDADE, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesDocumento.ID_INDEX: + value = getId(); + break; + case PesDocumento.TIPO_ID_INDEX: + value = getTipo_id(); + break; + case PesDocumento.TO_TIPO_ID_INDEX: + value = toTipo_id(); + break; + case PesDocumento.NUMERO_INDEX: + value = getNumero(); + break; + case PesDocumento.LOCAL_EMISSAO_INDEX: + value = getLocal_emissao(); + break; + case PesDocumento.DATA_EMISSAO_INDEX: + value = getData_emissao(); + break; + case PesDocumento.DATA_VALIDADE_INDEX: + value = getData_validade(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesDocumento.ID_INDEX: + value = this.id; + break; + case PesDocumento.TIPO_ID_INDEX: + value = this.tipo_id; + break; + case PesDocumento.TO_TIPO_ID_INDEX: + value = this.to_tipo_id; + break; + case PesDocumento.NUMERO_INDEX: + value = this.numero; + break; + case PesDocumento.LOCAL_EMISSAO_INDEX: + value = this.local_emissao; + break; + case PesDocumento.DATA_EMISSAO_INDEX: + value = this.data_emissao; + break; + case PesDocumento.DATA_VALIDADE_INDEX: + value = this.data_validade; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesDocumento.ID_INDEX: + setId( ( Integer ) value ); + break; + case PesDocumento.TIPO_ID_INDEX: + setTipo_id( ( Integer ) value ); + break; + case PesDocumento.TO_TIPO_ID_INDEX: + setToTipo_id( ( db.data.siprp_local.outer.PesDocumentoTipoData ) value ); + break; + case PesDocumento.NUMERO_INDEX: + setNumero( ( String ) value ); + break; + case PesDocumento.LOCAL_EMISSAO_INDEX: + setLocal_emissao( ( String ) value ); + break; + case PesDocumento.DATA_EMISSAO_INDEX: + setData_emissao( ( java.util.Date ) value ); + break; + case PesDocumento.DATA_VALIDADE_INDEX: + setData_validade( ( java.util.Date ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesDocumento.ID_INDEX: + this.id = ( Integer ) value; + break; + case PesDocumento.TIPO_ID_INDEX: + this.tipo_id = ( Integer ) value; + break; + case PesDocumento.TO_TIPO_ID_INDEX: + this.to_tipo_id = ( db.data.siprp_local.outer.PesDocumentoTipoData ) value; + break; + case PesDocumento.NUMERO_INDEX: + this.numero = ( String ) value; + break; + case PesDocumento.LOCAL_EMISSAO_INDEX: + this.local_emissao = ( String ) value; + break; + case PesDocumento.DATA_EMISSAO_INDEX: + this.data_emissao = ( java.util.Date ) value; + break; + case PesDocumento.DATA_VALIDADE_INDEX: + this.data_validade = ( 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 PesDocumento.ID_INDEX: + theClass = Integer.class; + break; + case PesDocumento.TIPO_ID_INDEX: + theClass = Integer.class; + break; + case PesDocumento.TO_TIPO_ID_INDEX: + theClass = db.data.siprp_local.outer.PesDocumentoTipoData.class; + break; + case PesDocumento.NUMERO_INDEX: + theClass = String.class; + break; + case PesDocumento.LOCAL_EMISSAO_INDEX: + theClass = String.class; + break; + case PesDocumento.DATA_EMISSAO_INDEX: + theClass = java.util.Date.class; + break; + case PesDocumento.DATA_VALIDADE_INDEX: + theClass = java.util.Date.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PesDocumento._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, PesDocumento.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PesDocumentoTipo.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PesDocumentoTipo.java new file mode 100644 index 00000000..77c957c7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PesDocumentoTipo.java @@ -0,0 +1,448 @@ +/* +* PesDocumentoTipo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class PesDocumentoTipo extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PesDocumentoTipo.ID, PesDocumentoTipo.ID_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.ID_FULL, PesDocumentoTipo.ID_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.CODIGO, PesDocumentoTipo.CODIGO_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.CODIGO_FULL, PesDocumentoTipo.CODIGO_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.DESCRICAO, PesDocumentoTipo.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.DESCRICAO_FULL, PesDocumentoTipo.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.ORDEM, PesDocumentoTipo.ORDEM_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.ORDEM_FULL, PesDocumentoTipo.ORDEM_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.DELETED_DATE, PesDocumentoTipo.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( PesDocumentoTipo.DELETED_DATE_FULL, PesDocumentoTipo.DELETED_DATE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "pes_documento_tipo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.pes_documento_tipo"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "pes_documento_tipo.id"; + public static final int ID_INDEX = 0; + public static final String CODIGO = "codigo"; + public static final String CODIGO_FULL = "pes_documento_tipo.codigo"; + public static final int CODIGO_INDEX = 1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "pes_documento_tipo.descricao"; + public static final int DESCRICAO_INDEX = 2; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "pes_documento_tipo.ordem"; + public static final int ORDEM_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "pes_documento_tipo.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + CODIGO, DESCRICAO, ORDEM, DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + CODIGO, TABLENAME + "." + DESCRICAO, TABLENAME + "." + ORDEM, TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, CODIGO, DESCRICAO, ORDEM, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, CODIGO, DESCRICAO, ORDEM, DELETED_DATE, }; + + private Integer id; + private String codigo; + private String descricao; + private Integer ordem; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PesDocumentoTipo() + { + 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.ListfromPesDocumento_tipo_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.PesDocumentoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.PesDocumentoData.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 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 PesDocumentoTipo.ID_INDEX: + value = getId(); + break; + case PesDocumentoTipo.CODIGO_INDEX: + value = getCodigo(); + break; + case PesDocumentoTipo.DESCRICAO_INDEX: + value = getDescricao(); + break; + case PesDocumentoTipo.ORDEM_INDEX: + value = getOrdem(); + break; + case PesDocumentoTipo.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesDocumentoTipo.ID_INDEX: + value = this.id; + break; + case PesDocumentoTipo.CODIGO_INDEX: + value = this.codigo; + break; + case PesDocumentoTipo.DESCRICAO_INDEX: + value = this.descricao; + break; + case PesDocumentoTipo.ORDEM_INDEX: + value = this.ordem; + break; + case PesDocumentoTipo.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesDocumentoTipo.ID_INDEX: + setId( ( Integer ) value ); + break; + case PesDocumentoTipo.CODIGO_INDEX: + setCodigo( ( String ) value ); + break; + case PesDocumentoTipo.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case PesDocumentoTipo.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + case PesDocumentoTipo.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesDocumentoTipo.ID_INDEX: + this.id = ( Integer ) value; + break; + case PesDocumentoTipo.CODIGO_INDEX: + this.codigo = ( String ) value; + break; + case PesDocumentoTipo.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case PesDocumentoTipo.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + case PesDocumentoTipo.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 PesDocumentoTipo.ID_INDEX: + theClass = Integer.class; + break; + case PesDocumentoTipo.CODIGO_INDEX: + theClass = String.class; + break; + case PesDocumentoTipo.DESCRICAO_INDEX: + theClass = String.class; + break; + case PesDocumentoTipo.ORDEM_INDEX: + theClass = Integer.class; + break; + case PesDocumentoTipo.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 : PesDocumentoTipo._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, PesDocumentoTipo.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PesPessoaDocumento.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PesPessoaDocumento.java new file mode 100644 index 00000000..2dee83cd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PesPessoaDocumento.java @@ -0,0 +1,431 @@ +/* +* PesPessoaDocumento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class PesPessoaDocumento extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PesPessoaDocumento.ID, PesPessoaDocumento.ID_INDEX ); + FIELD_INDEXES.put( PesPessoaDocumento.ID_FULL, PesPessoaDocumento.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PesPessoaDocumento.CLASS_IDENTIFIER, PesPessoaDocumento.PESSOA_ID, PesPessoaDocumento.TO_PESSOA_ID ); + FIELD_INDEXES.put( PesPessoaDocumento.PESSOA_ID, PesPessoaDocumento.PESSOA_ID_INDEX ); + FIELD_INDEXES.put( PesPessoaDocumento.PESSOA_ID_FULL, PesPessoaDocumento.PESSOA_ID_INDEX ); + FIELD_INDEXES.put( PesPessoaDocumento.TO_PESSOA_ID, PesPessoaDocumento.TO_PESSOA_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PesPessoaDocumento.CLASS_IDENTIFIER, PesPessoaDocumento.DOCUMENTO_ID, PesPessoaDocumento.TO_DOCUMENTO_ID ); + FIELD_INDEXES.put( PesPessoaDocumento.DOCUMENTO_ID, PesPessoaDocumento.DOCUMENTO_ID_INDEX ); + FIELD_INDEXES.put( PesPessoaDocumento.DOCUMENTO_ID_FULL, PesPessoaDocumento.DOCUMENTO_ID_INDEX ); + FIELD_INDEXES.put( PesPessoaDocumento.TO_DOCUMENTO_ID, PesPessoaDocumento.TO_DOCUMENTO_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 ForeignKeypessoa_idToevo_pessoa = + new com.evolute.entity.ForeignKey( PesPessoaDocumento.class, PesPessoaDocumento.PESSOA_ID, db.data.siprp_local.outer.EvoPessoaData.class, db.data.siprp_local.outer.EvoPessoaData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeydocumento_idTopes_documento = + new com.evolute.entity.ForeignKey( PesPessoaDocumento.class, PesPessoaDocumento.DOCUMENTO_ID, db.data.siprp_local.outer.PesDocumentoData.class, db.data.siprp_local.outer.PesDocumentoData.ID ); + + public static final String TABLENAME = "pes_pessoa_documento"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.pes_pessoa_documento"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "pes_pessoa_documento.id"; + public static final int ID_INDEX = 0; + public static final String PESSOA_ID = "pessoa_id"; + public static final String PESSOA_ID_FULL = "pes_pessoa_documento.pessoa_id"; + public static final int PESSOA_ID_INDEX = 1; + public static final String TO_PESSOA_ID = "to_pessoa_id"; + public static final String TO_PESSOA_ID_FULL = "pes_pessoa_documento.to_pessoa_id"; + public static final int TO_PESSOA_ID_INDEX = 2; + public static final String DOCUMENTO_ID = "documento_id"; + public static final String DOCUMENTO_ID_FULL = "pes_pessoa_documento.documento_id"; + public static final int DOCUMENTO_ID_INDEX = 3; + public static final String TO_DOCUMENTO_ID = "to_documento_id"; + public static final String TO_DOCUMENTO_ID_FULL = "pes_pessoa_documento.to_documento_id"; + public static final int TO_DOCUMENTO_ID_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + PESSOA_ID, TO_PESSOA_ID, DOCUMENTO_ID, TO_DOCUMENTO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + PESSOA_ID, TABLENAME + "." + TO_PESSOA_ID, TABLENAME + "." + DOCUMENTO_ID, TABLENAME + "." + TO_DOCUMENTO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, PESSOA_ID, DOCUMENTO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, PESSOA_ID, DOCUMENTO_ID, }; + + private Integer id; + private Integer pessoa_id; + private db.data.siprp_local.outer.EvoPessoaData to_pessoa_id; + private Integer documento_id; + private db.data.siprp_local.outer.PesDocumentoData to_documento_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PesPessoaDocumento() + { + 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 getPessoa_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PESSOA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.pessoa_id; + } + + public void setPessoa_id( Integer pessoa_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PESSOA_ID, pessoa_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.pessoa_id = pessoa_id; + LAZY_LOADED_OBJECTS.put( PESSOA_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EvoPessoaData toPessoa_id() + { + try + { + prepare( TO_PESSOA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_pessoa_id; + } + + public void setToPessoa_id( db.data.siprp_local.outer.EvoPessoaData to_pessoa_id ) + { + try + { + preProcess( TO_PESSOA_ID, to_pessoa_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_pessoa_id = to_pessoa_id; + } + + public Integer getDocumento_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DOCUMENTO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.documento_id; + } + + public void setDocumento_id( Integer documento_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( DOCUMENTO_ID, documento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.documento_id = documento_id; + LAZY_LOADED_OBJECTS.put( DOCUMENTO_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.PesDocumentoData toDocumento_id() + { + try + { + prepare( TO_DOCUMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_documento_id; + } + + public void setToDocumento_id( db.data.siprp_local.outer.PesDocumentoData to_documento_id ) + { + try + { + preProcess( TO_DOCUMENTO_ID, to_documento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_documento_id = to_documento_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesPessoaDocumento.ID_INDEX: + value = getId(); + break; + case PesPessoaDocumento.PESSOA_ID_INDEX: + value = getPessoa_id(); + break; + case PesPessoaDocumento.TO_PESSOA_ID_INDEX: + value = toPessoa_id(); + break; + case PesPessoaDocumento.DOCUMENTO_ID_INDEX: + value = getDocumento_id(); + break; + case PesPessoaDocumento.TO_DOCUMENTO_ID_INDEX: + value = toDocumento_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesPessoaDocumento.ID_INDEX: + value = this.id; + break; + case PesPessoaDocumento.PESSOA_ID_INDEX: + value = this.pessoa_id; + break; + case PesPessoaDocumento.TO_PESSOA_ID_INDEX: + value = this.to_pessoa_id; + break; + case PesPessoaDocumento.DOCUMENTO_ID_INDEX: + value = this.documento_id; + break; + case PesPessoaDocumento.TO_DOCUMENTO_ID_INDEX: + value = this.to_documento_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesPessoaDocumento.ID_INDEX: + setId( ( Integer ) value ); + break; + case PesPessoaDocumento.PESSOA_ID_INDEX: + setPessoa_id( ( Integer ) value ); + break; + case PesPessoaDocumento.TO_PESSOA_ID_INDEX: + setToPessoa_id( ( db.data.siprp_local.outer.EvoPessoaData ) value ); + break; + case PesPessoaDocumento.DOCUMENTO_ID_INDEX: + setDocumento_id( ( Integer ) value ); + break; + case PesPessoaDocumento.TO_DOCUMENTO_ID_INDEX: + setToDocumento_id( ( db.data.siprp_local.outer.PesDocumentoData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PesPessoaDocumento.ID_INDEX: + this.id = ( Integer ) value; + break; + case PesPessoaDocumento.PESSOA_ID_INDEX: + this.pessoa_id = ( Integer ) value; + break; + case PesPessoaDocumento.TO_PESSOA_ID_INDEX: + this.to_pessoa_id = ( db.data.siprp_local.outer.EvoPessoaData ) value; + break; + case PesPessoaDocumento.DOCUMENTO_ID_INDEX: + this.documento_id = ( Integer ) value; + break; + case PesPessoaDocumento.TO_DOCUMENTO_ID_INDEX: + this.to_documento_id = ( db.data.siprp_local.outer.PesDocumentoData ) 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 PesPessoaDocumento.ID_INDEX: + theClass = Integer.class; + break; + case PesPessoaDocumento.PESSOA_ID_INDEX: + theClass = Integer.class; + break; + case PesPessoaDocumento.TO_PESSOA_ID_INDEX: + theClass = db.data.siprp_local.outer.EvoPessoaData.class; + break; + case PesPessoaDocumento.DOCUMENTO_ID_INDEX: + theClass = Integer.class; + break; + case PesPessoaDocumento.TO_DOCUMENTO_ID_INDEX: + theClass = db.data.siprp_local.outer.PesDocumentoData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PesPessoaDocumento._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, PesPessoaDocumento.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Prestadores.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Prestadores.java new file mode 100644 index 00000000..2a69983f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Prestadores.java @@ -0,0 +1,1142 @@ +/* +* Prestadores.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Prestadores extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + FIELD_INDEXES.put( Prestadores.DELETED_STAMP, Prestadores.DELETED_STAMP_INDEX ); + FIELD_INDEXES.put( Prestadores.DELETED_STAMP_FULL, Prestadores.DELETED_STAMP_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, db.data.siprp_local.outer.ContactosData.class, db.data.siprp_local.outer.ContactosData.ID ); + + public static final String TABLENAME = "prestadores"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.prestadores"; + + 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 String TO_CONTACTO_ID_FULL = "prestadores.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 DELETED_STAMP = "deleted_stamp"; + public static final String DELETED_STAMP_FULL = "prestadores.deleted_stamp"; + public static final int DELETED_STAMP_INDEX = 14; + + 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, + DELETED_STAMP, }; + + 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, + TABLENAME + "." + DELETED_STAMP, }; + + 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, DELETED_STAMP, }; + + + 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, DELETED_STAMP, }; + + 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 db.data.siprp_local.outer.ContactosData to_contacto_id; + private String activo; + private String faz_consultas; + private String faz_ecds; + private String contribuinte; + private String observacoes; + private java.sql.Timestamp deleted_stamp; + + 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, 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 = new java.util.LinkedList< db.data.siprp_local.outer.EstabelecimentosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.EstabelecimentosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.MarcacoesTrabalhadorData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.MarcacoesTrabalhadorEstadosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.PrestadoresGruposProtocoloData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.PrtGruposProtocoloData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresConsultasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresConsultasDatasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresEcdData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresEcdsAnaliseData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresEcdsDatasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresEcdsDatasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 java.sql.Timestamp getDeleted_stamp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_STAMP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_stamp; + } + + public void setDeleted_stamp( java.sql.Timestamp deleted_stamp ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_STAMP, deleted_stamp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_stamp = deleted_stamp; + LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case 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; + case Prestadores.DELETED_STAMP_INDEX: + value = getDeleted_stamp(); + 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; + case Prestadores.DELETED_STAMP_INDEX: + value = this.deleted_stamp; + 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( ( db.data.siprp_local.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; + case Prestadores.DELETED_STAMP_INDEX: + setDeleted_stamp( ( java.sql.Timestamp ) 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 = ( db.data.siprp_local.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; + case Prestadores.DELETED_STAMP_INDEX: + this.deleted_stamp = ( java.sql.Timestamp ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case 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 = db.data.siprp_local.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; + case Prestadores.DELETED_STAMP_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PrestadoresGruposProtocolo.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PrestadoresGruposProtocolo.java new file mode 100644 index 00000000..3d3e72d1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PrestadoresGruposProtocolo.java @@ -0,0 +1,431 @@ +/* +* PrestadoresGruposProtocolo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class PrestadoresGruposProtocolo extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.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, db.data.siprp_local.outer.PrtGruposProtocoloData.class, db.data.siprp_local.outer.PrtGruposProtocoloData.ID ); + + public static final String TABLENAME = "prestadores_grupos_protocolo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.prestadores_grupos_protocolo"; + + 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 String TO_PRESTADOR_ID_FULL = "prestadores_grupos_protocolo.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 String TO_GRUPO_PROTOCOLO_ID_FULL = "prestadores_grupos_protocolo.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 db.data.siprp_local.outer.PrestadoresData to_prestador_id; + private Integer grupo_protocolo_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.PrestadoresData.class; + break; + case PrestadoresGruposProtocolo.GRUPO_PROTOCOLO_ID_INDEX: + theClass = Integer.class; + break; + case PrestadoresGruposProtocolo.TO_GRUPO_PROTOCOLO_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PrtElementosProtocolo.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PrtElementosProtocolo.java new file mode 100644 index 00000000..7f0afc71 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PrtElementosProtocolo.java @@ -0,0 +1,483 @@ +/* +* PrtElementosProtocolo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class PrtElementosProtocolo extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.PrtTiposElementosProtocoloData.class, db.data.siprp_local.outer.PrtTiposElementosProtocoloData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( PrtElementosProtocolo.class, PrtElementosProtocolo.EMPRESA_ID, db.data.siprp_local.outer.EmpresasData.class, db.data.siprp_local.outer.EmpresasData.ID ); + + public static final String TABLENAME = "prt_elementos_protocolo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.prt_elementos_protocolo"; + + 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 String TO_TIPO_ELEMENTO_PROTOCOLO_ID_FULL = "prt_elementos_protocolo.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 String TO_EMPRESA_ID_FULL = "prt_elementos_protocolo.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 db.data.siprp_local.outer.PrtTiposElementosProtocoloData to_tipo_elemento_protocolo_id; + private Integer empresa_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.outer.EmpresasData toEmpresa_id() + { + try + { + prepare( TO_EMPRESA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_id; + } + + public void setToEmpresa_id( db.data.siprp_local.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( ( db.data.siprp_local.outer.PrtTiposElementosProtocoloData ) value ); + break; + case PrtElementosProtocolo.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case PrtElementosProtocolo.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.PrtTiposElementosProtocoloData.class; + break; + case PrtElementosProtocolo.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case PrtElementosProtocolo.TO_EMPRESA_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PrtGruposProtocolo.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PrtGruposProtocolo.java new file mode 100644 index 00000000..4f3e2e45 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PrtGruposProtocolo.java @@ -0,0 +1,599 @@ +/* +* PrtGruposProtocolo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class PrtGruposProtocolo extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "prt_grupos_protocolo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.prt_grupos_protocolo"; + + 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 String TO_ANALISADOR_ID_FULL = "prt_grupos_protocolo.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 db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.MarcacoesGruposRealizadosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.PrestadoresGruposProtocoloData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.PrtTiposElementosProtocoloData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresEcdsAnaliseData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PrtTiposElementosProtocolo.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PrtTiposElementosProtocolo.java new file mode 100644 index 00000000..1031ba08 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/PrtTiposElementosProtocolo.java @@ -0,0 +1,515 @@ +/* +* PrtTiposElementosProtocolo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class PrtTiposElementosProtocolo extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.PrtGruposProtocoloData.class, db.data.siprp_local.outer.PrtGruposProtocoloData.ID ); + + public static final String TABLENAME = "prt_tipos_elementos_protocolo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.prt_tipos_elementos_protocolo"; + + 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 String TO_GRUPO_PROTOCOLO_ID_FULL = "prt_tipos_elementos_protocolo.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 db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.PrtElementosProtocoloData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresEcdData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TiposExamesComp.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TiposExamesComp.java new file mode 100644 index 00000000..4e6f0927 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TiposExamesComp.java @@ -0,0 +1,347 @@ +/* +* TiposExamesComp.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TiposExamesComp extends com.evolute.entity.evo.EvoDataObject +{ + 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 = "db.data.siprp_local.inner.tipos_exames_comp"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "tipos_exames_comp.id"; + public static final int ID_INDEX = 0; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "tipos_exames_comp.ordem"; + public static final int ORDEM_INDEX = 1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "tipos_exames_comp.descricao"; + public static final int DESCRICAO_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + ORDEM, DESCRICAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ORDEM, TABLENAME + "." + DESCRICAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ORDEM, DESCRICAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ORDEM, DESCRICAO, }; + + private Integer id; + private Integer ordem; + private String descricao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TiposExamesComp() + { + super(); + dirtyProperties = new boolean[]{ false, false, false }; + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 = new java.util.LinkedList< db.data.siprp_local.outer.ExamesPerfisData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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, ( 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Trabalhadores.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Trabalhadores.java new file mode 100644 index 00000000..a04e33ef --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Trabalhadores.java @@ -0,0 +1,1652 @@ +/* +* Trabalhadores.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Trabalhadores extends com.evolute.entity.evo.EvoDataObject +{ + 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 ); + FIELD_INDEXES.put( Trabalhadores.NIF, Trabalhadores.NIF_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NIF_FULL, Trabalhadores.NIF_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NUMERO_UTENTE, Trabalhadores.NUMERO_UTENTE_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NUMERO_UTENTE_FULL, Trabalhadores.NUMERO_UTENTE_INDEX ); + FIELD_INDEXES.put( Trabalhadores.PROCESSO_MOTIVO_ID, Trabalhadores.PROCESSO_MOTIVO_ID_INDEX ); + FIELD_INDEXES.put( Trabalhadores.PROCESSO_MOTIVO_ID_FULL, Trabalhadores.PROCESSO_MOTIVO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Trabalhadores.CLASS_IDENTIFIER, Trabalhadores.PESSOA_ID, Trabalhadores.TO_PESSOA_ID ); + FIELD_INDEXES.put( Trabalhadores.PESSOA_ID, Trabalhadores.PESSOA_ID_INDEX ); + FIELD_INDEXES.put( Trabalhadores.PESSOA_ID_FULL, Trabalhadores.PESSOA_ID_INDEX ); + FIELD_INDEXES.put( Trabalhadores.TO_PESSOA_ID, Trabalhadores.TO_PESSOA_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( Trabalhadores.class, Trabalhadores.ESTABELECIMENTO_ID, db.data.siprp_local.outer.EstabelecimentosData.class, db.data.siprp_local.outer.EstabelecimentosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeypessoa_idToevo_pessoa = + new com.evolute.entity.ForeignKey( Trabalhadores.class, Trabalhadores.PESSOA_ID, db.data.siprp_local.outer.EvoPessoaData.class, db.data.siprp_local.outer.EvoPessoaData.ID ); + + public static final String TABLENAME = "trabalhadores"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores"; + + 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 String TO_ESTABELECIMENTO_ID_FULL = "trabalhadores.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 NIF = "nif"; + public static final String NIF_FULL = "trabalhadores.nif"; + public static final int NIF_INDEX = 21; + public static final String NUMERO_UTENTE = "numero_utente"; + public static final String NUMERO_UTENTE_FULL = "trabalhadores.numero_utente"; + public static final int NUMERO_UTENTE_INDEX = 22; + public static final String PROCESSO_MOTIVO_ID = "processo_motivo_id"; + public static final String PROCESSO_MOTIVO_ID_FULL = "trabalhadores.processo_motivo_id"; + public static final int PROCESSO_MOTIVO_ID_INDEX = 23; + public static final String PESSOA_ID = "pessoa_id"; + public static final String PESSOA_ID_FULL = "trabalhadores.pessoa_id"; + public static final int PESSOA_ID_INDEX = 24; + public static final String TO_PESSOA_ID = "to_pessoa_id"; + public static final String TO_PESSOA_ID_FULL = "trabalhadores.to_pessoa_id"; + public static final int TO_PESSOA_ID_INDEX = 25; + + 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, NIF, NUMERO_UTENTE, + PROCESSO_MOTIVO_ID, PESSOA_ID, TO_PESSOA_ID, }; + + 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, TABLENAME + "." + NIF, TABLENAME + "." + NUMERO_UTENTE, + TABLENAME + "." + PROCESSO_MOTIVO_ID, TABLENAME + "." + PESSOA_ID, TABLENAME + "." + TO_PESSOA_ID, }; + + 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, NIF, NUMERO_UTENTE, + PROCESSO_MOTIVO_ID, PESSOA_ID, }; + + + 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, NIF, NUMERO_UTENTE, + PROCESSO_MOTIVO_ID, PESSOA_ID, }; + + 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 db.data.siprp_local.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; + private String nif; + private String numero_utente; + private Integer processo_motivo_id; + private Integer pessoa_id; + private db.data.siprp_local.outer.EvoPessoaData to_pessoa_id; + + 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, 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.ListfromAptOutrasVacina_trabalhador_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.AptOutrasVacinaData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.AptOutrasVacinaData.class , getPrimaryKey().getMap().get("id"), "trabalhador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromAptOutrasViajante_trabalhador_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.AptOutrasViajanteData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.outer.AptOutrasViajanteData.class , getPrimaryKey().getMap().get("id"), "trabalhador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + } + return result; + } + + public java.util.ListfromAvisos_trabalhador_id() + { + java.util.List result = new java.util.LinkedList< db.data.siprp_local.outer.AvisosData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.ExamesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.LembretesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.MarcacoesTrabalhadorData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresConsultasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresEcdsData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresProcessoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.outer.EstabelecimentosData toEstabelecimento_id() + { + try + { + prepare( TO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_estabelecimento_id; + } + + public void setToEstabelecimento_id( db.data.siprp_local.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 String getNif() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NIF ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nif; + } + + public void setNif( String nif ) + { + try + { + setLockedForRefresh( true ); + preProcess( NIF, nif ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nif = nif; + LAZY_LOADED_OBJECTS.put( NIF, Boolean.TRUE ); + } + + public String getNumero_utente() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NUMERO_UTENTE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.numero_utente; + } + + public void setNumero_utente( String numero_utente ) + { + try + { + setLockedForRefresh( true ); + preProcess( NUMERO_UTENTE, numero_utente ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.numero_utente = numero_utente; + LAZY_LOADED_OBJECTS.put( NUMERO_UTENTE, Boolean.TRUE ); + } + + public Integer getProcesso_motivo_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROCESSO_MOTIVO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.processo_motivo_id; + } + + public void setProcesso_motivo_id( Integer processo_motivo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROCESSO_MOTIVO_ID, processo_motivo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.processo_motivo_id = processo_motivo_id; + LAZY_LOADED_OBJECTS.put( PROCESSO_MOTIVO_ID, Boolean.TRUE ); + } + + public Integer getPessoa_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PESSOA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.pessoa_id; + } + + public void setPessoa_id( Integer pessoa_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PESSOA_ID, pessoa_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.pessoa_id = pessoa_id; + LAZY_LOADED_OBJECTS.put( PESSOA_ID, Boolean.TRUE ); + } + + public db.data.siprp_local.outer.EvoPessoaData toPessoa_id() + { + try + { + prepare( TO_PESSOA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_pessoa_id; + } + + public void setToPessoa_id( db.data.siprp_local.outer.EvoPessoaData to_pessoa_id ) + { + try + { + preProcess( TO_PESSOA_ID, to_pessoa_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_pessoa_id = to_pessoa_id; + } + + 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; + case Trabalhadores.NIF_INDEX: + value = getNif(); + break; + case Trabalhadores.NUMERO_UTENTE_INDEX: + value = getNumero_utente(); + break; + case Trabalhadores.PROCESSO_MOTIVO_ID_INDEX: + value = getProcesso_motivo_id(); + break; + case Trabalhadores.PESSOA_ID_INDEX: + value = getPessoa_id(); + break; + case Trabalhadores.TO_PESSOA_ID_INDEX: + value = toPessoa_id(); + 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; + case Trabalhadores.NIF_INDEX: + value = this.nif; + break; + case Trabalhadores.NUMERO_UTENTE_INDEX: + value = this.numero_utente; + break; + case Trabalhadores.PROCESSO_MOTIVO_ID_INDEX: + value = this.processo_motivo_id; + break; + case Trabalhadores.PESSOA_ID_INDEX: + value = this.pessoa_id; + break; + case Trabalhadores.TO_PESSOA_ID_INDEX: + value = this.to_pessoa_id; + 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( ( db.data.siprp_local.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; + case Trabalhadores.NIF_INDEX: + setNif( ( String ) value ); + break; + case Trabalhadores.NUMERO_UTENTE_INDEX: + setNumero_utente( ( String ) value ); + break; + case Trabalhadores.PROCESSO_MOTIVO_ID_INDEX: + setProcesso_motivo_id( ( Integer ) value ); + break; + case Trabalhadores.PESSOA_ID_INDEX: + setPessoa_id( ( Integer ) value ); + break; + case Trabalhadores.TO_PESSOA_ID_INDEX: + setToPessoa_id( ( db.data.siprp_local.outer.EvoPessoaData ) 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 = ( db.data.siprp_local.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; + case Trabalhadores.NIF_INDEX: + this.nif = ( String ) value; + break; + case Trabalhadores.NUMERO_UTENTE_INDEX: + this.numero_utente = ( String ) value; + break; + case Trabalhadores.PROCESSO_MOTIVO_ID_INDEX: + this.processo_motivo_id = ( Integer ) value; + break; + case Trabalhadores.PESSOA_ID_INDEX: + this.pessoa_id = ( Integer ) value; + break; + case Trabalhadores.TO_PESSOA_ID_INDEX: + this.to_pessoa_id = ( db.data.siprp_local.outer.EvoPessoaData ) 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 = db.data.siprp_local.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; + case Trabalhadores.NIF_INDEX: + theClass = String.class; + break; + case Trabalhadores.NUMERO_UTENTE_INDEX: + theClass = String.class; + break; + case Trabalhadores.PROCESSO_MOTIVO_ID_INDEX: + theClass = Integer.class; + break; + case Trabalhadores.PESSOA_ID_INDEX: + theClass = Integer.class; + break; + case Trabalhadores.TO_PESSOA_ID_INDEX: + theClass = db.data.siprp_local.outer.EvoPessoaData.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, ( 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresConsultas.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresConsultas.java new file mode 100644 index 00000000..489fa442 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresConsultas.java @@ -0,0 +1,650 @@ +/* +* TrabalhadoresConsultas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresConsultas extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresData.class, db.data.siprp_local.outer.TrabalhadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( TrabalhadoresConsultas.class, TrabalhadoresConsultas.PRESTADOR_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprocesso_idTotrabalhadores_processo = + new com.evolute.entity.ForeignKey( TrabalhadoresConsultas.class, TrabalhadoresConsultas.PROCESSO_ID, db.data.siprp_local.outer.TrabalhadoresProcessoData.class, db.data.siprp_local.outer.TrabalhadoresProcessoData.ID ); + + public static final String TABLENAME = "trabalhadores_consultas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_consultas"; + + 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 String TO_TRABALHADOR_ID_FULL = "trabalhadores_consultas.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 String TO_PRESTADOR_ID_FULL = "trabalhadores_consultas.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 String TO_PROCESSO_ID_FULL = "trabalhadores_consultas.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 db.data.siprp_local.outer.TrabalhadoresData to_trabalhador_id; + private java.util.Date data; + private Integer estado; + private Integer prestador_id; + private db.data.siprp_local.outer.PrestadoresData to_prestador_id; + private Integer processo_id; + private db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresConsultasDatasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.outer.PrestadoresData ) value ); + break; + case TrabalhadoresConsultas.PROCESSO_ID_INDEX: + setProcesso_id( ( Integer ) value ); + break; + case TrabalhadoresConsultas.TO_PROCESSO_ID_INDEX: + setToProcesso_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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 = db.data.siprp_local.outer.PrestadoresData.class; + break; + case TrabalhadoresConsultas.PROCESSO_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresConsultas.TO_PROCESSO_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatas.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatas.java new file mode 100644 index 00000000..266e1570 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatas.java @@ -0,0 +1,584 @@ +/* +* TrabalhadoresConsultasDatas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresConsultasDatas extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresConsultasData.class, db.data.siprp_local.outer.TrabalhadoresConsultasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( TrabalhadoresConsultasDatas.class, TrabalhadoresConsultasDatas.PRESTADOR_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "trabalhadores_consultas_datas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_consultas_datas"; + + 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 String TO_TRABALHADORES_CONSULTAS_ID_FULL = "trabalhadores_consultas_datas.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 String TO_PRESTADOR_ID_FULL = "trabalhadores_consultas_datas.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 db.data.siprp_local.outer.TrabalhadoresConsultasData to_trabalhadores_consultas_id; + private Integer estado; + private Integer prestador_id; + private db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.LembretesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresConsultasDatasEmailsData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresConsultasDatasObservacoesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatasEmails.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatasEmails.java new file mode 100644 index 00000000..1460608b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatasEmails.java @@ -0,0 +1,533 @@ +/* +* TrabalhadoresConsultasDatasEmails.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresConsultasDatasEmails extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresConsultasDatasData.class, db.data.siprp_local.outer.TrabalhadoresConsultasDatasData.ID ); + + public static final String TABLENAME = "trabalhadores_consultas_datas_emails"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_consultas_datas_emails"; + + 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 String TO_TRABALHADORES_CONSULTAS_DATAS_ID_FULL = "trabalhadores_consultas_datas_emails.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 db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatasObservacoes.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatasObservacoes.java new file mode 100644 index 00000000..ad09fb94 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresConsultasDatasObservacoes.java @@ -0,0 +1,383 @@ +/* +* TrabalhadoresConsultasDatasObservacoes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresConsultasDatasObservacoes extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresConsultasDatasData.class, db.data.siprp_local.outer.TrabalhadoresConsultasDatasData.ID ); + + public static final String TABLENAME = "trabalhadores_consultas_datas_observacoes"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_consultas_datas_observacoes"; + + 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 String TO_TRABALHADORES_CONSULTAS_DATAS_ID_FULL = "trabalhadores_consultas_datas_observacoes.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 db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcd.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcd.java new file mode 100644 index 00000000..3db97f83 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcd.java @@ -0,0 +1,838 @@ +/* +* TrabalhadoresEcd.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresEcd extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.PrtTiposElementosProtocoloData.class, db.data.siprp_local.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, db.data.siprp_local.outer.EcdOficialData.class, db.data.siprp_local.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, db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.class, db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyanalisador_idToprestadores = + new com.evolute.entity.ForeignKey( TrabalhadoresEcd.class, TrabalhadoresEcd.ANALISADOR_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "trabalhadores_ecd"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_ecd"; + + 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 String TO_ECD_ID_FULL = "trabalhadores_ecd.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 String TO_ECD_OFICIAL_ID_FULL = "trabalhadores_ecd.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 String TO_TRABALHADORES_ECDS_DATAS_ID_FULL = "trabalhadores_ecd.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 String TO_ANALISADOR_ID_FULL = "trabalhadores_ecd.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 db.data.siprp_local.outer.PrtTiposElementosProtocoloData to_ecd_id; + private Integer ecd_oficial_id; + private db.data.siprp_local.outer.EcdOficialData to_ecd_oficial_id; + private Integer estado; + private Integer trabalhadores_ecds_datas_id; + private db.data.siprp_local.outer.TrabalhadoresEcdsDatasData to_trabalhadores_ecds_datas_id; + private String enviado; + private Integer analisador_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.PrtTiposElementosProtocoloData.class; + break; + case TrabalhadoresEcd.ECD_OFICIAL_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcd.TO_ECD_OFICIAL_ID_INDEX: + theClass = db.data.siprp_local.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 = db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcds.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcds.java new file mode 100644 index 00000000..7438bd63 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcds.java @@ -0,0 +1,548 @@ +/* +* TrabalhadoresEcds.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresEcds extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresData.class, db.data.siprp_local.outer.TrabalhadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprocesso_idTotrabalhadores_processo = + new com.evolute.entity.ForeignKey( TrabalhadoresEcds.class, TrabalhadoresEcds.PROCESSO_ID, db.data.siprp_local.outer.TrabalhadoresProcessoData.class, db.data.siprp_local.outer.TrabalhadoresProcessoData.ID ); + + public static final String TABLENAME = "trabalhadores_ecds"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_ecds"; + + 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 String TO_TRABALHADOR_ID_FULL = "trabalhadores_ecds.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 String TO_PROCESSO_ID_FULL = "trabalhadores_ecds.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 db.data.siprp_local.outer.TrabalhadoresData to_trabalhador_id; + private Integer estado; + private java.util.Date data; + private Integer processo_id; + private db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresEcdsDatasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsAnalise.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsAnalise.java new file mode 100644 index 00000000..e92c4ea1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsAnalise.java @@ -0,0 +1,481 @@ +/* +* TrabalhadoresEcdsAnalise.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresEcdsAnalise extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.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, db.data.siprp_local.outer.PrtGruposProtocoloData.class, db.data.siprp_local.outer.PrtGruposProtocoloData.ID ); + + public static final String TABLENAME = "trabalhadores_ecds_analise"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_ecds_analise"; + + 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 String TO_PRESTADOR_ID_FULL = "trabalhadores_ecds_analise.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 String TO_GRUPO_ECDS_ID_FULL = "trabalhadores_ecds_analise.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 db.data.siprp_local.outer.PrestadoresData to_prestador_id; + private Integer grupo_ecds_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.PrestadoresData.class; + break; + case TrabalhadoresEcdsAnalise.GRUPO_ECDS_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcdsAnalise.TO_GRUPO_ECDS_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatas.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatas.java new file mode 100644 index 00000000..203d0609 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatas.java @@ -0,0 +1,803 @@ +/* +* TrabalhadoresEcdsDatas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresEcdsDatas extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresEcdsData.class, db.data.siprp_local.outer.TrabalhadoresEcdsData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( TrabalhadoresEcdsDatas.class, TrabalhadoresEcdsDatas.PRESTADOR_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyanalisador_idToprestadores = + new com.evolute.entity.ForeignKey( TrabalhadoresEcdsDatas.class, TrabalhadoresEcdsDatas.ANALISADOR_ID, db.data.siprp_local.outer.PrestadoresData.class, db.data.siprp_local.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "trabalhadores_ecds_datas"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_ecds_datas"; + + 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 String TO_TRABALHADORES_ECDS_ID_FULL = "trabalhadores_ecds_datas.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 String TO_PRESTADOR_ID_FULL = "trabalhadores_ecds_datas.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 String TO_ANALISADOR_ID_FULL = "trabalhadores_ecds_datas.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 db.data.siprp_local.outer.TrabalhadoresEcdsData to_trabalhadores_ecds_id; + private java.util.Date data; + private Integer estado; + private Integer prestador_id; + private db.data.siprp_local.outer.PrestadoresData to_prestador_id; + private Integer analisador_id; + private db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.LembretesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresEcdData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresEcdsDatasEmailsData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresEcdsDatasObservacoesData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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( ( db.data.siprp_local.outer.PrestadoresData ) value ); + break; + case TrabalhadoresEcdsDatas.ANALISADOR_ID_INDEX: + setAnalisador_id( ( Integer ) value ); + break; + case TrabalhadoresEcdsDatas.TO_ANALISADOR_ID_INDEX: + setToAnalisador_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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 = db.data.siprp_local.outer.PrestadoresData.class; + break; + case TrabalhadoresEcdsDatas.ANALISADOR_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcdsDatas.TO_ANALISADOR_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatasEmails.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatasEmails.java new file mode 100644 index 00000000..94d63e48 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatasEmails.java @@ -0,0 +1,533 @@ +/* +* TrabalhadoresEcdsDatasEmails.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresEcdsDatasEmails extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.class, db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.ID ); + + public static final String TABLENAME = "trabalhadores_ecds_datas_emails"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_ecds_datas_emails"; + + 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 String TO_TRABALHADORES_ECDS_DATAS_ID_FULL = "trabalhadores_ecds_datas_emails.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 db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatasObservacoes.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatasObservacoes.java new file mode 100644 index 00000000..aac5d0cb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresEcdsDatasObservacoes.java @@ -0,0 +1,381 @@ +/* +* TrabalhadoresEcdsDatasObservacoes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresEcdsDatasObservacoes extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.class, db.data.siprp_local.outer.TrabalhadoresEcdsDatasData.ID ); + + public static final String TABLENAME = "trabalhadores_ecds_datas_observacoes"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_ecds_datas_observacoes"; + + 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 String TO_TRABALHADORES_ECDS_DATAS_ID_FULL = "trabalhadores_ecds_datas_observacoes.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 db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresFichasAptidao.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresFichasAptidao.java new file mode 100644 index 00000000..c9080499 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresFichasAptidao.java @@ -0,0 +1,431 @@ +/* +* TrabalhadoresFichasAptidao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresFichasAptidao extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresProcessoData.class, db.data.siprp_local.outer.TrabalhadoresProcessoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyexame_idToexames = + new com.evolute.entity.ForeignKey( TrabalhadoresFichasAptidao.class, TrabalhadoresFichasAptidao.EXAME_ID, db.data.siprp_local.outer.ExamesData.class, db.data.siprp_local.outer.ExamesData.ID ); + + public static final String TABLENAME = "trabalhadores_fichas_aptidao"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_fichas_aptidao"; + + 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 String TO_PROCESSO_ID_FULL = "trabalhadores_fichas_aptidao.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 String TO_EXAME_ID_FULL = "trabalhadores_fichas_aptidao.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 db.data.siprp_local.outer.TrabalhadoresProcessoData to_processo_id; + private Integer exame_id; + private db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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 db.data.siprp_local.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( db.data.siprp_local.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( ( db.data.siprp_local.outer.TrabalhadoresProcessoData ) value ); + break; + case TrabalhadoresFichasAptidao.EXAME_ID_INDEX: + setExame_id( ( Integer ) value ); + break; + case TrabalhadoresFichasAptidao.TO_EXAME_ID_INDEX: + setToExame_id( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.outer.TrabalhadoresProcessoData.class; + break; + case TrabalhadoresFichasAptidao.EXAME_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresFichasAptidao.TO_EXAME_ID_INDEX: + theClass = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresProcesso.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresProcesso.java new file mode 100644 index 00000000..b6e3bc68 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/TrabalhadoresProcesso.java @@ -0,0 +1,684 @@ +/* +* TrabalhadoresProcesso.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class TrabalhadoresProcesso extends com.evolute.entity.evo.EvoDataObject +{ + 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, db.data.siprp_local.outer.TrabalhadoresData.class, db.data.siprp_local.outer.TrabalhadoresData.ID ); + + public static final String TABLENAME = "trabalhadores_processo"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.trabalhadores_processo"; + + 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 String TO_TRABALHADOR_ID_FULL = "trabalhadores_processo.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 db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresConsultasData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresEcdsData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 = new java.util.LinkedList< db.data.siprp_local.outer.TrabalhadoresFichasAptidaoData >(); + if ( getPrimaryKey() != null ) + { + try + { + result = fromReference( db.data.siprp_local.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 db.data.siprp_local.outer.TrabalhadoresData toTrabalhador_id() + { + try + { + prepare( TO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhador_id; + } + + public void setToTrabalhador_id( db.data.siprp_local.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( ( db.data.siprp_local.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 = ( db.data.siprp_local.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 = db.data.siprp_local.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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Versao.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Versao.java new file mode 100644 index 00000000..37bb6d94 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/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 db.data.siprp_local.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 = "db.data.siprp_local.inner.versao"; + + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Version.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Version.java new file mode 100644 index 00000000..5c74c9d0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/Version.java @@ -0,0 +1,330 @@ +/* +* Version.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package db.data.siprp_local.inner; + + +public class Version extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Version.CURRENT_VERSION, Version.CURRENT_VERSION_INDEX ); + FIELD_INDEXES.put( Version.CURRENT_VERSION_FULL, Version.CURRENT_VERSION_INDEX ); + FIELD_INDEXES.put( Version.ID, Version.ID_INDEX ); + FIELD_INDEXES.put( Version.ID_FULL, Version.ID_INDEX ); + FIELD_INDEXES.put( Version.MODULE_NAME, Version.MODULE_NAME_INDEX ); + FIELD_INDEXES.put( Version.MODULE_NAME_FULL, Version.MODULE_NAME_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "version"; + + + public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.version"; + + public static final int _INVALID__INDEX = -1; + public static final String CURRENT_VERSION = "current_version"; + public static final String CURRENT_VERSION_FULL = "version.current_version"; + public static final int CURRENT_VERSION_INDEX = 0; + public static final String ID = "id"; + public static final String ID_FULL = "version.id"; + public static final int ID_INDEX = 1; + public static final String MODULE_NAME = "module_name"; + public static final String MODULE_NAME_FULL = "version.module_name"; + public static final int MODULE_NAME_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + CURRENT_VERSION, MODULE_NAME, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + CURRENT_VERSION, TABLENAME + "." + MODULE_NAME, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + CURRENT_VERSION, ID, MODULE_NAME, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + CURRENT_VERSION, ID, MODULE_NAME, }; + + private Double current_version; + private Integer id; + private String module_name; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Version() + { + super(); + dirtyProperties = new boolean[]{ false, false, false }; + } + + public Double getCurrent_version() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CURRENT_VERSION ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.current_version; + } + + public void setCurrent_version( Double current_version ) + { + try + { + setLockedForRefresh( true ); + preProcess( CURRENT_VERSION, current_version ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.current_version = current_version; + LAZY_LOADED_OBJECTS.put( CURRENT_VERSION, Boolean.TRUE ); + } + + public Integer getId() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.id; + } + + public void setId( Integer id ) + { + try + { + 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 getModule_name() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MODULE_NAME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.module_name; + } + + public void setModule_name( String module_name ) + { + try + { + setLockedForRefresh( true ); + preProcess( MODULE_NAME, module_name ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.module_name = module_name; + LAZY_LOADED_OBJECTS.put( MODULE_NAME, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + value = getCurrent_version(); + break; + case Version.ID_INDEX: + value = getId(); + break; + case Version.MODULE_NAME_INDEX: + value = getModule_name(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + value = this.current_version; + break; + case Version.ID_INDEX: + value = this.id; + break; + case Version.MODULE_NAME_INDEX: + value = this.module_name; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + setCurrent_version( ( Double ) value ); + break; + case Version.ID_INDEX: + setId( ( Integer ) value ); + break; + case Version.MODULE_NAME_INDEX: + setModule_name( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + this.current_version = ( Double ) value; + break; + case Version.ID_INDEX: + this.id = ( Integer ) value; + break; + case Version.MODULE_NAME_INDEX: + this.module_name = ( String ) value; + break; + } + } + + public String []getFieldNames() + { + return FIELD_NAMES; + } + + public String []getFieldNamesFull() + { + return FIELD_NAMES_FULL; + } + + public String []getDBFieldNames() + { + return DB_FIELD_NAMES; + } + + public String []getPrimaryKeyNames() + { + return PK_FIELD_NAMES; + } + + public String []getDefaultLoadSet() + { + return DEFAULT_LOAD_SET; + } + + public String getPrimaryKeyName() + { + return PK_FIELD_NAMES[ 0 ]; + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case Version.CURRENT_VERSION_INDEX: + theClass = Double.class; + break; + case Version.ID_INDEX: + theClass = Integer.class; + break; + case Version.MODULE_NAME_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Version._INVALID__INDEX; + } + + public String getTableName() + { + return TABLENAME; + } + + public String getClassIdentifier() + { + return CLASS_IDENTIFIER; + } + + @Override + protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col ) + { + if( primaryKey == null ) + { + primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Version.PK_FIELD_NAMES ); + 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/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/package.xml b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/package.xml new file mode 100644 index 00000000..997285e8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/inner/package.xml @@ -0,0 +1,3583 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ActualizacaoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ActualizacaoData.java new file mode 100644 index 00000000..0c20f558 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ActualizacaoData.java @@ -0,0 +1,18 @@ +/* +* ActualizacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class ActualizacaoData extends db.data.siprp_local.inner.Actualizacao +{ + + public ActualizacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AptAppointmentData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AptAppointmentData.java new file mode 100644 index 00000000..29449f4a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AptAppointmentData.java @@ -0,0 +1,18 @@ +/* +* AptAppointmentData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class AptAppointmentData extends db.data.siprp_local.inner.AptAppointment +{ + + public AptAppointmentData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AptOutrasVacinaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AptOutrasVacinaData.java new file mode 100644 index 00000000..8fc0b1d5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AptOutrasVacinaData.java @@ -0,0 +1,18 @@ +/* +* AptOutrasVacinaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class AptOutrasVacinaData extends db.data.siprp_local.inner.AptOutrasVacina +{ + + public AptOutrasVacinaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AptOutrasViajanteData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AptOutrasViajanteData.java new file mode 100644 index 00000000..b7b806ff --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AptOutrasViajanteData.java @@ -0,0 +1,18 @@ +/* +* AptOutrasViajanteData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class AptOutrasViajanteData extends db.data.siprp_local.inner.AptOutrasViajante +{ + + public AptOutrasViajanteData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AptSegurancaAlimentarData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AptSegurancaAlimentarData.java new file mode 100644 index 00000000..56f9d6f3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AptSegurancaAlimentarData.java @@ -0,0 +1,18 @@ +/* +* AptSegurancaAlimentarData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class AptSegurancaAlimentarData extends db.data.siprp_local.inner.AptSegurancaAlimentar +{ + + public AptSegurancaAlimentarData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AptStateData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AptStateData.java new file mode 100644 index 00000000..5a80373c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AptStateData.java @@ -0,0 +1,18 @@ +/* +* AptStateData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class AptStateData extends db.data.siprp_local.inner.AptState +{ + + public AptStateData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AvisosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AvisosData.java new file mode 100644 index 00000000..be35e00d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/AvisosData.java @@ -0,0 +1,18 @@ +/* +* AvisosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class AvisosData extends db.data.siprp_local.inner.Avisos +{ + + public AvisosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ContactosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ContactosData.java new file mode 100644 index 00000000..dcf0758f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ContactosData.java @@ -0,0 +1,18 @@ +/* +* ContactosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class ContactosData extends db.data.siprp_local.inner.Contactos +{ + + public ContactosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurArsData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurArsData.java new file mode 100644 index 00000000..7c4caa4e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurArsData.java @@ -0,0 +1,18 @@ +/* +* CurArsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurArsData extends db.data.siprp_local.inner.CurArs +{ + + public CurArsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurAulasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurAulasData.java new file mode 100644 index 00000000..27442b59 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurAulasData.java @@ -0,0 +1,18 @@ +/* +* CurAulasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurAulasData extends db.data.siprp_local.inner.CurAulas +{ + + public CurAulasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurAulasFormadoresData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurAulasFormadoresData.java new file mode 100644 index 00000000..e5a75b70 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurAulasFormadoresData.java @@ -0,0 +1,18 @@ +/* +* CurAulasFormadoresData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurAulasFormadoresData extends db.data.siprp_local.inner.CurAulasFormadores +{ + + public CurAulasFormadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurCursosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurCursosData.java new file mode 100644 index 00000000..0c8a4328 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurCursosData.java @@ -0,0 +1,18 @@ +/* +* CurCursosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurCursosData extends db.data.siprp_local.inner.CurCursos +{ + + public CurCursosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurDiasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurDiasData.java new file mode 100644 index 00000000..cffa22c6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurDiasData.java @@ -0,0 +1,18 @@ +/* +* CurDiasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurDiasData extends db.data.siprp_local.inner.CurDias +{ + + public CurDiasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurFormadoresCursosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurFormadoresCursosData.java new file mode 100644 index 00000000..68fa9681 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurFormadoresCursosData.java @@ -0,0 +1,18 @@ +/* +* CurFormadoresCursosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurFormadoresCursosData extends db.data.siprp_local.inner.CurFormadoresCursos +{ + + public CurFormadoresCursosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurFormadoresData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurFormadoresData.java new file mode 100644 index 00000000..f4179b43 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurFormadoresData.java @@ -0,0 +1,18 @@ +/* +* CurFormadoresData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurFormadoresData extends db.data.siprp_local.inner.CurFormadores +{ + + public CurFormadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurFormandosCursosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurFormandosCursosData.java new file mode 100644 index 00000000..404428ba --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurFormandosCursosData.java @@ -0,0 +1,18 @@ +/* +* CurFormandosCursosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurFormandosCursosData extends db.data.siprp_local.inner.CurFormandosCursos +{ + + public CurFormandosCursosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurFormandosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurFormandosData.java new file mode 100644 index 00000000..513befc5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurFormandosData.java @@ -0,0 +1,18 @@ +/* +* CurFormandosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurFormandosData extends db.data.siprp_local.inner.CurFormandos +{ + + public CurFormandosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurHospitaisData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurHospitaisData.java new file mode 100644 index 00000000..d241c7f3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurHospitaisData.java @@ -0,0 +1,18 @@ +/* +* CurHospitaisData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurHospitaisData extends db.data.siprp_local.inner.CurHospitais +{ + + public CurHospitaisData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurNumeroCertificadoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurNumeroCertificadoData.java new file mode 100644 index 00000000..5562388b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurNumeroCertificadoData.java @@ -0,0 +1,18 @@ +/* +* CurNumeroCertificadoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurNumeroCertificadoData extends db.data.siprp_local.inner.CurNumeroCertificado +{ + + public CurNumeroCertificadoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurNumeroCertificadoFormadorData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurNumeroCertificadoFormadorData.java new file mode 100644 index 00000000..2449c28f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurNumeroCertificadoFormadorData.java @@ -0,0 +1,18 @@ +/* +* CurNumeroCertificadoFormadorData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurNumeroCertificadoFormadorData extends db.data.siprp_local.inner.CurNumeroCertificadoFormador +{ + + public CurNumeroCertificadoFormadorData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurPagamentosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurPagamentosData.java new file mode 100644 index 00000000..ce2a1f96 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurPagamentosData.java @@ -0,0 +1,18 @@ +/* +* CurPagamentosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurPagamentosData extends db.data.siprp_local.inner.CurPagamentos +{ + + public CurPagamentosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurPagamentosTiposData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurPagamentosTiposData.java new file mode 100644 index 00000000..c29b5d0d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurPagamentosTiposData.java @@ -0,0 +1,18 @@ +/* +* CurPagamentosTiposData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurPagamentosTiposData extends db.data.siprp_local.inner.CurPagamentosTipos +{ + + public CurPagamentosTiposData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurPresencasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurPresencasData.java new file mode 100644 index 00000000..40b63317 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurPresencasData.java @@ -0,0 +1,18 @@ +/* +* CurPresencasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurPresencasData extends db.data.siprp_local.inner.CurPresencas +{ + + public CurPresencasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurQuestionarioData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurQuestionarioData.java new file mode 100644 index 00000000..e869736c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurQuestionarioData.java @@ -0,0 +1,18 @@ +/* +* CurQuestionarioData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurQuestionarioData extends db.data.siprp_local.inner.CurQuestionario +{ + + public CurQuestionarioData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurQuestionarioPerguntaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurQuestionarioPerguntaData.java new file mode 100644 index 00000000..9b0b992d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurQuestionarioPerguntaData.java @@ -0,0 +1,18 @@ +/* +* CurQuestionarioPerguntaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurQuestionarioPerguntaData extends db.data.siprp_local.inner.CurQuestionarioPergunta +{ + + public CurQuestionarioPerguntaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurQuestionarioRespostaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurQuestionarioRespostaData.java new file mode 100644 index 00000000..b64bb269 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurQuestionarioRespostaData.java @@ -0,0 +1,18 @@ +/* +* CurQuestionarioRespostaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurQuestionarioRespostaData extends db.data.siprp_local.inner.CurQuestionarioResposta +{ + + public CurQuestionarioRespostaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurTopicosAulasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurTopicosAulasData.java new file mode 100644 index 00000000..966ad307 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurTopicosAulasData.java @@ -0,0 +1,18 @@ +/* +* CurTopicosAulasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurTopicosAulasData extends db.data.siprp_local.inner.CurTopicosAulas +{ + + public CurTopicosAulasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurTopicosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurTopicosData.java new file mode 100644 index 00000000..7f565b61 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/CurTopicosData.java @@ -0,0 +1,18 @@ +/* +* CurTopicosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class CurTopicosData extends db.data.siprp_local.inner.CurTopicos +{ + + public CurTopicosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EcdOficialData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EcdOficialData.java new file mode 100644 index 00000000..69291a55 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EcdOficialData.java @@ -0,0 +1,18 @@ +/* +* EcdOficialData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EcdOficialData extends db.data.siprp_local.inner.EcdOficial +{ + + public EcdOficialData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EmailPlanoDeActuacaoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EmailPlanoDeActuacaoData.java new file mode 100644 index 00000000..e251a8bd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EmailPlanoDeActuacaoData.java @@ -0,0 +1,18 @@ +/* +* EmailPlanoDeActuacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EmailPlanoDeActuacaoData extends db.data.siprp_local.inner.EmailPlanoDeActuacao +{ + + public EmailPlanoDeActuacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EmpresaPrecoPeriodicidadeTipoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EmpresaPrecoPeriodicidadeTipoData.java new file mode 100644 index 00000000..57479c87 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EmpresaPrecoPeriodicidadeTipoData.java @@ -0,0 +1,18 @@ +/* +* EmpresaPrecoPeriodicidadeTipoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EmpresaPrecoPeriodicidadeTipoData extends db.data.siprp_local.inner.EmpresaPrecoPeriodicidadeTipo +{ + + public EmpresaPrecoPeriodicidadeTipoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EmpresaPrecoServicoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EmpresaPrecoServicoData.java new file mode 100644 index 00000000..1392ad33 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EmpresaPrecoServicoData.java @@ -0,0 +1,18 @@ +/* +* EmpresaPrecoServicoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EmpresaPrecoServicoData extends db.data.siprp_local.inner.EmpresaPrecoServico +{ + + public EmpresaPrecoServicoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EmpresaPrecoServicoTipoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EmpresaPrecoServicoTipoData.java new file mode 100644 index 00000000..dc8d6935 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EmpresaPrecoServicoTipoData.java @@ -0,0 +1,18 @@ +/* +* EmpresaPrecoServicoTipoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EmpresaPrecoServicoTipoData extends db.data.siprp_local.inner.EmpresaPrecoServicoTipo +{ + + public EmpresaPrecoServicoTipoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EmpresasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EmpresasData.java new file mode 100644 index 00000000..4ca2924a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EmpresasData.java @@ -0,0 +1,18 @@ +/* +* EmpresasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EmpresasData extends db.data.siprp_local.inner.Empresas +{ + + public EmpresasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ErrorsData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ErrorsData.java new file mode 100644 index 00000000..001f926d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ErrorsData.java @@ -0,0 +1,18 @@ +/* +* ErrorsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class ErrorsData extends db.data.siprp_local.inner.Errors +{ + + public ErrorsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EstabelecimentosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EstabelecimentosData.java new file mode 100644 index 00000000..0c2ef031 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EstabelecimentosData.java @@ -0,0 +1,18 @@ +/* +* EstabelecimentosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EstabelecimentosData extends db.data.siprp_local.inner.Estabelecimentos +{ + + public EstabelecimentosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EtiquetasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EtiquetasData.java new file mode 100644 index 00000000..f5cc4335 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EtiquetasData.java @@ -0,0 +1,18 @@ +/* +* EtiquetasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EtiquetasData extends db.data.siprp_local.inner.Etiquetas +{ + + public EtiquetasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoPessoaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoPessoaData.java new file mode 100644 index 00000000..c8ace64c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoPessoaData.java @@ -0,0 +1,18 @@ +/* +* EvoPessoaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EvoPessoaData extends db.data.siprp_local.inner.EvoPessoa +{ + + public EvoPessoaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUpdateData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUpdateData.java new file mode 100644 index 00000000..2549cd82 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUpdateData.java @@ -0,0 +1,18 @@ +/* +* EvoUpdateData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EvoUpdateData extends db.data.siprp_local.inner.EvoUpdate +{ + + public EvoUpdateData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrPermissionData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrPermissionData.java new file mode 100644 index 00000000..0a773f45 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrPermissionData.java @@ -0,0 +1,18 @@ +/* +* EvoUsrPermissionData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EvoUsrPermissionData extends db.data.siprp_local.inner.EvoUsrPermission +{ + + public EvoUsrPermissionData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrPreferencesData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrPreferencesData.java new file mode 100644 index 00000000..4a646e0f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrPreferencesData.java @@ -0,0 +1,18 @@ +/* +* EvoUsrPreferencesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EvoUsrPreferencesData extends db.data.siprp_local.inner.EvoUsrPreferences +{ + + public EvoUsrPreferencesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrRoleData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrRoleData.java new file mode 100644 index 00000000..afa56c6d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrRoleData.java @@ -0,0 +1,18 @@ +/* +* EvoUsrRoleData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EvoUsrRoleData extends db.data.siprp_local.inner.EvoUsrRole +{ + + public EvoUsrRoleData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrRolesPermissionsData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrRolesPermissionsData.java new file mode 100644 index 00000000..a2d78b95 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrRolesPermissionsData.java @@ -0,0 +1,18 @@ +/* +* EvoUsrRolesPermissionsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EvoUsrRolesPermissionsData extends db.data.siprp_local.inner.EvoUsrRolesPermissions +{ + + public EvoUsrRolesPermissionsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrUserData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrUserData.java new file mode 100644 index 00000000..262fde8a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrUserData.java @@ -0,0 +1,18 @@ +/* +* EvoUsrUserData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EvoUsrUserData extends db.data.siprp_local.inner.EvoUsrUser +{ + + public EvoUsrUserData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrUsersRolesData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrUsersRolesData.java new file mode 100644 index 00000000..d0842712 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/EvoUsrUsersRolesData.java @@ -0,0 +1,18 @@ +/* +* EvoUsrUsersRolesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class EvoUsrUsersRolesData extends db.data.siprp_local.inner.EvoUsrUsersRoles +{ + + public EvoUsrUsersRolesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ExamesData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ExamesData.java new file mode 100644 index 00000000..fb4cf9b9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ExamesData.java @@ -0,0 +1,18 @@ +/* +* ExamesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class ExamesData extends db.data.siprp_local.inner.Exames +{ + + public ExamesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ExamesPerfisData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ExamesPerfisData.java new file mode 100644 index 00000000..cf9aabc9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ExamesPerfisData.java @@ -0,0 +1,18 @@ +/* +* ExamesPerfisData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class ExamesPerfisData extends db.data.siprp_local.inner.ExamesPerfis +{ + + public ExamesPerfisData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ExamesPortariaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ExamesPortariaData.java new file mode 100644 index 00000000..ade72d19 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ExamesPortariaData.java @@ -0,0 +1,18 @@ +/* +* ExamesPortariaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class ExamesPortariaData extends db.data.siprp_local.inner.ExamesPortaria +{ + + public ExamesPortariaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/FilCategoriasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/FilCategoriasData.java new file mode 100644 index 00000000..e56c57f4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/FilCategoriasData.java @@ -0,0 +1,18 @@ +/* +* FilCategoriasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class FilCategoriasData extends db.data.siprp_local.inner.FilCategorias +{ + + public FilCategoriasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/FilFileAppointmentData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/FilFileAppointmentData.java new file mode 100644 index 00000000..4ec472cf --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/FilFileAppointmentData.java @@ -0,0 +1,18 @@ +/* +* FilFileAppointmentData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class FilFileAppointmentData extends db.data.siprp_local.inner.FilFileAppointment +{ + + public FilFileAppointmentData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/FilFileData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/FilFileData.java new file mode 100644 index 00000000..40fefdcf --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/FilFileData.java @@ -0,0 +1,18 @@ +/* +* FilFileData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class FilFileData extends db.data.siprp_local.inner.FilFile +{ + + public FilFileData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/FilFileEmpresaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/FilFileEmpresaData.java new file mode 100644 index 00000000..c30b6c2c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/FilFileEmpresaData.java @@ -0,0 +1,18 @@ +/* +* FilFileEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class FilFileEmpresaData extends db.data.siprp_local.inner.FilFileEmpresa +{ + + public FilFileEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/FilFileMarcacoesEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/FilFileMarcacoesEstabelecimentoData.java new file mode 100644 index 00000000..12e55883 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/FilFileMarcacoesEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* FilFileMarcacoesEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class FilFileMarcacoesEstabelecimentoData extends db.data.siprp_local.inner.FilFileMarcacoesEstabelecimento +{ + + public FilFileMarcacoesEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HistoricoEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HistoricoEstabelecimentoData.java new file mode 100644 index 00000000..34a8e0b7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HistoricoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HistoricoEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HistoricoEstabelecimentoData extends db.data.siprp_local.inner.HistoricoEstabelecimento +{ + + public HistoricoEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsAreaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsAreaData.java new file mode 100644 index 00000000..d096fdfd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsAreaData.java @@ -0,0 +1,18 @@ +/* +* HsAreaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsAreaData extends db.data.siprp_local.inner.HsArea +{ + + public HsAreaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsEmailData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsEmailData.java new file mode 100644 index 00000000..8ca79d85 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsEmailData.java @@ -0,0 +1,18 @@ +/* +* HsEmailData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsEmailData extends db.data.siprp_local.inner.HsEmail +{ + + public HsEmailData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsEmailEmpresaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsEmailEmpresaData.java new file mode 100644 index 00000000..8e1489ee --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsEmailEmpresaData.java @@ -0,0 +1,18 @@ +/* +* HsEmailEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsEmailEmpresaData extends db.data.siprp_local.inner.HsEmailEmpresa +{ + + public HsEmailEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsEmailEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsEmailEstabelecimentoData.java new file mode 100644 index 00000000..67b053a9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsEmailEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HsEmailEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsEmailEstabelecimentoData extends db.data.siprp_local.inner.HsEmailEstabelecimento +{ + + public HsEmailEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsEquipamentoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsEquipamentoData.java new file mode 100644 index 00000000..fc253f7f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsEquipamentoData.java @@ -0,0 +1,18 @@ +/* +* HsEquipamentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsEquipamentoData extends db.data.siprp_local.inner.HsEquipamento +{ + + public HsEquipamentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsLegislacaoCategoriaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsLegislacaoCategoriaData.java new file mode 100644 index 00000000..50fc7216 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsLegislacaoCategoriaData.java @@ -0,0 +1,18 @@ +/* +* HsLegislacaoCategoriaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsLegislacaoCategoriaData extends db.data.siprp_local.inner.HsLegislacaoCategoria +{ + + public HsLegislacaoCategoriaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsLegislacaoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsLegislacaoData.java new file mode 100644 index 00000000..d67e3767 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsLegislacaoData.java @@ -0,0 +1,18 @@ +/* +* HsLegislacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsLegislacaoData extends db.data.siprp_local.inner.HsLegislacao +{ + + public HsLegislacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsLegislacaoEmpresaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsLegislacaoEmpresaData.java new file mode 100644 index 00000000..f4318e06 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsLegislacaoEmpresaData.java @@ -0,0 +1,18 @@ +/* +* HsLegislacaoEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsLegislacaoEmpresaData extends db.data.siprp_local.inner.HsLegislacaoEmpresa +{ + + public HsLegislacaoEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsLegislacaoEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsLegislacaoEstabelecimentoData.java new file mode 100644 index 00000000..d9564909 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsLegislacaoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HsLegislacaoEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsLegislacaoEstabelecimentoData extends db.data.siprp_local.inner.HsLegislacaoEstabelecimento +{ + + public HsLegislacaoEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsMedidaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsMedidaData.java new file mode 100644 index 00000000..4b15e2bd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsMedidaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsMedidaData extends db.data.siprp_local.inner.HsMedida +{ + + public HsMedidaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsNormalizacaoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsNormalizacaoData.java new file mode 100644 index 00000000..32beaebd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsNormalizacaoData.java @@ -0,0 +1,18 @@ +/* +* HsNormalizacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsNormalizacaoData extends db.data.siprp_local.inner.HsNormalizacao +{ + + public HsNormalizacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsNormalizacaoEmpresaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsNormalizacaoEmpresaData.java new file mode 100644 index 00000000..b67fc3c1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsNormalizacaoEmpresaData.java @@ -0,0 +1,18 @@ +/* +* HsNormalizacaoEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsNormalizacaoEmpresaData extends db.data.siprp_local.inner.HsNormalizacaoEmpresa +{ + + public HsNormalizacaoEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsNormalizacaoEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsNormalizacaoEstabelecimentoData.java new file mode 100644 index 00000000..7b7ab0d6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsNormalizacaoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HsNormalizacaoEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsNormalizacaoEstabelecimentoData extends db.data.siprp_local.inner.HsNormalizacaoEstabelecimento +{ + + public HsNormalizacaoEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsPostoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsPostoData.java new file mode 100644 index 00000000..492a2a3b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsPostoData.java @@ -0,0 +1,18 @@ +/* +* HsPostoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsPostoData extends db.data.siprp_local.inner.HsPosto +{ + + public HsPostoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsPostoEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsPostoEstabelecimentoData.java new file mode 100644 index 00000000..153c1971 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsPostoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HsPostoEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsPostoEstabelecimentoData extends db.data.siprp_local.inner.HsPostoEstabelecimento +{ + + public HsPostoEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsPostoMedidaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsPostoMedidaData.java new file mode 100644 index 00000000..82c7505e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsPostoMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsPostoMedidaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsPostoMedidaData extends db.data.siprp_local.inner.HsPostoMedida +{ + + public HsPostoMedidaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsPostoRiscoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsPostoRiscoData.java new file mode 100644 index 00000000..20a3ed92 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsPostoRiscoData.java @@ -0,0 +1,18 @@ +/* +* HsPostoRiscoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsPostoRiscoData extends db.data.siprp_local.inner.HsPostoRisco +{ + + public HsPostoRiscoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioAreaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioAreaData.java new file mode 100644 index 00000000..c0be2955 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioAreaData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioAreaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioAreaData extends db.data.siprp_local.inner.HsRelatorioArea +{ + + public HsRelatorioAreaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioData.java new file mode 100644 index 00000000..16aba4b9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioData extends db.data.siprp_local.inner.HsRelatorio +{ + + public HsRelatorioData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioEquipamentoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioEquipamentoData.java new file mode 100644 index 00000000..8e1a7fdd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioEquipamentoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioEquipamentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioEquipamentoData extends db.data.siprp_local.inner.HsRelatorioEquipamento +{ + + public HsRelatorioEquipamentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioLegislacaoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioLegislacaoData.java new file mode 100644 index 00000000..34580b9d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioLegislacaoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioLegislacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioLegislacaoData extends db.data.siprp_local.inner.HsRelatorioLegislacao +{ + + public HsRelatorioLegislacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioMedidaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioMedidaData.java new file mode 100644 index 00000000..fb3ebf35 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioMedidaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioMedidaData extends db.data.siprp_local.inner.HsRelatorioMedida +{ + + public HsRelatorioMedidaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioNormalizacaoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioNormalizacaoData.java new file mode 100644 index 00000000..b8a07e57 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioNormalizacaoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioNormalizacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioNormalizacaoData extends db.data.siprp_local.inner.HsRelatorioNormalizacao +{ + + public HsRelatorioNormalizacaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioPostoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioPostoData.java new file mode 100644 index 00000000..00e1d30d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioPostoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioPostoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioPostoData extends db.data.siprp_local.inner.HsRelatorioPosto +{ + + public HsRelatorioPostoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioPostoMedidaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioPostoMedidaData.java new file mode 100644 index 00000000..23a9c63c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioPostoMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioPostoMedidaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioPostoMedidaData extends db.data.siprp_local.inner.HsRelatorioPostoMedida +{ + + public HsRelatorioPostoMedidaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioPostoRiscoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioPostoRiscoData.java new file mode 100644 index 00000000..7fe89842 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioPostoRiscoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioPostoRiscoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioPostoRiscoData extends db.data.siprp_local.inner.HsRelatorioPostoRisco +{ + + public HsRelatorioPostoRiscoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioRiscoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioRiscoData.java new file mode 100644 index 00000000..5742674d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioRiscoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioRiscoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioRiscoData extends db.data.siprp_local.inner.HsRelatorioRisco +{ + + public HsRelatorioRiscoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioRiscoValorQualitativoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioRiscoValorQualitativoData.java new file mode 100644 index 00000000..43866573 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRelatorioRiscoValorQualitativoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioRiscoValorQualitativoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRelatorioRiscoValorQualitativoData extends db.data.siprp_local.inner.HsRelatorioRiscoValorQualitativo +{ + + public HsRelatorioRiscoValorQualitativoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRiscoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRiscoData.java new file mode 100644 index 00000000..77292c22 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRiscoData.java @@ -0,0 +1,18 @@ +/* +* HsRiscoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRiscoData extends db.data.siprp_local.inner.HsRisco +{ + + public HsRiscoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRiscoEmpresaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRiscoEmpresaData.java new file mode 100644 index 00000000..c379a4d7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRiscoEmpresaData.java @@ -0,0 +1,18 @@ +/* +* HsRiscoEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRiscoEmpresaData extends db.data.siprp_local.inner.HsRiscoEmpresa +{ + + public HsRiscoEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRiscoMedidaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRiscoMedidaData.java new file mode 100644 index 00000000..8c2f14f8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRiscoMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsRiscoMedidaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRiscoMedidaData extends db.data.siprp_local.inner.HsRiscoMedida +{ + + public HsRiscoMedidaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRiscoTemaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRiscoTemaData.java new file mode 100644 index 00000000..7c0c1468 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/HsRiscoTemaData.java @@ -0,0 +1,18 @@ +/* +* HsRiscoTemaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class HsRiscoTemaData extends db.data.siprp_local.inner.HsRiscoTema +{ + + public HsRiscoTemaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/IdsData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/IdsData.java new file mode 100644 index 00000000..41b23b07 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/IdsData.java @@ -0,0 +1,18 @@ +/* +* IdsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class IdsData extends db.data.siprp_local.inner.Ids +{ + + public IdsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ImageData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ImageData.java new file mode 100644 index 00000000..55daf68b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/ImageData.java @@ -0,0 +1,18 @@ +/* +* ImageData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class ImageData extends db.data.siprp_local.inner.Image +{ + + public ImageData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/LembretesData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/LembretesData.java new file mode 100644 index 00000000..35b41584 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/LembretesData.java @@ -0,0 +1,18 @@ +/* +* LembretesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class LembretesData extends db.data.siprp_local.inner.Lembretes +{ + + public LembretesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/LembretesTiposData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/LembretesTiposData.java new file mode 100644 index 00000000..a88f1f75 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/LembretesTiposData.java @@ -0,0 +1,18 @@ +/* +* LembretesTiposData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class LembretesTiposData extends db.data.siprp_local.inner.LembretesTipos +{ + + public LembretesTiposData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesEmpresaData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesEmpresaData.java new file mode 100644 index 00000000..b4833a64 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesEmpresaData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class MarcacoesEmpresaData extends db.data.siprp_local.inner.MarcacoesEmpresa +{ + + public MarcacoesEmpresaData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesEstabelecimentoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesEstabelecimentoData.java new file mode 100644 index 00000000..7082c58f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class MarcacoesEstabelecimentoData extends db.data.siprp_local.inner.MarcacoesEstabelecimento +{ + + public MarcacoesEstabelecimentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesGruposRealizadosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesGruposRealizadosData.java new file mode 100644 index 00000000..d4f509be --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesGruposRealizadosData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesGruposRealizadosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class MarcacoesGruposRealizadosData extends db.data.siprp_local.inner.MarcacoesGruposRealizados +{ + + public MarcacoesGruposRealizadosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesTecnicosHstData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesTecnicosHstData.java new file mode 100644 index 00000000..52776b28 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesTecnicosHstData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesTecnicosHstData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class MarcacoesTecnicosHstData extends db.data.siprp_local.inner.MarcacoesTecnicosHst +{ + + public MarcacoesTecnicosHstData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesTrabalhadorData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesTrabalhadorData.java new file mode 100644 index 00000000..347d6683 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesTrabalhadorData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesTrabalhadorData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class MarcacoesTrabalhadorData extends db.data.siprp_local.inner.MarcacoesTrabalhador +{ + + public MarcacoesTrabalhadorData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesTrabalhadorEstadosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesTrabalhadorEstadosData.java new file mode 100644 index 00000000..4ec3e0d1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MarcacoesTrabalhadorEstadosData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesTrabalhadorEstadosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class MarcacoesTrabalhadorEstadosData extends db.data.siprp_local.inner.MarcacoesTrabalhadorEstados +{ + + public MarcacoesTrabalhadorEstadosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MedVacinaTipoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MedVacinaTipoData.java new file mode 100644 index 00000000..47d90f50 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MedVacinaTipoData.java @@ -0,0 +1,18 @@ +/* +* MedVacinaTipoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class MedVacinaTipoData extends db.data.siprp_local.inner.MedVacinaTipo +{ + + public MedVacinaTipoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MedicosData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MedicosData.java new file mode 100644 index 00000000..01e45d62 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/MedicosData.java @@ -0,0 +1,18 @@ +/* +* MedicosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class MedicosData extends db.data.siprp_local.inner.Medicos +{ + + public MedicosData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PaisesContinentesData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PaisesContinentesData.java new file mode 100644 index 00000000..b08e4856 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PaisesContinentesData.java @@ -0,0 +1,18 @@ +/* +* PaisesContinentesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PaisesContinentesData extends db.data.siprp_local.inner.PaisesContinentes +{ + + public PaisesContinentesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PaisesData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PaisesData.java new file mode 100644 index 00000000..9c381def --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PaisesData.java @@ -0,0 +1,18 @@ +/* +* PaisesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PaisesData extends db.data.siprp_local.inner.Paises +{ + + public PaisesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PesDocumentoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PesDocumentoData.java new file mode 100644 index 00000000..5ff276bf --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PesDocumentoData.java @@ -0,0 +1,18 @@ +/* +* PesDocumentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PesDocumentoData extends db.data.siprp_local.inner.PesDocumento +{ + + public PesDocumentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PesDocumentoTipoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PesDocumentoTipoData.java new file mode 100644 index 00000000..6a60e193 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PesDocumentoTipoData.java @@ -0,0 +1,18 @@ +/* +* PesDocumentoTipoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PesDocumentoTipoData extends db.data.siprp_local.inner.PesDocumentoTipo +{ + + public PesDocumentoTipoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PesPessoaDocumentoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PesPessoaDocumentoData.java new file mode 100644 index 00000000..c693287e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PesPessoaDocumentoData.java @@ -0,0 +1,18 @@ +/* +* PesPessoaDocumentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PesPessoaDocumentoData extends db.data.siprp_local.inner.PesPessoaDocumento +{ + + public PesPessoaDocumentoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PrestadoresData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PrestadoresData.java new file mode 100644 index 00000000..7d855c68 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PrestadoresData.java @@ -0,0 +1,18 @@ +/* +* PrestadoresData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PrestadoresData extends db.data.siprp_local.inner.Prestadores +{ + + public PrestadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PrestadoresGruposProtocoloData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PrestadoresGruposProtocoloData.java new file mode 100644 index 00000000..46ad4cd2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PrestadoresGruposProtocoloData.java @@ -0,0 +1,18 @@ +/* +* PrestadoresGruposProtocoloData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PrestadoresGruposProtocoloData extends db.data.siprp_local.inner.PrestadoresGruposProtocolo +{ + + public PrestadoresGruposProtocoloData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PrtElementosProtocoloData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PrtElementosProtocoloData.java new file mode 100644 index 00000000..a90aba18 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PrtElementosProtocoloData.java @@ -0,0 +1,18 @@ +/* +* PrtElementosProtocoloData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PrtElementosProtocoloData extends db.data.siprp_local.inner.PrtElementosProtocolo +{ + + public PrtElementosProtocoloData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PrtGruposProtocoloData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PrtGruposProtocoloData.java new file mode 100644 index 00000000..0789d2c4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PrtGruposProtocoloData.java @@ -0,0 +1,18 @@ +/* +* PrtGruposProtocoloData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PrtGruposProtocoloData extends db.data.siprp_local.inner.PrtGruposProtocolo +{ + + public PrtGruposProtocoloData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PrtTiposElementosProtocoloData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PrtTiposElementosProtocoloData.java new file mode 100644 index 00000000..b44b7da1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/PrtTiposElementosProtocoloData.java @@ -0,0 +1,18 @@ +/* +* PrtTiposElementosProtocoloData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class PrtTiposElementosProtocoloData extends db.data.siprp_local.inner.PrtTiposElementosProtocolo +{ + + public PrtTiposElementosProtocoloData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TiposExamesCompData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TiposExamesCompData.java new file mode 100644 index 00000000..bcfd5279 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TiposExamesCompData.java @@ -0,0 +1,18 @@ +/* +* TiposExamesCompData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TiposExamesCompData extends db.data.siprp_local.inner.TiposExamesComp +{ + + public TiposExamesCompData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasData.java new file mode 100644 index 00000000..698423e0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresConsultasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresConsultasData extends db.data.siprp_local.inner.TrabalhadoresConsultas +{ + + public TrabalhadoresConsultasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasData.java new file mode 100644 index 00000000..126abd92 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresConsultasDatasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresConsultasDatasData extends db.data.siprp_local.inner.TrabalhadoresConsultasDatas +{ + + public TrabalhadoresConsultasDatasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasEmailsData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasEmailsData.java new file mode 100644 index 00000000..1dd76cfb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasEmailsData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresConsultasDatasEmailsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresConsultasDatasEmailsData extends db.data.siprp_local.inner.TrabalhadoresConsultasDatasEmails +{ + + public TrabalhadoresConsultasDatasEmailsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasObservacoesData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasObservacoesData.java new file mode 100644 index 00000000..56272c70 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresConsultasDatasObservacoesData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresConsultasDatasObservacoesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresConsultasDatasObservacoesData extends db.data.siprp_local.inner.TrabalhadoresConsultasDatasObservacoes +{ + + public TrabalhadoresConsultasDatasObservacoesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresData.java new file mode 100644 index 00000000..5abfcdb3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresData extends db.data.siprp_local.inner.Trabalhadores +{ + + public TrabalhadoresData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdData.java new file mode 100644 index 00000000..3096b8ed --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresEcdData extends db.data.siprp_local.inner.TrabalhadoresEcd +{ + + public TrabalhadoresEcdData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsAnaliseData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsAnaliseData.java new file mode 100644 index 00000000..ebe19019 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsAnaliseData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsAnaliseData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresEcdsAnaliseData extends db.data.siprp_local.inner.TrabalhadoresEcdsAnalise +{ + + public TrabalhadoresEcdsAnaliseData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsData.java new file mode 100644 index 00000000..1e37f77b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresEcdsData extends db.data.siprp_local.inner.TrabalhadoresEcds +{ + + public TrabalhadoresEcdsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasData.java new file mode 100644 index 00000000..dca02f91 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsDatasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresEcdsDatasData extends db.data.siprp_local.inner.TrabalhadoresEcdsDatas +{ + + public TrabalhadoresEcdsDatasData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasEmailsData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasEmailsData.java new file mode 100644 index 00000000..b5e99d45 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasEmailsData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsDatasEmailsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresEcdsDatasEmailsData extends db.data.siprp_local.inner.TrabalhadoresEcdsDatasEmails +{ + + public TrabalhadoresEcdsDatasEmailsData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasObservacoesData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasObservacoesData.java new file mode 100644 index 00000000..d7262b35 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresEcdsDatasObservacoesData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsDatasObservacoesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresEcdsDatasObservacoesData extends db.data.siprp_local.inner.TrabalhadoresEcdsDatasObservacoes +{ + + public TrabalhadoresEcdsDatasObservacoesData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresFichasAptidaoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresFichasAptidaoData.java new file mode 100644 index 00000000..54b190dd --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresFichasAptidaoData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresFichasAptidaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresFichasAptidaoData extends db.data.siprp_local.inner.TrabalhadoresFichasAptidao +{ + + public TrabalhadoresFichasAptidaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresProcessoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresProcessoData.java new file mode 100644 index 00000000..3defc1fe --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/TrabalhadoresProcessoData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresProcessoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class TrabalhadoresProcessoData extends db.data.siprp_local.inner.TrabalhadoresProcesso +{ + + public TrabalhadoresProcessoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/VersaoData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/VersaoData.java new file mode 100644 index 00000000..5966e58b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/VersaoData.java @@ -0,0 +1,18 @@ +/* +* VersaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class VersaoData extends db.data.siprp_local.inner.Versao +{ + + public VersaoData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/VersionData.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/VersionData.java new file mode 100644 index 00000000..80068f97 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/data/siprp_local/outer/VersionData.java @@ -0,0 +1,18 @@ +/* +* VersionData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package db.data.siprp_local.outer; + + +public final class VersionData extends db.data.siprp_local.inner.Version +{ + + public VersionData() + { + super(); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/Area.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/Area.java new file mode 100644 index 00000000..ca089483 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/Area.java @@ -0,0 +1,62 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.entidades; + +import java.io.Serializable; +import java.util.List; + +/** + * + * @author lluis + */ +public class Area implements Serializable +{ + private Integer id; + private Integer area_id; //from relatorios + private Integer plano_id; + private String descricao; + private List riscos; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getDescricao() { + return descricao; + } + + public void setDescricao(String descricao) { + this.descricao = descricao; + } + + public List getRiscos() { + return riscos; + } + + public void setRiscos(List riscos) { + this.riscos = riscos; + } + + public Integer getPlano_id() { + return plano_id; + } + + public void setPlano_id(Integer plano_id) { + this.plano_id = plano_id; + } + + public Integer getArea_id() { + return area_id; + } + + public void setArea_id(Integer area_id) { + this.area_id = area_id; + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/EstadoMedida.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/EstadoMedida.java new file mode 100644 index 00000000..0d3e74ed --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/EstadoMedida.java @@ -0,0 +1,41 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.entidades; + +import java.io.Serializable; + + +/** + * + * @author dneves + */ +public class EstadoMedida implements Serializable +{ + + private Integer id; + private String descricao; + + + public Integer getId() + { + return this.id; + } + + public void setId( Integer id ) + { + this.id = id; + } + + public String getDescricao() + { + return this.descricao; + } + + public void setDescricao( String desc ) + { + this.descricao = desc; + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/Medida.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/Medida.java new file mode 100644 index 00000000..b6ef19bb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/Medida.java @@ -0,0 +1,91 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.entidades; + +import java.io.Serializable; +import java.util.List; + +/** + * + * @author lluis + */ +public class Medida implements Serializable +{ + private Integer id; + private Integer medida_id; //from relatorios + private Integer valor_id; + private Integer risco_id; + private String descricao; + private String activa; + private Integer validarMedidaId = null; + private List postos; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getDescricao() { + return descricao; + } + + public void setDescricao(String descricao) { + this.descricao = descricao; + } + + public String getActiva() { + return activa; + } + + public void setActiva(String activa) { + this.activa = activa; + } + + public Integer getValor_id() { + return valor_id; + } + + public void setValor_id(Integer valor_id) { + this.valor_id = valor_id; + } + + public List getPostos() { + return postos; + } + + public void setPostos(List postos) { + this.postos = postos; + } + + public Integer getRisco_id() { + return risco_id; + } + + public void setRisco_id(Integer risco_id) { + this.risco_id = risco_id; + } + + public Integer getMedida_id() { + return medida_id; + } + + public void setMedida_id(Integer medida_id) { + this.medida_id = medida_id; + } + + public Integer getValidarMedidaId() + { + return validarMedidaId; + } + + public void setValidarMedidaId( Integer validarMedId ) + { + validarMedidaId = validarMedId; + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/PlanoActuacao.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/PlanoActuacao.java new file mode 100644 index 00000000..285d80ba --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/PlanoActuacao.java @@ -0,0 +1,528 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.entidades; + +import global.Global; +import java.io.Serializable; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +/** + * + * @author lluis + */ +public class PlanoActuacao implements Serializable +{ + + private static final SimpleDateFormat D_F = new SimpleDateFormat( "dd-MM-yyyy" ); + + private Integer id; + private Integer estabelecimento_id; + private String nome_estabelecimento; + private Integer empresa_id; + private String nome_empresa; + private Integer fase; + private Integer fase_anterior; + private String descricao; + private List areas; + private List riscos; + + // + private Date data_visita; + private String data_visita_str; + private Date data_relatorio; + private Integer tecnico_hs_id; + private String fase_nome; + private String tecnico_hs_nome; + private String loja_nome; + + private Boolean validacao_director_loja; + private Boolean validacao_dns; + private Boolean validacao_hs; + + private String observacoes_dl; + private String observacoes_dns; + private String obs_correcao; + + private int total_riscos; + + private String correcao; + private Integer fase_antes_correcao; + + private Date data_validacao_seg; + private Integer user_seg; + private Date data_validacao_dir_loja; + private Integer user_dir_loja; + private Date data_validacao_dns; + private Integer user_dns; + private Date data_validacao_hs; + private Integer user_hs; + + private Date data_disponibilizacao; + + private String data_validacao_dir_loja_str; + private String data_validacao_dns_str; + private String data_validacao_hs_str; + + private Date data_controlo; + private Date data_email_controlo; + + private Boolean concluido_por_desactivacao; + private Date data_desactivacao; + + private Integer tecnico_superior_hs_id; + private String tecnico_superior_hs_nome; + + private String tecnicos_nomes; + + private Integer hs_relatorio_id; + + + public PlanoActuacao() + { + + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getEstabelecimento_id() { + return estabelecimento_id; + } + + public void setEstabelecimento_id(Integer estabelecimento_id) { + this.estabelecimento_id = estabelecimento_id; + } + + public Integer getFase() { + return fase; + } + + public void setFase(Integer fase) { + this.fase = fase; + fase_nome = Global.FASES_TEXTO[fase.intValue()-1]; + } + + public String getDescricao() { + return descricao; + } + + public void setDescricao(String descricao) { + this.descricao = descricao; + } + + public List getRiscos() { + return riscos; + } + + public void setRiscos(List riscos) { + this.riscos = riscos; + } + + public Date getData_visita() { + return data_visita; + } + + public void setData_visita(Date data_visita) { + this.data_visita = data_visita; + SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + data_visita_str = formatter.format(data_visita); + } + + public Integer getTecnico_hs_id() { + return tecnico_hs_id; + } + + public void setTecnico_hs_id(Integer tecnico_hs_id) { + this.tecnico_hs_id = tecnico_hs_id; + } + + public String getFase_nome() { + String fn = fase_nome; + + if ( fase.intValue() == Global.FASE_CONCLUIDO ) + { + if ( getConcluidoPorDesactivacao() != null && getConcluidoPorDesactivacao() ) + { + fn = "Prazo Expirado"; + + if ( getDataDesactivacao() != null ) + { + fn += " (em " + D_F.format( getDataDesactivacao() ) + ")"; + } + } + } + + return fn; +// if ( fase.intValue() == Global.FASE_CONCLUIDO && getConcluidoPorDesactivacao() != null && getConcluidoPorDesactivacao() ) +// { +// return "Prazo Expirado"; +// } +// return fase_nome; + } + + public void setFase_nome(String fase_nome) { + this.fase_nome = fase_nome; + } + + public String getTecnico_hs_nome() { + return tecnico_hs_nome; + } + + public void setTecnico_hs_nome(String tecnico_hs_nome) { + this.tecnico_hs_nome = tecnico_hs_nome; + } + + public String getLoja_nome() { + return loja_nome; + } + + public void setLoja_nome(String loja_nome) { + this.loja_nome = loja_nome; + } + + public String getData_visita_str() { + return data_visita_str; + } + + public void setData_visita_str(String data_visita_str) { + this.data_visita_str = data_visita_str; + } + + public String getNome_estabelecimento() { + return nome_estabelecimento; + } + + public void setNome_estabelecimento(String nome_estabelecimento) { + this.nome_estabelecimento = nome_estabelecimento; + } + + public List getAreas() { + return areas; + } + + public void setAreas(List areas) { + this.areas = areas; + } + + public int getTotal_riscos() { + return total_riscos; + } + + public void setTotal_riscos(int total_riscos) { + this.total_riscos = total_riscos; + } + + public Boolean getValidacao_director_loja() { + return validacao_director_loja; + } + + public void setValidacao_director_loja(Boolean validacao_director_loja) { + this.validacao_director_loja = validacao_director_loja; + } + + public Boolean getValidacao_dns() { + return validacao_dns; + } + + public void setValidacao_dns(Boolean validacao_dns) { + this.validacao_dns = validacao_dns; + } + + public Boolean getValidacao_hs() { + return validacao_hs; + } + + public void setValidacao_hs(Boolean validacao_hs) { + this.validacao_hs = validacao_hs; + } + + public String getObs_correcao() { + return obs_correcao; + } + + public void setObs_correcao(String obs_correcao) { + this.obs_correcao = obs_correcao; + } + + public String getCorrecao() { + return correcao; + } + + public void setCorrecao(String correcao) { + this.correcao = correcao; + } + + public Integer getFase_antes_correcao() { + return fase_antes_correcao; + } + + public void setFase_antes_correcao(Integer fase_antes_correcao) { + this.fase_antes_correcao = fase_antes_correcao; + } + + public Date getData_validacao_dir_loja() { + return data_validacao_dir_loja; + } + + public void setData_validacao_dir_loja(Date data_validacao_dir_loja) { + SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + if(data_validacao_dir_loja != null) + { + data_validacao_dir_loja_str = formatter.format(data_validacao_dir_loja); + } + + this.data_validacao_dir_loja = data_validacao_dir_loja; + } + + public Integer getUser_dir_loja() { + return user_dir_loja; + } + + public void setUser_dir_loja(Integer user_dir_loja) { + this.user_dir_loja = user_dir_loja; + } + + public Date getData_validacao_dns() { + return data_validacao_dns; + } + + public void setData_validacao_dns(Date data_validacao_dns) { + SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + if(data_validacao_dns != null) + { + data_validacao_dns_str = formatter.format(data_validacao_dns); + } + this.data_validacao_dns = data_validacao_dns; + } + + public Integer getUser_dns() { + return user_dns; + } + + public void setUser_dns(Integer user_dns) { + this.user_dns = user_dns; + } + + public Date getData_validacao_hs() { + return data_validacao_hs; + } + + public void setData_validacao_hs(Date data_validacao_hs) { + SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + if(data_validacao_hs != null) + { + data_validacao_hs_str = formatter.format(data_validacao_hs); + } + + this.data_validacao_hs = data_validacao_hs; + } + + public Integer getUser_hs() { + return user_hs; + } + + public void setUser_hs(Integer user_hs) { + this.user_hs = user_hs; + } + + public String getData_validacao_dir_loja_str() { + return data_validacao_dir_loja_str; + } + + public void setData_validacao_dir_loja_str(String data_validacao_dir_loja_str) { + this.data_validacao_dir_loja_str = data_validacao_dir_loja_str; + } + + public String getData_validacao_dns_str() { + return data_validacao_dns_str; + } + + public void setData_validacao_dns_str(String data_validacao_dns_str) { + this.data_validacao_dns_str = data_validacao_dns_str; + } + + public String getData_validacao_hs_str() { + return data_validacao_hs_str; + } + + public void setData_validacao_hs_str(String data_validacao_hs_str) { + this.data_validacao_hs_str = data_validacao_hs_str; + } + + public String getObservacoes_dl() { + return observacoes_dl; + } + + public void setObservacoes_dl(String observacoes_dl) { + this.observacoes_dl = observacoes_dl; + } + + public String getObservacoes_dns() { + return observacoes_dns; + } + + public void setObservacoes_dns(String observacoes_dns) { + this.observacoes_dns = observacoes_dns; + } + + public Integer getFase_anterior() { + return fase_anterior; + } + + public void setFase_anterior(Integer fase_anterior) { + this.fase_anterior = fase_anterior; + } + + public Date getData_controlo() { + return data_controlo; + } + + public void setData_controlo(Date data_controlo) { + this.data_controlo = data_controlo; + } + + public Date getData_email_controlo() { + return data_email_controlo; + } + + public void setData_email_controlo(Date data_email_controlo) { + this.data_email_controlo = data_email_controlo; + } + + public Integer getEmpresa_id() { + return empresa_id; + } + + public void setEmpresa_id(Integer empresa_id) { + this.empresa_id = empresa_id; + } + + public String getNome_empresa() { + return nome_empresa; + } + + public void setNome_empresa(String nome_empresa) { + this.nome_empresa = nome_empresa; + } + + public Date getData_relatorio() { + return data_relatorio; + } + + public void setData_relatorio(Date data_relatorio) { + this.data_relatorio = data_relatorio; + } + + public Boolean getConcluidoPorDesactivacao() + { + return concluido_por_desactivacao; + } + + public void setConcluidoPorDesactivacao( boolean value ) + { + this.concluido_por_desactivacao = value; + } + + public Date getDataDesactivacao() + { + return data_desactivacao; + } + + public void setDataDesactivacao( Date data_desactivacao ) + { + this.data_desactivacao = data_desactivacao; + } + + public Integer getTecnico_superior_hs_id() + { + return tecnico_superior_hs_id; + } + + public void setTecnico_superior_hs_id( Integer tecnico_superior_hs_id ) + { + this.tecnico_superior_hs_id = tecnico_superior_hs_id; + } + + public String getTecnico_superior_hs_nome() { + return tecnico_superior_hs_nome; + } + + public void setTecnico_superior_hs_nome(String tecnico_superior_hs_nome) { + this.tecnico_superior_hs_nome = tecnico_superior_hs_nome; + } + + public String getTecnicos_nomes() + { + String nomes = getTecnico_hs_nome(); + if ( getTecnico_superior_hs_nome() != null ) + { + nomes = nomes == null ? getTecnico_superior_hs_nome() : nomes + ", " + getTecnico_superior_hs_nome(); + } + + setTecnicos_nomes( nomes ); + return tecnicos_nomes; + } + + public void setTecnicos_nomes(String tecnicos_nomes) { + this.tecnicos_nomes = tecnicos_nomes; + } + + public Date getData_disponibilizacao() { + return data_disponibilizacao; + } + + public void setData_disponibilizacao(Date data_disponibilizacao) { + this.data_disponibilizacao = data_disponibilizacao; + } + + public Boolean getConcluido_por_desactivacao() { + return concluido_por_desactivacao; + } + + public Date getData_desactivacao() { + return data_desactivacao; + } + + public void setConcluido_por_desactivacao(Boolean concluido_por_desactivacao) { + this.concluido_por_desactivacao = concluido_por_desactivacao; + } + + public void setData_desactivacao(Date data_desactivacao) { + this.data_desactivacao = data_desactivacao; + } + + public Date getData_validacao_seg() { + return data_validacao_seg; + } + + public Integer getUser_seg() { + return user_seg; + } + + public void setData_validacao_seg(Date data_validacao_seg) { + this.data_validacao_seg = data_validacao_seg; + } + + public void setUser_seg(Integer user_seg) { + this.user_seg = user_seg; + } + + public Integer getHs_relatorio_id() { + return hs_relatorio_id; + } + + public void setHs_relatorio_id(Integer hs_relatorio_id) { + this.hs_relatorio_id = hs_relatorio_id; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/PostoTrabalho.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/PostoTrabalho.java new file mode 100644 index 00000000..c6fc8097 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/PostoTrabalho.java @@ -0,0 +1,61 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.entidades; + +import java.io.Serializable; + +/** + * + * @author lluis + */ +public class PostoTrabalho implements Serializable +{ + private Integer id; + private Integer posto_id; //from relatorios + private Integer medida_id; + private String descricao; + private String activo; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getDescricao() { + return descricao; + } + + public void setDescricao(String descricao) { + this.descricao = descricao; + } + + public String getActivo() { + return activo; + } + + public void setActivo(String activo) { + this.activo = activo; + } + + public Integer getMedida_id() { + return medida_id; + } + + public void setMedida_id(Integer medida_id) { + this.medida_id = medida_id; + } + + public Integer getPosto_id() { + return posto_id; + } + + public void setPosto_id(Integer posto_id) { + this.posto_id = posto_id; + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/Risco.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/Risco.java new file mode 100644 index 00000000..06becb0c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/Risco.java @@ -0,0 +1,189 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.entidades; + + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * + * @author lluis + */ +public class Risco implements Serializable +{ + private Integer id; + private Integer area_id; + private String descricao; + private String activo; + //private Valor valor; + private Integer valor; + private String responsavel_execucao; + private String por; + private String recursos_necessarios; + private Date data_inicio; + private Date data_fim; + private Integer risco_id; + private String parecer_dns; + private String parecer_dl; + private String verificacao_siprp; + private Boolean isPatrimonial; + + private List valores; + private List medidas; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getDescricao() { + return descricao; + } + + public void setDescricao(String descricao) { + this.descricao = descricao; + } + + public String getActivo() { + return activo; + } + + public void setActivo(String activo) { + this.activo = activo; + } + + public Integer getArea_id() { + return area_id; + } + + public void setArea_id(Integer area_id) { + this.area_id = area_id; + } + +// public Valor getValor() { +// return valor; +// } +// +// public void setValor(Valor valor) { +// this.valor = valor; +// } + + public List getMedidas() { + return medidas; + } + + public void setMedidas(List medidas) { + this.medidas = medidas; + } + + public List getValores() { + return valores; + } + + public void setValores(List valores) { + this.valores = valores; + } + + public String getResponsavel_execucao() { + return responsavel_execucao; + } + + public void setResponsavel_execucao(String responsavel_execucao) { + this.responsavel_execucao = responsavel_execucao; + } + + public String getRecursos_necessarios() { + return recursos_necessarios; + } + + public void setRecursos_necessarios(String recursos_necessarios) { + this.recursos_necessarios = recursos_necessarios; + } + + public Date getData_inicio() { + return data_inicio; + } + + public void setData_inicio(Date data_inicio) { + this.data_inicio = data_inicio; + } + + public Date getData_fim() { + return data_fim; + } + + public void setData_fim(Date data_fim) { + this.data_fim = data_fim; + } + + public String getParecer_dns() { + return parecer_dns; + } + + public void setParecer_dns(String parecer_dns) { + this.parecer_dns = parecer_dns; + } + + public String getParecer_dl() { + return parecer_dl; + } + + public void setParecer_dl(String parecer_dl) { + this.parecer_dl = parecer_dl; + } + + public String getVerificacao_siprp() { + return verificacao_siprp; + } + + public void setVerificacao_siprp(String verificacao_siprp) { + this.verificacao_siprp = verificacao_siprp; + } + + public Integer getValor() { + return valor; + } + + public void setValor(Integer valor) { + this.valor = valor; + } + + public Integer getRisco_id() { + return risco_id; + } + + public void setRisco_id(Integer risco_id) { + this.risco_id = risco_id; + } + + /** + * @return the por + */ + public String getPor() { + return por; + } + + /** + * @param por the por to set + */ + public void setPor(String por) { + this.por = por; + } + + public Boolean getIsPatrimonial() { + return isPatrimonial; + } + + public void setIsPatrimonial(Boolean isPatrimonial) { + this.isPatrimonial = isPatrimonial; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/Utilizador.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/Utilizador.java new file mode 100644 index 00000000..e1087bce --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/Utilizador.java @@ -0,0 +1,249 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.entidades; + +import java.io.Serializable; +import java.util.Date; + +/** + * + * @author lluis + */ +public class Utilizador implements Serializable +{ + private Integer id; + private String login; + private String password; + private String email; + private Integer empresa_id; + private Integer estabelecimento_id; + private String administrador; + private Integer tipo; + private String numero_cedula; + private String cap; + private Integer codigo_permissao; + private String nome; + private Integer medico_id; + private Integer funcionario_hst_id; + private String activo; + private Integer acesso; + private String responsavel_loja; + private String gestor_geral; + private String numero_mecanografico; + private String categoria; //descricao do 'tipo'' + private String nome_estabelecimento; + private String primeiro_login; + private String apagado; + private Date data_password; + private Integer estabelecimento_gestor = null; + + public Integer getId() { + + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getLogin() { + return login; + } + + public void setLogin(String login) { + this.login = login; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public Integer getEmpresa_id() { + return empresa_id; + } + + public void setEmpresa_id(Integer empresa_id) { + this.empresa_id = empresa_id; + } + + public Integer getEstabelecimento_id() { + return estabelecimento_id; + } + + public void setEstabelecimento_id(Integer estabelecimento_id) { + this.estabelecimento_id = estabelecimento_id; + } + + public String getAdministrador() { + return administrador; + } + + public void setAdministrador(String administrador) { + this.administrador = administrador; + } + + public Integer getTipo() { + return tipo; + } + + public void setTipo(Integer tipo) { + this.tipo = tipo; + } + + public String getNumero_cedula() { + return numero_cedula; + } + + public void setNumero_cedula(String numero_cedula) { + this.numero_cedula = numero_cedula; + } + + public String getCap() { + return cap; + } + + public void setCap(String cap) { + this.cap = cap; + } + + public Integer getCodigo_permissao() { + return codigo_permissao; + } + + public void setCodigo_permissao(Integer codigo_permissao) { + this.codigo_permissao = codigo_permissao; + } + + public String getNome() { + return nome; + } + + public void setNome(String nome) { + this.nome = nome; + } + + public Integer getMedico_id() { + return medico_id; + } + + public void setMedico_id(Integer medico_id) { + this.medico_id = medico_id; + } + + public Integer getFuncionario_hst_id() { + return funcionario_hst_id; + } + + public void setFuncionario_hst_id(Integer funcionario_hst_id) { + this.funcionario_hst_id = funcionario_hst_id; + } + + public String getActivo() { + return activo; + } + + public void setActivo(String activo) { + this.activo = activo; + } + + public Integer getAcesso() { + return acesso; + } + + public void setAcesso(Integer acesso) { + this.acesso = acesso; + } + + public String getResponsavel_loja() { + return responsavel_loja; + } + + public void setResponsavel_loja(String responsavel_loja) { + this.responsavel_loja = responsavel_loja; + } + + public String getGestor_geral() { + return gestor_geral; + } + + public void setGestor_geral(String gestor_geral) { + this.gestor_geral = gestor_geral; + } + + public String getNumero_mecanografico() { + return numero_mecanografico; + } + + public void setNumero_mecanografico(String numero_mecanografico) { + this.numero_mecanografico = numero_mecanografico; + } + + public String getCategoria() { + return categoria; + } + + public void setCategoria(String categoria) { + this.categoria = categoria; + } + + public String getNome_estabelecimento() { + return nome_estabelecimento; + } + + public void setNome_estabelecimento(String nome_estabelecimento) { + this.nome_estabelecimento = nome_estabelecimento; + } + + public String getPrimeiro_login() { + return primeiro_login; + } + + public void setPrimeiro_login(String primeiro_login) { + this.primeiro_login = primeiro_login; + } + + public String getApagado() { + return apagado; + } + + public void setApagado(String apagado) { + this.apagado = apagado; + } + + public Date getData_password() { + return data_password; + } + + public void setData_password(Date data_password) { + this.data_password = data_password; + } + + /** + * @return the estabelecimento_gestor + */ + public Integer getEstabelecimento_gestor() { + return estabelecimento_gestor; + } + + /** + * @param estabelecimento_gestor the estabelecimento_gestor to set + */ + public void setEstabelecimento_gestor(Integer estabelecimento_gestor) { + this.estabelecimento_gestor = estabelecimento_gestor; + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/Valor.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/Valor.java new file mode 100644 index 00000000..49d97665 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/entidades/Valor.java @@ -0,0 +1,118 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.entidades; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * + * @author lluis + */ +public class Valor implements Serializable +{ + private Integer id; + private Integer risco_id; + private Integer valor; + private List medidas; + + private String responsavel_execucao; + private String recursos_necessarios; + private Date data_inicio; + private Date data_fim; + private String parecer_dns; + private String parecer_dl; + private String verificacao_siprp; + + public Integer getValor() { + return valor; + } + + public void setValor(Integer valor) { + this.valor = valor; + } + + public List getMedidas() { + return medidas; + } + + public void setMedidas(List medidas) { + this.medidas = medidas; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getRisco_id() { + return risco_id; + } + + public void setRisco_id(Integer risco_id) { + this.risco_id = risco_id; + } + + public String getResponsavel_execucao() { + return responsavel_execucao; + } + + public void setResponsavel_execucao(String responsavel_execucao) { + this.responsavel_execucao = responsavel_execucao; + } + + public String getRecursos_necessarios() { + return recursos_necessarios; + } + + public void setRecursos_necessarios(String recursos_necessarios) { + this.recursos_necessarios = recursos_necessarios; + } + + public Date getData_inicio() { + return data_inicio; + } + + public void setData_inicio(Date data_inicio) { + this.data_inicio = data_inicio; + } + + public Date getData_fim() { + return data_fim; + } + + public void setData_fim(Date data_fim) { + this.data_fim = data_fim; + } + + public String getParecer_dns() { + return parecer_dns; + } + + public void setParecer_dns(String parecer_dns) { + this.parecer_dns = parecer_dns; + } + + public String getParecer_dl() { + return parecer_dl; + } + + public void setParecer_dl(String parecer_dl) { + this.parecer_dl = parecer_dl; + } + + public String getVerificacao_siprp() { + return verificacao_siprp; + } + + public void setVerificacao_siprp(String verificacao_siprp) { + this.verificacao_siprp = verificacao_siprp; + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/CreatePlanosDataProvider.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/CreatePlanosDataProvider.java new file mode 100644 index 00000000..9b9604ef --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/CreatePlanosDataProvider.java @@ -0,0 +1,899 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.providers; + +import com.evolute.utils.arrays.Virtual2DArray; +import com.evolute.utils.error.ErrorLogger; +import com.evolute.utils.sql.Expression; +import com.evolute.utils.sql.Field; +import com.evolute.utils.sql.Select2; +import db.DBConstants.DB; +import db.data.siprp.outer.PlanoAreasData; +import db.data.siprp.outer.PlanoMedidasData; +import db.data.siprp.outer.PlanoPostosTrabalhoData; +import db.data.siprp.outer.PlanoRiscosData; +import db.data.siprp.outer.PlanosActuacaoData; +import db.data.siprp_local.outer.EmpresasData; +import db.entidades.Area; +import db.entidades.Medida; +import db.entidades.PlanoActuacao; +import db.entidades.PostoTrabalho; +import db.entidades.Risco; +import db.entidades.Valor; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.Date; +import java.util.LinkedList; +import java.util.List; +import utils.Utils; + +/** + * + * @author lluis + */ +public class CreatePlanosDataProvider extends GenericDataProvider +{ +// private DbRelatorios db; +// private DbLocalRelatorios dblocal; + + private static CreatePlanosDataProvider INSTANCE = null; + + private CreatePlanosDataProvider() throws Exception + { + super(); +// try +// { +// db = DbRelatorios.getInstance(); +// db.connect(); +// dblocal = DbLocalRelatorios.getInstance(); +// dblocal.connect(); +// } +// catch ( Exception ex ) +// { +// System.out.println( "CreatePlanosDataProvider . () : " + ex.getMessage() ); +// ErrorLogger.logException( ex ); +// } + } + + public static synchronized CreatePlanosDataProvider getInstance() throws Exception + { + if ( INSTANCE == null ) + { + INSTANCE = new CreatePlanosDataProvider(); + } + return INSTANCE; + } + + public List getPlanosOnline( Integer estabelecimentoID ) throws Exception + { + List< Date > list = new LinkedList< Date >(); + + Expression where = new Field( PlanosActuacaoData.DELETED_DATE_FULL ).isEqual( null ); + if ( estabelecimentoID != null ) + { + where = where.and( new Field( PlanosActuacaoData.ESTABELECIMENTO_ID_FULL ).isEqual( estabelecimentoID ) ); + } + + Select2 query = new Select2( PlanosActuacaoData.TABLENAME, + where, + new String[] { PlanosActuacaoData.DATA_VISITA_FULL }, + new String[] {} ); + Virtual2DArray array = getExecuter().executeQuery( query ); + if ( array != null ) + { + System.out.println( "\nCreatePlanosDataProvider . getPlanosOnline( " + estabelecimentoID + " ) : " ); + for ( int i = 0; i < array.columnLength(); i++ ) + { + Date date = array.get( i, 0 ); + System.out.println( "\tdata : " + date ); + list.add( date ); + } + } + return list; + +// ArrayList list = new ArrayList(); +// Statement st = createStatement(); +// String sql = "select data_visita from planos_actuacao where deleted_date is null"; +// if( estabelecimentoID != null ) +// { +// sql += " and estabelecimento_id = " + estabelecimentoID; +// } +// ResultSet rs = st.executeQuery(sql); +// +// if(rs.isBeforeFirst()) +// { +// rs.first(); +// do +// { +// java.sql.Date sqlDate = rs.getDate("data_visita"); +// java.util.Date data_visita = new java.util.Date(sqlDate.getTime()); +// System.out.println("DATA PLANO : " + data_visita.toString()); +// list.add(data_visita); +// }while(rs.next()); +// } +// return list; + } + + public List getEstabelecimentosWithPlanos() + { + List< Integer > list = new LinkedList< Integer >(); + + try + { + Select2 query = new Select2( PlanosActuacaoData.TABLENAME, + new Field( PlanosActuacaoData.DELETED_DATE_FULL ).isEqual( null ), + new String[] { "DISTINCT " + PlanosActuacaoData.ESTABELECIMENTO_ID_FULL }, + new String[] {} + ); + Virtual2DArray array = getExecuter().executeQuery( query ); + if ( array != null ) + { + for ( int i = 0; i < array.columnLength(); i++ ) + { + Integer estabelecimentoID = array.get( i, 0 ); + list.add( estabelecimentoID ); + } + } + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + return list; + +// List result = new ArrayList(); +// try +// { +// Statement st = createStatement(); +// String sql = "select distinct estabelecimento_id from planos_actuacao where deleted_date is null"; +// ResultSet rs = st.executeQuery(sql); +// if(rs.isBeforeFirst()) +// { +// rs.first(); +// do +// { +// result.add( rs.getInt("estabelecimento_id") ); +// }while(rs.next()); +// } +// } +// catch( Exception e ) +// { +// ErrorLogger.logException( e ); +// } +// return result; + } + + + + //=================== + + public PlanoActuacao getFullPlano(PlanoActuacao plano, Integer relatorioId) + { + try + { + plano = getAreasByPlano(plano, relatorioId); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + return plano; + } + + private PlanoActuacao getAreasByPlano(PlanoActuacao plano, Integer relatorioId) throws Exception + { + Statement st = createLocalStatement(); + + String sql = "select distinct area_id, hs_relatorio_area.description as descricao from hs_relatorio_posto "; + sql += "inner join hs_relatorio_posto_medida on hs_relatorio_posto_medida.posto_id = hs_relatorio_posto.id "; + sql += "inner join hs_relatorio_medida on hs_relatorio_medida.id = hs_relatorio_posto_medida.medida_id "; + sql += "inner join hs_relatorio_risco on hs_relatorio_risco.id = hs_relatorio_medida.risco_id "; + sql += "inner join hs_relatorio on hs_relatorio.id = hs_relatorio_risco.relatorio_id "; + sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; + sql += "where hs_relatorio.id = " + relatorioId + " "; + sql += "order by area_id "; + System.out.println("AREAS BY PLANO SQL : " + sql); + ResultSet rs = st.executeQuery(sql); + + List areas = new ArrayList(); + if(rs.isBeforeFirst()) + { + rs.first(); + do + { + Area a = new Area(); + a.setId(new Integer( rs.getInt("area_id") )); + a.setArea_id(a.getId()); + if(existemMedidasByArea(a.getId())) + { + a.setDescricao(Utils.unicodeToHTML(rs.getString("descricao"))); + try + { + a.setRiscos(getRiscosByArea(a)); + } + catch(Exception ex) + { + System.out.println("ERRO RISCOS BY AREA !!!!"); + ErrorLogger.logException( ex ); + a.setRiscos(null); + } + + areas.add(a); + } + + }while(rs.next()); + plano.setAreas(areas); + } + return plano; + } + + + /** + * create Risco here with isPatrimonial : + * select column in query + * set property + * + * @param a + * @return + * @throws Exception + */ + private List getRiscosByArea(Area a) throws Exception + { + Statement st = createLocalStatement(); + String sql = "select distinct hs_relatorio_risco.id, hs_relatorio_risco.description as descricao, hs_relatorio_risco.is_patrimonial as is_patrimonial " + + " from hs_relatorio_posto "; + sql += "inner join hs_relatorio_posto_medida on hs_relatorio_posto_medida.posto_id = hs_relatorio_posto.id "; + sql += "inner join hs_relatorio_medida on hs_relatorio_medida.id = hs_relatorio_posto_medida.medida_id "; + sql += "inner join hs_relatorio_risco on hs_relatorio_risco.id = hs_relatorio_medida.risco_id "; + sql += "inner join hs_relatorio on hs_relatorio.id = hs_relatorio_risco.relatorio_id "; + sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; + sql += "where area_id = " + a.getId() + " "; + sql += "order by hs_relatorio_risco.id "; + System.out.println("RISCOS BY AREA SQL : " + sql); + ResultSet rs = st.executeQuery(sql); + + List< Risco > riscos = new ArrayList(); + if ( rs.isBeforeFirst() ) + { + rs.first(); + do + { + Risco r = new Risco(); + r.setId( new Integer( rs.getInt( "id" ) ) ); + if ( existemMedidasByRisco( r.getId() ) ) + { + r.setDescricao( Utils.unicodeToHTML( rs.getString( "descricao" ) ) ); + r.setIsPatrimonial( rs.getBoolean( "is_patrimonial" ) ); + + r.setValores( getValoresByRisco( r, a ) ); + //Integer valor = getValorByRisco(r, a); + //r.setValor(valor); + r.setRisco_id( new Integer( rs.getInt( "id" ) ) ); + r.setMedidas( getMedidasByRisco( r, a ) ); + riscos.add( r ); + } + } + while( rs.next() ); + } + return riscos; + } + + private List getValoresByRisco(Risco r, Area a) throws Exception + //private Integer getValorByRisco(Risco r, Area a) throws Exception + { + Statement st = createLocalStatement(); + String sql = "select valor from "; + sql += "(select distinct hs_relatorio_posto_risco.risco_id, "; + sql += "case when hs_relatorio_posto_risco.valor_qualitativo_id isnull and hs_relatorio_posto_risco.probabilidade isnull and hs_relatorio_posto_risco.severidade isnull then null "; + sql += "when hs_relatorio_posto_risco.valor_qualitativo_id isnull then hs_relatorio_posto_risco.probabilidade * hs_relatorio_posto_risco.severidade "; + sql += "else null "; + sql += "end as valor "; + sql += "from hs_relatorio_posto "; + sql += "inner join hs_relatorio_posto_medida on hs_relatorio_posto_medida.posto_id = hs_relatorio_posto.id "; + sql += "inner join hs_relatorio_medida on hs_relatorio_medida.id = hs_relatorio_posto_medida.medida_id "; + sql += "inner join hs_relatorio_risco on hs_relatorio_risco.id = hs_relatorio_medida.risco_id "; + sql += "inner join hs_relatorio_posto_risco on (hs_relatorio_posto_risco.posto_id = hs_relatorio_posto.id and hs_relatorio_posto_risco.risco_id = hs_relatorio_risco.id) "; + sql += "inner join hs_relatorio on hs_relatorio.id = hs_relatorio_risco.relatorio_id "; + sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; + sql += "where hs_relatorio_posto_risco.risco_id = " + r.getId() + " and area_id = " + a.getId() + ") subquery "; + sql += "order by subquery.valor"; + System.out.println("VALORES BY RISCO : " + sql); + ResultSet rs = st.executeQuery(sql); + List valores = new ArrayList(); +// Integer valor = null; + if(rs.isBeforeFirst()) + { + rs.first(); + do + { + Valor v = new Valor(); + Object oValor = rs.getObject("valor"); + + if(oValor == null) + { + v.setValor(null); + //r.setValor(null); +// valor = null; + } + else + { + v.setValor((Integer) oValor); + //r.setValor((Integer) oValor); +// valor = (Integer) oValor; + } +// System.out.println("RISCO : " + r.getId().toString() + "VALOR : " + oValor.toString()); + //int valor = rs.getInt("valor"); + //v.setValor(new Integer(valor)); + //v.setMedidas(getMedidasByValor(v, r, a)); + valores.add(v); + }while(rs.next()); + } + return valores; + //return valor; + } + +// private List getMedidasByValor(Valor v, Risco r, Area a) throws Exception +// { +// Statement st = dblocal.createStatement(); +// String sql = "select distinct medida_id, valor, descricao from "; +// sql += "( select distinct hs_relatorio_posto_medida.medida_id, hs_relatorio_posto_risco.risco_id, hs_relatorio_medida.description as descricao, "; +// sql += "case when hs_relatorio_posto_risco.valor_qualitativo_id isnull and hs_relatorio_posto_risco.probabilidade isnull and hs_relatorio_posto_risco.severidade isnull then null "; +// sql += "when hs_relatorio_posto_risco.valor_qualitativo_id isnull then hs_relatorio_posto_risco.probabilidade * hs_relatorio_posto_risco.severidade "; +// sql += "else hs_relatorio_posto_risco.valor_qualitativo_id "; +// sql += "end as valor "; +// sql += "from hs_relatorio_posto "; +// sql += "inner join hs_relatorio_posto_medida on hs_relatorio_posto_medida.posto_id = hs_relatorio_posto.id "; +// sql += "inner join hs_relatorio_medida on hs_relatorio_medida.id = hs_relatorio_posto_medida.medida_id "; +// sql += "inner join hs_relatorio_risco on hs_relatorio_risco.id = hs_relatorio_medida.risco_id "; +// sql += "inner join hs_relatorio_posto_risco on (hs_relatorio_posto_risco.posto_id = hs_relatorio_posto.id and hs_relatorio_posto_risco.risco_id = hs_relatorio_risco.id) "; +// sql += "inner join hs_relatorio on hs_relatorio.id = hs_relatorio_risco.relatorio_id "; +// sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; +// sql += "where hs_relatorio_posto_risco.risco_id = " + r.getId() + " and area_id = " + a.getId() + " and hs_relatorio_posto_medida.is_plano_actuacao = true" + ") subquery "; +// //sql += "where hs_relatorio_posto_risco.risco_id = " + r.getId() + " and area_id = " + a.getId() + ") subquery "; +// //sql += "where valor = " + v.getValor() + " "; +// sql += "order by subquery.medida_id, valor"; +// System.out.println("MEDIDAS BY VALOR SQL : " + sql); +// ResultSet rs = st.executeQuery(sql); +// List medidas = new ArrayList(); +// if(rs.isBeforeFirst()) +// { +// rs.first(); +// do +// { +// Medida m = new Medida(); +// //int valor = rs.getInt("valor"); +// //m.setValor(new Integer(valor)); +// m.setId(new Integer( rs.getInt("medida_id") )); +// m.setDescricao(Utils.unicodeToHTML(rs.getString("descricao"))); +// m.setPostos(getPostosByMedidaAndValor(m, v, a)); +// medidas.add(m); +// }while(rs.next()); +// } +// return medidas; +// } + + private List getMedidasByRisco(Risco r, Area a) throws Exception + { + Statement st = createLocalStatement(); + String sql = "select distinct medida_id, valor, descricao from "; + sql += "( select distinct hs_relatorio_posto_medida.medida_id, hs_relatorio_posto_risco.risco_id, hs_relatorio_medida.description as descricao, "; + sql += "case when hs_relatorio_posto_risco.valor_qualitativo_id isnull and hs_relatorio_posto_risco.probabilidade isnull and hs_relatorio_posto_risco.severidade isnull then null "; + sql += "when hs_relatorio_posto_risco.valor_qualitativo_id isnull then hs_relatorio_posto_risco.probabilidade * hs_relatorio_posto_risco.severidade "; + sql += "else hs_relatorio_posto_risco.valor_qualitativo_id "; + sql += "end as valor "; + sql += "from hs_relatorio_posto "; + sql += "inner join hs_relatorio_posto_medida on hs_relatorio_posto_medida.posto_id = hs_relatorio_posto.id "; + sql += "inner join hs_relatorio_medida on hs_relatorio_medida.id = hs_relatorio_posto_medida.medida_id "; + sql += "inner join hs_relatorio_risco on hs_relatorio_risco.id = hs_relatorio_medida.risco_id "; + sql += "inner join hs_relatorio_posto_risco on (hs_relatorio_posto_risco.posto_id = hs_relatorio_posto.id and hs_relatorio_posto_risco.risco_id = hs_relatorio_risco.id) "; + sql += "inner join hs_relatorio on hs_relatorio.id = hs_relatorio_risco.relatorio_id "; + sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; + sql += "where hs_relatorio_posto_risco.risco_id = " + r.getId() + " and area_id = " + a.getId() + " and hs_relatorio_posto_medida.is_plano_actuacao = true" + ") subquery "; + //sql += "where hs_relatorio_posto_risco.risco_id = " + r.getId() + " and area_id = " + a.getId() + ") subquery "; + //sql += "where valor = " + v.getValor() + " "; + sql += "order by subquery.medida_id, valor"; + System.out.println("MEDIDAS BY RISCO SQL : " + sql); + ResultSet rs = st.executeQuery(sql); + List medidas = new ArrayList(); + if(rs.isBeforeFirst()) + { + rs.first(); + do + { + Medida m = new Medida(); + //int valor = rs.getInt("valor"); + //m.setValor(new Integer(valor)); + m.setId(new Integer( rs.getInt("medida_id") )); + m.setMedida_id(m.getId()); + m.setDescricao(Utils.unicodeToHTML(rs.getString("descricao"))); + //m.setPostos(getPostosByMedidaAndValor(m, v, a)); + m.setPostos(getPostosByMedida(r, m, a)); + medidas.add(m); + }while(rs.next()); + } + return medidas; + } + +// private List getPostosByMedidaAndValor(Medida m, Valor v, Area a) throws Exception +// { +// Statement st = dblocal.createStatement(); +// String sql = "select subquery.posto_id, valor, descricao from "; +// sql += "(select hs_relatorio_posto_medida.posto_id, hs_relatorio_posto.description as descricao, "; +// sql += "case when hs_relatorio_posto_risco.valor_qualitativo_id isnull and hs_relatorio_posto_risco.probabilidade isnull and hs_relatorio_posto_risco.severidade isnull then null "; +// sql += "when hs_relatorio_posto_risco.valor_qualitativo_id isnull then hs_relatorio_posto_risco.probabilidade * hs_relatorio_posto_risco.severidade "; +// sql += "else hs_relatorio_posto_risco.valor_qualitativo_id "; +// sql += "end as valor "; +// sql += "from hs_relatorio_posto_medida "; +// sql += "inner join hs_relatorio_posto_risco on hs_relatorio_posto_risco.posto_id = hs_relatorio_posto_medida.posto_id "; +// sql += "inner join hs_relatorio_posto on hs_relatorio_posto.id = hs_relatorio_posto_medida.posto_id "; +// sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; +// sql += "where medida_id = " + m.getId() + " and area_id = " + a.getId() + ") subquery "; +// //sql += "where valor = " + v.getValor(); +// System.out.println("POSTOS BY MEDIDA SQL : " + sql); +// ResultSet rs = st.executeQuery(sql); +// List postos = new ArrayList(); +// if(rs.isBeforeFirst()) +// { +// rs.first(); +// do +// { +// PostoTrabalho p = new PostoTrabalho(); +// p.setId(new Integer( rs.getInt("posto_id") )); +// p.setDescricao(Utils.unicodeToHTML(rs.getString("descricao"))); +// postos.add(p); +// }while(rs.next()); +// } +// return postos; +// } + + private List getPostosByMedida(Risco r, Medida m, Area a) throws Exception + { + Statement st = createLocalStatement(); + String sql = "select subquery.posto_id, valor, descricao from "; + sql += "(select hs_relatorio_posto_medida.posto_id, hs_relatorio_posto.description as descricao, "; + sql += "case when hs_relatorio_posto_risco.valor_qualitativo_id isnull and hs_relatorio_posto_risco.probabilidade isnull and hs_relatorio_posto_risco.severidade isnull then null "; + sql += "when hs_relatorio_posto_risco.valor_qualitativo_id isnull then hs_relatorio_posto_risco.probabilidade * hs_relatorio_posto_risco.severidade "; + sql += "else hs_relatorio_posto_risco.valor_qualitativo_id "; + sql += "end as valor "; + sql += "from hs_relatorio_posto_medida "; + sql += "inner join hs_relatorio_posto_risco on hs_relatorio_posto_risco.posto_id = hs_relatorio_posto_medida.posto_id "; + sql += "inner join hs_relatorio_posto on hs_relatorio_posto.id = hs_relatorio_posto_medida.posto_id "; + sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; + sql += "where medida_id = " + m.getId() + " and area_id = " + a.getId() + " and risco_id = " + r.getId() + ") subquery "; + //sql += "where valor = " + v.getValor(); + System.out.println("POSTOS BY MEDIDA SQL : " + sql); + ResultSet rs = st.executeQuery(sql); + List postos = new ArrayList(); + if(rs.isBeforeFirst()) + { + rs.first(); + do + { + PostoTrabalho p = new PostoTrabalho(); + p.setId(new Integer( rs.getInt("posto_id") )); + p.setPosto_id(p.getId()); + p.setDescricao(Utils.unicodeToHTML(rs.getString("descricao"))); + postos.add(p); + }while(rs.next()); + } + return postos; + } + + + + private boolean existemMedidasByArea(Integer area_id) throws Exception + { + Statement st = createLocalStatement(); + String sql = "select distinct medida_id, valor, descricao "; + sql += "from ( select distinct hs_relatorio_posto_medida.medida_id, hs_relatorio_posto_risco.risco_id, hs_relatorio_medida.description as descricao, "; + sql += "case when hs_relatorio_posto_risco.valor_qualitativo_id isnull and hs_relatorio_posto_risco.probabilidade isnull and hs_relatorio_posto_risco.severidade isnull then null "; + sql += "when hs_relatorio_posto_risco.valor_qualitativo_id isnull then hs_relatorio_posto_risco.probabilidade * hs_relatorio_posto_risco.severidade else hs_relatorio_posto_risco.valor_qualitativo_id end as valor from hs_relatorio_posto "; + sql += "inner join hs_relatorio_posto_medida on hs_relatorio_posto_medida.posto_id = hs_relatorio_posto.id "; + sql += "inner join hs_relatorio_medida on hs_relatorio_medida.id = hs_relatorio_posto_medida.medida_id "; + sql += "inner join hs_relatorio_risco on hs_relatorio_risco.id = hs_relatorio_medida.risco_id "; + sql += "inner join hs_relatorio_posto_risco on (hs_relatorio_posto_risco.posto_id = hs_relatorio_posto.id and hs_relatorio_posto_risco.risco_id = hs_relatorio_risco.id) "; + sql += "inner join hs_relatorio on hs_relatorio.id = hs_relatorio_risco.relatorio_id "; + sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; + sql += "where area_id = " + area_id + " and hs_relatorio_posto_medida.is_plano_actuacao = true) subquery order by subquery.medida_id, valor"; + System.out.println("EXISTEM MEDIDAS BY AREA SQL : " + sql); + ResultSet rs = st.executeQuery(sql); + if(rs.isBeforeFirst()) + { + return true; + } + else + { + return false; + } + } + + private boolean existemMedidasByRisco(Integer risco_id) throws Exception + { + Statement st = createLocalStatement(); + String sql = "select distinct medida_id "; + sql += "from ( select distinct hs_relatorio_posto_medida.medida_id, hs_relatorio_posto_risco.risco_id, hs_relatorio_medida.description as descricao, "; + sql += "case when hs_relatorio_posto_risco.valor_qualitativo_id isnull and hs_relatorio_posto_risco.probabilidade isnull and hs_relatorio_posto_risco.severidade isnull then null "; + sql += "when hs_relatorio_posto_risco.valor_qualitativo_id isnull then hs_relatorio_posto_risco.probabilidade * hs_relatorio_posto_risco.severidade else hs_relatorio_posto_risco.valor_qualitativo_id end as valor from hs_relatorio_posto "; + sql += "inner join hs_relatorio_posto_medida on hs_relatorio_posto_medida.posto_id = hs_relatorio_posto.id "; + sql += "inner join hs_relatorio_medida on hs_relatorio_medida.id = hs_relatorio_posto_medida.medida_id "; + sql += "inner join hs_relatorio_risco on hs_relatorio_risco.id = hs_relatorio_medida.risco_id "; + sql += "inner join hs_relatorio_posto_risco on (hs_relatorio_posto_risco.posto_id = hs_relatorio_posto.id and hs_relatorio_posto_risco.risco_id = hs_relatorio_risco.id) "; + sql += "inner join hs_relatorio on hs_relatorio.id = hs_relatorio_risco.relatorio_id "; + sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; + sql += "where hs_relatorio_posto_risco.risco_id = " + risco_id + " and hs_relatorio_posto_medida.is_plano_actuacao = true) subquery order by medida_id"; + System.out.println("EXISTEM MEDIDAS BY RISCO SQL : " + sql); + ResultSet rs = st.executeQuery(sql); + + return rs.isBeforeFirst(); + +// if(rs.isBeforeFirst()) +// { +// return true; +// } +// else +// { +// return false; +// } + } + + + public Integer createPlano( PlanoActuacao p ) throws Exception + { + Integer newPlanoID = null; + Date todayDate = new Date(); + + boolean concluidoPorDesactivacao = p.getConcluidoPorDesactivacao() == null ? Boolean.FALSE : p.getConcluidoPorDesactivacao(); + Date dataDesactivacao = p.getDataDesactivacao(); + if ( dataDesactivacao == null && concluidoPorDesactivacao ) + { + dataDesactivacao = todayDate; + } + + PlanosActuacaoData planoData = new PlanosActuacaoData(); + planoData.setEstabelecimento_id( p.getEstabelecimento_id() ); + planoData.setFase( p.getFase() ); + planoData.setData_visita( p.getData_visita() ); + planoData.setNome_estabelecimento( p.getNome_estabelecimento() ); + + planoData.setValidacao_director_loja( false ); + planoData.setValidacao_dns( false ); + planoData.setValidacao_hs( false ); + + planoData.setParecer_dns( null ); + planoData.setObs_correcao( null ); + planoData.setData_validacao_dir_loja( null ); + planoData.setUser_dir_loja( null ); + planoData.setData_validacao_dns( null ); + planoData.setUser_dns( null ); + planoData.setData_validacao_hs( null ); + planoData.setUser_hs( null ); + + planoData.setFase_antes_correcao( null ); + planoData.setCorrecao( "n" ); + planoData.setObservacoes_dl( null ); + planoData.setObservacoes_dns( null ); + planoData.setVerificacao_siprp( null ); + + planoData.setData_controlo( todayDate ); + planoData.setData_email_controlo( null ); + + planoData.setEmpresa_id( p.getEmpresa_id() ); + planoData.setNome_empresa( p.getNome_empresa() ); + + planoData.setTecnico_hs_id( p.getTecnico_hs_id() ); + planoData.setTecnico_hs_nome( p.getTecnico_hs_nome() ); + + planoData.setData_relatorio( p.getData_relatorio() ); + planoData.setDeleted_date( null ); + + planoData.setConcluido_por_desactivacao( concluidoPorDesactivacao ); + + planoData.setTecnico_superior_hs_id( p.getTecnico_superior_hs_id() ); + planoData.setTecnico_superior_hs_nome( p.getTecnico_superior_hs_nome() ); + + planoData.setData_desactivacao( dataDesactivacao ); + planoData.setData_disponibilizacao( p.getData_disponibilizacao() ); + planoData.setData_validacao_seg( null ); + planoData.setUser_seg( null ); + + planoData.setHs_relatorio_id( p.getHs_relatorio_id() ); + + System.out.println( "\nCREATE PLANO : " ); + planoData.setProvider( EvoBaseProvider.getInstance().getProvider() ); + planoData.save(); + newPlanoID = planoData.getId(); + System.out.println( "\n\tplanoID : " + newPlanoID ); + + return newPlanoID; + } + +// public Integer createPlano( PlanoActuacao p ) throws Exception +// { +// Statement st = createStatement(); +// Integer newId = getMaxTableId("planos_actuacao"); +// String sql = "insert into planos_actuacao (id, estabelecimento_id, fase, data_visita, data_relatorio, nome_estabelecimento, empresa_id, nome_empresa, data_controlo, tecnico_hs_id, tecnico_hs_nome, tecnico_superior_hs_id, tecnico_superior_hs_nome, concluido_por_desactivacao, data_desactivacao) values ("; +// sql += newId + ", "; +// sql += p.getEstabelecimento_id() + ", "; +// sql += p.getFase() + ", '"; +// java.sql.Date sqlDate = new java.sql.Date(p.getData_visita().getTime()); +// sql += sqlDate + "', '"; +// sqlDate = new java.sql.Date(p.getData_relatorio().getTime()); +// sql += sqlDate + "', '"; +// sql += p.getNome_estabelecimento() + "', "; +// sql += p.getEmpresa_id() + ", '"; +// sql += p.getNome_empresa() + "', '"; +// Date today = new Date(); +// sqlDate = new java.sql.Date(today.getTime()); +// sql += sqlDate + "', "; +// //tecnico +// sql += p.getTecnico_hs_id() + ", "; +// if(p.getTecnico_hs_nome() == null) +// { +// sql += null; +// } +// else +// { +// sql += "'" + p.getTecnico_hs_nome() + "'"; +// } +// +// //tecnico_superior +// sql += ", "; +// sql += p.getTecnico_superior_hs_id() + ", "; +// sql += p.getTecnico_superior_hs_nome() == null ? null : "'" + p.getTecnico_superior_hs_nome() + "'"; +// +// //concluido_por_desactivacao +// sql += ", "; +// sql += p.getConcluidoPorDesactivacao() == null ? "false" : p.getConcluidoPorDesactivacao(); +// +// //data_desactivacao +// sql += ", "; +// +// java.sql.Date deactiveDate = null; +// if ( p.getDataDesactivacao() != null ) +// { +// deactiveDate = new java.sql.Date( p.getDataDesactivacao().getTime() ); +// } +// else if ( p.getConcluidoPorDesactivacao() != null && p.getConcluidoPorDesactivacao() ) +// { +// deactiveDate = new java.sql.Date( new Date().getTime() ); +// } +// sql += deactiveDate == null ? "null" : "'" + deactiveDate + "'"; +// +// sql += ")"; +// +// System.out.println("SQL CREATE PLANO : " + sql); +// st.execute(sql); +// +// return newId; +// } + + + public Integer createArea( Area a ) throws Exception + { + Integer newAreaID = null; + + PlanoAreasData areaData = new PlanoAreasData(); + areaData.setArea_id( a.getArea_id() ); + areaData.setPlano_id( a.getPlano_id() ); + areaData.setDescricao( a.getDescricao() ); + + System.out.println( "\nCREATE AREA : " ); + areaData.setProvider( EvoBaseProvider.getInstance().getProvider( DB.SIPRP ) ); + areaData.save(); + newAreaID = areaData.getId(); + System.out.println( "\n\tareaID : " + newAreaID ); + + return newAreaID; + } +// public Integer createArea( Area a ) throws Exception +// { +// Statement st = createStatement(); +// Integer newId = getMaxTableId("plano_areas"); +// String sql = "insert into plano_areas (id, area_id, plano_id, descricao) values ("; +// sql += newId + ", "; +// sql += a.getArea_id() + ", "; +// sql += a.getPlano_id() + ", '"; +// sql += a.getDescricao() + "' "; +// sql += ")"; +// +// System.out.println("SQL CREATE AREA : " + sql); +// st.execute(sql); +// return newId; +// } + + + public Integer createRisco( Risco r ) throws Exception + { + Integer newRiscoID = null; + + PlanoRiscosData riscoData = new PlanoRiscosData(); + riscoData.setDescricao( r.getDescricao() ); + riscoData.setActivo( r.getActivo() == null ? "y" : r.getActivo() ); + riscoData.setArea_id( r.getArea_id() ); + riscoData.setValor( r.getValor() ); + riscoData.setRisco_id( r.getId() ); + riscoData.setIs_patrimonial( r.getIsPatrimonial() ); + + System.out.println( "\nCREATE RISCO : " ); + riscoData.setProvider( EvoBaseProvider.getInstance().getProvider( DB.SIPRP ) ); + riscoData.save(); + newRiscoID = riscoData.getId(); + System.out.println( "\n\triscoID : " + newRiscoID ); + + return newRiscoID; + } + +// public Integer createRisco(Risco r) throws Exception +// { +// Statement st = createStatement(); +// Integer newId = getMaxTableId("plano_riscos"); +// String sql = "insert into plano_riscos (id, area_id, descricao, valor, risco_id) values ("; +// sql += newId + ", "; +// sql += r.getArea_id() + ", '"; +// sql += r.getDescricao() + "', "; +// sql += r.getValor() + ", "; +// sql += r.getId(); +// sql += ")"; +// +// System.out.println("SQL CREATE RISCO : " + sql); +// st.execute(sql); +// return newId; +// } + + +// public Integer createValor(Valor v) throws Exception +// { +// Statement st = createStatement(); +// Integer newId = getMaxTableId("plano_valores"); +// String sql = "insert into plano_valores (id, risco_id, valor) values ("; +// sql += newId + ", "; +// sql += v.getRisco_id() + ", "; +// sql += v.getValor() + ""; +// sql += ")"; +// +// System.out.println("SQL CREATE VALOR : " + sql); +// st.execute(sql); +// return newId; +// } + + + public Integer createMedida( Medida m ) throws Exception + { + Integer newMedidaID = null; + + PlanoMedidasData medidaData = new PlanoMedidasData(); + medidaData.setMedida_id( m.getMedida_id() ); + medidaData.setRisco_id( m.getRisco_id() ); + medidaData.setDescricao( m.getDescricao() ); + + System.out.println( "\nCREATE MEDIDA : " ); + medidaData.setProvider( EvoBaseProvider.getInstance().getProvider( DB.SIPRP ) ); + medidaData.save(); + newMedidaID = medidaData.getId(); + System.out.println( "\n\tmedidaID : " + newMedidaID ); + + return newMedidaID; + } +// public Integer createMedida(Medida m) throws Exception +// { +// Statement st = createStatement(); +// Integer newId = getMaxTableId("plano_medidas"); +// String sql = "insert into plano_medidas (id, medida_id, risco_id, descricao) values ("; +// sql += newId + ", "; +// sql += m.getMedida_id() + ", "; +// sql += m.getRisco_id() + ", '"; +// sql += m.getDescricao() + "' "; +// sql += ")"; +// +// System.out.println("SQL CREATE MEDIDA : " + sql); +// st.execute(sql); +// return newId; +// } + + + public void createPostoTrabalho( PostoTrabalho p ) throws Exception + { + PlanoPostosTrabalhoData postoData = new PlanoPostosTrabalhoData(); + postoData.setPosto_id( p.getPosto_id() ); + postoData.setMedida_id( p.getMedida_id() ); + postoData.setDescricao( p.getDescricao() ); + + System.out.println( "\nCREATE POSTO TRABALHO : " ); + postoData.setProvider( EvoBaseProvider.getInstance().getProvider( DB.SIPRP ) ); + postoData.save(); + } +// public void createPostoTrabalho(PostoTrabalho p) throws Exception +// { +// Statement st = createStatement(); +// Integer newId = getMaxTableId("plano_postos_trabalho"); +// String sql = "insert into plano_postos_trabalho (id, posto_id, medida_id, descricao) values ("; +// sql += newId + ", "; +// sql += p.getPosto_id() + ", "; +// sql += p.getMedida_id() + ", '"; +// sql += p.getDescricao() + "' "; +// sql += ")"; +// +// System.out.println("SQL CREATE POSTO : " + sql); +// st.execute(sql); +// } + + + + //==================== + + + public String getEmpresaNome( Integer empresaID ) throws Exception + { + String nome = null; + + EmpresasData empresaData = getLocalProvider().load( EmpresasData.class, empresaID, EmpresasData.ID ); + if ( empresaData != null ) + { + nome = Utils.unicodeToHTML( empresaData.getDesignacao_social() ); + } + else + { + ErrorLogger.logException( new Exception( "CreatePlanosDataProvider . getEmpresaNome( " + empresaID + " ) : is Null !" + + "\n\tempresaData = " + (empresaData == null ? "null" : "not null") + ", nome = " + nome ) ); + } + return nome; + } +// public String getEmpresaNome(Integer empresa_id) throws Exception +// { +// Statement st = createLocalStatement(); +// String sql ="SELECT designacao_social FROM empresas WHERE id = " + empresa_id; +// ResultSet rslocal = st.executeQuery(sql); +// rslocal.first(); +// String nome = Utils.unicodeToHTML(rslocal.getString("designacao_social")); +// return nome; +// } + + + +// private Statement createStatement() +// { +// Statement st = null; +// try +// { +// if ( db == null ) +// { +//// db = new DbRelatorios(); +// db = DbRelatorios.getInstance(); +// db.connect(); +// } +// st = db.createStatement(); +// } +// catch ( Exception e ) +// { +// System.out.println( "\nCreatePlanosDataProvider . createStatement() : db was null ! error connecting : " + e.getMessage() ); +// ErrorLogger.logException( e ); +// } +// return st; +// } + +// private Statement createLocalStatement() +// { +// Statement st = null; +// try +// { +// if ( dblocal == null ) +// { +//// dblocal = new DbLocalRelatorios(); +// dblocal = DbLocalRelatorios.getInstance(); +// dblocal.connect(); +// } +// st = dblocal.createStatement(); +// } +// catch ( Exception e ) +// { +// System.out.println( "\nCreatePlanosDataProvider . createLocalStatement() : dblocal was null ! error connecting : " + e.getMessage() ); +// ErrorLogger.logException( e ); +// } +// return st; +// } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/EvoBaseProvider.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/EvoBaseProvider.java new file mode 100644 index 00000000..0e5a3382 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/EvoBaseProvider.java @@ -0,0 +1,371 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.providers; + +import com.evolute.entity.ProviderInterface; +import com.evolute.entity.ProviderRegistry; +import com.evolute.entity.evo.EvoDataException; +import com.evolute.entity.evo.EvoDataObject; +import com.evolute.entity.evo.EvoDataProvider; +import com.evolute.entity.evo.EvoDataProviderFactory; +import com.evolute.entity.utils.ConnectionIdentity; +import com.evolute.utils.Singleton; +import com.evolute.utils.db.DBException; +import com.evolute.utils.db.DBManager; +import com.evolute.utils.db.Executer; +import com.evolute.utils.db.JDBCManager; +import com.evolute.utils.db.keyretrievers.PostgresqlAutoKeyRetriever; +import com.evolute.utils.error.ErrorLogger; +import com.evolute.utils.jdbc.DBStatementExecuter; +import com.evolute.utils.jdbc.StatementExecuterFactory; +import com.evolute.utils.sql.Insert; +import com.evolute.utils.sql.SQLQuery; +import com.evolute.utils.strings.UnicodeChecker; +import db.DBConstants; +import db.DBPropertiesLoader; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.Statement; +import javax.faces.context.ExternalContext; +import javax.faces.context.FacesContext; +import javax.servlet.http.HttpSession; + +/** + * + * @author dneves + */ +public class EvoBaseProvider +{ + private static EvoBaseProvider INSTANCE = null; + + private ProviderInterface< EvoDataObject< ? >, EvoDataException > providerInterface; + private DBManager dbManager; + + private ProviderInterface< EvoDataObject< ? >, EvoDataException > localProviderInterface; + private DBManager localDBManager; + + private EvoBaseProvider() throws DBException + { + init(); + } + + public static synchronized EvoBaseProvider getInstance() throws DBException + { + if ( INSTANCE == null ) + { + INSTANCE = new EvoBaseProvider(); + } + return INSTANCE; + } + + private void init() throws DBException + { + System.out.println( "EvoBaseProvider . init() : " ); + + String server = DBPropertiesLoader.getInstance().findProperty( DBConstants.SERVER_SIPRP ); + int port = DBPropertiesLoader.getInstance().findProperty( DBConstants.PORT_SIPRP, -1 ); + String dbname = DBPropertiesLoader.getInstance().findProperty( DBConstants.DATABASE_SIPRP ); + String username = DBPropertiesLoader.getInstance().findProperty( DBConstants.USERNAME_SIPRP ); + String password = DBPropertiesLoader.getInstance().findProperty( DBConstants.PASSWORD_SIPRP ); + +// System.out.println( "\t" + server + " : " + port + " : " + dbname + " : " + username + " : " + password ); + + String server_local = DBPropertiesLoader.getInstance().findProperty( DBConstants.SERVER_SIPRP_LOCAL ); + int port_local = DBPropertiesLoader.getInstance().findProperty( DBConstants.PORT_SIPRP_LOCAL, -1 ); + String dbname_local = DBPropertiesLoader.getInstance().findProperty( DBConstants.DATABASE_SIPRP_LOCAL ); + String username_local = DBPropertiesLoader.getInstance().findProperty( DBConstants.USERNAME_SIPRP_LOCAL ); + String password_local = DBPropertiesLoader.getInstance().findProperty( DBConstants.PASSWORD_SIPRP_LOCAL ); + +// System.out.println( "\t" + server_local + " : " + port_local + " : " + dbname_local + " : " + username_local + " : " + password_local ); + + init( DBConstants.DB.SIPRP, server, port, dbname, username, password ); + init( DBConstants.DB.SIPRP_LOCAL, server_local, port_local, dbname_local, username_local, password_local ); + } + + private void init( DBConstants.DB db, String dbServer, Integer dbPort, String dbName, String dbUsername, String dbPassword ) + throws DBException + { + String dbUrl = "jdbc:postgresql://" + dbServer + ":" + dbPort + "/" + dbName + "?prepareThreshold=2"; + if ( DBConstants.DB.SIPRP.equals( db ) ) + { + Singleton.setInstance( DBConstants.CONNECTION_URL, dbUrl ); + } + else if ( DBConstants.DB.SIPRP_LOCAL.equals( db ) ) + { + Singleton.setInstance( DBConstants.LOCAL_CONNECTION_URL, dbUrl ); + } + + createDBManager( db, dbUsername, dbPassword ); + initProviderConnection( db, dbUsername, dbPassword ); + } + + private void createDBManager( DBConstants.DB db, String username, String password ) + throws DBException + { + if ( DBConstants.DB.SIPRP.equals( db ) ) + { + if( dbManager != null ) + { + dbManager.close(); + } + String dbUrl = ( String ) Singleton.getInstance( DBConstants.CONNECTION_URL ); + DBManager manager = new JDBCManager( dbUrl, username, password , 14, 7, 7, new SQLQuery[] { } ); + StatementExecuterFactory.initialize( new DBStatementExecuter( manager.getSharedExecuter( EvoBaseProvider.class ) ) ); + UnicodeChecker.setUseDoubleSlash( true ); + Insert.setDefaultKeyRetriever( PostgresqlAutoKeyRetriever.RETRIEVER ); + dbManager = manager; +// Singleton.setInstance( Singleton.DEFAULT_DBMANAGER, dbManager ); +// System.out.println( "\nDBManager : " + dbManager ); + } + else if ( DBConstants.DB.SIPRP_LOCAL.equals( db ) ) + { + if( localDBManager != null ) + { + localDBManager.close(); + } + String dbUrl = ( String ) Singleton.getInstance( DBConstants.LOCAL_CONNECTION_URL ); + DBManager manager = new JDBCManager( dbUrl, username, password , 14, 7, 7, new SQLQuery[] { } ); + StatementExecuterFactory.initialize( new DBStatementExecuter( manager.getSharedExecuter( EvoBaseProvider.class ) ) ); + UnicodeChecker.setUseDoubleSlash( true ); + Insert.setDefaultKeyRetriever( PostgresqlAutoKeyRetriever.RETRIEVER ); + localDBManager = manager; + Singleton.setInstance( Singleton.DEFAULT_DBMANAGER, localDBManager ); +// System.out.println( "\nLocalDBManager : " + localDBManager ); + } + } + + private void initProviderConnection( DBConstants.DB db, String username, String password ) + { + if ( DBConstants.DB.SIPRP.equals( db ) ) + { + String dbUrl = ( String ) Singleton.getInstance( DBConstants.CONNECTION_URL ); + providerInterface = createInstance( db, dbUrl, username, password ); + } + else if ( DBConstants.DB.SIPRP_LOCAL.equals( db ) ) + { + String dbUrl = ( String ) Singleton.getInstance( DBConstants.LOCAL_CONNECTION_URL ); + localProviderInterface = createInstance( db, dbUrl, username, password ); + } + } + + private static ProviderInterface< EvoDataObject< ? >, EvoDataException > createInstance( DBConstants.DB db, String url, String user, String password ) + { + ProviderRegistry.registerDefaultProviderFactory( new EvoDataProviderFactory() ); + ConnectionIdentity conn = new ConnectionIdentity( url, user ); + ProviderRegistry.registerDefaultConnection( conn ); + ProviderInterface< EvoDataObject< ? >, EvoDataException > provider = + ( ProviderInterface< EvoDataObject< ? >, EvoDataException > ) ProviderRegistry.getDefaultProvider( conn ); + ( ( EvoDataProvider ) provider ).setIsUsingCache( Boolean.FALSE ); + if ( DBConstants.DB.SIPRP.equals( db ) ) + { + Singleton.setInstance( DBConstants.DEFAULT_PROVIDER, provider ); + } + else if ( DBConstants.DB.SIPRP_LOCAL.equals( db ) ) + { + Singleton.setInstance( DBConstants.LOCAL_PROVIDER, provider ); + Singleton.setInstance( Singleton.DEFAULT_EVO_DATA_PROVIDER, provider ); + Singleton.setInstance( Singleton.DEFAULT_OBJECT_PROVIDER, provider ); + } + conn.setPassword( password ); + return provider; + } + + public ProviderInterface< EvoDataObject< ? >, EvoDataException > getProvider() + { + return getProvider( DBConstants.DB.SIPRP ); + } + + public ProviderInterface< EvoDataObject< ? >, EvoDataException > getProvider( DBConstants.DB db ) + { + ProviderInterface< EvoDataObject< ? >, EvoDataException > provider = null; + + if ( DBConstants.DB.SIPRP.equals( db ) ) + { + provider = providerInterface; + } + else if ( DBConstants.DB.SIPRP_LOCAL.equals( db ) ) + { + provider = localProviderInterface; + } + + return provider; + } + + public DBManager getDbManager() + { + return getDbManager( DBConstants.DB.SIPRP ); + } + + public DBManager getDbManager( DBConstants.DB db ) + { + DBManager manager = null; + if ( DBConstants.DB.SIPRP.equals( db ) ) + { + manager = dbManager; + } + else if ( DBConstants.DB.SIPRP_LOCAL.equals( db ) ) + { + manager = localDBManager; + } + return manager; + } + + public Executer getExecuter() throws DBException + { + return getExecuter( this ); + } + + private Executer getExecuter( Object clazz ) throws DBException + { + if ( getDbManager() == null ) + { + init(); + } + +// DBManager dbm = ( DBManager ) Singleton.getInstance( DBConstants.DEFAULT_DBMANAGER ); +// return dbm.getSharedExecuter( this ); + + DBManager dbm = getDbManager( DBConstants.DB.SIPRP ); + if ( dbm != null ) + { + return dbm.getSharedExecuter( this ); + } + return null; + } + + public Executer getLocalExecuter() throws DBException + { + return getLocalExecuter( this ); + } + + private Executer getLocalExecuter( Object clazz ) throws DBException + { + if ( getDbManager( DBConstants.DB.SIPRP_LOCAL ) == null ) + { + init(); + } +// DBManager dbm = ( DBManager ) Singleton.getInstance( DBConstants.LOCAL_DBMANAGER ); +// return dbm.getSharedExecuter( this ); + + DBManager dbm = getDbManager( DBConstants.DB.SIPRP_LOCAL ); + if ( dbm != null ) + { + return dbm.getSharedExecuter( this ); + } + return null; + } + + @Deprecated + public Statement createStatement() + { + String connectionURL = ( String ) Singleton.getInstance( DBConstants.CONNECTION_URL ); + String username = DBPropertiesLoader.getInstance().findProperty( DBConstants.USERNAME_SIPRP ); + String password = DBPropertiesLoader.getInstance().findProperty( DBConstants.PASSWORD_SIPRP ); + + return getStatement( DBConstants.DB.SIPRP, connectionURL, username, password ); + } + + @Deprecated + public Statement createLocalStatement() + { + String connectionURL = ( String ) Singleton.getInstance( DBConstants.LOCAL_CONNECTION_URL ); + String username = DBPropertiesLoader.getInstance().findProperty( DBConstants.USERNAME_SIPRP_LOCAL ); + String password = DBPropertiesLoader.getInstance().findProperty( DBConstants.PASSWORD_SIPRP_LOCAL ); + + return getStatement( DBConstants.DB.SIPRP_LOCAL, connectionURL, username, password ); + } + + private Statement getStatement( DBConstants.DB db, String connectionURL, String username, String password ) + { + Statement stm = null; + try + { + Connection connection = getConnection( db, connectionURL, username, password ); + if ( connection != null ) + { + stm = connection.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY ); + } + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + return stm; + } + + private Connection getConnection( DBConstants.DB db, String connectionURL, String username, String password ) throws Exception + { + Connection connection = null; +// System.out.println( "\nEvoBaseProvider . getConnection( " + connectionURL + ", " + username + " ) : " ); + + FacesContext fc = FacesContext.getCurrentInstance(); +// System.out.println( "\tFacesContext : " + fc ); + if ( fc != null ) + { + + ExternalContext ec = fc.getExternalContext(); + // System.out.println( "\tExternalContext : " + ec ); + if ( ec != null ) + { + HttpSession session = ( HttpSession ) ec.getSession( false ); + // System.out.println( "\tSession : " + session ); + + if ( session != null ) + { + if ( DBConstants.DB.SIPRP.equals( db ) ) + { + connection = ( Connection ) session.getAttribute( DBConstants.SESSION_CONNECTION ); + if ( connection == null ) + { + // System.out.println( "\n-> Creating new SIPRP connection ..." ); + Class.forName( "org.postgresql.Driver" ).newInstance(); + connection = DriverManager.getConnection( connectionURL, username, password ); + session.setAttribute( DBConstants.SESSION_CONNECTION, connection ); + } + } + else if ( DBConstants.DB.SIPRP_LOCAL.equals( db ) ) + { + connection = ( Connection ) session.getAttribute( DBConstants.SESSION_CONNECTION_LOCAL ); + if ( connection == null ) + { + // System.out.println( "\n-> Creating new SIPRP_LOCAL connection ..." ); + Class.forName( "org.postgresql.Driver" ).newInstance(); + connection = DriverManager.getConnection( connectionURL, username, password ); + session.setAttribute( DBConstants.SESSION_CONNECTION_LOCAL, connection ); + } + } + } + } + } + + if ( connection == null ) + { + connection = ( Connection ) Singleton.getInstance( "CONNECTION_OBJECT" ); + if ( connection == null ) + { + // System.out.println( "\nEvoBaseProvider . getConnection() : session is null !" ); + + if ( DBConstants.DB.SIPRP.equals( db ) ) + { + // System.out.println( "\t-> Creating new SIPRP connection ..." ); + Class.forName( "org.postgresql.Driver" ).newInstance(); + connection = DriverManager.getConnection( connectionURL, username, password ); + } + else if ( DBConstants.DB.SIPRP_LOCAL.equals( db ) ) + { + // System.out.println( "\t-> Creating new SIPRP_LOCAL connection ..." ); + Class.forName( "org.postgresql.Driver" ).newInstance(); + connection = DriverManager.getConnection( connectionURL, username, password ); + } + Singleton.setInstance( "CONNECTION_OBJECT", connection ); + } + } + +// System.out.println( "<-- getConnection() : " + connection ); + return connection; + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/GenericDataProvider.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/GenericDataProvider.java new file mode 100644 index 00000000..0da93335 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/GenericDataProvider.java @@ -0,0 +1,122 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.providers; + +import com.evolute.entity.ProviderInterface; +import com.evolute.entity.evo.EvoDataException; +import com.evolute.entity.evo.EvoDataObject; +import com.evolute.utils.db.DBException; +import com.evolute.utils.db.Executer; +import com.evolute.utils.error.ErrorLogger; +import db.DBConstants; +import java.sql.ResultSet; +import java.sql.Statement; + + +public abstract class GenericDataProvider +{ + private ProviderInterface< EvoDataObject< ? >, EvoDataException > provider = null; + private Executer executer = null; + + private ProviderInterface< EvoDataObject< ? >, EvoDataException > localProvider = null; + private Executer localExecuter = null; + + protected GenericDataProvider() throws Exception + { + provider = EvoBaseProvider.getInstance().getProvider( DBConstants.DB.SIPRP ); + executer = EvoBaseProvider.getInstance().getExecuter(); + + localProvider = EvoBaseProvider.getInstance().getProvider( DBConstants.DB.SIPRP_LOCAL ); + localExecuter = EvoBaseProvider.getInstance().getLocalExecuter(); + } + + public Executer getExecuter() + { + return executer; + } + + public Executer getLocalExecuter() + { + return localExecuter; + } + + public ProviderInterface< EvoDataObject< ? >, EvoDataException > getProvider() + { + return provider; + } + + public ProviderInterface< EvoDataObject< ? >, EvoDataException > getLocalProvider() + { + return localProvider; + } + + +// public void checkConnection() +// { +// Db db = Db.getInstance(); +// if ( db.getConnection() == null ) +// { +// try +// { +// db.connect(); +// } +// catch ( Exception ex ) +// { +// ErrorLogger.logException( ex ); +// } +// } +// } + + protected Integer getMaxTableId(String table) + { + Statement st = createStatement(); + String id = table + ".id"; + String sql = "SELECT max(" + id + ")+1 AS MAXID FROM " + table; + try + { + ResultSet rs = st.executeQuery(sql); + rs.first(); + Integer newId = new Integer(rs.getInt("MAXID")); + if(newId.intValue() == 0) + { + newId = new Integer(1); + } + return newId; + } + catch(Exception ex) + { + return new Integer(1); + } + } + + protected Statement createStatement() + { + try + { +// Db db = Db.getInstance(); +// return db.createStatement(); + return EvoBaseProvider.getInstance().createStatement(); + } + catch ( DBException ex ) + { + ErrorLogger.logException( ex ); + } + return null; + } + + protected Statement createLocalStatement() + { + try + { + return EvoBaseProvider.getInstance().createLocalStatement(); + } + catch ( DBException ex ) + { + ErrorLogger.logException( ex ); + } + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/PlanosDataProvider.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/PlanosDataProvider.java new file mode 100644 index 00000000..3ac96fdc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/PlanosDataProvider.java @@ -0,0 +1,694 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.providers; + +import com.evolute.utils.arrays.Virtual2DArray; +import com.evolute.utils.error.ErrorLogger; +import com.evolute.utils.sql.Assignment; +import com.evolute.utils.sql.Expression; +import com.evolute.utils.sql.Field; +import com.evolute.utils.sql.Select2; +import com.evolute.utils.sql.Update; +import com.evolute.utils.strings.StringPlainer; +import db.data.siprp.outer.EstadoMedidasData; +import db.data.siprp.outer.PlanoAreasData; +import db.data.siprp.outer.PlanoMedidasData; +import db.data.siprp.outer.PlanoPostosTrabalhoData; +import db.data.siprp.outer.PlanoRiscosData; +import db.data.siprp.outer.PlanosActuacaoData; +import db.entidades.Area; +import db.entidades.EstadoMedida; +import db.entidades.Medida; +import db.entidades.PlanoActuacao; +import db.entidades.PostoTrabalho; +import db.entidades.Risco; +import db.entidades.Utilizador; +import global.Global; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.Date; +import java.util.LinkedList; +import java.util.List; +import utils.Utils; + + +public class PlanosDataProvider extends GenericDataProvider +{ + private static PlanosDataProvider INSTANCE = null; + + private PlanosDataProvider() throws Exception + { + super(); + } + + public static synchronized PlanosDataProvider getInstance() throws Exception + { + if ( INSTANCE == null ) + { + INSTANCE = new PlanosDataProvider(); + } + return INSTANCE; + } + + public void updatePlano(PlanoActuacao p) throws Exception + { + if ( p.getConcluidoPorDesactivacao() == null ) + { + p.setConcluidoPorDesactivacao( false ); + } + if(p.getObs_correcao() == null) + { + p.setObs_correcao(""); + } + if(p.getObservacoes_dl() == null) + { + p.setObservacoes_dl(""); + } + if(p.getObservacoes_dns() == null) + { + p.setObservacoes_dns(""); + } + if ( p.getUser_dir_loja() != null && p.getUser_dir_loja().intValue() == 0 ) + { + p.setUser_dir_loja( null ); + } + if ( p.getUser_dns() != null && p.getUser_dns().intValue() == 0 ) + { + p.setUser_dns( null ); + } + if ( p.getUser_hs() != null && p.getUser_hs().intValue() == 0 ) + { + p.setUser_hs( null ); + } + if ( p.getUser_seg() != null && p.getUser_seg().intValue() == 0 ) + { + p.setUser_seg( null ); + } + + Expression where = new Field( "id" ).isEqual( p.getId() ); + + Update upd = new Update( "planos_actuacao", new Assignment[] + { + new Assignment( new Field( "fase" ), p.getFase() ), + new Assignment( new Field( "validacao_director_loja" ), p.getValidacao_director_loja() ), + new Assignment( new Field( "validacao_dns" ), p.getValidacao_dns() ), + new Assignment( new Field( "validacao_hs" ), p.getValidacao_hs() ), + new Assignment( new Field( "observacoes_dl" ), p.getObservacoes_dl() ), + new Assignment( new Field( "observacoes_dns" ), p.getObservacoes_dns() ), + new Assignment( new Field( "obs_correcao" ), p.getObs_correcao() ), + new Assignment( new Field( "correcao" ), p.getCorrecao() ), + new Assignment( new Field( "fase_antes_correcao" ), p.getFase_antes_correcao() ), + new Assignment( new Field( "concluido_por_desactivacao" ), ( p.getConcluidoPorDesactivacao() == null ? new Boolean( false ) : p.getConcluidoPorDesactivacao() ) ), + new Assignment( new Field( "data_desactivacao" ), p.getDataDesactivacao() ), + new Assignment( new Field( "data_validacao_dir_loja" ), p.getData_validacao_dir_loja() ), + new Assignment( new Field( "user_dir_loja" ), p.getUser_dir_loja() ), + new Assignment( new Field( "data_validacao_dns" ), p.getData_validacao_dns() ), + new Assignment( new Field( "user_dns" ), p.getUser_dns() ), + new Assignment( new Field( "data_validacao_hs" ), p.getData_validacao_hs() ), + new Assignment( new Field( "user_hs" ), p.getUser_hs() ), + new Assignment( new Field( "data_controlo" ), p.getData_controlo() ), + new Assignment( new Field( "data_email_controlo" ), p.getData_email_controlo() ), + new Assignment( new Field( "data_validacao_seg" ), p.getData_validacao_seg() ), + new Assignment( new Field( "user_seg" ), p.getUser_seg() ) + }, where ); + + System.out.println( "SQL UPDATE PLANO : " + upd.toString() ); + + ErrorLogger.log( "SAVE : PlanosDataProvider.updatePlano( " + p.getId() + " ) : " + upd.toString() ); + getExecuter().executeQuery( upd ); + } + + public void updateRisco( Risco r ) throws Exception + { + if(r.getResponsavel_execucao() == null) + { + r.setResponsavel_execucao(""); + } + if(r.getPor() == null) + { + r.setPor(""); + } + if(r.getRecursos_necessarios() == null) + { + r.setRecursos_necessarios(""); + } + if(r.getParecer_dl() == null) + { + r.setParecer_dl(""); + } + if(r.getParecer_dns() == null) + { + r.setParecer_dns(""); + } + if(r.getVerificacao_siprp() == null) + { + r.setVerificacao_siprp(""); + } + + Expression where = new Field( "id" ).isEqual( r.getId() ); + + Update upd = new Update( PlanoRiscosData.TABLENAME, new Assignment[] + { + new Assignment( new Field( PlanoRiscosData.RESPONSAVEL_EXECUCAO ), r.getResponsavel_execucao() ), + new Assignment( new Field( PlanoRiscosData.POR ), r.getPor() ), + new Assignment( new Field( PlanoRiscosData.RECURSOS_NECESSARIOS ), r.getRecursos_necessarios() ), + new Assignment( new Field( PlanoRiscosData.DATA_INICIO ), r.getData_inicio() ), + new Assignment( new Field( PlanoRiscosData.DATA_FIM ), r.getData_fim() ), + new Assignment( new Field( PlanoRiscosData.PARECER_DNS ), r.getParecer_dns() ), + new Assignment( new Field( PlanoRiscosData.PARECER_DL ), r.getParecer_dl() ), + new Assignment( new Field( PlanoRiscosData.VERIFICACAO_SIPRP ), r.getVerificacao_siprp() ) + }, where ); + + ErrorLogger.log( "\nSAVE : PlanosDataProvider.updateRisco( " + r.getId() + " ) : " + upd.toString() ); + getExecuter().executeQuery( upd ); + System.out.println( "\n\tUPDATE RISCO SUCCESS !" ); + } + + public void updateMedidas( Risco risco ) throws Exception + { + List< Medida > medidas = risco.getMedidas(); + for ( Medida m : medidas ) + { + Integer emID = null; + if ( m.getValidarMedidaId() != null && m.getValidarMedidaId().intValue() != 0 ) + { + emID = m.getValidarMedidaId(); + } + + Expression where = new Field( "id" ).isEqual( m.getId() ).and( new Field( "risco_id" ).isEqual( risco.getId() ) ); + + Update upd = new Update( PlanoMedidasData.TABLENAME, new Assignment[] + { + new Assignment( new Field( PlanoMedidasData.ESTADO_MEDIDAS_ID ), emID ) + }, where ); + + System.out.println( "SQL UPDATE MEDIDAS : " + upd.toString() ); + ErrorLogger.log( "SAVE : PlanosDataProvider.updateMedidas( " + risco.getId() + " ) : " + upd.toString() ); + getExecuter().executeQuery( upd ); + } + } + + public String getExpression( String nome, String estabelecimento, String dataVisita ) + { + String tables = "planos_actuacao"; + String whereExpression = "planos_actuacao.deleted_date IS NULL "; + + if ( nome != null ) + { + nome = StringPlainer.convertString( nome.trim() ); + nome = nome.replaceAll( " ", "%" ); + whereExpression += "AND ( plain_utf8( planos_actuacao.tecnico_hs_nome ) LIKE '%" + nome + "%' OR plain_utf8( planos_actuacao.tecnico_superior_hs_nome ) LIKE '%" + nome + "%' ) "; + } + if ( estabelecimento != null ) + { + estabelecimento = StringPlainer.convertString( estabelecimento.trim() ); + estabelecimento = estabelecimento.replaceAll( " ", "%" ); + whereExpression += "AND plain_utf8( planos_actuacao.nome_estabelecimento ) LIKE '%" + estabelecimento + "%' "; + } + if ( dataVisita != null ) + { + whereExpression += "AND planos_actuacao.data_visita = '" + dataVisita + "' "; + } + + return "SELECT * FROM " + tables + " WHERE " + whereExpression; + } + + private String getFaseActivos( Utilizador u ) + { + String sql = ""; + int userType = u.getTipo().intValue(); + switch ( userType ) + { + case Global.TECNICO_HS: + sql += " AND (fase = 1 OR fase = 5)"; + break; + + case Global.RESPONSAVEL_SEGURANCA: + sql += " AND fase = 2"; + break; + + case Global.DIRECTOR_LOJA: + sql += " AND fase = 3"; + break; + + case Global.DIRECTOR_NACIONAL_SEGURANCA: + sql += " AND fase = 4"; + break; + } + if ( userType != Global.DIRECTOR_SIPRP && userType != Global.TECNICO_HS && userType != Global.DIRECTOR_NACIONAL_SEGURANCA ) + { + sql += " AND estabelecimento_id = " + u.getEstabelecimento_id(); + } + + return sql; + } + + + public List< PlanoActuacao > searchPlanosActivos( Utilizador u, String nome, String estabelecimento, String dataVisita ) + throws Exception + { + Statement st = createStatement(); + String sql = getExpression( nome, estabelecimento, dataVisita ); +// sql += " AND " + getFaseActivos( u ); + sql += getFaseActivos( u ); + + System.out.println( "SEARCH ACTIVOS" ); + System.out.println( "SQL: " + sql ); + + ResultSet rs = st.executeQuery( sql ); + return getFullPlanos( rs ); + } + + private String getFaseSeguimento( Utilizador u ) + { + int userType = u.getTipo(); + String sql = ""; + switch( userType ) + { + case Global.TECNICO_HS: + sql = " AND (fase <> 1 AND fase <> 5 AND fase <> 6) "; + break; + case Global.RESPONSAVEL_SEGURANCA: + sql = " AND (fase <> 2 AND fase <> 6) "; + break; + case Global.DIRECTOR_LOJA: + sql = " AND (fase <> 3 AND fase <> 6) "; + break; + case Global.DIRECTOR_NACIONAL_SEGURANCA: + sql = " AND (fase <> 4 AND fase <> 6) "; + break; + case Global.DIRECTOR_SIPRP: + case Global.RH: + case Global.DIRECTOR_GERAL_RH: + case Global.GESTOR: + sql = " AND (fase > 1 AND fase < 6) "; + break; + default: + break; + } + + if ( userType != Global.DIRECTOR_SIPRP && userType != Global.TECNICO_HS + && userType != Global.DIRECTOR_NACIONAL_SEGURANCA && userType != Global.DIRECTOR_GERAL_RH + && userType != Global.GESTOR ) + { + sql += " AND estabelecimento_id = " + u.getEstabelecimento_id(); + } + if ( userType == Global.GESTOR ) + { + if ( u.getEstabelecimento_gestor().intValue() > 0 ) + { + sql += " AND estabelecimento_id = " + u.getEstabelecimento_gestor(); + } + } + return sql; + } + + public List< PlanoActuacao > searchPlanosSeguimento( Utilizador u, String nome, String estabelecimento, String dataVisita ) + throws Exception + { + Statement st = createStatement(); + + String sql = getExpression( nome, estabelecimento, dataVisita ); + sql += getFaseSeguimento( u ); + + System.out.println( "SEARCH SEGUIMENTO" ); + System.out.println( "SQL: " + sql ); + + ResultSet rs = st.executeQuery( sql ); + return getFullPlanos( rs ); + } + + + private String getFaseConcluidos( Utilizador u ) + { + int userType = u.getTipo().intValue(); + String sql = " AND fase = 6 "; + + if ( userType != Global.DIRECTOR_SIPRP && userType != Global.TECNICO_HS + && userType != Global.DIRECTOR_NACIONAL_SEGURANCA && userType != Global.DIRECTOR_GERAL_RH ) + { + sql += " AND estabelecimento_id = " + u.getEstabelecimento_id(); + } + + return sql; + } + + public List< PlanoActuacao > searchPlanosConcluidos( Utilizador u, String nome, String estabelecimento, String dataVisita ) + throws Exception + { + String sql = getExpression( nome, estabelecimento, dataVisita ); + sql += getFaseConcluidos( u ); + + System.out.println( "SEARCH CONCLUIDOS" ); + System.out.println( "SQL: " + sql ); + + Statement st = createStatement(); + ResultSet rs = st.executeQuery( sql ); + return getFullPlanos( rs ); + } + + + private ArrayList getFullPlanos( ResultSet rs ) throws Exception + { + ArrayList list = new ArrayList(); + if ( rs.isBeforeFirst() ) + { + rs.first(); + do + { + PlanoActuacao pa = new PlanoActuacao(); + pa.setId( new Integer( rs.getInt("id") ) ); + pa.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id"))); + pa.setNome_estabelecimento( Utils.unicodeToHTML( rs.getString( "nome_estabelecimento" ) ) ); + pa.setNome_empresa( Utils.unicodeToHTML( rs.getString( "nome_empresa" ) ) ); + pa.setFase( new Integer( rs.getInt("fase") ) ); + java.sql.Date sqlDate = rs.getDate("data_visita"); + pa.setData_visita(new java.util.Date(sqlDate.getTime())); + pa.setValidacao_director_loja(new Boolean( rs.getBoolean("validacao_director_loja") )); + pa.setValidacao_dns(new Boolean( rs.getBoolean("validacao_dns") )); + pa.setValidacao_hs(new Boolean( rs.getBoolean("validacao_hs") )); + pa.setObservacoes_dl( Utils.unicodeToHTML( rs.getString("observacoes_dl") ) ); + pa.setObservacoes_dns( Utils.unicodeToHTML( rs.getString("observacoes_dns") ) ); + pa.setObs_correcao( Utils.unicodeToHTML( rs.getString("obs_correcao") ) ); + pa.setAreas( getAreasByPlano( pa ) ); + pa.setTotal_riscos( getTotalRiscosByPlano( pa.getId() ) ); + pa.setCorrecao( Utils.unicodeToHTML( rs.getString("correcao") ) ); + pa.setFase_antes_correcao(new Integer(rs.getInt("fase_antes_correcao"))); + pa.setData_validacao_dir_loja(rs.getDate("data_validacao_dir_loja")); + pa.setUser_dir_loja(new Integer(rs.getInt("user_dir_loja"))); + pa.setData_validacao_dns(rs.getDate("data_validacao_dns")); + pa.setUser_dns(new Integer(rs.getInt("user_dns"))); + pa.setData_validacao_hs(rs.getDate("data_validacao_hs")); + pa.setUser_hs(new Integer(rs.getInt("user_hs"))); + pa.setTecnico_hs_id(new Integer(rs.getInt("tecnico_hs_id"))); + pa.setTecnico_hs_nome( Utils.unicodeToHTML( rs.getString("tecnico_hs_nome") ) ); + pa.setConcluidoPorDesactivacao( new Boolean( rs.getBoolean( "concluido_por_desactivacao" ) ) ); + pa.setDataDesactivacao( rs.getDate( "data_desactivacao" ) ); + pa.setTecnico_superior_hs_id( new Integer( rs.getInt( "tecnico_superior_hs_id" ) ) ); + pa.setTecnico_superior_hs_nome( Utils.unicodeToHTML( rs.getString( "tecnico_superior_hs_nome" ) ) ); + pa.setData_disponibilizacao( rs.getDate( "data_disponibilizacao" ) ); + pa.setData_validacao_seg( rs.getDate( "data_validacao_seg" ) ); + pa.setUser_seg( rs.getInt( "user_seg" ) ); + pa.setHs_relatorio_id( rs.getInt( "hs_relatorio_id" ) ); + + list.add( pa ); + } + while ( rs.next() ); + } + return list; + } + + private List< Area > getAreasByPlano( PlanoActuacao p ) throws Exception + { + List< Area > list = new LinkedList< Area >(); + + Select2 query = new Select2( PlanoAreasData.TABLENAME, + new Field( PlanoAreasData.PLANO_ID_FULL ).isEqual( p.getId() ), + new String[] { PlanoAreasData.ID_FULL, PlanoAreasData.PLANO_ID_FULL, PlanoAreasData.DESCRICAO_FULL }, + new String[] { PlanoAreasData.DESCRICAO_FULL } + ); + Virtual2DArray array = getExecuter().executeQuery( query ); + if ( array != null && array.columnLength() > 0 ) + { + for ( int i = 0; i < array.columnLength(); i++ ) + { + Integer areaID = array.get( i, 0 ); + Integer planoID = array.get( i, 1 ); + String descricao = array.get( i, 2 ); + + Area area = new Area(); + area.setId( areaID ); + area.setPlano_id( planoID ); + area.setDescricao( Utils.unicodeToHTML( descricao ) ); + area.setRiscos( getRiscosByArea( area ) ); + list.add( area ); + } + } + + return list; + } + + /** + * FIXME : ORDER BY patrimonial em ultimo ! + * + * @param a + * @return + * @throws Exception + */ + private List< Risco > getRiscosByArea( Area a ) throws Exception + { + List< Risco > list = new LinkedList< Risco >(); + + Select2 query = new Select2( + PlanoRiscosData.TABLENAME, + new Field( PlanoRiscosData.AREA_ID_FULL ).isEqual( a.getId() ), + new String[] { + PlanoRiscosData.ID_FULL, PlanoRiscosData.AREA_ID_FULL, PlanoRiscosData.DESCRICAO_FULL, PlanoRiscosData.RESPONSAVEL_EXECUCAO_FULL, + PlanoRiscosData.POR_FULL, PlanoRiscosData.RECURSOS_NECESSARIOS_FULL, PlanoRiscosData.DATA_INICIO_FULL, PlanoRiscosData.DATA_FIM_FULL, + PlanoRiscosData.PARECER_DL_FULL, PlanoRiscosData.PARECER_DNS_FULL, PlanoRiscosData.VERIFICACAO_SIPRP_FULL, PlanoRiscosData.VALOR_FULL, + PlanoRiscosData.IS_PATRIMONIAL_FULL, "coalesce( valor, -1 ) AS ordem_valor", + }, + new String[] { "ordem_valor DESC", PlanoRiscosData.AREA_ID_FULL, PlanoRiscosData.RISCO_ID_FULL } + ); + query.disableOrderFieldsVerification(); + + Virtual2DArray array = getExecuter().executeQuery( query ); + if ( array != null && array.columnLength() > 0 ) + { + for ( int i = 0; i < array.columnLength(); i++ ) + { + Integer riscoID = array.get( i, 0 ); + Integer areaID = array.get( i, 1 ); + String descricao = array.get( i, 2 ); + String responsavelExecucao = array.get( i, 3 ); + String por = array.get( i, 4 ); + String recursosNecessarios = array.get( i, 5 ); + Date dataInicio = array.get( i, 6 ); + Date dataFim = array.get( i, 7 ); + String parecerDL = array.get( i, 8 ); + String parecerDNS = array.get( i, 9 ); + String verificacaoSiprp = array.get( i, 10 ); + Integer valor = array.get( i, 11 ); + Boolean isPatrimonial = array.get( i, 12 ); + + Risco r = new Risco(); + r.setId( riscoID ); + r.setArea_id( areaID ); + r.setDescricao( Utils.unicodeToHTML( descricao ) ); + r.setResponsavel_execucao( Utils.unicodeToHTML( responsavelExecucao ) ); + r.setPor( por ); + r.setRecursos_necessarios( Utils.unicodeToHTML( recursosNecessarios ) ); + r.setData_inicio( dataInicio ); + r.setData_fim( dataFim ); + r.setParecer_dl( Utils.unicodeToHTML( parecerDL ) ); + r.setParecer_dns( Utils.unicodeToHTML( parecerDNS ) ); + r.setVerificacao_siprp( Utils.unicodeToHTML( verificacaoSiprp ) ); + r.setValor( valor ); + r.setMedidas( getMedidasByRisco( r ) ); + r.setIsPatrimonial( isPatrimonial ); + + list.add( r ); + } + } + + return list; + } + + + private List getMedidasByRisco( Risco r ) throws Exception + { + List< Medida > list = new LinkedList< Medida >(); + + Select2 query = new Select2( PlanoMedidasData.TABLENAME, + new Field( PlanoMedidasData.RISCO_ID_FULL ).isEqual( r.getId() ), + new String[] { + PlanoMedidasData.ID_FULL, PlanoMedidasData.DESCRICAO_FULL, PlanoMedidasData.ESTADO_MEDIDAS_ID_FULL + }, + new String[] { PlanoMedidasData.ID_FULL } + ); + Virtual2DArray array = getExecuter().executeQuery( query ); + if ( array != null ) + { + for ( int i = 0; i < array.columnLength(); i++ ) + { + Integer planoMedidaID = array.get( i, 0 ); + String descricao = array.get( i, 1 ); + Integer estado = array.get( i, 2 ); + + Medida m = new Medida(); + m.setId( planoMedidaID ); + m.setDescricao( Utils.unicodeToHTML( descricao ) ); + m.setValidarMedidaId( estado ); + m.setPostos( getPostosByMedida( m ) ); + + list.add( m ); + } + } + + return list; + } + + private List< PostoTrabalho > getPostosByMedida( Medida m ) throws Exception + { + List< PostoTrabalho > list = new LinkedList< PostoTrabalho >(); + + Select2 query = new Select2( PlanoPostosTrabalhoData.TABLENAME, + new Field( PlanoPostosTrabalhoData.MEDIDA_ID_FULL ).isEqual( m.getId() ), + new String[] { PlanoPostosTrabalhoData.ID_FULL, PlanoPostosTrabalhoData.MEDIDA_ID_FULL, PlanoPostosTrabalhoData.DESCRICAO_FULL }, + new String[] { PlanoPostosTrabalhoData.ID_FULL } + ); + Virtual2DArray array = getExecuter().executeQuery( query ); + if ( array != null ) + { + for ( int i = 0; i < array.columnLength(); i++ ) + { + Integer planoPostoTrabalhoID = array.get( i, 0 ); + Integer medidaID = array.get( i, 1 ); + String descricao = array.get( i, 2 ); + + PostoTrabalho p = new PostoTrabalho(); + p.setId( planoPostoTrabalhoID ); + p.setMedida_id( medidaID ); + p.setDescricao( Utils.unicodeToHTML( descricao ) ); + + list.add( p ); + } + } + + return list; + } + + public int getTotalRiscosByPlano( Integer planoID ) + { + int count = 0; + try + { + Select2 query = new Select2( + new String[] { PlanoRiscosData.TABLENAME, PlanoAreasData.TABLENAME, PlanosActuacaoData.TABLENAME }, + new Integer[] { Select2.JOIN_INNER, Select2.JOIN_INNER }, + new Expression[] { + new Field( PlanoRiscosData.AREA_ID_FULL ).isEqual( new Field( PlanoAreasData.ID_FULL ) ), + new Field( PlanoAreasData.PLANO_ID_FULL ).isEqual( new Field( PlanosActuacaoData.ID_FULL ) ) + }, + new String[] { + "COUNT( " + PlanoRiscosData.ID_FULL + " ) AS total_riscos" + }, + new Field( PlanosActuacaoData.ID_FULL ).isEqual( planoID ).and( + new Field( PlanosActuacaoData.DELETED_DATE_FULL ).isEqual( null ) + ), + new String[] {}, + null, + null, + null + ); + Virtual2DArray array = getExecuter().executeQuery( query ); + if ( array != null && array.columnLength() > 0 ) + { + Long countL = array.get( 0, 0 ); + count = countL == null ? 0 : countL.intValue(); + } + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + return count; + } + + public List< EstadoMedida > getEstadoMedidas() throws Exception + { + List< EstadoMedida > list = new LinkedList< EstadoMedida >(); + + Select2 query = new Select2( EstadoMedidasData.TABLENAME, + new Field( EstadoMedidasData.ACTIVO_FULL ).isEqual( "y" ), + new String[] { + EstadoMedidasData.ID_FULL, EstadoMedidasData.DESCRICAO_FULL, EstadoMedidasData.ORDEM_FULL, + EstadoMedidasData.ACTIVO_FULL + }, + new String[] { EstadoMedidasData.ORDEM_FULL + " ASC" } + ); + Virtual2DArray array = getExecuter().executeQuery( query ); + if ( array != null ) + { + for ( int i = 0; i < array.columnLength(); i++ ) + { + Integer estadoID = array.get( i, 0 ); + String descricao = array.get( i, 1 ); + Integer ordem = array.get( i, 2 ); + String activo = array.get( i, 3 ); + + EstadoMedida estado = new EstadoMedida(); + estado.setId( estadoID ); + estado.setDescricao( Utils.unicodeToHTML( descricao ) ); + list.add( estado ); + } + } + return list; + } + + private boolean isEmpty( String str ) + { + return str == null || "".equals( str.trim() ); + } + + public boolean isRiscoTratado( Risco risco, Utilizador user ) + { + boolean isTratado = false; + + if ( risco != null && user != null ) + { + int userType = user.getTipo() == null ? -1 : user.getTipo().intValue(); + + switch ( userType ) + { + case Global.RESPONSAVEL_SEGURANCA : + { + String resp = risco.getResponsavel_execucao(); + String por = risco.getPor(); + String rec = risco.getRecursos_necessarios(); + Date dataInicio = risco.getData_inicio(); + Date dataFim = risco.getData_fim(); + + isTratado = ! isEmpty( resp ) && ! isEmpty( por ) && ! isEmpty( rec ) && dataInicio != null && dataFim != null; + break; + } + case Global.DIRECTOR_LOJA : + { + String parecer = risco.getParecer_dl(); + + isTratado = ! isEmpty( parecer ); + + break; + } + case Global.DIRECTOR_NACIONAL_SEGURANCA : + { + String parecer = risco.getParecer_dns(); + + isTratado = ! isEmpty( parecer ); + + break; + } + case Global.TECNICO_HS : + { + String verify = risco.getVerificacao_siprp(); + isTratado = ! isEmpty( verify ); + List< Medida > medidas = risco.getMedidas(); + for ( int i = 0; i < medidas.size() && isTratado; i++ ) + { + Medida m = medidas.get( i ); + Integer estadoMedida = m.getValidarMedidaId(); + isTratado &= estadoMedida != null; + } + break; + } + } + } + + return isTratado; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/RelatoriosDataProvider.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/RelatoriosDataProvider.java new file mode 100644 index 00000000..99fdd652 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/RelatoriosDataProvider.java @@ -0,0 +1,488 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.providers; + +import com.evolute.utils.error.ErrorLogger; +import db.data.siprp_local.outer.EmpresasData; +import db.data.siprp_local.outer.ImageData; +import db.entidades.Area; +import db.entidades.Medida; +import db.entidades.PlanoActuacao; +import db.entidades.PostoTrabalho; +import db.entidades.Risco; +import db.entidades.Valor; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; +import utils.Utils; + +/** + * + * @author lluis + */ +public class RelatoriosDataProvider extends GenericDataProvider +{ +// private DbLocal dblocal = DbLocal.getInstance(); + + private static RelatoriosDataProvider INSTANCE = null; + + private RelatoriosDataProvider() throws Exception + { + super(); +// dblocal.connect(); + } + + public static synchronized RelatoriosDataProvider getInstance() throws Exception + { + if ( INSTANCE == null ) + { + INSTANCE = new RelatoriosDataProvider(); + } + return INSTANCE; + } + + + public PlanoActuacao getFullPlano(PlanoActuacao plano, Integer relatorioId) + { + try + { + plano = getAreasByPlano(plano, relatorioId); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + return plano; + } + + private PlanoActuacao getAreasByPlano( PlanoActuacao plano, Integer relatorioID ) throws Exception + { + Statement st = createLocalStatement(); + + String sql = "select distinct area_id, hs_relatorio_area.description as descricao from hs_relatorio_posto "; + sql += "inner join hs_relatorio_posto_medida on hs_relatorio_posto_medida.posto_id = hs_relatorio_posto.id "; + sql += "inner join hs_relatorio_medida on hs_relatorio_medida.id = hs_relatorio_posto_medida.medida_id "; + sql += "inner join hs_relatorio_risco on hs_relatorio_risco.id = hs_relatorio_medida.risco_id "; + sql += "inner join hs_relatorio on hs_relatorio.id = hs_relatorio_risco.relatorio_id "; + sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; + sql += "where hs_relatorio.id = " + relatorioID + " "; + sql += "order by area_id "; + System.out.println("AREAS BY PLANO SQL : " + sql); + ResultSet rs = st.executeQuery(sql); + + List areas = new ArrayList(); + if(rs.isBeforeFirst()) + { + rs.first(); + do + { + Area a = new Area(); + a.setId(new Integer( rs.getInt("area_id") )); + a.setArea_id(a.getId()); + if(existemMedidasByArea(a.getId())) + { + a.setDescricao(Utils.unicodeToHTML(rs.getString("descricao"))); + try + { + a.setRiscos(getRiscosByArea(a)); + } + catch(Exception ex) + { + System.out.println("ERRO RISCOS BY AREA !!!!"); + ErrorLogger.logException( ex ); + a.setRiscos(null); + } + + areas.add(a); + } + + }while(rs.next()); + plano.setAreas(areas); + } + return plano; + } + + private List getRiscosByArea(Area a) throws Exception + { +// Statement st = dblocal.createStatement(); + Statement st = createLocalStatement(); + + String sql = "select distinct hs_relatorio_risco.id, hs_relatorio_risco.description as descricao from hs_relatorio_posto "; + sql += "inner join hs_relatorio_posto_medida on hs_relatorio_posto_medida.posto_id = hs_relatorio_posto.id "; + sql += "inner join hs_relatorio_medida on hs_relatorio_medida.id = hs_relatorio_posto_medida.medida_id "; + sql += "inner join hs_relatorio_risco on hs_relatorio_risco.id = hs_relatorio_medida.risco_id "; + sql += "inner join hs_relatorio on hs_relatorio.id = hs_relatorio_risco.relatorio_id "; + sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; + sql += "where area_id = " + a.getId() + " "; + sql += "order by hs_relatorio_risco.id "; + System.out.println("RISCOS BY AREA SQL : " + sql); + ResultSet rs = st.executeQuery(sql); + List riscos = new ArrayList(); + if(rs.isBeforeFirst()) + { + + rs.first(); + do + { + Risco r = new Risco(); + r.setId(new Integer( rs.getInt("id") )); + if(existemMedidasByRisco(r.getId())) + { + r.setDescricao(Utils.unicodeToHTML(rs.getString("descricao"))); + r.setValores(getValoresByRisco(r, a)); + //Integer valor = getValorByRisco(r, a); + //r.setValor(valor); + r.setRisco_id(new Integer( rs.getInt("id") )); + r.setMedidas(getMedidasByRisco( r, a)); + riscos.add(r); + } + + }while(rs.next()); + } + return riscos; + + } + + private List getValoresByRisco(Risco r, Area a) throws Exception + //private Integer getValorByRisco(Risco r, Area a) throws Exception + { +// Statement st = dblocal.createStatement(); + Statement st = createLocalStatement(); + + String sql = "select valor from "; + sql += "(select distinct hs_relatorio_posto_risco.risco_id, "; + sql += "case when hs_relatorio_posto_risco.valor_qualitativo_id isnull and hs_relatorio_posto_risco.probabilidade isnull and hs_relatorio_posto_risco.severidade isnull then null "; + sql += "when hs_relatorio_posto_risco.valor_qualitativo_id isnull then hs_relatorio_posto_risco.probabilidade * hs_relatorio_posto_risco.severidade "; + sql += "else hs_relatorio_posto_risco.valor_qualitativo_id "; + sql += "end as valor "; + sql += "from hs_relatorio_posto "; + sql += "inner join hs_relatorio_posto_medida on hs_relatorio_posto_medida.posto_id = hs_relatorio_posto.id "; + sql += "inner join hs_relatorio_medida on hs_relatorio_medida.id = hs_relatorio_posto_medida.medida_id "; + sql += "inner join hs_relatorio_risco on hs_relatorio_risco.id = hs_relatorio_medida.risco_id "; + sql += "inner join hs_relatorio_posto_risco on (hs_relatorio_posto_risco.posto_id = hs_relatorio_posto.id and hs_relatorio_posto_risco.risco_id = hs_relatorio_risco.id) "; + sql += "inner join hs_relatorio on hs_relatorio.id = hs_relatorio_risco.relatorio_id "; + sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; + sql += "where hs_relatorio_posto_risco.risco_id = " + r.getId() + " and area_id = " + a.getId() + ") subquery "; + sql += "order by subquery.valor"; + System.out.println("VALORES BY RISCO : " + sql); + ResultSet rs = st.executeQuery(sql); + List valores = new ArrayList(); + Integer valor = null; + if(rs.isBeforeFirst()) + { + rs.first(); + do + { + Valor v = new Valor(); + Object oValor = rs.getObject("valor"); + + if(oValor == null) + { + v.setValor(null); + //r.setValor(null); + valor = null; + } + else + { + v.setValor((Integer) oValor); + //r.setValor((Integer) oValor); + valor = (Integer) oValor; + } +// System.out.println("RISCO : " + r.getId().toString() + "VALOR : " + oValor.toString()); + //int valor = rs.getInt("valor"); + //v.setValor(new Integer(valor)); + //v.setMedidas(getMedidasByValor(v, r, a)); + valores.add(v); + }while(rs.next()); + } + return valores; + //return valor; + } + +// private List getMedidasByValor(Valor v, Risco r, Area a) throws Exception +// { +// Statement st = dblocal.createStatement(); +// String sql = "select distinct medida_id, valor, descricao from "; +// sql += "( select distinct hs_relatorio_posto_medida.medida_id, hs_relatorio_posto_risco.risco_id, hs_relatorio_medida.description as descricao, "; +// sql += "case when hs_relatorio_posto_risco.valor_qualitativo_id isnull and hs_relatorio_posto_risco.probabilidade isnull and hs_relatorio_posto_risco.severidade isnull then null "; +// sql += "when hs_relatorio_posto_risco.valor_qualitativo_id isnull then hs_relatorio_posto_risco.probabilidade * hs_relatorio_posto_risco.severidade "; +// sql += "else hs_relatorio_posto_risco.valor_qualitativo_id "; +// sql += "end as valor "; +// sql += "from hs_relatorio_posto "; +// sql += "inner join hs_relatorio_posto_medida on hs_relatorio_posto_medida.posto_id = hs_relatorio_posto.id "; +// sql += "inner join hs_relatorio_medida on hs_relatorio_medida.id = hs_relatorio_posto_medida.medida_id "; +// sql += "inner join hs_relatorio_risco on hs_relatorio_risco.id = hs_relatorio_medida.risco_id "; +// sql += "inner join hs_relatorio_posto_risco on (hs_relatorio_posto_risco.posto_id = hs_relatorio_posto.id and hs_relatorio_posto_risco.risco_id = hs_relatorio_risco.id) "; +// sql += "inner join hs_relatorio on hs_relatorio.id = hs_relatorio_risco.relatorio_id "; +// sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; +// sql += "where hs_relatorio_posto_risco.risco_id = " + r.getId() + " and area_id = " + a.getId() + " and hs_relatorio_posto_medida.is_plano_actuacao = true" + ") subquery "; +// //sql += "where hs_relatorio_posto_risco.risco_id = " + r.getId() + " and area_id = " + a.getId() + ") subquery "; +// //sql += "where valor = " + v.getValor() + " "; +// sql += "order by subquery.medida_id, valor"; +// System.out.println("MEDIDAS BY VALOR SQL : " + sql); +// ResultSet rs = st.executeQuery(sql); +// List medidas = new ArrayList(); +// if(rs.isBeforeFirst()) +// { +// rs.first(); +// do +// { +// Medida m = new Medida(); +// //int valor = rs.getInt("valor"); +// //m.setValor(new Integer(valor)); +// m.setId(new Integer( rs.getInt("medida_id") )); +// m.setDescricao(Utils.unicodeToHTML(rs.getString("descricao"))); +// m.setPostos(getPostosByMedidaAndValor(m, v, a)); +// medidas.add(m); +// }while(rs.next()); +// } +// return medidas; +// } + + private List getMedidasByRisco(Risco r, Area a) throws Exception + { +// Statement st = dblocal.createStatement(); + Statement st = createLocalStatement(); + + String sql = "select distinct medida_id, valor, descricao from "; + sql += "( select distinct hs_relatorio_posto_medida.medida_id, hs_relatorio_posto_risco.risco_id, hs_relatorio_medida.description as descricao, "; + sql += "case when hs_relatorio_posto_risco.valor_qualitativo_id isnull and hs_relatorio_posto_risco.probabilidade isnull and hs_relatorio_posto_risco.severidade isnull then null "; + sql += "when hs_relatorio_posto_risco.valor_qualitativo_id isnull then hs_relatorio_posto_risco.probabilidade * hs_relatorio_posto_risco.severidade "; + sql += "else hs_relatorio_posto_risco.valor_qualitativo_id "; + sql += "end as valor "; + sql += "from hs_relatorio_posto "; + sql += "inner join hs_relatorio_posto_medida on hs_relatorio_posto_medida.posto_id = hs_relatorio_posto.id "; + sql += "inner join hs_relatorio_medida on hs_relatorio_medida.id = hs_relatorio_posto_medida.medida_id "; + sql += "inner join hs_relatorio_risco on hs_relatorio_risco.id = hs_relatorio_medida.risco_id "; + sql += "inner join hs_relatorio_posto_risco on (hs_relatorio_posto_risco.posto_id = hs_relatorio_posto.id and hs_relatorio_posto_risco.risco_id = hs_relatorio_risco.id) "; + sql += "inner join hs_relatorio on hs_relatorio.id = hs_relatorio_risco.relatorio_id "; + sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; + sql += "where hs_relatorio_posto_risco.risco_id = " + r.getId() + " and area_id = " + a.getId() + " and hs_relatorio_posto_medida.is_plano_actuacao = true" + ") subquery "; + //sql += "where hs_relatorio_posto_risco.risco_id = " + r.getId() + " and area_id = " + a.getId() + ") subquery "; + //sql += "where valor = " + v.getValor() + " "; + sql += "order by subquery.medida_id, valor"; + System.out.println("MEDIDAS BY RISCO SQL : " + sql); + ResultSet rs = st.executeQuery(sql); + List medidas = new ArrayList(); + if(rs.isBeforeFirst()) + { + rs.first(); + do + { + Medida m = new Medida(); + //int valor = rs.getInt("valor"); + //m.setValor(new Integer(valor)); + m.setId(new Integer( rs.getInt("medida_id") )); + m.setMedida_id(m.getId()); + m.setDescricao(Utils.unicodeToHTML(rs.getString("descricao"))); + //m.setPostos(getPostosByMedidaAndValor(m, v, a)); + m.setPostos(getPostosByMedida(r, m, a)); + medidas.add(m); + }while(rs.next()); + } + return medidas; + } + +// private List getPostosByMedidaAndValor(Medida m, Valor v, Area a) throws Exception +// { +// Statement st = dblocal.createStatement(); +// String sql = "select subquery.posto_id, valor, descricao from "; +// sql += "(select hs_relatorio_posto_medida.posto_id, hs_relatorio_posto.description as descricao, "; +// sql += "case when hs_relatorio_posto_risco.valor_qualitativo_id isnull and hs_relatorio_posto_risco.probabilidade isnull and hs_relatorio_posto_risco.severidade isnull then null "; +// sql += "when hs_relatorio_posto_risco.valor_qualitativo_id isnull then hs_relatorio_posto_risco.probabilidade * hs_relatorio_posto_risco.severidade "; +// sql += "else hs_relatorio_posto_risco.valor_qualitativo_id "; +// sql += "end as valor "; +// sql += "from hs_relatorio_posto_medida "; +// sql += "inner join hs_relatorio_posto_risco on hs_relatorio_posto_risco.posto_id = hs_relatorio_posto_medida.posto_id "; +// sql += "inner join hs_relatorio_posto on hs_relatorio_posto.id = hs_relatorio_posto_medida.posto_id "; +// sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; +// sql += "where medida_id = " + m.getId() + " and area_id = " + a.getId() + ") subquery "; +// //sql += "where valor = " + v.getValor(); +// System.out.println("POSTOS BY MEDIDA SQL : " + sql); +// ResultSet rs = st.executeQuery(sql); +// List postos = new ArrayList(); +// if(rs.isBeforeFirst()) +// { +// rs.first(); +// do +// { +// PostoTrabalho p = new PostoTrabalho(); +// p.setId(new Integer( rs.getInt("posto_id") )); +// p.setDescricao(Utils.unicodeToHTML(rs.getString("descricao"))); +// postos.add(p); +// }while(rs.next()); +// } +// return postos; +// } + + private List getPostosByMedida(Risco r, Medida m, Area a) throws Exception + { +// Statement st = dblocal.createStatement(); + Statement st = createLocalStatement(); + + String sql = "select subquery.posto_id, valor, descricao from "; + sql += "(select hs_relatorio_posto_medida.posto_id, hs_relatorio_posto.description as descricao, "; + sql += "case when hs_relatorio_posto_risco.valor_qualitativo_id isnull and hs_relatorio_posto_risco.probabilidade isnull and hs_relatorio_posto_risco.severidade isnull then null "; + sql += "when hs_relatorio_posto_risco.valor_qualitativo_id isnull then hs_relatorio_posto_risco.probabilidade * hs_relatorio_posto_risco.severidade "; + sql += "else hs_relatorio_posto_risco.valor_qualitativo_id "; + sql += "end as valor "; + sql += "from hs_relatorio_posto_medida "; + sql += "inner join hs_relatorio_posto_risco on hs_relatorio_posto_risco.posto_id = hs_relatorio_posto_medida.posto_id "; + sql += "inner join hs_relatorio_posto on hs_relatorio_posto.id = hs_relatorio_posto_medida.posto_id "; + sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; + sql += "where medida_id = " + m.getId() + " and area_id = " + a.getId() + " and risco_id = " + r.getId() + ") subquery "; + //sql += "where valor = " + v.getValor(); + System.out.println("POSTOS BY MEDIDA SQL : " + sql); + ResultSet rs = st.executeQuery(sql); + List postos = new ArrayList(); + if(rs.isBeforeFirst()) + { + rs.first(); + do + { + PostoTrabalho p = new PostoTrabalho(); + p.setId(new Integer( rs.getInt("posto_id") )); + p.setPosto_id(p.getId()); + p.setDescricao(Utils.unicodeToHTML(rs.getString("descricao"))); + postos.add(p); + }while(rs.next()); + } + return postos; + } + + + + private boolean existemMedidasByArea(Integer area_id) throws Exception + { +// Statement st = dblocal.createStatement(); + Statement st = createLocalStatement(); + + String sql = "select distinct medida_id, valor, descricao "; + sql += "from ( select distinct hs_relatorio_posto_medida.medida_id, hs_relatorio_posto_risco.risco_id, hs_relatorio_medida.description as descricao, "; + sql += "case when hs_relatorio_posto_risco.valor_qualitativo_id isnull and hs_relatorio_posto_risco.probabilidade isnull and hs_relatorio_posto_risco.severidade isnull then null "; + sql += "when hs_relatorio_posto_risco.valor_qualitativo_id isnull then hs_relatorio_posto_risco.probabilidade * hs_relatorio_posto_risco.severidade else hs_relatorio_posto_risco.valor_qualitativo_id end as valor from hs_relatorio_posto "; + sql += "inner join hs_relatorio_posto_medida on hs_relatorio_posto_medida.posto_id = hs_relatorio_posto.id "; + sql += "inner join hs_relatorio_medida on hs_relatorio_medida.id = hs_relatorio_posto_medida.medida_id "; + sql += "inner join hs_relatorio_risco on hs_relatorio_risco.id = hs_relatorio_medida.risco_id "; + sql += "inner join hs_relatorio_posto_risco on (hs_relatorio_posto_risco.posto_id = hs_relatorio_posto.id and hs_relatorio_posto_risco.risco_id = hs_relatorio_risco.id) "; + sql += "inner join hs_relatorio on hs_relatorio.id = hs_relatorio_risco.relatorio_id "; + sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; + sql += "where area_id = " + area_id + " and hs_relatorio_posto_medida.is_plano_actuacao = true) subquery order by subquery.medida_id, valor"; + System.out.println("EXISTEM MEDIDAS BY AREA SQL : " + sql); + ResultSet rs = st.executeQuery(sql); + if(rs.isBeforeFirst()) + { + return true; + } + else + { + return false; + } + } + + private boolean existemMedidasByRisco(Integer risco_id) throws Exception + { +// Statement st = dblocal.createStatement(); + Statement st = createLocalStatement(); + + String sql = "select distinct medida_id "; + sql += "from ( select distinct hs_relatorio_posto_medida.medida_id, hs_relatorio_posto_risco.risco_id, hs_relatorio_medida.description as descricao, "; + sql += "case when hs_relatorio_posto_risco.valor_qualitativo_id isnull and hs_relatorio_posto_risco.probabilidade isnull and hs_relatorio_posto_risco.severidade isnull then null "; + sql += "when hs_relatorio_posto_risco.valor_qualitativo_id isnull then hs_relatorio_posto_risco.probabilidade * hs_relatorio_posto_risco.severidade else hs_relatorio_posto_risco.valor_qualitativo_id end as valor from hs_relatorio_posto "; + sql += "inner join hs_relatorio_posto_medida on hs_relatorio_posto_medida.posto_id = hs_relatorio_posto.id "; + sql += "inner join hs_relatorio_medida on hs_relatorio_medida.id = hs_relatorio_posto_medida.medida_id "; + sql += "inner join hs_relatorio_risco on hs_relatorio_risco.id = hs_relatorio_medida.risco_id "; + sql += "inner join hs_relatorio_posto_risco on (hs_relatorio_posto_risco.posto_id = hs_relatorio_posto.id and hs_relatorio_posto_risco.risco_id = hs_relatorio_risco.id) "; + sql += "inner join hs_relatorio on hs_relatorio.id = hs_relatorio_risco.relatorio_id "; + sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id "; + sql += "where hs_relatorio_posto_risco.risco_id = " + risco_id + " and hs_relatorio_posto_medida.is_plano_actuacao = true) subquery order by medida_id"; + System.out.println("EXISTEM MEDIDAS BY RISCO SQL : " + sql); + ResultSet rs = st.executeQuery(sql); + if(rs.isBeforeFirst()) + { + return true; + } + else + { + return false; + } + + } + + + public String getEmpresaNome(Integer empresa_id) throws Exception + { + String nome = ""; + EmpresasData empresaData = getLocalProvider().load( EmpresasData.class, empresa_id, EmpresasData.ID ); + if ( empresaData != null ) + { + nome = Utils.unicodeToHTML( empresaData.getDesignacao_social() ); + } + return nome; + +// Statement st = createLocalStatement(); +// +// String sql ="SELECT designacao_social FROM empresas WHERE id = " + empresa_id; +// ResultSet rslocal = st.executeQuery(sql); +// rslocal.first(); +// String nome = Utils.unicodeToHTML(rslocal.getString("designacao_social")); +// return nome; + } + + public byte[] getLogoByEmpresa( Integer empresaId ) + throws Exception + { + byte[] logo = null; + EmpresasData empresaData = getLocalProvider().load( EmpresasData.class, empresaId, EmpresasData.ID ); + if ( empresaData != null ) + { + Integer logoID = empresaData.getEmpresa_logo_id(); + logo = getLogo( logoID ); + } + return logo; + +// Statement st = createLocalStatement(); +// +// String sql = "select empresa_logo_id from empresas where id = " + empresaId; +// ResultSet rslocal = st.executeQuery(sql); +// if ( rslocal.isBeforeFirst() ) +// { +// rslocal.first(); +// Integer logoId = new Integer( rslocal.getInt("empresa_logo_id") ); +// byte[] logo = getLogo( logoId ); +// return logo; +// } +// +// return null; + } + + + public byte[] getLogo( Integer logoID ) throws Exception + { + byte[] logo = null; + ImageData imageData = getLocalProvider().load( ImageData.class, logoID, ImageData.ID ); + if ( imageData != null ) + { + logo = imageData.getImage_data(); + } + System.out.println( "\nRelatoriosDataProvider . getLogo( " + logoID + " ) : " + ( logo == null ? "null" : "size = " + logo.length ) ); + return logo; + } + +// public byte[] getLogo(Integer logoId) throws Exception +// { +// Statement st = createLocalStatement(); +// +// String sql = "select image_data from image where id = " + logoId; +// ResultSet rslocal = st.executeQuery(sql); +// rslocal.first(); +// byte[] logo = rslocal.getBytes("image_data"); +// System.out.println("LOGO SIZE : " + logo.length); +// return logo; +// } +} \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/UtilizadoresDataProvider.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/UtilizadoresDataProvider.java new file mode 100644 index 00000000..83e332f7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/UtilizadoresDataProvider.java @@ -0,0 +1,258 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.providers; + +import com.evolute.utils.arrays.Virtual2DArray; +import com.evolute.utils.sql.Expression; +import com.evolute.utils.sql.Field; +import com.evolute.utils.sql.Select2; +import db.data.siprp.outer.UtilizadoresData; +import db.entidades.Utilizador; +import global.Global; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.LinkedList; +import java.util.List; + +/** + * + * @author lluis + */ +public class UtilizadoresDataProvider extends GenericDataProvider +{ + private static UtilizadoresDataProvider INSTANCE = null; + + private UtilizadoresDataProvider() throws Exception + { + super(); + + } + + public static synchronized UtilizadoresDataProvider getInstance() throws Exception + { + if ( INSTANCE == null ) + { + INSTANCE = new UtilizadoresDataProvider(); + } + return INSTANCE; + } + + + public Utilizador getUtilizador( String login ) throws Exception + { + Utilizador user = null; + + Select2 query = new Select2( + new String[] { "utilizadores" }, + new Integer[] {}, + new Expression[] {}, + new String[] { "utilizadores.id" }, + new Field( "utilizadores.apagado" ).isEqual( "n" ).and( + new Field( "LOWER( utilizadores.login )" ).isEqual( login.toLowerCase() ) + ), + new String[] {}, + null, null, null + ); + Virtual2DArray result = getExecuter().executeQuery( query ); + if ( result != null && result.columnLength() > 0 ) + { + Integer userID = result.get( 0, 0 ); + user = getUtilizador( userID ); + } + return user; + } + + public Utilizador getUtilizador( Integer userID ) throws Exception + { + Utilizador user = null; + UtilizadoresData userData = getProvider().load( UtilizadoresData.class, userID ); + user = copyFrom( userData ); + return user; + } + + private Utilizador copyFrom( UtilizadoresData userData ) + { + Utilizador user = null; + if ( userData != null ) + { + user = new Utilizador(); + user.setId( userData.getId() ); + user.setLogin( userData.getLogin() ); + user.setPassword( userData.getPassword() ); + user.setData_password( userData.getData_password() ); + user.setEmail( userData.getEmail() ); + user.setEmpresa_id( userData.getEmpresa_id() ); + user.setEstabelecimento_id( userData.getEstabelecimento_id() ); + user.setAdministrador( userData.getAdministrador() ); + user.setTipo( userData.getTipo() ); + user.setNumero_cedula( userData.getNumero_cedula() ); + user.setCap( userData.getCap() ); + user.setNome( userData.getNome() ); + user.setMedico_id( userData.getMedico_id() ); + user.setFuncionario_hst_id( userData.getFuncionario_hst_id() ); + user.setActivo( userData.getActivo() ); + user.setResponsavel_loja( userData.getResponsavel_loja() ); + user.setGestor_geral( userData.getGestor_geral() ); + user.setApagado( userData.getApagado() ); + } + return user; + } + +// public Utilizador getUtilizador( Integer id ) throws Exception +// { +// Utilizador u = null; +// Statement st = createStatement(); +// String sql = "SELECT * FROM utilizadores WHERE id = " + id; +// ResultSet rs = st.executeQuery( sql ); +// if ( rs.first() ) +// { +// u = new Utilizador(); +// u.setId(new Integer(rs.getInt("id"))); +// u.setLogin(rs.getString("login")); +// u.setPassword(rs.getString("password")); +// u.setData_password(rs.getDate("data_password")); +// u.setEmail(rs.getString("email")); +// u.setEmpresa_id(new Integer(rs.getInt("empresa_id"))); +// u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id"))); +// u.setAdministrador(rs.getString("administrador")); +// u.setTipo(new Integer(rs.getInt("tipo"))); +// u.setNumero_cedula(rs.getString("numero_cedula")); +// u.setCap(rs.getString("cap")); +// u.setNome(rs.getString("nome")); +// u.setMedico_id(new Integer(rs.getInt("medico_id"))); +// u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id"))); +// u.setActivo(rs.getString("activo")); +// u.setResponsavel_loja(rs.getString("responsavel_loja")); +// u.setGestor_geral(rs.getString("gestor_geral")); +// u.setApagado(rs.getString("apagado")); +// } +// return u; +// } + + public List< Utilizador > getUtilizadoresListByTipo( Integer tipo, String responsavel_loja, Integer estabelecimento_id ) + throws Exception + { + List< Utilizador > list = new LinkedList< Utilizador >(); + + int type = tipo.intValue(); + + Expression where = new Field( UtilizadoresData.ACTIVO_FULL ).isEqual( "y" ).and( + new Field( UtilizadoresData.APAGADO_FULL ).isEqual( "n" ) ).and( + new Field( UtilizadoresData.ESTABELECIMENTO_ID_FULL ).isEqual( estabelecimento_id ) + ); + + if ( type == Global.RESPONSAVEL_SEGURANCA && "y".equals( responsavel_loja ) ) + { + where = where.and( new Field( UtilizadoresData.RESPONSAVEL_LOJA_FULL ).isEqual( "y" ) ); + } + + if ( type == Global.DIRECTOR_LOJA || type == Global.RESPONSAVEL_SEGURANCA || type == Global.DIRECTOR_NACIONAL_SEGURANCA || type == Global.TECNICO_HS ) + { + System.out.println( "UtilizadoresDataProvider . getUtilizadoresListByTipo() : " + where.toString() ); + + List< UtilizadoresData > listData = getProvider().listLoad( UtilizadoresData.class, where, new String[] { UtilizadoresData.NOME }, null ); + for ( UtilizadoresData userData : listData ) + { + list.add( copyFrom( userData ) ); + } + } + + + +// Statement st = createStatement(); +// String sql = ""; +// String estabelecimento_constraint = ""; +// if(tipo.intValue() == Global.DIRECTOR_LOJA || tipo.intValue() == Global.RESPONSAVEL_SEGURANCA || tipo.intValue() == Global.DIRECTOR_NACIONAL_SEGURANCA) +// { +// estabelecimento_constraint = " AND estabelecimento_id = " + estabelecimento_id; +// } +// if(tipo.intValue() == Global.RESPONSAVEL_SEGURANCA && responsavel_loja.matches("y")) +// { +// sql = "SELECT * FROM utilizadores WHERE activo = 'y' AND apagado = 'n' AND responsavel_loja = 'y' AND tipo = " + tipo + estabelecimento_constraint; +// } +// else if(tipo.intValue() == Global.DIRECTOR_LOJA || tipo.intValue() == Global.TECNICO_HS || tipo.intValue() == Global.DIRECTOR_NACIONAL_SEGURANCA) +// { +// sql = "SELECT * FROM utilizadores WHERE activo = 'y' AND apagado = 'n' AND tipo = " + tipo + estabelecimento_constraint; +// } +// +// System.out.println("UTILIZADORES LIST BY TIPO SQL : " + sql); +// ResultSet rs = st.executeQuery(sql); +// if(rs.isBeforeFirst()) +// { +// rs.first(); +// do +// { +// Utilizador u = new Utilizador(); +// u.setId(new Integer(rs.getInt("id"))); +// u.setLogin(rs.getString("login")); +// u.setPassword(rs.getString("password")); +// u.setData_password(rs.getDate("data_password")); +// u.setEmail(rs.getString("email")); +// u.setEmpresa_id(new Integer(rs.getInt("empresa_id"))); +// u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id"))); +// u.setAdministrador(rs.getString("administrador")); +// u.setTipo(new Integer(rs.getInt("tipo"))); +// u.setNumero_cedula(rs.getString("numero_cedula")); +// u.setCap(rs.getString("cap")); +// u.setNome(rs.getString("nome")); +// u.setMedico_id(new Integer(rs.getInt("medico_id"))); +// u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id"))); +// u.setActivo(rs.getString("activo")); +// u.setResponsavel_loja(rs.getString("responsavel_loja")); +// list.add(u); +// }while(rs.next()); +// } + + return list; + } + + public List< Utilizador > getUtilizadoresList() throws Exception + { + List< Utilizador > list = new LinkedList< Utilizador >(); + + Expression where = new Field( UtilizadoresData.ACTIVO_FULL ).isEqual( "y" ).and( + new Field( UtilizadoresData.APAGADO_FULL ).isEqual( "n" ) ); + + List< UtilizadoresData > listData = getProvider().listLoad( UtilizadoresData.class, where, new String[] { UtilizadoresData.NOME }, null ); + for ( UtilizadoresData userData : listData ) + { + list.add( copyFrom( userData ) ); + } + return list; + } + +// public ArrayList getUtilizadoresList() throws Exception +// { +// ArrayList list = new ArrayList(); +// Statement st = createStatement(); +// String sql = "select * from utilizadores where activo = 'y' and apagado = 'n'"; +// +// ResultSet rs = st.executeQuery(sql); +// rs.first(); +// do +// { +// Utilizador u = new Utilizador(); +// u.setId(new Integer(rs.getInt("id"))); +// u.setLogin(rs.getString("login")); +// u.setPassword(rs.getString("password")); +// u.setData_password(rs.getDate("data_password")); +// u.setEmail(rs.getString("email")); +// u.setEmpresa_id(new Integer(rs.getInt("empresa_id"))); +// u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id"))); +// u.setAdministrador(rs.getString("administrador")); +// u.setTipo(new Integer(rs.getInt("tipo"))); +// u.setNumero_cedula(rs.getString("numero_cedula")); +// u.setCap(rs.getString("cap")); +// u.setNome(rs.getString("nome")); +// u.setMedico_id(new Integer(rs.getInt("medico_id"))); +// u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id"))); +// u.setActivo(rs.getString("activo")); +// u.setResponsavel_loja(rs.getString("responsavel_loja")); +// list.add(u); +// }while(rs.next()); +// return list; +// } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/UtilizadoresLogic.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/UtilizadoresLogic.java new file mode 100644 index 00000000..97bd2fc3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/db/providers/UtilizadoresLogic.java @@ -0,0 +1,47 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package db.providers; + +import com.evolute.utils.error.ErrorLogger; +import db.entidades.Utilizador; + +/** + * + * @author dneves + */ +public class UtilizadoresLogic +{ + private static UtilizadoresLogic INSTANCE = null; + + private UtilizadoresLogic() + { + + } + + public static synchronized UtilizadoresLogic getInstance() + { + if ( INSTANCE == null ) + { + INSTANCE = new UtilizadoresLogic(); + } + return INSTANCE; + } + + public String getNomeUtilizadorByID( Integer userID ) + { + String nome = ""; + try + { + Utilizador userValidacao = UtilizadoresDataProvider.getInstance().getUtilizador( userID ); + nome = userValidacao == null ? "" : userValidacao.getNome(); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + return nome; + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/global/Global.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/global/Global.java new file mode 100644 index 00000000..8e2d5d20 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/global/Global.java @@ -0,0 +1,61 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package global; + +/** + * + * @author lluis + */ +public class Global +{ + + //tipos utilizadores + public static final int RESPONSAVEL_SEGURANCA = 1; + public static final int RH = 2; + public static final int TECNICO_HS = 3; + public static final int GESTOR = 6; + public static final int DIRECTOR_GERAL_RH = 7; + public static final int DIRECTOR_SIPRP = 8; + public static final int DIRECTOR_LOJA = 9; + public static final int DIRECTOR_NACIONAL_SEGURANCA = 10; + + //Fases do plano + public static final int FASE_SIPRP_EMISSAO = 1; + public static final int FASE_SEGURANCA_PREENCHIMENTO = 2; + public static final int FASE_DIR_LOJA_VALIDACAO = 3; + public static final int FASE_DNS_PARECER = 4; + public static final int FASE_SIPRP_CONCLUSAO = 5; + public static final int FASE_CONCLUIDO = 6; + + //Fases do plano - texto + public static final String FASE_SIPRP_EMISSAO_TXT = "SIPRP(Emissão)"; + public static final String FASE_SEGURANCA_PREENCHIMENTO_TXT = "Segurança Auchan(Preenchimento)"; + public static final String FASE_DIR_LOJA_VALIDACAO_TXT = "Director de loja(Validação)"; + public static final String FASE_DNS_PARECER_TXT = "DNS(Parecer)"; + public static final String FASE_SIPRP_CONCLUSAO_TXT = "SIPRP(Verificação/Conclusão)"; + + public static final String[] FASES_TEXTO = new String[] { + "SIPRP(Emissão)", + "Segurança Auchan(Preenchimento)", + "Director de loja(Validação)", + "DNS(Parecer)", + "SIPRP(Verificação/Conclusão)", + "Concluído" + }; + + //public static final String ANALISE_ACIDENTES_URL = "http://localhost:8084/AnaliseAcidentesTrabalho/faces/"; //testes + //public static final String ANALISE_ACIDENTES_URL = "http://192.168.111.24:8084/AnaliseAcidentesTrabalho/faces/"; //testes portatil + public static final String ANALISE_ACIDENTES_URL = "https://www.siprp.pt/AnaliseAcidentesTrabalho/faces/"; //real + public static final String PLANOS_ACTUACAO_URL = "https://www.siprp.pt/PlanosActuacao/faces/"; + + public static final String LOGOS_FOLDER = "/resources/images"; + public static final String PDF_FOLDER_URL = "/resources/pdf"; + + + public static final int ESTADO_MEDIDA_IMPLEMENTADA = 1; + public static final int ESTADO_MEDIDA_NAO_IMPLEMENTADA = 2; + public static final int ESTADO_MEDIDA_EM_IMPLEMENTACAO = 3; +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/mail/Mail.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/mail/Mail.java new file mode 100644 index 00000000..9e7703b3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/mail/Mail.java @@ -0,0 +1,93 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package mail; + +import java.util.Date; +import java.util.Properties; +import javax.mail.BodyPart; +import javax.mail.Message; +import javax.mail.Multipart; +import javax.mail.Session; +import javax.mail.Transport; +import javax.mail.internet.InternetAddress; +import javax.mail.internet.MimeBodyPart; +import javax.mail.internet.MimeMessage; +import javax.mail.internet.MimeMultipart; + +/** + * + * @author lluis + */ +public class Mail { + + + private final static String SMTP_HOST = "mail2.evolute.pt"; + private final static int SMTP_PORT = 587; + + private final String mail_username = "acidentes.auchan@siprp.pt"; +// private final String mail_password = "47Ju6Vb"; + private final String mail_password = "EghRzS2l"; + + public final static String ENDERECO_ENVIO = "planos.auchan@siprp.pt"; + //public final static String ENDERECO_ENVIO = "lluis@evolute.pt"; //testes + + + public void send(String emailTo, String emailFrom, String assunto, String texto_email) throws Exception + { + Properties props = new Properties(); + //props.put("mail.transport.protocol", "smtp"); + props.put("mail.smtp.host", SMTP_HOST ); + props.put("mail.from", emailFrom ); + props.put("mail.smtp.auth", "true" ); + props.put("mail.smtp.user", mail_username ); + props.put("mail.smtp.password", mail_password ); +// props.put("mail.smtp.user", "lluis"); +// props.put("mail.smtp.password", "654321"); + + + Session session = Session.getInstance( props ); +// Authenticator auth = new SMTPAuthenticator(); +// Session session = Session.getDefaultInstance(props, auth); + + Message msg = new MimeMessage( session ); + msg.setFrom( new InternetAddress( emailFrom ) ); + InternetAddress[] address = {new InternetAddress( emailTo )}; + msg.setRecipients( Message.RecipientType.TO, address ); + ((MimeMessage)msg).setSubject(assunto, "UTF-8"); + msg.setSentDate(new Date()); + Multipart multipart = new MimeMultipart(); + BodyPart msgBodyPart = new MimeBodyPart(); + String html; + html=" "; + html+=""; + html+= texto_email; + html+=""; + msgBodyPart.setContent(html, "text/html"); + multipart.addBodyPart(msgBodyPart); + msg.setContent(multipart); + +// Transport.send(msg); + Transport t; + t = session.getTransport( "smtp" ); + + t.connect( SMTP_HOST, SMTP_PORT, mail_username, mail_password ); + t.sendMessage( msg, msg.getAllRecipients() ); + + t.close(); +// System.out.println("Email Enviado !!!! "); + + } + +// private class SMTPAuthenticator extends Authenticator { +// public PasswordAuthentication getPasswordAuthentication() { +// String username = "lluis"; +// String password = "654321"; +// return new PasswordAuthentication(username, password); +// } +// +// } +} + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/pagination/Pagina.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/pagination/Pagina.java new file mode 100644 index 00000000..8957c4e2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/pagination/Pagina.java @@ -0,0 +1,118 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package pagination; + +import com.sun.webui.jsf.component.Hyperlink; +import javax.faces.context.FacesContext; +import planosactuacao.SessionBean1.PAGINATION_ENUM; + +/** + * + * @author lluis + */ +public class Pagina extends Hyperlink +{ + private PAGINATION_ENUM paginationType; + + private Integer risco_id; + private Integer valor; + private Integer pageNumber; + private Boolean previous = false; + private Boolean next = false; + + public Pagina() + { + super(); + } + + @Override + public Object saveState( FacesContext context ) + { + Object values[] = new Object[ 7 ]; + values[ 0 ] = super.saveState( context ); + values[ 1 ] = getRisco_id(); + values[ 2 ] = getValor(); + values[ 3 ] = getPageNumber(); + values[ 4 ] = isPrevious(); + values[ 5 ] = isNext(); + values[ 6 ] = getPaginationType(); + return values; + } + + @Override + public void restoreState( FacesContext context, Object state ) + { + Object values[] = ( Object[] ) state; + super.restoreState( context, values[ 0 ] ); + risco_id = ( Integer ) values[ 1 ]; + valor = ( Integer ) values[ 2 ]; + pageNumber = ( Integer ) values[ 3 ]; + previous = ( Boolean ) values[ 4 ]; + next = ( Boolean ) values[ 5 ]; + setPaginationType( ( PAGINATION_ENUM ) values[ 6 ] ); + } + + public Integer getRisco_id() + { + return risco_id; + } + + public void setRisco_id(Integer risco_id) + { + this.risco_id = risco_id; + } + + public Boolean isPrevious() + { + return previous; + } + + public void setPrevious(Boolean previous) + { + this.previous = previous; + } + + public Boolean isNext() + { + return next; + } + + public void setNext(Boolean next) + { + this.next = next; + } + + public Integer getPageNumber() + { + return pageNumber; + } + + public void setPageNumber( Integer page_nr ) + { + this.pageNumber = page_nr; + } + + public Integer getValor() + { + return valor; + } + + public void setValor( Integer valor ) + { + this.valor = valor; + } + + public PAGINATION_ENUM getPaginationType() + { + return paginationType; + } + + public void setPaginationType( PAGINATION_ENUM paginationType ) + { + this.paginationType = paginationType; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/pagination/Pagination.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/pagination/Pagination.java new file mode 100644 index 00000000..37178797 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/pagination/Pagination.java @@ -0,0 +1,210 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package pagination; + +import com.evolute.utils.error.ErrorLogger; +import db.entidades.PlanoActuacao; +import db.entidades.Risco; +import db.entidades.Utilizador; +import db.providers.PlanosDataProvider; +import java.io.Serializable; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import planosactuacao.SessionBean1.PAGINATION_ENUM; + +/** + * + * @author lluis + */ +public abstract class Pagination implements Serializable +{ + private static final String COLOR_TRATADO = "#0000FF"; + private static final String COLOR_NAO_TRATADO = "#FF0000"; + + private final PAGINATION_ENUM pagination; + private final PlanoActuacao planoActuacao; + private final Utilizador user; + + private List< Risco > riscos = new LinkedList< Risco >(); + private List< Pagina > pages = new LinkedList< Pagina >(); + + private int currentPageNumber = 1; + + + public Pagination( PAGINATION_ENUM pagination, PlanoActuacao p, Utilizador user ) + { + this.pagination = pagination; + this.planoActuacao = p; + this.user = user; + setup(); + } + + public PAGINATION_ENUM getPagination() + { + return pagination; + } + + public PlanoActuacao getPlanoActuacao() + { + return planoActuacao; + } + + public abstract void setup(); + + public void addRisco( Risco r ) + { + if ( r != null ) + { + if ( riscos == null ) + { + riscos = new LinkedList< Risco >(); + } + riscos.add( r ); + } + } + + public void addPage( Pagina page ) + { + if ( page != null ) + { + if ( pages == null ) + { + pages = new LinkedList< Pagina >(); + } + pages.add( page ); + } + } + + public List< Pagina > getPages( Risco riscoActual ) + { + pages = new LinkedList< Pagina >(); + + if ( getCurrentPageNumber() > 1 ) + { + Pagina page = new Pagina(); + page.setId( "prev" ); + page.setPrevious( new Boolean( true ) ); + page.setText( "<<" ); + addPage( page ); + } + + Iterator< Risco > it = riscos.iterator(); + int pageNumber = 1; + while ( it.hasNext() ) + { + Risco risco = it.next(); + + Pagina page = new Pagina(); + page.setId( "valor" + risco.getId() ); + page.setPageNumber( pageNumber ); + page.setText( pageNumber ); + if ( isCurrentPage( page, risco, riscoActual ) ) + { + setDisabled( page ); + } + else + { + setColor( page, risco ); + } + addPage( page ); + + pageNumber++; + } + + if ( getCurrentPageNumber() < getTotalPages() ) + { + Pagina page = new Pagina(); + page.setId( "next" ); + page.setNext( new Boolean( true ) ); + page.setText( ">>" ); + addPage( page ); + } + + return pages; + } + + private boolean isCurrentPage( Pagina page, Risco risco, Risco riscoActual ) + { + return ( page.getPageNumber() == getCurrentPageNumber() ) && ( ( riscoActual.getIsPatrimonial() && risco.getIsPatrimonial() && getPagination().equals( PAGINATION_ENUM.PATRIMONIAIS ) ) + || ( ! riscoActual.getIsPatrimonial() && ! risco.getIsPatrimonial() && getPagination().equals( PAGINATION_ENUM.NORMAL ) ) ); + } + + private void setColor( Pagina page, Risco risco ) + { + String color = getColor( risco ); + if ( color != null ) + { + String style = page.getStyle(); + style = (style == null ? "" : style) + "; color: " + color + ";"; + page.setStyle( style ); + } + } + + private void setDisabled( Pagina page ) + { + String style = page.getStyle(); + style = ( style == null ? "" : style ) + "background: #FFFFFF; border: 1px solid #000000; padding-left: 5px; padding-right: 5px;"; + page.setStyle( style ); + page.setDisabled( true ); + } + + private String getColor( Risco risco ) + { + String result = null; +// try +// { +// boolean isRiscoTratado = PlanosDataProvider.getInstance().isRiscoTratado( risco, user ); +// result = isRiscoTratado ? COLOR_TRATADO : COLOR_NAO_TRATADO; +// } +// catch ( Exception e ) +// { +// ErrorLogger.logException( e ); +// } + return result; + } + + public Risco getRisco( Pagina p ) + { + if ( p.isNext() ) + { + currentPageNumber++; + } + else if ( p.isPrevious() ) + { + currentPageNumber--; + } + else + { + currentPageNumber = p.getPageNumber().intValue(); + } + + return riscos.get( currentPageNumber - 1 ); + } + + public Risco getNextRisco() + { + Risco r = null; + + if ( currentPageNumber < getTotalPages() ) + { + currentPageNumber++; + r = riscos.get( currentPageNumber - 1 ); + } + + return r; + } + + public int getTotalPages() + { + return pages == null ? 0 : pages.size() - 1; + } + + public int getCurrentPageNumber() + { + return currentPageNumber; + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/pagination/PaginationNormais.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/pagination/PaginationNormais.java new file mode 100644 index 00000000..2e6c5daf --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/pagination/PaginationNormais.java @@ -0,0 +1,44 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package pagination; + +import db.entidades.Area; +import db.entidades.PlanoActuacao; +import db.entidades.Risco; +import db.entidades.Utilizador; +import planosactuacao.SessionBean1.PAGINATION_ENUM; + +/** + * + * @author dneves + */ +public class PaginationNormais extends Pagination +{ + public PaginationNormais( PlanoActuacao plano, Utilizador user ) + { + super( PAGINATION_ENUM.NORMAL, plano, user ); + } + + @Override + public void setup() + { + if ( getPlanoActuacao() != null ) + { + for ( Area a : getPlanoActuacao().getAreas() ) + { + for ( Risco r : a.getRiscos() ) + { + if ( ! r.getIsPatrimonial() ) + { + addRisco( r ); + } + } + } + } + } + +} + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/pagination/PaginationPatrimoniais.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/pagination/PaginationPatrimoniais.java new file mode 100644 index 00000000..33884d1b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/pagination/PaginationPatrimoniais.java @@ -0,0 +1,43 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package pagination; + +import db.entidades.Area; +import db.entidades.PlanoActuacao; +import db.entidades.Risco; +import db.entidades.Utilizador; +import planosactuacao.SessionBean1.PAGINATION_ENUM; + +/** + * + * @author dneves + */ +public class PaginationPatrimoniais extends Pagination +{ + public PaginationPatrimoniais( PlanoActuacao plano, Utilizador user ) + { + super( PAGINATION_ENUM.PATRIMONIAIS, plano, user ); + } + + @Override + public void setup() + { + if ( getPlanoActuacao() != null ) + { + for ( Area a : getPlanoActuacao().getAreas() ) + { + for ( Risco r : a.getRiscos() ) + { + if ( r.getIsPatrimonial() ) + { + addRisco( r ); + } + } + } + } + } + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/phaselistener/ContextListener.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/phaselistener/ContextListener.java new file mode 100644 index 00000000..23d0173b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/phaselistener/ContextListener.java @@ -0,0 +1,121 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package phaselistener; + +import com.evolute.utils.date.DateUtils; +import com.evolute.utils.error.ErrorLogger; +import com.evolute.utils.timer.TimedEvent; +import com.evolute.utils.timer.Timer; +import db.DBConstants.DB; +import db.providers.EvoBaseProvider; +import java.text.SimpleDateFormat; +import java.util.Date; +import javax.servlet.ServletContextEvent; +import javax.servlet.ServletContextListener; +import planosactuacao.PlanosActuacao; +import shst.companydataloaders.SIPRPPropertiesLoader; +import utils.PlanosActuacaoLogger; + +/** + * + * @author dneves + */ +public class ContextListener implements ServletContextListener +{ + private static final int IMPORT_INTERVAL = 300; + + private long startedTime = 0L; + + private TimedEvent importEvent = null; + + public void contextInitialized( ServletContextEvent sce ) + { + startedTime = System.currentTimeMillis(); + System.out.println( "\n\ncontextInitialized : " + startedTime ); + + try + { + System.out.println( "\n\tReading app.properties ..." ); + SIPRPPropertiesLoader props = SIPRPPropertiesLoader.getInstance(); + props.load(); + } + catch ( Exception e ) + { +// ErrorLogger.logException( e ); + System.out.println( "\n\n<---- ERROR ! " + e.getMessage() ); + } + + try + { + System.out.println( "\nInitializing db ..." ); + EvoBaseProvider.getInstance(); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + + try + { + System.out.println( "\nInitializing PA logger ..." ); + PlanosActuacaoLogger.init(); + } + catch ( Throwable e ) + { + e.printStackTrace( System.err ); + } + + System.out.println( "\nScheduling Import Event ... " ); + importEvent = new TimedEvent() + { + public void executeAction() throws Exception + { + try + { + PlanosActuacao planos = new PlanosActuacao(); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + Timer.resetEvent( this ); + } + }; + Timer.scheduleEvent( importEvent, IMPORT_INTERVAL ); + System.out.println( "\tExecuting Import each " + ( IMPORT_INTERVAL / 60 ) + " minutes." ); + } + + public void contextDestroyed( ServletContextEvent sce ) + { + System.out.println( "\ncontextDestroyed() : " ); + + if ( importEvent != null ) + { + System.out.println( "\tStopping import timer ..." ); + Timer.abortEvent( importEvent ); + } + + try + { + System.out.println( "\nClosing provider connections" ); + EvoBaseProvider.getInstance().getProvider( DB.SIPRP ).close(); + EvoBaseProvider.getInstance().getProvider( DB.SIPRP_LOCAL ).close(); + EvoBaseProvider.getInstance().getDbManager( DB.SIPRP_LOCAL ).close(); + EvoBaseProvider.getInstance().getDbManager( DB.SIPRP ).close(); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + + long endTime = System.currentTimeMillis(); + SimpleDateFormat D_F = new SimpleDateFormat( "dd-MM-yyyy HH:mm:ss" ); + Date startDate = new Date( startedTime ); + Date endDate = new Date( endTime ); + String timePassed = DateUtils.getTimePassed( startedTime, endTime ); + System.out.println( "\trunning for: " + D_F.format( startDate ) + " -> " + D_F.format( endDate ) + " = " + ( (endTime - startedTime) / 1000 ) + " s ; " + timePassed ); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/phaselistener/MainPhaseListener.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/phaselistener/MainPhaseListener.java new file mode 100644 index 00000000..6c757518 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/phaselistener/MainPhaseListener.java @@ -0,0 +1,260 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package phaselistener; + +import com.evolute.utils.error.ErrorLogger; +import db.entidades.Utilizador; +import db.providers.UtilizadoresDataProvider; +import global.Global; +import java.util.HashMap; +import java.util.Map; +import javax.faces.component.UIViewRoot; +import javax.faces.context.ExternalContext; +import javax.faces.context.FacesContext; +import javax.faces.event.PhaseEvent; +import javax.faces.event.PhaseId; +import javax.faces.event.PhaseListener; +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; +import planosactuacao.SessionBean1; +import utils.JSFHTTPUtils; +import utils.JSFUtils; +import utils.Logos; + +/** + * + * @author lluis + */ +public class MainPhaseListener implements PhaseListener +{ + private boolean firstEntry = true; + + public void afterPhase( PhaseEvent pe ) + { + if ( pe.getPhaseId() == PhaseId.RENDER_RESPONSE ) + { + FacesContext fc = pe.getFacesContext(); + String view = fc.getViewRoot().getViewId(); + System.out.println( "\nafterPhase . RENDER RESPONSE VIEW : " + view ); + } + } + + public void beforePhase(PhaseEvent event) + { + if ( event.getPhaseId() == PhaseId.RENDER_RESPONSE ) + { + FacesContext fc = event.getFacesContext(); + UIViewRoot view = fc.getViewRoot(); + String viewID = view.getViewId(); + ExternalContext ec = fc.getExternalContext(); + + try + { + SessionBean1 session = JSFUtils.getSessionBean( fc ); + String referer = JSFHTTPUtils.getReferer( fc ); + + HttpServletRequest req = ( HttpServletRequest ) ec.getRequest(); + + if ( referer != null && referer.contains( "/AnaliseAcidentesTrabalho/" ) ) + { + HttpSession reqSession = ( HttpSession ) ec.getSession( false ); + ServletContext paContext = reqSession.getServletContext(); + ServletContext aatContext = paContext.getContext( "/AnaliseAcidentesTrabalho" ); + + String sessionID = req.getParameter( "sessionID" ); + + Map< String, Object > paData = new HashMap< String, Object >(); + paData.put( "session", reqSession ); + paContext.setAttribute( sessionID, paData ); + + Map< String, Object > mapData = ( Map< String, Object > ) aatContext.getAttribute( sessionID ); + Integer userID = ( Integer ) mapData.get( "userID" ); + if ( userID != null ) + { + Utilizador currentUser = UtilizadoresDataProvider.getInstance().getUtilizador( userID ); + session.setCurrentUser( currentUser ); + session.setLoggedIn( true ); + session.setAatSessionID( sessionID ); + setupPages( fc, session, viewID ); + } + else + { + gotoLogin( fc, viewID ); + } + } + else + { + if ( session.isLoggedIn() && session.getCurrentUser() != null ) + { + setupPages( fc, session, viewID ); + } + else + { + gotoLogin( fc, viewID ); + } + } + } + catch ( Exception e ) + { + gotoLogin( fc, viewID ); + } + } + } + + +// public void beforePhase( PhaseEvent pe ) +// { +// if ( pe.getPhaseId() == PhaseId.RENDER_RESPONSE ) +// { +// System.out.println( "beforePhase() : " ); +// +// FacesContext fc = pe.getFacesContext(); +// SessionBean1 session = JSFUtils.getSessionBean( fc ); +// String referer = JSFHTTPUtils.getReferer( pe.getFacesContext() ); +// System.out.println( "\tReferer : " + referer ); +// +// UIViewRoot view = fc.getViewRoot(); +// System.out.println( "\tView : " + view ); +// String viewID = view.getViewId(); +// System.out.println( "\t\tView ID :" + viewID ); +// +// +// if ( referer != null && referer.contains( "/AnaliseAcidentesTrabalho/" ) ) +// { +// +// ExternalContext ec = fc.getExternalContext(); +// if ( ec != null ) +// { +// HttpSession reqSession = ( HttpSession ) ec.getSession( false ); +// System.out.println( "\treqSession : " + reqSession ); +// +// ServletContext thisContext = reqSession.getServletContext(); +// System.out.println( "\tthisContext : " + thisContext ); +// +// ServletContext otherContext = thisContext.getContext( "/AnaliseAcidentesTrabalho" ); +// System.out.println( "\totherContext : " + otherContext ); +// +// String sessionID = ( String ) otherContext.getAttribute( "sessionID" ); +// Map< String, Object > mapData = ( Map< String, Object > ) otherContext.getAttribute( sessionID ); +// Integer userID = ( Integer ) mapData.get( "userID" ); +// +// System.out.println( "\n\tsessionID : " + sessionID ); +// System.out.println( "\tuserID : " + userID ); +// +// if ( userID != null ) +// { +// try +// { +// Utilizador currentUser = UtilizadoresDataProvider.getInstance().getUtilizador( userID ); +// session.setCurrentUser( currentUser ); +// +// setupPages( fc, session, viewID ); +// } +// catch ( Exception e ) +// { +// ErrorLogger.logException( e ); +// gotoLogin( fc, viewID ); +// } +// } +// else +// { +// gotoLogin( fc, viewID ); +// } +// } +// } +// else +// { +// +// HttpServletRequest req = ( HttpServletRequest ) fc.getExternalContext().getRequest(); +// boolean sessionValid = req.isRequestedSessionIdValid(); +// System.out.println( "\tSessionValid : " + sessionValid ); +// +// boolean loggedIn = session.isLoggedIn(); +// System.out.println( "\tLogged In : " + loggedIn ); +// +// if ( sessionValid && loggedIn ) +// { +// System.out.println( "\t---> session IS valid && user IS logged in." ); +// +// setupPages( fc, session, viewID ); +// } +// else +// { +// gotoLogin( fc, viewID ); +// } +// } +// } +// } + + public PhaseId getPhaseId() + { + return PhaseId.ANY_PHASE; + } + + private void gotoLogin( FacesContext fc, String viewID ) + { + if ( viewID.compareTo( "/Login.jsp" ) != 0 ) + { + try + { + String url = Global.ANALISE_ACIDENTES_URL + "Login.jsp"; + JSFUtils.redirect( fc, url ); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + System.out.println( "\n\t\t\tERROR REDIRECTING TO LOGIN !" ); + } + } + } + + private void setupPages( FacesContext fc, SessionBean1 session, String viewID ) + { + //disable/enable EditarPlano menu ??? + session.setRenderTopMenuImages( true ); + session.setRenderSubHeader( false ); + + Utilizador currentUser = session.getCurrentUser(); + int userType = currentUser == null ? -1 : currentUser.getTipo() == null ? -1 : currentUser.getTipo().intValue(); + if ( viewID.matches( "/EditarPlano.jsp" ) || viewID.matches( "/EnviarCorrecao.jsp" ) || viewID.matches( "/ViewPlano.jsp" ) ) + { + session.setDisableMenu( false ); + session.setDisableMenuPlanos( false ); + if ( viewID.matches( "/ViewPlano.jsp" ) ) + { + session.setDisableMenuUtilizadores( userType != Global.DIRECTOR_SIPRP ); + session.setDisableMenuDadosUtilizador( false ); + session.setRenderTopMenuImages( false ); + session.setRenderSubHeader( true ); + } + else if ( viewID.matches( "/EditarPlano.jsp" ) ) + { + session.setDisableMenuPlanos( false ); + session.setRenderTopMenuImages( false ); + session.setRenderSubHeader( true ); + } + } + else + { + session.setDisableMenu(false); + if ( viewID.matches( "/ListaPlanos.jsp" ) ) + { + if ( userType == Global.RH || userType == Global.GESTOR ) + { + session.setDisableMenuUtilizadores( true ); + } + session.setDisableMenuPlanos( true ); + } + } + + //insert logos + Integer empresaId = currentUser != null ? currentUser.getEmpresa_id() : null; + Logos logos = new Logos(); + String logourl = logos.getLogo( fc, empresaId ); + session.setLogoEmpresaUrl( logourl ); + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/phaselistener/SessionListener.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/phaselistener/SessionListener.java new file mode 100644 index 00000000..0eff2121 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/phaselistener/SessionListener.java @@ -0,0 +1,33 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package phaselistener; + +import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpSessionEvent; +import javax.servlet.http.HttpSessionListener; + +/** + * + * @author dneves + */ +public class SessionListener implements HttpSessionListener +{ + + @Override + public void sessionCreated( HttpSessionEvent se ) + { + HttpSession session = se.getSession(); + System.out.println( "PlanosActuacao : new Session Created : " + session.getId() ); + } + + @Override + public void sessionDestroyed( HttpSessionEvent se ) + { + HttpSession session = se.getSession(); + System.out.println( "PlanosActuacao : session destroyed : " + session.getId() ); + } + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/ApplicationBean1.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/ApplicationBean1.java new file mode 100644 index 00000000..c1b27cb7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/ApplicationBean1.java @@ -0,0 +1,151 @@ +/* + * ApplicationBean1.java + * + * Created on Aug 25, 2008, 11:20:16 AM + */ + +package planosactuacao; + +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractApplicationBean; +import java.sql.Connection; +import javax.faces.FacesException; + +/** + *

Application scope data bean for your application. Create properties + * here to represent cached data that should be made available to all users + * and pages in the application.

+ * + *

An instance of this class will be created for you automatically, + * the first time your application evaluates a value binding expression + * or method binding expression that references a managed bean using + * this class.

+ * + * @author lluis + */ +public class ApplicationBean1 extends AbstractApplicationBean { + // + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + //
+ + private boolean timerStarted = false; + private Connection localConnection = null; + private Connection connection = null; + + /** + *

Construct a new application data bean instance.

+ */ + public ApplicationBean1() { + } + + /** + *

This method is called when this bean is initially added to + * application scope. Typically, this occurs as a result of evaluating + * a value binding or method binding expression, which utilizes the + * managed bean facility to instantiate this bean and store it into + * application scope.

+ * + *

You may customize this method to initialize and cache application wide + * data values (such as the lists of valid options for dropdown list + * components), or to allocate resources that are required for the + * lifetime of the application.

+ */ + @Override + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + ErrorLogger.logException( e ); + log("ApplicationBean1 Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

This method is called when this bean is removed from + * application scope. Typically, this occurs as a result of + * the application being shut down by its owning container.

+ * + *

You may customize this method to clean up resources allocated + * during the execution of the init() method, or + * at any later time during the lifetime of the application.

+ */ + @Override + public void destroy() { + } + + /** + *

Return an appropriate character encoding based on the + * Locale defined for the current JavaServer Faces + * view. If no more suitable encoding can be found, return + * "UTF-8" as a general purpose default.

+ * + *

The default implementation uses the implementation from + * our superclass, AbstractApplicationBean.

+ */ + @Override + public String getLocaleCharacterEncoding() { + return super.getLocaleCharacterEncoding(); + } + + /** + * @return the timerStarted + */ + public boolean isTimerStarted() { + return timerStarted; + } + + /** + * @param timerStarted the timerStarted to set + */ + public void setTimerStarted(boolean timerStarted) { + this.timerStarted = timerStarted; + } + + /** + * @return the connection + */ + public Connection getConnection() { + return connection; + } + + /** + * @param connection the connection to set + */ + public void setConnection(Connection connection) { + this.connection = connection; + } + + public Connection getLocalConnection() { + return localConnection; + } + + /** + * @param connection the connection to set + */ + public void setLocalConnection(Connection connection) { + this.localConnection = connection; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Bundle.properties b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Bundle.properties new file mode 100644 index 00000000..57ed665a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Bundle.properties @@ -0,0 +1,3 @@ +# To change this template, choose Tools | Templates +# and open the template in the editor. + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Dummy.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Dummy.java new file mode 100644 index 00000000..65b41af8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Dummy.java @@ -0,0 +1,254 @@ +/* + * Dummy.java + * + * Created on Oct 6, 2008, 10:43:13 AM + */ + +package planosactuacao; + +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractPageBean; + +import com.sun.webui.jsf.component.Hyperlink; +import db.entidades.Utilizador; +import db.providers.UtilizadoresDataProvider; +import java.util.List; +import java.util.ListIterator; +import javax.faces.FacesException; +import javax.faces.event.ActionEvent; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ * + * @author lluis + */ +public class Dummy extends AbstractPageBean +{ + // + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + private Hyperlink hyperlink1 = new Hyperlink(); + + public Hyperlink getHyperlink1() { + return hyperlink1; + } + + public void setHyperlink1(Hyperlink h) { + this.hyperlink1 = h; + } + private Hyperlink link = new Hyperlink(); + + public Hyperlink getLink() { + return link; + } + + public void setLink(Hyperlink h) { + this.link = h; + } + + //
+ + /** + *

Construct a new Page bean instance.

+ */ + public Dummy() + { +// connect(); + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + @Override + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + ErrorLogger.logException( e ); + log("Dummy Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + @Override + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + @Override + public void prerender() { + + //Verbatim verbatim = new Verbatim(); + //printUsers(); + + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + @Override + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1) getBean("ApplicationBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1) getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1) getBean("SessionBean1"); + } + + public String lnkAnaliseAcidentes_action() { + // TODO: Process the action. Return value is a navigation + // case name where null will return to the same page. + return null; + } + + public void lnk_actionListener(ActionEvent e) { + // TODO: Process the action. Return value is a navigation + // case name where null will return to the same page. + System.out.print("DUMMY LINK"); + } + + + private void printUsers() + { +// UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); + + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + + List< Utilizador > list = udp.getUtilizadoresList(); + ListIterator iter = list.listIterator(); + System.out.println("=================================================================================="); + System.out.println("LOGIN\tEMAIL\tTIPO\tESTABELECIMENTO\tRESP. LOJA\tACTIVO\tAPAGADO"); + while(iter.hasNext()) + { + Utilizador u = (Utilizador) iter.next(); + System.out.print(u.getLogin() + "\t"); + System.out.print(u.getEmail() + "\t"); + System.out.print(u.getTipo() + "\t"); + System.out.print(u.getEstabelecimento_id() + "\t"); + System.out.print(u.getResponsavel_loja() + "\t"); + System.out.print(u.getActivo() + "\t"); + System.out.print(u.getApagado() + "\t\n"); + } + System.out.println(""); + System.out.println("=================================================================================="); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + +// private void connect() +// { +// db.Db db = new db.Db(); +// try +// { +// Connection connection = db.connect(); +// } +// catch(Exception ex) +// { +// getSessionBean1().setMsg("Erro na ligação à Base de Dados"); +// //***** terminate session +// try { +// getExternalContext().redirect("faces/Erro.jsp"); +// } catch(Exception e) { +// // . . . handle exception . . . +// ErrorLogger.logException( e ); +// } +// ErrorLogger.logException( ex ); +// } +// } + + public String butImage_action() { + // TODO: Process the action. Return value is a navigation + // case name where null will return to the same page. + +// FacesContext fc = getFacesContext(); +// Logos logos = new Logos(); +// String logourl = logos.getLogo(fc); +// if(logourl != null) +// { +// image1.setUrl(logourl); +// } + + return null; + } + +} + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/EditarPlano.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/EditarPlano.java new file mode 100644 index 00000000..19eb670d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/EditarPlano.java @@ -0,0 +1,2399 @@ +/* + * PlanoActuacao.java + * + * Created on Aug 26, 2008, 3:10:59 PM + */ + +package planosactuacao; + +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractPageBean; + +import com.sun.webui.jsf.component.Button; +import com.sun.webui.jsf.component.Calendar; +import com.sun.webui.jsf.component.Checkbox; +import com.sun.webui.jsf.component.DropDown; +import com.sun.webui.jsf.component.PanelGroup; +import com.sun.webui.jsf.component.StaticText; +import com.sun.webui.jsf.component.TextArea; +import com.sun.webui.jsf.component.TextField; + +import com.sun.webui.jsf.model.Option; +import db.entidades.Area; +import db.entidades.EstadoMedida; +import db.entidades.Medida; +import db.entidades.PlanoActuacao; +import db.entidades.PostoTrabalho; +import db.entidades.Risco; +import db.entidades.Utilizador; +import db.entidades.Valor; +import db.providers.PlanosDataProvider; +import db.providers.UtilizadoresDataProvider; +import db.providers.UtilizadoresLogic; +import global.Global; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.ListIterator; +import java.util.Vector; +import javax.el.MethodExpression; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlInputHidden; +import javax.faces.component.html.HtmlPanelGrid; +import javax.faces.context.FacesContext; +import javax.faces.event.ActionEvent; +import javax.faces.event.MethodExpressionActionListener; +import javax.faces.event.ValueChangeEvent; +import mail.Mail; +import pagination.Pagina; +import pagination.Pagination; +import pagination.PaginationNormais; +import pagination.PaginationPatrimoniais; +import planosactuacao.SessionBean1.PAGINATION_ENUM; +import utils.JSFUtils; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ * + * @author lluis + */ +public class EditarPlano extends AbstractPageBean +{ + // + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + //
+// PlanosDataProvider pdp = new PlanosDataProvider(); + HtmlPanelGrid grid; + PanelGroup pg; + StaticText st; + private HtmlPanelGrid gridLayout = new HtmlPanelGrid(); + + //Plano actuacao + PlanoActuacao plano; + + //HtmlPanelGrid gridPlano = new HtmlPanelGrid(); + HtmlPanelGrid gridArea; + HtmlPanelGrid gridRisco; + HtmlPanelGrid gridValor; + HtmlPanelGrid gridMedida; + HtmlPanelGrid gridPosto; + HtmlPanelGrid gridResponsavel; + + int risco_id = 0; + int medida_id = 0; + int posto_id = 0; + + //page components + TextField txtResponsavelExecucao; + TextField txtPor; + TextArea txtRecursos; + Calendar dtInicio; + Calendar dtFim; + TextArea txtParecerDns; + TextArea txtParecerDl; + TextArea txtVerificacaoSiprp; + + + public HtmlPanelGrid getGridLayout() { + return gridLayout; + } + + public void setGridLayout(HtmlPanelGrid hpg) { + this.gridLayout = hpg; + } + private Button butGravarPlano = new Button(); + + public Button getButGravarPlano() { + return butGravarPlano; + } + + public void setButGravarPlano(Button b) { + this.butGravarPlano = b; + } + private Button butGravarRisco = new Button(); + + public Button getButGravarRisco() { + return butGravarRisco; + } + + public void setButGravarRisco(Button b) { + this.butGravarRisco = b; + } + private Button butEnviar = new Button(); + + public Button getButEnviar() { + return butEnviar; + } + + public void setButEnviar(Button b) { + this.butEnviar = b; + } + private Button butLimparDados = new Button(); + + public Button getButLimparDados() { + return butLimparDados; + } + + public void setButLimparDados(Button b) { + this.butLimparDados = b; + } + private Button butCancelar = new Button(); + + public Button getButCancelar() { + return butCancelar; + } + + public void setButCancelar(Button b) { + this.butCancelar = b; + } + private StaticText lblMsg = new StaticText(); + + public StaticText getLblMsg() { + return lblMsg; + } + + public void setLblMsg(StaticText st) { + this.lblMsg = st; + } + private HtmlPanelGrid gridValidar = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridValidar() { + return gridValidar; + } + + public void setGridValidar(HtmlPanelGrid hpg) { + this.gridValidar = hpg; + } + private Checkbox chkValidacao = new Checkbox(); + + public Checkbox getChkValidacao() { + return chkValidacao; + } + + public void setChkValidacao(Checkbox c) { + this.chkValidacao = c; + } + + private Checkbox chkDesactivar = new Checkbox(); + + public Checkbox getChkDesactivar() { + return chkDesactivar; + } + + public void setChkDesactivar( Checkbox c ) { + this.chkDesactivar = c; + } + private HtmlInputHidden hidValidacao = new HtmlInputHidden(); + + public HtmlInputHidden getHidValidacao() { + return hidValidacao; + } + + public void setHidValidacao(HtmlInputHidden hih) { + this.hidValidacao = hih; + } + private PanelGroup grpPagination = new PanelGroup(); + + public PanelGroup getGrpPagination() { + return grpPagination; + } + + public void setGrpPagination(PanelGroup pg) { + this.grpPagination = pg; + } + private HtmlPanelGrid gridPagination = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPagination() { + return gridPagination; + } + + public void setGridPagination(HtmlPanelGrid hpg) { + this.gridPagination = hpg; + } + private Button butEnviarCorrecao = new Button(); + + public Button getButEnviarCorrecao() { + return butEnviarCorrecao; + } + + public void setButEnviarCorrecao(Button b) { + this.butEnviarCorrecao = b; + } + private StaticText lblObs = new StaticText(); + + public StaticText getLblObs() { + return lblObs; + } + + public void setLblObs(StaticText st) { + this.lblObs = st; + } + private HtmlPanelGrid gridPlano2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getgridPlano2() { + return gridPlano2; + } + + public void setgridPlano2(HtmlPanelGrid hpg) { + this.gridPlano2 = hpg; + } + private HtmlPanelGrid gridPlano = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPlano() { + return gridPlano; + } + + public void setGridPlano(HtmlPanelGrid hpg) { + this.gridPlano = hpg; + } + private HtmlPanelGrid gridValidacoes = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridValidacoes() { + return gridValidacoes; + } + + public void setGridValidacoes(HtmlPanelGrid hpg) { + this.gridValidacoes = hpg; + } + private HtmlPanelGrid gridValidar2 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridValidar2() { + return gridValidar2; + } + + public void setGridValidar2(HtmlPanelGrid hpg) { + this.gridValidar2 = hpg; + } + private HtmlPanelGrid gridObservacoes = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridObservacoes() { + return gridObservacoes; + } + + public void setGridObservacoes(HtmlPanelGrid hpg) { + this.gridObservacoes = hpg; + } + private StaticText stNomeEmpresa = new StaticText(); + + public StaticText getStNomeEmpresa() { + return stNomeEmpresa; + } + + public void setStNomeEmpresa(StaticText st) { + this.stNomeEmpresa = st; + } + + /** + *

Construct a new Page bean instance.

+ */ + public EditarPlano() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + @Override + public void init() + { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try + { + _init(); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + log("PlanoActuacao Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + Utilizador u = getSessionBean1().getCurrentUser(); + if ( u.getTipo().intValue() != Global.DIRECTOR_NACIONAL_SEGURANCA && u.getTipo().intValue() != Global.DIRECTOR_LOJA ) + { + butEnviarCorrecao.setStyleClass( "hidden" ); + } + + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + @Override + public void preprocess() + { + + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + @Override + public void prerender() + { + FacesContext fc = getFacesContext(); + //boolean isPostback = JSFUtils.isPostBack12(fc); + //boolean isPostback = JSFUtils.isPostBack(fc); + boolean isPostback = JSFUtils.isPostback(); + System.out.println("POSTBACK : " + isPostback); + PlanoActuacao p = getSessionBean1().getPlanoActuacao(); + + System.out.println( "\nEditarPlano . prerender() : " + p.getId() + "\n"); + + getRiscosByPlano( p ); + if ( ! isPostback ) + { + //initializePlano(); + fillValoresHash( p ); + initialize( p ); + showPlano( p ); + //fillPlano(); + } + else + { + Boolean validacao = ( Boolean ) chkValidacao.getSelected(); + if ( validacao != null ) + { + if ( validacao.booleanValue() == true ) + { + butEnviarCorrecao.setDisabled( true ); + butEnviar.setDisabled( false ); + } + else + { + butEnviarCorrecao.setDisabled( false ); + butEnviar.setDisabled( true ); + } + } + } + + if ( gridPagination.getChildCount() > 0 ) + { + gridPagination.getChildren().clear(); + } + setPagination( PAGINATION_ENUM.NORMAL ); + setPagination( PAGINATION_ENUM.PATRIMONIAIS ); + + if ( p.getCorrecao().matches( "y" ) ) + { + lblObs.setText( p.getObs_correcao() ); + } + lblMsg.setText( getSessionBean1().getMsg() ); + getSessionBean1().setMsg( "" ); + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + @Override + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1) getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1) getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected ApplicationBean1 getApplicationBean1() + { + return (ApplicationBean1) getBean("ApplicationBean1"); + } + + public String hyperlink1_action() + { + // TODO: Process the action. Return value is a navigation + // case name where null will return to the same page. + return "lista_planos"; + } + + private void initialize( PlanoActuacao p ) + { + Utilizador u = getSessionBean1().getCurrentUser(); + + Pagination paginationNormal = new PaginationNormais( p, u ); + Pagination paginationPatrimoniais = new PaginationPatrimoniais( p, u ); + getSessionBean1().addPagination( PAGINATION_ENUM.NORMAL, paginationNormal ); + getSessionBean1().addPagination( PAGINATION_ENUM.PATRIMONIAIS, paginationPatrimoniais ); + + if ( u.getTipo().intValue() == Global.DIRECTOR_NACIONAL_SEGURANCA ) + { + hidValidacao.setValue( "dns" ); + } + else if ( u.getTipo().intValue() == Global.DIRECTOR_LOJA ) + { + hidValidacao.setValue( "dir_loja" ); + } + if ( u.getTipo().intValue() == Global.TECNICO_HS ) + { + hidValidacao.setValue( "hs" ); + } + + if ( u.getTipo().intValue() != Global.DIRECTOR_LOJA && u.getTipo().intValue() != Global.DIRECTOR_NACIONAL_SEGURANCA && u.getTipo().intValue() != Global.TECNICO_HS ) + { + gridValidar.setRendered( false ); + } +// else +// { +// if ( u.getTipo().intValue() == Global.DIRECTOR_NACIONAL_SEGURANCA ) +// { +// +// } +// else if ( u.getTipo().intValue() == Global.DIRECTOR_LOJA || u.getTipo().intValue() == Global.TECNICO_HS ) +// { +// +// } +// } + + int fase = p.getFase().intValue(); + switch( fase ) + { + case Global.FASE_SEGURANCA_PREENCHIMENTO : + if ( p.getObservacoes_dl() != null ) + { + if ( p.getObservacoes_dl().trim().length() > 0 ) + { + pg = new PanelGroup(); + gridObservacoes.getChildren().add( pg ); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Observações gerais DL: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( p.getObservacoes_dl() ); + pg.getChildren().add( st ); + } + } + + if ( p.getObservacoes_dns() != null ) + { + if ( p.getObservacoes_dns().trim().length() > 0 ) + { + pg = new PanelGroup(); + gridObservacoes.getChildren().add( pg ); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Observações gerais DNS: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( p.getObservacoes_dns() ); + pg.getChildren().add( st ); + } + } + + if ( p.getCorrecao().matches( "n" ) ) + { + butEnviar.setText( "Enviar a Director de Loja>>" ); + } + else + { + if ( p.getFase_antes_correcao().intValue() == Global.FASE_DIR_LOJA_VALIDACAO ) + { + butEnviar.setText( "Enviar a Director de Loja>>" ); + } + else if ( p.getFase_antes_correcao().intValue() == Global.FASE_DNS_PARECER ) + { + butEnviar.setText( "Enviar a Director Nacional Segurança>>" ); + } + } + + break; + + case Global.FASE_DIR_LOJA_VALIDACAO: + //butEnviar.setText("Enviar a Director de Loja"); + pg = new PanelGroup(); + pg.setId( "pgObsDl" ); + gridObservacoes.getChildren().add( pg ); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Observações gerais DL: " ); + pg.getChildren().add( st ); + TextArea txtObservacoesDl = new TextArea(); + txtObservacoesDl.setId( "txtObservacoesDl" ); + txtObservacoesDl.setColumns( 200 ); + txtObservacoesDl.setText( p.getObservacoes_dl() ); + pg.getChildren().add( txtObservacoesDl ); + + if ( p.getObservacoes_dns() != null ) + { + if ( p.getObservacoes_dns().trim().length() > 0 ) + { + pg = new PanelGroup(); + gridObservacoes.getChildren().add( pg ); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Observações gerais DNS: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( p.getObservacoes_dns() ); + pg.getChildren().add( st ); + } + } + + if ( p.getValidacao_director_loja().booleanValue() == true ) + { + chkValidacao.setSelected( new Boolean( true ) ); + butEnviarCorrecao.setDisabled( true ); + butEnviar.setDisabled( false ); + } + else + { + butEnviarCorrecao.setDisabled( false ); + butEnviar.setDisabled( true ); + } + butEnviar.setText( "Enviar a Director Nacional Segurança>>" ); + + if ( p.getCorrecao().matches( "y" ) ) + { + butEnviar.setText( "Enviar a Director Nacional Segurança>>" ); + } + + break; + + case Global.FASE_DNS_PARECER: + if ( p.getObservacoes_dl() != null ) + { + if ( p.getObservacoes_dl().trim().length() > 0 ) + { + pg = new PanelGroup(); + pg.setId( "pgObsDl" ); + gridObservacoes.getChildren().add( pg ); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Observações gerais DL: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( p.getObservacoes_dl() ); + pg.getChildren().add( st ); + } + } + + pg = new PanelGroup(); + pg.setId( "pgObsDns" ); + gridObservacoes.getChildren().add( pg ); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Observações gerais DNS: " ); + pg.getChildren().add( st ); + TextArea txtObservacoesDns = new TextArea(); + txtObservacoesDns.setId( "txtObservacoesDns" ); + txtObservacoesDns.setColumns( 200 ); + txtObservacoesDns.setText( p.getObservacoes_dns() ); + pg.getChildren().add( txtObservacoesDns ); + if ( p.getValidacao_dns().booleanValue() == true ) + { + chkValidacao.setSelected( new Boolean( true ) ); + butEnviarCorrecao.setDisabled( true ); + butEnviar.setDisabled( false ); + } + else + { + butEnviarCorrecao.setDisabled( false ); + butEnviar.setDisabled( true ); + } + + butEnviar.setText( "Enviar para Técnico de HS>>" ); + break; + + case Global.FASE_SIPRP_CONCLUSAO: + if ( p.getObservacoes_dl() != null ) + { + if ( p.getObservacoes_dl().trim().length() > 0 ) + { + pg = new PanelGroup(); + gridObservacoes.getChildren().add( pg ); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Observações gerais DL: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( p.getObservacoes_dl() ); + pg.getChildren().add( st ); + } + } + + + if ( p.getObservacoes_dns() != null ) + { + if ( p.getObservacoes_dns().trim().length() > 0 ) + { + pg = new PanelGroup(); + gridObservacoes.getChildren().add( pg ); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Observações gerais DNS: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( p.getObservacoes_dns() ); + pg.getChildren().add( st ); + } + } + + if ( p.getValidacao_hs().booleanValue() == true ) + { + chkValidacao.setSelected( new Boolean( true ) ); + butEnviar.setDisabled( false ); + } + else + { + butEnviar.setDisabled( true ); + } + butEnviar.setText( "Concluir" ); + break; + } + + chkDesactivar.setSelected( Boolean.FALSE ); + gridLayout.getChildren().add( gridPlano ); + } + + private void showPlano( PlanoActuacao p ) + { + gridArea = new HtmlPanelGrid(); + gridArea.setId( "gridArea" ); + gridArea.setColumns( 1 ); + gridArea.setColumnClasses( "gridColCenter" ); + gridArea.setWidth( "100%" ); + gridArea.setStyle( "background-color: #f6f4e8; border: solid 1px #766c6c" ); + + gridPlano.getChildren().add( gridArea ); + + if ( p.getAreas().size() > 0 ) + { + Area a = p.getAreas().get( 0 ); + showArea( a ); + if ( a.getRiscos().size() > 0 ) + { + Risco r = a.getRiscos().get( 0 ); + showRisco( r ); + showValor( r ); + showResponsavel( r ); + } + } + showPreviousValidacoes( p ); + + Utilizador currentUser = getSessionBean1().getCurrentUser(); + if ( currentUser.getTipo().intValue() == Global.TECNICO_HS + || currentUser.getTipo().intValue() == Global.DIRECTOR_SIPRP ) + { + chkDesactivar.setId( "chkDesactivarPlano" ); + chkDesactivar.setLabel( "Desactivar Plano" ); + chkDesactivar.setSelected( p.getConcluidoPorDesactivacao() ); + chkDesactivar.setStyle( "float: left;" ); + gridPlano.getChildren().add( chkDesactivar ); + } + } + + private void showArea( Area a ) + { + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Área: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( Utils.unicodeToHTML( a.getDescricao() ) ); + pg.getChildren().add( st ); + gridArea.getChildren().add( pg ); + } + + private void showRisco( Risco r ) + { + System.out.println( "\nEditarPlano . showRisco() : " + r.getId() + " - " + r.getDescricao() ); + + getSessionBean1().setCurrentRisco( r ); + + String riscoText = "Risco" + ( r.getIsPatrimonial() ? " Patrimonial: " : ": " ); + + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setColumns( 1 ); + grd.setWidth( "100%" ); + + gridRisco = new HtmlPanelGrid(); + gridRisco.setWidth( "98%" ); + gridRisco.setColumns( 1 ); + gridRisco.setColumnClasses( "gridColLeft" ); + gridArea.getChildren().add( gridRisco ); + + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( riscoText ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( r.getDescricao() ); + pg.getChildren().add( st ); + gridRisco.getChildren().add( pg ); + } + + private void showValores(Risco r) + { + List valores = r.getValores(); + + for(Valor v : valores) + { + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setColumns(1); + grd.setColumnClasses("gridColLeft"); + grd.setWidth("100%"); + + gridValor = new HtmlPanelGrid(); + gridRisco.getChildren().add(gridValor); + gridValor.setWidth("100%"); + gridValor.setColumns(1); + gridValor.setColumnClasses("gridColLeft"); + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape(false); + st.setStyleClass("label"); + st.setText("Valor: "); + pg.getChildren().add(st); + st = new StaticText(); + st.setEscape(false); + st.setText(v.getValor().toString()); + pg.getChildren().add(st); + gridValor.getChildren().add(pg); + + showMedidas(r); + } + } + + private void showValor(Risco r) + { + getSessionBean1().setCurrentRisco(r); + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setColumns(1); + grd.setColumnClasses("gridColLeft"); + grd.setWidth("100%"); + + gridValor = new HtmlPanelGrid(); + gridRisco.getChildren().add(gridValor); + gridValor.setWidth("100%"); + gridValor.setColumns(1); + gridValor.setColumnClasses("gridColLeft"); + + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape(false); + st.setStyleClass("label"); + st.setText("Valor: "); + pg.getChildren().add(st); + st = new StaticText(); + st.setEscape(false); + if ( r.getValor() == null ) + { + st.setText("IND"); + } + else + { + st.setText(r.getValor().toString()); + } + + pg.getChildren().add( st ); + gridValor.getChildren().add( pg ); + + showMedidas( r ); + } + + private void showMedidas( Risco r ) + { + List< Medida > medidas = r.getMedidas(); + for ( Medida m : medidas ) + { + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setColumns( 1 ); + grd.setWidth( "100%" ); + grd.setStyleClass( "centerBlock" ); + gridValor.getChildren().add( grd ); + + gridMedida = new HtmlPanelGrid(); + gridMedida.setId( "gridMedida_" + m.getId() ); + gridMedida.setStyleClass("centerBlock"); + gridMedida.setWidth("98%"); + gridMedida.setColumns(1); + gridMedida.setColumnClasses("gridColLeft"); + grd.getChildren().add( gridMedida ); + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape(false); + st.setStyleClass("label"); + st.setText("Medida:  "); + pg.getChildren().add(st); + st = new StaticText(); + st.setEscape(false); + st.setText(m.getDescricao()); + pg.getChildren().add(st); + gridMedida.getChildren().add(pg); + + showPostos( m ); + + Utilizador u = getSessionBean1().getCurrentUser(); + PlanoActuacao planoActual = getSessionBean1().getPlanoActuacao(); + if ( planoActual.getFase().intValue() == Global.FASE_SIPRP_CONCLUSAO ) + { + List< EstadoMedida > opts = null; + try + { + PlanosDataProvider pdp = PlanosDataProvider.getInstance(); + opts = pdp.getEstadoMedidas(); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + + DropDown drop = new DropDown(); + Option opt[] = null; + if ( opts != null ) + { + opt = new Option[ (opts.size() + 1) ]; + opt[ 0 ] = new Option( 0, "" ); + for ( int i = 0; i < opts.size(); i++ ) + { + EstadoMedida em = opts.get( i ); + opt[ (i+1) ] = new Option( em.getId(), em.getDescricao() ); + } + } + else + { + opt = new Option[ 1 ]; + opt[ 0 ] = new Option( 0, "" ); + } + drop.setItems( opt ); + + drop.setId( "drop_" + r.getId() + "_" + m.getId() ); + drop.setSelected( m.getValidarMedidaId() == null ? 0 : m.getValidarMedidaId() ); + + StaticText dropLabel = new StaticText(); + dropLabel.setText( "Validar Medida: " ); + + PanelGroup valPG = new PanelGroup(); + valPG.setId( "valPG_" + m.getId() ); + valPG.getChildren().add( dropLabel ); + valPG.getChildren().add( drop ); + gridMedida.getChildren().add( valPG ); + } + } + + } + + private void showPostos( Medida m ) + { + List< PostoTrabalho > postos = m.getPostos(); + for ( PostoTrabalho p : postos ) + { + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setColumns(1); + grd.setWidth("100%"); + grd.setStyleClass("centerBlock"); + gridMedida.getChildren().add(grd); + + gridPosto = new HtmlPanelGrid(); + gridPosto.setStyleClass("centerBlock"); + gridPosto.setWidth("98%"); + gridPosto.setColumns(1); + gridPosto.setColumnClasses("gridColLeft"); + grd.getChildren().add(gridPosto); + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape(false); + st.setStyleClass("label"); + st.setText("Posto de trabalho:  "); + pg.getChildren().add(st); + st = new StaticText(); + st.setEscape(false); + st.setText(p.getDescricao()); + pg.getChildren().add( st ); + gridPosto.getChildren().add( pg ); + } + } + + private void showResponsavel( Risco r ) + { + System.out.println( "RISCO : " + r.getDescricao() + " RESPONSAVEL : " + r.getResponsavel_execucao() ); + + Utilizador u = getSessionBean1().getCurrentUser(); + gridResponsavel = new HtmlPanelGrid(); + gridResponsavel.setId( "gridResponsavel" ); + gridResponsavel.setWidth( "100%" ); + gridResponsavel.setColumns( 1 ); + gridResponsavel.setColumnClasses( "gridColLeft" ); + gridArea.getChildren().add( gridResponsavel ); + + pg = new PanelGroup(); + pg.setId( "pgResponsavel" ); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Responsável de execução:" ); + pg.getChildren().add( st ); + if ( u.getTipo().intValue() == Global.RESPONSAVEL_SEGURANCA ) + { + txtResponsavelExecucao = new TextField(); + txtResponsavelExecucao.setId( "txtResponsavel" ); + txtResponsavelExecucao.setColumns( 100 ); + txtResponsavelExecucao.setText( r.getResponsavel_execucao() ); + pg.getChildren().add( txtResponsavelExecucao ); + } + else + { + st = new StaticText(); + st.setEscape( false ); + st.setText( r.getResponsavel_execucao() ); + pg.getChildren().add( st ); + } + + st = new StaticText(); + st.setEscape( false ); + st.setText( " " ); + pg.getChildren().add( st ); + + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "POR:" ); + pg.getChildren().add( st ); + + if ( u.getTipo().intValue() == Global.RESPONSAVEL_SEGURANCA ) + { + txtPor = new TextField(); + txtPor.setId( "txtPor" ); + txtPor.setColumns( 20 ); + txtPor.setText( r.getPor() ); + pg.getChildren().add( txtPor ); + } + else + { + st = new StaticText(); + st.setEscape( false ); + st.setText( r.getPor() ); + pg.getChildren().add( st ); + } + + gridResponsavel.getChildren().add( pg ); + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Recursos necessários à implementação da medida: " ); + pg.getChildren().add( st ); + gridResponsavel.getChildren().add( pg ); + if ( u.getTipo().intValue() == Global.RESPONSAVEL_SEGURANCA ) + { + txtRecursos = new TextArea(); + txtRecursos.setId( "txtRecursos" ); + txtRecursos.setColumns( 200 ); + txtRecursos.setText( r.getRecursos_necessarios() ); + gridResponsavel.getChildren().add( txtRecursos ); + } + else + { + st = new StaticText(); + st.setEscape( false ); + st.setText( r.getRecursos_necessarios() ); + pg.getChildren().add( st ); + } + + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setColumns(2); + grd.setColumnClasses( "gridCol15, gridCol85" ); + grd.setId( "gridDtInicio" ); + grd.setStyle( "width: 100%" ); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Data prevista de início:" ); + grd.getChildren().add( st ); + if ( u.getTipo().intValue() == Global.RESPONSAVEL_SEGURANCA ) + { + dtInicio = new Calendar(); + dtInicio.setId( "dtInicio" ); + + dtInicio.setDateFormatPattern( "dd-MM-yyyy" ); + dtInicio.setValue( r.getData_inicio() ); + java.util.GregorianCalendar gcalendar = new java.util.GregorianCalendar(); + gcalendar.set( 2000, 1, 1 ); + dtInicio.setMinDate( gcalendar.getTime() ); + grd.getChildren().add( dtInicio ); + } + else + { + if ( r.getData_inicio() != null ) + { + st = new StaticText(); + st.setEscape( false ); + SimpleDateFormat formatter = new SimpleDateFormat( "dd/MM/yyyy" ); + String data_str = formatter.format( r.getData_inicio() ); + st.setText( data_str ); + grd.getChildren().add( st ); + } + } + + gridResponsavel.getChildren().add( grd ); + + grd = new HtmlPanelGrid(); + grd.setColumns( 2 ); + grd.setColumnClasses( "gridCol15, gridCol85" ); + grd.setId( "gridDtFim" ); + grd.setStyle( "width: 100%" ); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Data prevista de conclusão:" ); + grd.getChildren().add( st ); + if ( u.getTipo().intValue() == Global.RESPONSAVEL_SEGURANCA ) + { + dtFim = new Calendar(); + dtFim.setId("dtFim"); + dtFim.setDateFormatPattern("dd-MM-yyyy"); + java.util.GregorianCalendar gcalendar1 = new java.util.GregorianCalendar(); + gcalendar1.set(2099,1,1); + dtFim.setMaxDate(gcalendar1.getTime()); + dtFim.setValue(r.getData_fim()); + grd.getChildren().add(dtFim); + } + else + { + if(r.getData_fim() != null) + { + st = new StaticText(); + st.setEscape(false); + SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + String data_str = formatter.format(r.getData_fim()); + st.setText(data_str); + grd.getChildren().add(st); + } + } + + gridResponsavel.getChildren().add(grd); + + if ( u.getTipo().intValue() != Global.DIRECTOR_LOJA ) + { + if ( r.getParecer_dl() != null ) + { + if ( r.getParecer_dl().trim().length() > 0 ) + { + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Parecer Director de Loja: " ); + pg.getChildren().add( st ); + gridResponsavel.getChildren().add( pg ); + + st = new StaticText(); + st.setEscape( false ); + st.setText( r.getParecer_dl() ); + pg.getChildren().add( st ); + } + } + } + else + { + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape(false); + st.setStyleClass("label"); + st.setText("Parecer Director de Loja: "); + pg.getChildren().add(st); + gridResponsavel.getChildren().add(pg); + + txtParecerDl = new TextArea(); + txtParecerDl.setId("txtParecerDl"); + txtParecerDl.setColumns(200); + txtParecerDl.setText(r.getParecer_dl()); + gridResponsavel.getChildren().add(txtParecerDl); + } + + + if(u.getTipo().intValue() != Global.DIRECTOR_NACIONAL_SEGURANCA) + { + if(r.getParecer_dns() != null) + { + if(r.getParecer_dns().trim().length() > 0) + { + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape(false); + st.setStyleClass("label"); + st.setText("Parecer Director Nacional de Segurança: "); + pg.getChildren().add( st ); + gridResponsavel.getChildren().add( pg ); + + st = new StaticText(); + st.setEscape( false ); + st.setText( r.getParecer_dns() ); + pg.getChildren().add( st ); + } + } + } + else + { + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Parecer Director Nacional de Segurança: " ); + pg.getChildren().add( st ); + gridResponsavel.getChildren().add( pg ); + + txtParecerDns = new TextArea(); + txtParecerDns.setId( "txtParecerDns" ); + txtParecerDns.setColumns( 200 ); + txtParecerDns.setText( r.getParecer_dns() ); + gridResponsavel.getChildren().add( txtParecerDns ); + } + + //Verificacao SIPRP + if ( u.getTipo().intValue() != Global.TECNICO_HS ) + { + if ( r.getVerificacao_siprp() != null ) + { + if ( r.getVerificacao_siprp().trim().length() > 0 ) + { + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Verificação SIPRP: " ); + pg.getChildren().add( st ); + gridResponsavel.getChildren().add( pg ); + + st = new StaticText(); + st.setEscape( false ); + st.setText( r.getVerificacao_siprp() ); + pg.getChildren().add( st ); + } + } + } + else + { + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Verificação SIPRP: " ); + pg.getChildren().add( st ); + gridResponsavel.getChildren().add( pg ); + + txtVerificacaoSiprp = new TextArea(); + txtVerificacaoSiprp.setId( "txtVerificacaoSiprp" ); + txtVerificacaoSiprp.setColumns( 200 ); + txtVerificacaoSiprp.setText( r.getVerificacao_siprp() ); + gridResponsavel.getChildren().add( txtVerificacaoSiprp ); + } + + } + + private void showPreviousValidacoes( PlanoActuacao p ) + { + Utilizador u = getSessionBean1().getCurrentUser(); + int tipo = u.getTipo().intValue(); + + switch ( tipo ) + { + case Global.DIRECTOR_NACIONAL_SEGURANCA : + if ( p.getValidacao_director_loja().booleanValue() ) + { + StaticText st = new StaticText(); + st.setEscape( false ); + String nome = UtilizadoresLogic.getInstance().getNomeUtilizadorByID( p.getUser_dir_loja() ); + st.setText( "Validado por " + nome + " (Director de Loja) a " + p.getData_validacao_dir_loja_str() ); + gridValidacoes.getChildren().add( st ); + } + break; + case Global.TECNICO_HS : + if ( p.getValidacao_director_loja().booleanValue() ) + { + StaticText st = new StaticText(); + st.setEscape( false ); + String nome = UtilizadoresLogic.getInstance().getNomeUtilizadorByID( p.getUser_dir_loja() ); + st.setText( "Validado por " + nome + " (Director de Loja) a " + p.getData_validacao_dir_loja_str() ); + gridValidacoes.getChildren().add( st ); + } + + if ( p.getValidacao_dns().booleanValue() ) + { + StaticText st = new StaticText(); + st.setEscape( false ); + String nome = UtilizadoresLogic.getInstance().getNomeUtilizadorByID( p.getUser_dns() ); + st.setText( "Validado por " + nome + " (Director Nacional de Segurança) a " + p.getData_validacao_dns_str() ); + gridValidacoes.getChildren().add( st ); + } + break; + } + } + + private static final int MAX_PAGES_PER_LINE = 20; + + private void setPagination( PAGINATION_ENUM type ) + { + Class[] argtypes = new Class[ 1 ]; + argtypes[ 0 ] = ActionEvent.class; + MethodExpression me = ( MethodExpression ) this.getApplication().getExpressionFactory().createMethodExpression( + getFacesContext().getELContext(), "#{EditarPlano.paginacao_actionListener}", null, argtypes ); + + StaticText typeLabel = new StaticText(); + typeLabel.setText( type.getType() + ":" ); + gridPagination.getChildren().add( typeLabel ); + + PanelGroup group = new PanelGroup(); + + Risco currentRisco = getSessionBean1().getCurrentRisco(); + Pagination pagination = getSessionBean1().getPagination( type ); + List< Pagina > paginas = pagination.getPages( currentRisco ); + + for ( int p = 0; p < paginas.size(); p++ ) + { + Pagina pagina = paginas.get( p ); + + if ( p > 0 && p % MAX_PAGES_PER_LINE == 0 ) + { + gridPagination.getChildren().add( group ); + group = new PanelGroup(); + } + + if ( pagina.isPrevious() ) + { + pagina.addActionListener( new MethodExpressionActionListener( me ) ); + pagina.setPaginationType( type ); + group.getChildren().add( pagina ); + st = new StaticText(); + st.setEscape( false ); + st.setText( " " ); + group.getChildren().add( st ); + } + else if ( pagina.isNext() ) + { + st = new StaticText(); + st.setEscape( false ); + st.setText( " " ); + group.getChildren().add( st ); + pagina.addActionListener( new MethodExpressionActionListener( me ) ); + pagina.setPaginationType( type ); + group.getChildren().add( pagina ); + } + else + { + pagina.addActionListener( new MethodExpressionActionListener( me ) ); + pagina.setPaginationType( type ); + group.getChildren().add( pagina ); + if ( pagina.getPageNumber().intValue() < pagination.getTotalPages() ) + { + st = new StaticText(); + st.setEscape( false ); + st.setText( " | " ); + group.getChildren().add( st ); + } + } + } + + gridPagination.getChildren().add( group ); + } + + public String butGravarPlano_action() + { + String page = null; + try + { + page = gravarPlano(); + getSessionBean1().setMsg("Os dados do Plano de Actuação foram guardados"); + } + catch ( Exception ex ) + { + ErrorLogger.logException( new Exception( "Erro na gravacao do plano!" ) ); + ErrorLogger.logException( ex ); + getSessionBean1().setMsg("Erro na gravação do plano!"); + } + + return page; + } + + private String gravarPlano() throws Exception + { + String returnToPage = null; + PlanoActuacao p = getSessionBean1().getPlanoActuacao(); + int fase = p.getFase().intValue(); + switch ( fase ) + { + case Global.FASE_DIR_LOJA_VALIDACAO: + PanelGroup pg = (PanelGroup) gridObservacoes.findComponent("pgObsDl"); + if(pg != null) + { + TextArea txtObs = (TextArea) pg.findComponent("txtObservacoesDl"); + if(txtObs != null) + { + p.setObservacoes_dl(""); + if(txtObs.getText() != null) + { + p.setObservacoes_dl((String) txtObs.getText()); + } + } + } + + + Boolean validacao = (Boolean)chkValidacao.getSelected(); + if(validacao != null) + { + if(validacao.booleanValue()) + { + p.setValidacao_director_loja(new Boolean(true)); + } + } + break; + + case Global.FASE_DNS_PARECER: + pg = (PanelGroup) gridObservacoes.findComponent("pgObsDns"); + if(pg != null) + { + TextArea txtObs = (TextArea) pg.findComponent("txtObservacoesDns"); + if(txtObs != null) + { + p.setObservacoes_dns(""); + if(txtObs.getText() != null) + { + p.setObservacoes_dns((String) txtObs.getText()); + } + } + } + + validacao = (Boolean)chkValidacao.getSelected(); + if(validacao != null) + { + if(validacao.booleanValue()) + { + p.setValidacao_dns(new Boolean(true)); + } + } + break; + + case Global.FASE_SIPRP_CONCLUSAO: + validacao = (Boolean)chkValidacao.getSelected(); + if(validacao != null) + { + if(validacao.booleanValue()) + { + p.setValidacao_hs(new Boolean(true)); + } + } + } + + Utilizador currentUser = getSessionBean1().getCurrentUser(); + if ( currentUser.getTipo().intValue() == Global.TECNICO_HS + || currentUser.getTipo().intValue() == Global.DIRECTOR_SIPRP ) + { + Checkbox chkD = ( Checkbox ) gridPlano.findComponent( "form1:chkDesactivarPlano" ); + if ( chkD != null ) + { + Boolean desactivar = ( Boolean ) chkD.getSelected(); + if ( desactivar != null && desactivar ) + { + p.setFase( Global.FASE_CONCLUIDO ); + p.setConcluidoPorDesactivacao( Boolean.TRUE ); + returnToPage = "lista_planos"; + } + } + } + + PlanosDataProvider pdp = PlanosDataProvider.getInstance(); + pdp.updatePlano( p ); + + //Valor curValor = getSessionBean1().getCurrentValor(); + Risco curValor = getSessionBean1().getCurrentRisco(); + curValor = fillValorFields(curValor); +// getSessionBean1().getValoresHash().remove(curValor.getId()); +// getSessionBean1().getValoresHash().put(curValor.getId(), curValor); + getSessionBean1().getRiscosHash().remove(curValor.getId()); + getSessionBean1().getRiscosHash().put(curValor.getId(), curValor); + +// HashMap valores = getSessionBean1().getValoresHash(); +// Iterator iter = valores.keySet().iterator(); +// while(iter.hasNext()) +// { +// Integer id = iter.next(); +// Valor v = valores.get(id); +// pdp.updateValor(v); +// } + + HashMap valores = getSessionBean1().getRiscosHash(); + Iterator iter = valores.keySet().iterator(); + while(iter.hasNext()) + { + Integer id = iter.next(); + Risco r = valores.get(id); + pdp.updateRisco(r); + + if ( fase == Global.FASE_SIPRP_CONCLUSAO ) + { + pdp.updateMedidas( r ); + } + } + + return returnToPage; + } + + public String butGravarRisco_action() + { + PlanoActuacao p = getSessionBean1().getPlanoActuacao(); + int fase = p.getFase().intValue(); + switch ( fase ) + { + case Global.FASE_DIR_LOJA_VALIDACAO : + PanelGroup pg = ( PanelGroup ) gridObservacoes.findComponent( "pgObsDl" ); + if ( pg != null ) + { + TextArea txtObs = ( TextArea ) pg.findComponent( "txtObservacoesDl" ); + if ( txtObs != null ) + { + p.setObservacoes_dl( "" ); + if ( txtObs.getText() != null ) + { + p.setObservacoes_dl( ( String ) txtObs.getText() ); + } + } + } + + Boolean validacao = ( Boolean ) chkValidacao.getSelected(); + if ( validacao != null ) + { + if ( validacao.booleanValue() ) + { + p.setValidacao_director_loja( new Boolean( true ) ); + } + } + break; + + case Global.FASE_DNS_PARECER : + pg = ( PanelGroup ) gridObservacoes.findComponent( "pgObsDns" ); + if ( pg != null ) + { + TextArea txtObs = ( TextArea ) pg.findComponent( "txtObservacoesDns" ); + if ( txtObs != null ) + { + p.setObservacoes_dns( "" ); + if ( txtObs.getText() != null ) + { + p.setObservacoes_dns( ( String ) txtObs.getText() ); + } + } + } + + validacao = ( Boolean ) chkValidacao.getSelected(); + if ( validacao != null ) + { + if ( validacao.booleanValue() ) + { + p.setValidacao_dns( new Boolean( true ) ); + } + } + break; + + case Global.FASE_SIPRP_CONCLUSAO : + validacao = ( Boolean ) chkValidacao.getSelected(); + if ( validacao != null ) + { + if ( validacao.booleanValue() ) + { + p.setValidacao_hs( new Boolean( true ) ); + } + } + } + + try + { + PlanosDataProvider pdp = PlanosDataProvider.getInstance(); + pdp.updatePlano( p ); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + + try + { + Risco r = getSessionBean1().getCurrentRisco(); + r = fillValorFields( r ); + + PlanosDataProvider pdp = PlanosDataProvider.getInstance(); + pdp.updateRisco( r ); + if ( fase == Global.FASE_SIPRP_CONCLUSAO ) + { + pdp.updateMedidas( r ); + } + getSessionBean1().getRiscosHash().remove( r.getId() ); + getSessionBean1().getRiscosHash().put( r.getId(), r ); + +// Pagination pagination = getSessionBean1().getPagination(); + Pagination pagination = getSessionBean1().getPagination( r.getIsPatrimonial() ? PAGINATION_ENUM.PATRIMONIAIS : PAGINATION_ENUM.NORMAL ); + + r = pagination.getNextRisco(); + Area a = getSessionBean1().getAreasHash().get( r.getArea_id() ); + if ( r != null ) + { + gridArea = ( HtmlPanelGrid ) gridPlano.findComponent( "form1:gridArea" ); + if ( gridArea.getChildren() != null ) + { + gridArea.getChildren().clear(); + } + showArea( a ); + showRisco( r ); + showValor( r ); + showResponsavel( r ); + } + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + return null; + } + +// private void fillPlanoFields() +// { +// PlanoActuacao p = getSessionBean1().getPlanoActuacao(); +// +// int fase = p.getFase().intValue(); +// switch(fase) +// { +// case Global.FASE_DIR_LOJA_VALIDACAO: +// Boolean validacao = (Boolean)chkValidacao.getSelected(); +// p.setValidacao_hs(validacao); +// +// TextArea txtObs = (TextArea) pg.findComponent("txtObservacoesDl"); +// if(txtObs != null) +// { +// if(txtObs.getText() != null) +// { +// p.setObservacoes_dl((String) txtObs.getText()); +// } +// } +// break; +// +// case Global.DIRECTOR_NACIONAL_SEGURANCA: +// validacao = (Boolean)chkValidacao.getSelected(); +// p.setValidacao_hs(validacao); +// +// txtObs = (TextArea) pg.findComponent("txtObservacoesDns"); +// if(txtObs != null) +// { +// if(txtObs.getText() != null) +// { +// p.setObservacoes_dns((String) txtObs.getText()); +// } +// } +// break; +// +// case Global.FASE_SIPRP_CONCLUSAO: +// validacao = (Boolean)chkValidacao.getSelected(); +// p.setValidacao_hs(validacao); +// break; +// +// +// } +// } + + +// private Valor fillValorFields(Valor v) + private Risco fillValorFields( Risco r ) + { + //gridPlano = (HtmlPanelGrid) gridLayout.findComponent("form1:gridPlano"); + gridArea = (HtmlPanelGrid) gridPlano.findComponent("form1:gridArea"); + gridResponsavel = (HtmlPanelGrid) gridArea.findComponent("form1:gridResponsavel"); + + TextField txtResponsavel = (TextField) gridResponsavel.findComponent("form1:pgResponsavel:txtResponsavel"); + if(txtResponsavel != null) + { + if(txtResponsavel.getText() != null) + { + r.setResponsavel_execucao((String) txtResponsavel.getText()); + } + } + + TextField txtPor = (TextField) gridResponsavel.findComponent("form1:pgResponsavel:txtPor"); + if(txtPor != null) + { + if(txtPor.getText() != null) + { + r.setPor((String) txtPor.getText()); + } + } + + TextArea txtRecursos = (TextArea) gridResponsavel.findComponent("form1:txtRecursos"); + if(txtRecursos != null) + { + if(txtRecursos.getText() != null) + { + r.setRecursos_necessarios((String) txtRecursos.getText()); + } + } + + Calendar dtInicio = (Calendar) gridResponsavel.findComponent("form1:dtInicio:"); + if(dtInicio != null) + { + r.setData_inicio(dtInicio.getSelectedDate()); + } + + Calendar dtFim = (Calendar) gridResponsavel.findComponent("form1:dtFim"); + if(dtFim != null) + { + r.setData_fim(dtFim.getSelectedDate()); + } + + TextArea txtParecerDl = (TextArea) gridResponsavel.findComponent("form1:txtParecerDl"); + if(txtParecerDl != null) + { + if(txtParecerDl.getText() != null) + { + r.setParecer_dl((String) txtParecerDl.getText()); + } + } + + TextArea txtParecerDns = (TextArea) gridResponsavel.findComponent("form1:txtParecerDns"); + if(txtParecerDns != null) + { + if(txtParecerDns.getText() != null) + { + r.setParecer_dns((String) txtParecerDns.getText()); + } + } + + TextArea txtVerificacaoSiprp = (TextArea) gridResponsavel.findComponent("form1:txtVerificacaoSiprp"); + if(txtVerificacaoSiprp != null) + { + if(txtVerificacaoSiprp.getText() != null) + { + r.setVerificacao_siprp((String) txtVerificacaoSiprp.getText()); + } + } + + PlanoActuacao planoActual = getSessionBean1().getPlanoActuacao(); + if ( planoActual.getFase().intValue() == Global.FASE_SIPRP_CONCLUSAO ) + { + for( Medida m: r.getMedidas() ) + { + gridMedida = (HtmlPanelGrid) gridArea.findComponent("form1:gridMedida_" + m.getId() ); + if ( gridMedida != null ) + { + PanelGroup gridValPG = ( PanelGroup ) gridMedida.findComponent( "valPG_" + m.getId() ); + if ( gridValPG != null ) + { + DropDown drop = ( DropDown ) gridValPG.findComponent("drop_" + r.getId() + "_" + m.getId()); + if( drop != null ) + { + Integer optID = ( Integer ) drop.getSelected(); + m.setValidarMedidaId( optID.intValue() == 0 ? null : optID ); + } + } + } + } + } + + return r; + } + + public String butEnviar_action() + { + PlanoActuacao p = getSessionBean1().getPlanoActuacao(); + + if ( planoValidationOk( p ) ) + { + //Valor curValor = getSessionBean1().getCurrentValor(); + Risco curValor = getSessionBean1().getCurrentRisco(); + curValor = fillValorFields(curValor); + getSessionBean1().getRiscosHash().remove(curValor.getId()); + getSessionBean1().getRiscosHash().put(curValor.getId(), curValor); + if(!checkCamposObrigatorios()) + { + getSessionBean1().setMsg("Faltam preencher alguns riscos/valor. Por favor preencha todos os campos antes de prosseguir"); + return null; + } + try //save current valor + { +// Valor v = getSessionBean1().getCurrentValor(); +// v = fillValorFields(v); +// pdp.updateValor(v); + PlanosDataProvider pdp = PlanosDataProvider.getInstance(); + + HashMap valores = getSessionBean1().getRiscosHash(); + Iterator iter = valores.keySet().iterator(); + while(iter.hasNext()) + { + Integer id = iter.next(); + Risco r = valores.get(id); + pdp.updateRisco( r ); + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + try + { + processEnviar(p); + return "lista_planos"; + } + catch(Exception ex) + { + getSessionBean1().setMsg("Erro no envio do Plano"); + ErrorLogger.logException( ex ); + } + } + + return null; + } + + private boolean planoValidationOk( PlanoActuacao p ) + { + boolean ok = true; + boolean processo_validado = true; + int dns_next_fase = 2; + + int fase = p.getFase().intValue(); + p.setFase_anterior(new Integer(fase)); + switch ( fase ) + { + case Global.FASE_SEGURANCA_PREENCHIMENTO : + gridArea = (HtmlPanelGrid) gridPlano.findComponent("form1:gridArea"); + gridResponsavel = (HtmlPanelGrid) gridArea.findComponent("form1:gridResponsavel"); + HtmlPanelGrid gridDtInicio = (HtmlPanelGrid) gridResponsavel.findComponent("form1:gridDtInicio"); + Calendar calDtInicio = (Calendar) gridDtInicio.findComponent("form1:dtInicio"); + HtmlPanelGrid gridDtFim = (HtmlPanelGrid) gridResponsavel.findComponent("form1:gridDtFim"); + Calendar calDtFim = (Calendar) gridDtFim.findComponent("form1:dtFim"); + Date dtInicio = calDtInicio.getSelectedDate(); + Date dtFim = calDtFim.getSelectedDate(); + if(dtInicio != null && dtFim != null) + { + if ( dtInicio.after( dtFim ) ) + { + getSessionBean1().setMsg("Data Início não pode ser superior à data fim!"); + ok = false; + } + else + { + fase++; + } + } + if ( ok ) + { + p.setData_validacao_seg( new Date() ); + p.setUser_seg( getSessionBean1().getCurrentUser().getId() ); + } + + break; + + case Global.FASE_SIPRP_CONCLUSAO : + Boolean validacao = ( Boolean ) chkValidacao.getSelected(); + if ( validacao == null ) + { + processo_validado = false; + ok = false; + } + else + { + processo_validado = false; + if ( validacao.booleanValue() ) + { + processo_validado = true; + p.setValidacao_hs( new Boolean( true ) ); + Date today = new Date(); + p.setData_validacao_hs( today ); + p.setUser_hs( getSessionBean1().getCurrentUser().getId() ); + } + } + + if ( processo_validado ) + { + fase++; + } + else + { + getSessionBean1().setMsg("É necessário validar o processo antes de dar seguimento para a fase seguinte!"); + ok = false; + } + break; + + case Global.FASE_DIR_LOJA_VALIDACAO : + validacao = (Boolean)chkValidacao.getSelected(); + if(validacao == null) + { + processo_validado = false; + } + else + { + processo_validado = false; + if(validacao.booleanValue()) + { + processo_validado = true; + p.setValidacao_director_loja(new Boolean(true)); + p.setData_validacao_dir_loja( new Date() ); + p.setUser_dir_loja(getSessionBean1().getCurrentUser().getId()); + + PanelGroup pg = (PanelGroup) gridObservacoes.findComponent("pgObsDl"); + if(pg != null) + { + TextArea txtObs = (TextArea) pg.findComponent("txtObservacoesDl"); + if(txtObs != null) + { + p.setObservacoes_dl(""); + if(txtObs.getText() != null) + { + p.setObservacoes_dl((String) txtObs.getText()); + } + } + } + + } + } + + if(processo_validado) + { + fase++; + } + else + { + fase = Global.FASE_SEGURANCA_PREENCHIMENTO; //fase 2 + } + break; + + case Global.FASE_DNS_PARECER: + validacao = (Boolean)chkValidacao.getSelected(); + if(validacao == null) + { + processo_validado = false; + } + else + { + processo_validado = false; + if(validacao.booleanValue()) + { + processo_validado = true; + p.setValidacao_dns(new Boolean(true)); + Date today = new Date(); + p.setData_validacao_dns(today); + p.setUser_dns(getSessionBean1().getCurrentUser().getId()); + + PanelGroup pg = (PanelGroup) gridObservacoes.findComponent("pgObsDns"); + if(pg != null) + { + TextArea txtObs = (TextArea) pg.findComponent("txtObservacoesDns"); + if(txtObs != null) + { + p.setObservacoes_dns(""); + if(txtObs.getText() != null) + { + p.setObservacoes_dns((String) txtObs.getText()); + } + } + } + } + } + + if ( processo_validado ) + { + fase++; + } + else + { + getSessionBean1().setMsg("É necessário validar o processo antes de dar seguimento para a fase seguinte!"); + ok = false; + } + break; + } + + if ( ok ) + { + if ( p.getCorrecao().matches( "y" ) ) + { + fase = p.getFase_antes_correcao().intValue(); + p.setCorrecao( "n" ); + p.setObs_correcao( "" ); + } + p.setFase( new Integer( fase ) ); + } + + return ok; + } + + private boolean checkCamposObrigatorios() + { + boolean res = true; + HashMap valores = getSessionBean1().getRiscosHash(); + Iterator iter = valores.keySet().iterator(); + while(iter.hasNext()) + { + Integer id = iter.next(); +// Valor v = valores.get(id); + Risco r = valores.get(id); + if(r.getResponsavel_execucao() == null) + { + res = false; + break; + } + else if(r.getResponsavel_execucao().trim().length() == 0) + { + res = false; + break; + } + + if(r.getPor() == null) + { + res = false; + break; + } + else if(r.getPor().trim().length() == 0) + { + res = false; + break; + } + + if(r.getRecursos_necessarios() == null) + { + res = false; + break; + } + else if(r.getRecursos_necessarios().trim().length() == 0) + { + res = false; + break; + } + + if(r.getData_inicio() == null) + { + res = false; + break; + } + + if(r.getData_fim() == null) + { + res = false; + break; + } + } + return res; + } + + + private void processEnviar(PlanoActuacao p) throws Exception + { +// PlanosDataProvider pdp = new PlanosDataProvider(); + p.setObs_correcao(""); + PlanosDataProvider pdp = PlanosDataProvider.getInstance(); + pdp.updatePlano( p ); + enviarMail( p ); + } + + + public void enviarMail(PlanoActuacao p) + { +// UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); + Mail mail = new Mail(); + String assunto = ""; + String mail_text = ""; + + int fase = p.getFase().intValue(); + int tipo_utilizador = 0; + switch(fase) + { +// case Global.FASE_SIPRP_EMISSAO: +// break; + + case Global.FASE_SEGURANCA_PREENCHIMENTO: + if(p.getFase_anterior() == null ) + { + assunto = "PLANOS - SEGURANÇA (PREENCHIMENTO)"; + mail_text = "Notifica-se que o Plano passou para a fase Segurança(Preenchimento)"; + } + else + { + switch(p.getFase_anterior().intValue()) + { + case Global.FASE_DIR_LOJA_VALIDACAO: + tipo_utilizador = Global.DIRECTOR_LOJA; + assunto = "Plano de Actuação da Avaliação de Riscos de " + p.getData_visita_str() + " - Pedido de Correcção"; + mail_text = "

Exmo. (a) Senhor (a),

"; + mail_text += "

O Plano de Actuação referente à auditoria de Avaliação de Riscos Laborais realizada no passado dia " + p.getData_visita_str() + " foi devolvido para correcção.

"; + mail_text += "

Proceda, por favor, em www.siprp.com à(s) respectiva(s) correcção(ões) de acordo com as indicações e volte a reenviar o processo para a fase seguinte.

"; + mail_text += "

Caso tenha alguma dúvida ou necessite de qualquer esclarecimento, contacte, por favor, a Área Técnica da SIPRP através do telefone 213 504 540.

"; + mail_text += "

Cumprimentos,

"; + mail_text += "

A equipa da SIPRP

"; + mail_text += "

Por favor não responda a esta mensagem, dado tratar-se de um e-mail automático

"; + break; + } + } + break; + + case Global.FASE_DIR_LOJA_VALIDACAO: + tipo_utilizador = Global.DIRECTOR_LOJA; + assunto = "Plano de Actuação da Avaliação de Riscos de " + p.getData_visita_str(); + mail_text = "

Exmo. (a) Senhor (a),

"; + mail_text += "

Encontra-se disponível em www.siprp.com o Plano de Actuação referente à auditoria de "; + mail_text += "Avaliação de Riscos Laborais realizada no passado dia " + p.getData_visita_str() + " para que possa "; + mail_text += "validar a informação preenchida.

"; + mail_text += "

Cumprimentos.

"; + mail_text += "

Por favor não responda a esta mensagem, dado tratar-se de um e-mail automático

"; + + break; + + case Global.FASE_DNS_PARECER: + tipo_utilizador = Global.DIRECTOR_NACIONAL_SEGURANCA; + assunto = "Plano de Actuação da Avaliação de Riscos de " + p.getData_visita_str() + " - " + p.getNome_estabelecimento(); + mail_text = "

Exmo. Senhor Silvestre Machado,

"; + mail_text += "

Encontra-se disponível em www.siprp.com o Plano de Actuação referente à auditoria de Avaliação de Riscos Laborais realizada no passado dia " + p.getData_visita_str() + " para que o possa validar.

"; + mail_text += "

Cumprimentos.

"; + mail_text += "

Por favor não responda a esta mensagem, dado tratar-se de um e-mail automático

"; + break; + + case Global.FASE_SIPRP_CONCLUSAO: + tipo_utilizador = Global.TECNICO_HS; + assunto = "Plano de Actuação da Avaliação de Riscos de " + p.getData_visita_str() + " - " + p.getNome_estabelecimento(); + mail_text = "

Exmo. (a) Senhor (a),

"; + mail_text += "

Encontra-se disponível em www.siprp.com o Plano de Actuação referente à auditoria de Avaliação de Riscos Laborais realizada no passado dia " + p.getData_visita_str() + " para que possa efectuar a sua verificação.

"; + mail_text += "

Por favor não responda a esta mensagem, dado tratar-se de um e-mail automático

"; + break; + + case Global.FASE_CONCLUIDO: + assunto = "Plano de Actuação da Avaliação de Riscos de " + p.getData_visita_str() + " - " + p.getNome_estabelecimento() + " - Processo finalizado"; + mail_text = "

Exmo. (a) Senhor (a),

"; + mail_text += "

Encontra-se disponível em www.siprp.com o Plano de Actuação referente à auditoria de Avaliação de Riscos Laborais realizada no passado dia " + p.getData_visita_str() + " finalizado após verificação pelos Técnicos Superiores de Higiene e Segurança da SIPRP.

"; + mail_text += "

Aproveitamos para agradecer toda a disponibilidade e ficamos ao vosso dispor, caso tenha alguma dúvida ou necessite de qualquer esclarecimento, através do telefone 213 504 540.

"; + mail_text += "

Cumprimentos,

"; + mail_text += "

Por favor não responda a esta mensagem, dado tratar-se de um e-mail automático

"; + break; + } + + if(fase < Global.FASE_CONCLUIDO) // nao envia para ninguem na fase Concluido + { + String responsavel_loja = "n"; + if(tipo_utilizador == Global.RESPONSAVEL_SEGURANCA) + { + responsavel_loja = "y"; + } + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + List< Utilizador > list = udp.getUtilizadoresListByTipo(tipo_utilizador, responsavel_loja, p.getEstabelecimento_id()); + ListIterator iter = list.listIterator(); + while(iter.hasNext()) + { + Utilizador u = (Utilizador) iter.next(); + System.out.println("USER MAIL NEXT FASE : " + u.getLogin() + " ; " + u.getEmail()); + try + { + mail.send(u.getEmail(), Mail.ENDERECO_ENVIO, assunto, mail_text); + System.out.println("EMAIL ENVIADO !!"); + } + catch(Exception ex1) + { + ErrorLogger.logException( ex1 ); + System.out.println("MAIL ERROR : " + ex1.getMessage()); + } + + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + } + else //fase concluido + { + int[] users = new int[]{Global.RESPONSAVEL_SEGURANCA, Global.DIRECTOR_LOJA, Global.DIRECTOR_NACIONAL_SEGURANCA}; + for(int i=0; i < users.length; i++) + { + tipo_utilizador = users[i]; + + String responsavel_loja = "n"; + if(tipo_utilizador == Global.RESPONSAVEL_SEGURANCA) + { + responsavel_loja = "y"; + } + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + List< Utilizador > list = udp.getUtilizadoresListByTipo(tipo_utilizador, responsavel_loja, p.getEstabelecimento_id()); + ListIterator iter = list.listIterator(); + while(iter.hasNext()) + { + Utilizador u = (Utilizador) iter.next(); + System.out.println("USER MAIL NEXT FASE : " + u.getLogin() + " ; " + u.getEmail()); + try + { + mail.send(u.getEmail(), Mail.ENDERECO_ENVIO, assunto, mail_text); + System.out.println("EMAIL ENVIADO !!"); + } + catch(Exception ex1) + { + ErrorLogger.logException( ex1 ); + System.out.println("MAIL ERROR : " + ex1.getMessage()); + } + + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + } + } + +// catch(Exception ex) +// { +// //ErrorLogger.logException( ex ); +// } +// Mail mail = new Mail(); +// try +// { +// mail.send("lluis@evolute.pt", Mail.ENDERECO_ENVIO, assunto, mail_text); +// System.out.println("EMAIL ENVIADO !!"); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// System.out.println("ERRO NO ENVIO DO EMAIL !!"); +// } +// } + + + } + + public void chkValidacao_processValueChange(ValueChangeEvent event) { +// if(chkValidacao.getSelected() != null) +// { +// Boolean selected = (Boolean) chkValidacao.getSelected(); +// if(selected.booleanValue()) +// { +// //txtParecer.setRendered(true); +// gridParecer.setStyleClass("visible"); +// } +// else +// { +// //txtParecer.setRendered(false); +// gridParecer.setStyleClass("hidden"); +// } +// } +// else +// { +// //txtParecer.setRendered(false); +// gridParecer.setStyleClass("hidden"); +// } + } + + public void drpIrPara_processValueChange( ValueChangeEvent event ) + { + + } + + + private void getRiscosByPlano( PlanoActuacao p ) + { + HashMap areasHash = new HashMap(); + HashMap riscosHash = new HashMap(); + + for( Area a : p.getAreas() ) + { + areasHash.put( a.getId(), a ); + for ( Risco r : a.getRiscos() ) + { + riscosHash.put( r.getId(), r ); + } + } + + getSessionBean1().setAreasHash( areasHash ); + getSessionBean1().setRiscosHash( riscosHash ); + } + + private void fillValoresHash( PlanoActuacao p ) + { + HashMap< Integer, Risco > riscosHash = new HashMap< Integer, Risco >(); + for ( Area a : p.getAreas() ) + { + for ( Risco r : a.getRiscos() ) + { +// for(Valor v : r.getValores()) +// { +// valoresHash.put(v.getId(), v); +// } + riscosHash.put( r.getId(), r ); + } + } + //getSessionBean1().setValoresHash(valoresHash); + getSessionBean1().setRiscosHash( riscosHash ); + } + + public void paginacao_actionListener( ActionEvent e ) + { + Risco curValor = getSessionBean1().getCurrentRisco(); + curValor = fillValorFields( curValor ); + getSessionBean1().getRiscosHash().remove( curValor.getId() ); + getSessionBean1().getRiscosHash().put( curValor.getId(), curValor ); + + gridArea = ( HtmlPanelGrid ) gridPlano.findComponent( "form1:gridArea" ); + if ( gridArea.getChildren() != null ) + { + gridArea.getChildren().clear(); + } + Pagina pagina = ( Pagina ) e.getSource(); + PAGINATION_ENUM type = pagina.getPaginationType(); + +// Pagination pagination = getSessionBean1().getPagination(); + Pagination pagination = getSessionBean1().getPagination( type ); + if ( pagination != null ) + { + Risco r = pagination.getRisco( pagina ); + r = getSessionBean1().getRiscosHash().get( r.getId() ); + + Area a = getSessionBean1().getAreasHash().get( r.getArea_id() ); + showArea( a ); + showRisco( r ); + showValor( r ); + showResponsavel( r ); + } + } + + public String butCancelar_action() + { + return "lista_planos"; + } + + public String butLimparDados_action() + { + gridArea = (HtmlPanelGrid) gridPlano.findComponent("form1:gridArea"); + gridResponsavel = (HtmlPanelGrid) gridArea.findComponent("form1:gridResponsavel"); + PlanoActuacao p = getSessionBean1().getPlanoActuacao(); + int fase = p.getFase().intValue(); + switch(fase) + { + case Global.FASE_SEGURANCA_PREENCHIMENTO: + TextField txtResponsavel = (TextField) gridResponsavel.findComponent("form1:pgResponsavel:txtResponsavel"); + TextArea txtRecursos = (TextArea) gridResponsavel.findComponent("form1:txtRecursos"); + Calendar dtInicio = (Calendar) gridResponsavel.findComponent("form1:dtInicio:"); + Calendar dtFim = (Calendar) gridResponsavel.findComponent("form1:dtFim"); + txtResponsavel.setText(""); + txtRecursos.setText(""); + dtInicio.setValue(null); + dtFim.setValue(null); + break; + + case Global.FASE_DIR_LOJA_VALIDACAO: + TextArea txtParecerDl = (TextArea) gridResponsavel.findComponent("form1:txtParecerDl"); + txtParecerDl.setText(""); + PanelGroup pg = (PanelGroup) gridObservacoes.findComponent("pgObsDl"); + if(pg != null) + { + TextArea txtObs = (TextArea) pg.findComponent("txtObservacoesDl"); + txtObs.setText(""); + } + break; + + case Global.FASE_DNS_PARECER: + TextArea txtParecerDns = (TextArea) gridResponsavel.findComponent("form1:txtParecerDns"); + txtParecerDns.setText(""); + pg = (PanelGroup) gridObservacoes.findComponent("pgObsDns"); + if(pg != null) + { + TextArea txtObs = (TextArea) pg.findComponent("txtObservacoesDns"); + txtObs.setText(""); + } + break; + + case Global.FASE_SIPRP_CONCLUSAO: + TextArea txtVerificacaoSiprp = (TextArea) gridResponsavel.findComponent("form1:txtVerificacaoSiprp"); + txtVerificacaoSiprp.setText(""); + break; + } + + return null; + } + + public String butEnviarCorrecao_action() + { + System.out.println( "BUT ENVIAR CORRECAO" ); + return "enviar_correcao"; + } + +} + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/EnviarCorrecao.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/EnviarCorrecao.java new file mode 100644 index 00000000..12c1fb88 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/EnviarCorrecao.java @@ -0,0 +1,353 @@ +/* + * EnviarCorrecao.java + * + * Created on Nov 13, 2008, 11:26:00 AM + */ + +package planosactuacao; + +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.webui.jsf.component.Button; +import com.sun.webui.jsf.component.DropDown; +import com.sun.webui.jsf.component.StaticText; +import com.sun.webui.jsf.component.TextArea; +import com.sun.webui.jsf.model.Option; +import db.entidades.PlanoActuacao; +import db.entidades.Utilizador; +import db.providers.PlanosDataProvider; +import db.providers.UtilizadoresDataProvider; +import global.Global; +import java.util.List; +import java.util.ListIterator; +import javax.faces.FacesException; +import javax.faces.event.ValueChangeEvent; +import mail.Mail; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ * + * @author lluis + */ +public class EnviarCorrecao extends AbstractPageBean { + // + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + private StaticText lblMsg = new StaticText(); + + public StaticText getLblMsg() { + return lblMsg; + } + + public void setLblMsg(StaticText st) { + this.lblMsg = st; + } + private TextArea txtObservacoes = new TextArea(); + + public TextArea getTxtObservacoes() { + return txtObservacoes; + } + + public void setTxtObservacoes(TextArea ta) { + this.txtObservacoes = ta; + } + private DropDown drpIrPara = new DropDown(); + + public DropDown getDrpIrPara() { + return drpIrPara; + } + + public void setDrpIrPara(DropDown dd) { + this.drpIrPara = dd; + } + private Button butCancelar = new Button(); + + public Button getButCancelar() { + return butCancelar; + } + + public void setButCancelar(Button b) { + this.butCancelar = b; + } + private Button butEnviar = new Button(); + + public Button getButEnviar() { + return butEnviar; + } + + public void setButEnviar(Button b) { + this.butEnviar = b; + } + + //
+ + /** + *

Construct a new Page bean instance.

+ */ + public EnviarCorrecao() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + @Override + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + ErrorLogger.logException( e ); + log("EnviarCorrecao Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + @Override + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + @Override + public void prerender() { + initialize(); + lblMsg.setText(getSessionBean1().getMsg()); + getSessionBean1().setMsg(""); + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + @Override + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1) getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1) getBean("ApplicationBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1) getBean("RequestBean1"); + } + + public void drpIrPara_processValueChange(ValueChangeEvent event) { + } + + private void initialize() + { + Utilizador u = getSessionBean1().getCurrentUser(); + com.sun.webui.jsf.model.Option[] listOptions = null; + + if(u.getTipo().intValue() == Global.DIRECTOR_LOJA) + { + listOptions = new com.sun.webui.jsf.model.Option[1]; + listOptions[0] = new Option(new Integer(Global.FASE_SEGURANCA_PREENCHIMENTO), "Responsável de segurança"); + } + else if(u.getTipo().intValue() == Global.DIRECTOR_NACIONAL_SEGURANCA) + { + listOptions = new com.sun.webui.jsf.model.Option[2]; + listOptions[0] = new Option(new Integer(Global.FASE_SEGURANCA_PREENCHIMENTO), "Responsável de segurança"); + listOptions[1] = new Option(new Integer(Global.FASE_DIR_LOJA_VALIDACAO), "Director de loja"); + } + + getSessionBean1().setIrParaOptions(listOptions); + getSessionBean1().setIrParaChoice(new Integer( Global.FASE_SEGURANCA_PREENCHIMENTO )); + //drpIrPara.setItems(listOptions); + //drpIrPara.setSelected(new Integer( Global.FASE_SEGURANCA_PREENCHIMENTO )); + } + + public String butCancelar_action() +{ + return "editar_plano"; + } + + public String butEnviar_action() + { + Utilizador u = getSessionBean1().getCurrentUser(); +// PlanosDataProvider pdp = new PlanosDataProvider(); + PlanoActuacao p = getSessionBean1().getPlanoActuacao(); + p.setFase_anterior(p.getFase()); + int dns_next_fase = 0; + int fase = 0; + Integer irPara = (Integer)drpIrPara.getSelected(); + fase = irPara.intValue(); + if(u.getTipo().intValue() == Global.DIRECTOR_LOJA) + { + p.setValidacao_director_loja(new Boolean(false)); + } + else if(u.getTipo().intValue() == Global.DIRECTOR_NACIONAL_SEGURANCA) + { + p.setValidacao_dns(new Boolean(false)); + } + p.setCorrecao("y"); + p.setFase_antes_correcao(p.getFase()); + p.setFase(new Integer(fase)); + String observacoes = ""; + if(txtObservacoes.getText() != null) + { + if(u.getTipo().intValue() == Global.DIRECTOR_LOJA) + { + observacoes = "Observações do Director de Loja: "; + } + else if(u.getTipo().intValue() == Global.DIRECTOR_NACIONAL_SEGURANCA) + { + observacoes = "Observações do Director Nacional de Segurança: "; + } + observacoes += (String)txtObservacoes.getText(); + p.setObs_correcao(observacoes); + } + try + { + PlanosDataProvider pdp = PlanosDataProvider.getInstance(); + pdp.updatePlano( p ); + enviarMail( p ); + return "lista_planos"; + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + getSessionBean1().setMsg("Erro no envio do plano para a fase " + Global.FASES_TEXTO[fase-1]); + } + return null; + } + + private void enviarMail(PlanoActuacao p) + { + String assunto = ""; + String mail_text = ""; + + int fase = p.getFase().intValue(); + int tipo_utilizador = 0; + switch(fase) + { + case Global.FASE_SEGURANCA_PREENCHIMENTO: + tipo_utilizador = Global.RESPONSAVEL_SEGURANCA; + assunto = "Plano de Actuação da Avaliação de Riscos de " + p.getData_visita_str() + " - Pedido de Correcção"; + mail_text = "

Exmo. (a) Senhor (a),

"; + mail_text += "

O Plano de Actuação referente à auditoria de Avaliação de Riscos Laborais realizada no passado dia " + p.getData_visita_str() + " foi devolvido para correcção.

"; + mail_text += "

Proceda, por favor, em www.siprp.com à(s) respectiva(s) correcção(ões) de acordo com as indicações e volte a reenviar o processo para a fase seguinte.

"; + mail_text += "

Caso tenha alguma dúvida ou necessite de qualquer esclarecimento, contacte, por favor, a Área Técnica da SIPRP através do telefone 213 504 540.

"; + mail_text += "

Cumprimentos,

"; + mail_text += "

A equipa da SIPRP

"; + mail_text += "

Por favor não responda a esta mensagem, dado tratar-se de um e-mail automático

"; + break; + + case Global.FASE_DIR_LOJA_VALIDACAO: + tipo_utilizador = Global.DIRECTOR_LOJA; + assunto = "Plano de Actuação da Avaliação de Riscos de " + p.getData_visita_str() + " - Pedido de Correcção"; + mail_text = "

Exmo. (a) Senhor (a),

"; + mail_text += "

O Plano de Actuação referente à auditoria de Avaliação de Riscos Laborais realizada no passado dia " + p.getData_visita_str() + " foi devolvido para correcção.

"; + mail_text += "

Proceda, por favor, em www.siprp.com à(s) respectiva(s) correcção(ões) de acordo com as indicações do Director Nacional de Segurança e volte a reenviar o processo para a fase seguinte.

"; + mail_text += "

Cumprimentos.

"; + mail_text += "

Por favor não responda a esta mensagem, dado tratar-se de um e-mail automático

"; + break; + } + + Mail mail = new Mail(); + +// UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); + String responsavel_loja = "n"; + if(tipo_utilizador == Global.RESPONSAVEL_SEGURANCA) + { + responsavel_loja = "y"; + } + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + List< Utilizador > list = udp.getUtilizadoresListByTipo(tipo_utilizador, responsavel_loja, p.getEstabelecimento_id()); + ListIterator iter = list.listIterator(); + while(iter.hasNext()) + { + Utilizador u = (Utilizador) iter.next(); + System.out.println("USER MAIL NEXT FASE : " + u.getLogin() + " ; " + u.getEmail()); + try + { + mail.send(u.getEmail(), Mail.ENDERECO_ENVIO, assunto, mail_text); + System.out.println("EMAIL ENVIADO !!"); + } + catch(Exception ex1) + { + ErrorLogger.logException( ex1 ); + System.out.println("MAIL ERROR : " + ex1.getMessage()); + } + + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + } + +} + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Erro.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Erro.java new file mode 100644 index 00000000..895eaa51 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Erro.java @@ -0,0 +1,153 @@ +/* + * Erro.java + * + * Created on Aug 26, 2008, 10:54:11 AM + */ + +package planosactuacao; + +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.webui.jsf.component.StaticText; +import javax.faces.FacesException; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ * + * @author lluis + */ +public class Erro extends AbstractPageBean { + // + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + private StaticText txtMsg = new StaticText(); + + public StaticText getTxtMsg() { + return txtMsg; + } + + public void setTxtMsg(StaticText st) { + this.txtMsg = st; + } + + //
+ + /** + *

Construct a new Page bean instance.

+ */ + public Erro() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + @Override + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + ErrorLogger.logException( e ); + log("Erro Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + @Override + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + @Override + public void prerender() { + txtMsg.setText( getSessionBean1().getMsg() ); + getSessionBean1().setMsg(""); + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + @Override + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1) getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1) getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1) getBean("ApplicationBean1"); + } + +} + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Footer.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Footer.java new file mode 100644 index 00000000..1f529e12 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Footer.java @@ -0,0 +1,141 @@ +/* + * Footer.java + * + * Created on Oct 6, 2008, 3:01:32 PM + */ + +package planosactuacao; + +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import javax.faces.FacesException; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ * + * @author lluis + */ +public class Footer extends AbstractPageBean { + // + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + + //
+ + /** + *

Construct a new Page bean instance.

+ */ + public Footer() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + @Override + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + ErrorLogger.logException( e ); + log("Footer Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + @Override + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + @Override + public void prerender() { + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + @Override + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1) getBean("ApplicationBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1) getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1) getBean("SessionBean1"); + } + +} + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Header.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Header.java new file mode 100644 index 00000000..12bba90c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Header.java @@ -0,0 +1,246 @@ +/* + * Header.java + * + * Created on Oct 6, 2008, 10:35:36 AM + */ + +package planosactuacao; + +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractFragmentBean; +import com.sun.webui.jsf.component.ImageComponent; +import com.sun.webui.jsf.component.StaticText; +import db.entidades.Utilizador; +import global.Global; +import javax.faces.FacesException; +import javax.faces.context.FacesContext; +import utils.JSFHTTPUtils; +import utils.JSFUtils; + +/** + *

Fragment bean that corresponds to a similarly named JSP page + * fragment. This class contains component definitions (and initialization + * code) for all components that you have defined on this fragment, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ * + * @author lluis + */ +public class Header extends AbstractFragmentBean { + // + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + private StaticText stDataPlano = new StaticText(); + + public StaticText getStDataPlano() { + return stDataPlano; + } + + public void setStDataPlano(StaticText st) { + this.stDataPlano = st; + } + private ImageComponent imgLogoEmpresa = new ImageComponent(); + + public ImageComponent getImgLogoEmpresa() { + return imgLogoEmpresa; + } + + public void setImgLogoEmpresa(ImageComponent ic) { + this.imgLogoEmpresa = ic; + } + //
+ + public Header() { + } + + /** + *

Callback method that is called whenever a page containing + * this page fragment is navigated to, either directly via a URL, + * or indirectly via page navigation. Override this method to acquire + * resources that will be needed for event handlers and lifecycle methods.

+ * + *

The default implementation does nothing.

+ */ + @Override + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + FacesContext fc = getFacesContext(); + String referer = JSFHTTPUtils.getReferer(fc); + System.out.println("HEADER - REFERER : " + referer); + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + ErrorLogger.logException( e ); + log("Page1 Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called. Override this + * method to release resources acquired in the init() + * resources that will be needed for event handlers and lifecycle methods.

+ * + *

The default implementation does nothing.

+ */ + @Override + public void destroy() { + } + + public String lnkLogout_action() + { + FacesContext fc = getFacesContext(); + try + { + JSFUtils.logout( fc ); + try + { + JSFUtils.redirect( fc, Global.ANALISE_ACIDENTES_URL + "Login.jsp" ); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + return null; + } + + public String lnkAnaliseAcidentes_action() + { + FacesContext fc = getFacesContext(); + SessionBean1 session = JSFUtils.getSessionBean(fc); + Utilizador u = session.getCurrentUser(); + + String url = Global.ANALISE_ACIDENTES_URL; + int tipo = u.getTipo().intValue(); + switch(tipo) + { + case Global.RESPONSAVEL_SEGURANCA: + url += "FormSeguranca.jsp?user=" + u.getId().intValue(); + break; + + case Global.RH: + url += "FormRH.jsp?user=" + u.getId().intValue(); + break; + + case Global.TECNICO_HS: + url += "FormHS.jsp?user=" + u.getId().intValue(); + break; + + case Global.GESTOR: + url += "FormGestor.jsp?user=" + u.getId().intValue(); + break; + + case Global.DIRECTOR_LOJA: + url += "FormGestor.jsp?user=" + u.getId().intValue(); + break; + case Global.DIRECTOR_GERAL_RH: + url += "FormDirGerRh.jsp?user=" + u.getId().intValue(); + break; + + case Global.DIRECTOR_SIPRP: + url += "FormDirSiprp.jsp?user=" + u.getId().intValue(); + break; + + case Global.DIRECTOR_NACIONAL_SEGURANCA: + url += "FormGestor.jsp?user=" + u.getId().intValue(); + break; + } + + try + { + JSFUtils.redirect(fc.getCurrentInstance(), url); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + return null; + } + + public String lnkPlanosActuacao1_action() { + // TODO: Process the action. Return value is a navigation + // case name where null will return to the same page. + return "lista_planos"; + } + + public String lnkGerirUtilizadores1_action() { + // TODO: Process the action. Return value is a navigation + // case name where null will return to the same page. + FacesContext fc = getFacesContext(); + SessionBean1 session = JSFUtils.getSessionBean(fc); + Utilizador u = session.getCurrentUser(); + + String url = Global.ANALISE_ACIDENTES_URL; + //int tipo = u.getTipo().intValue(); + + url += "GestaoUtilizadores.jsp?user=" + u.getId().intValue(); + try + { + JSFUtils.redirect(fc.getCurrentInstance(), url); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + return null; + } + + public String lnkDadosUtilizador1_action() { + // TODO: Process the action. Return value is a navigation + // case name where null will return to the same page. + FacesContext fc = getFacesContext(); + SessionBean1 session = JSFUtils.getSessionBean(fc); + Utilizador u = session.getCurrentUser(); + + String url = Global.ANALISE_ACIDENTES_URL; + int tipo = u.getTipo().intValue(); + + url += "FichaUtilizador.jsp?user=" + u.getId().intValue() + "&mode=edit"; + try + { + JSFUtils.redirect(fc.getCurrentInstance(), url); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + + return null; + } + + public String lnkAjuda_action() { + // TODO: Process the action. Return value is a navigation + // case name where null will return to the same page. + return "planos_actuacao_ajuda.pdf"; + } + + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/ListaPlanos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/ListaPlanos.java new file mode 100644 index 00000000..758b2bd5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/ListaPlanos.java @@ -0,0 +1,1010 @@ +/* + * ListaPlanos.java + * + * Created on Aug 29, 2008, 2:57:16 PM + */ + +package planosactuacao; + +import com.evolute.utils.date.DateUtils; +import com.evolute.utils.error.ErrorLogger; +import com.sun.data.provider.RowKey; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.webui.jsf.component.Button; +import com.sun.webui.jsf.component.PanelGroup; +import com.sun.webui.jsf.component.Table; +import com.sun.webui.jsf.component.TableColumn; +import com.sun.webui.jsf.component.TableRowGroup; +import com.sun.webui.jsf.component.TextField; +import db.entidades.PlanoActuacao; +import db.entidades.Utilizador; +import db.providers.PlanosDataProvider; +import global.Global; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import javax.faces.context.FacesContext; +import javax.servlet.http.HttpServletResponse; +import shst.higiene.planoactuacao.print.PlanoActuacaoPDFCreator; +import tabledataproviders.PlanosActualDataProvider; +import tabledataproviders.PlanosConcluidosDataProvider; +import tabledataproviders.PlanosSeguimentoDataProvider; +import utils.JSFUtils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ * + * @author lluis + */ +public class ListaPlanos extends AbstractPageBean +{ + // + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + private Table table1 = new Table(); + + public Table getTable1() { + return table1; + } + + public void setTable1(Table t) { + this.table1 = t; + } + private TableRowGroup tableRowGroup1 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup1() { + return tableRowGroup1; + } + + public void setTableRowGroup1(TableRowGroup trg) { + this.tableRowGroup1 = trg; + } + private TableRowGroup tableRowGroup2 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup2() { + return tableRowGroup2; + } + + public void setTableRowGroup2(TableRowGroup trg) { + this.tableRowGroup2 = trg; + } + private TableRowGroup tableRowGroup3 = new TableRowGroup(); + + public TableRowGroup getTableRowGroup3() { + return tableRowGroup3; + } + + public void setTableRowGroup3(TableRowGroup trg) { + this.tableRowGroup3 = trg; + } + + + private HtmlPanelGrid gridActual = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridActual() { + return gridActual; + } + + public void setGridActual(HtmlPanelGrid hpg) { + this.gridActual = hpg; + } + + private TableColumn tableColumn55 = new TableColumn(); + + public TableColumn getTableColumn55() + { + return tableColumn55; + } + + public void setTableColumn55( TableColumn c ) + { + this.tableColumn55 = c; + } + + private Button buttonDesactivar = new Button(); + + public Button getButtonDesactivar() { + return buttonDesactivar; + } + + public void setButtonDesactivar( Button b ) { + this.buttonDesactivar = b; + } + + + private TableColumn tableColumn56 = new TableColumn(); + + public TableColumn getTableColumn56() + { + return tableColumn56; + } + + public void setTableColumn56( TableColumn c ) + { + this.tableColumn56 = c; + } + + private Button buttonDesactivarSeguimento = new Button(); + + public Button getButtonDesactivarSeguimento() { + return buttonDesactivarSeguimento; + } + + public void setButtonDesactivarSeguimento( Button b ) { + this.buttonDesactivarSeguimento = b; + } + + private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanelFilterActual() + { + return this.gridPanelFilterActual; + } + public void setGridPanelFilterActual( HtmlPanelGrid pg ) + { + this.gridPanelFilterActual = pg; + } + + private PanelGroup groupPanelFilterActual = new PanelGroup(); + public PanelGroup getGroupPanelFilterActual() + { + return this.groupPanelFilterActual; + } + public void setGroupPanelFilterActual( PanelGroup pg ) + { + this.groupPanelFilterActual = pg; + } + + private TextField textFilterNameActual = new TextField(); + public TextField getTextFilterNameActual() + { + return this.textFilterNameActual; + } + public void setTextFilterNameActual( TextField tf ) + { + this.textFilterNameActual = tf; + } + + private TextField textFilterEstabelecimentoActual = new TextField(); + + public TextField getTextFilterEstabelecimentoActual() { + return textFilterEstabelecimentoActual; + } + public void setTextFilterEstabelecimentoActual(TextField textFilterEstabelecimentoActual) { + this.textFilterEstabelecimentoActual = textFilterEstabelecimentoActual; + } + + private com.sun.webui.jsf.component.Calendar calFilterDateActual = new com.sun.webui.jsf.component.Calendar(); + public com.sun.webui.jsf.component.Calendar getCalFilterDateActual() { + return calFilterDateActual; + } + public void setCalFilterDateActual(com.sun.webui.jsf.component.Calendar calFilterDateActual) { + this.calFilterDateActual = calFilterDateActual; + } + + private Button buttonFilterActual = new Button(); + public Button getButtonFilterActual() + { + return this.buttonFilterActual; + } + public void setButtonFilterActual( Button b ) + { + this.buttonFilterActual = b; + } + + + + private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanelFilterSeg() + { + return this.gridPanelFilterSeg; + } + public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + { + this.gridPanelFilterSeg = pg; + } + + private PanelGroup groupPanelFilterSeg = new PanelGroup(); + public PanelGroup getGroupPanelFilterSeg() + { + return this.groupPanelFilterSeg; + } + public void setGroupPanelFilterSeg( PanelGroup pg ) + { + this.groupPanelFilterSeg = pg; + } + + private TextField textFilterNameSeg = new TextField(); + public TextField getTextFilterNameSeg() + { + return this.textFilterNameSeg; + } + public void setTextFilterNameSeg( TextField tf ) + { + this.textFilterNameSeg = tf; + } + + private TextField textFilterEstabelecimentoSeg = new TextField(); + + public TextField getTextFilterEstabelecimentoSeg() { + return textFilterEstabelecimentoSeg; + } + public void setTextFilterEstabelecimentoSeg(TextField textFilterEstabelecimentoSeg) { + this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg; + } + + private com.sun.webui.jsf.component.Calendar calFilterDateSeg = new com.sun.webui.jsf.component.Calendar(); + public com.sun.webui.jsf.component.Calendar getCalFilterDateSeg() { + return calFilterDateSeg; + } + public void setCalFilterDateSeg(com.sun.webui.jsf.component.Calendar calFilterDateSeg) { + this.calFilterDateSeg = calFilterDateSeg; + } + + private Button buttonFilterSeg = new Button(); + public Button getButtonFilterSeg() + { + return this.buttonFilterSeg; + } + public void setButtonFilterSeg( Button b ) + { + this.buttonFilterSeg = b; + } + + + private HtmlPanelGrid gridPanelFilterConc = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanelFilterConc() + { + return this.gridPanelFilterConc; + } + public void setGridPanelFilterConc( HtmlPanelGrid pg ) + { + this.gridPanelFilterConc = pg; + } + + private PanelGroup groupPanelFilterConc = new PanelGroup(); + public PanelGroup getGroupPanelFilterConc() + { + return this.groupPanelFilterConc; + } + public void setGroupPanelFilterConc( PanelGroup pg ) + { + this.groupPanelFilterConc = pg; + } + + private TextField textFilterNameConc = new TextField(); + public TextField getTextFilterNameConc() + { + return this.textFilterNameConc; + } + public void setTextFilterNameConc( TextField tf ) + { + this.textFilterNameConc = tf; + } + + private TextField textFilterEstabelecimentoConc = new TextField(); + + public TextField getTextFilterEstabelecimentoConc() { + return textFilterEstabelecimentoConc; + } + public void setTextFilterEstabelecimentoConc(TextField textFilterEstabelecimentoConc) { + this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc; + } + + private com.sun.webui.jsf.component.Calendar calFilterDateConc = new com.sun.webui.jsf.component.Calendar(); + public com.sun.webui.jsf.component.Calendar getCalFilterDateConc() { + return calFilterDateConc; + } + public void setCalFilterDateConc(com.sun.webui.jsf.component.Calendar calFilterDateConc) { + this.calFilterDateConc = calFilterDateConc; + } + + private Button buttonFilterConc = new Button(); + public Button getButtonFilterConc() + { + return this.buttonFilterConc; + } + public void setButtonFilterConc( Button b ) + { + this.buttonFilterConc = b; + } + + private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + //
+ + + /** + *

Construct a new Page bean instance.

+ */ + public ListaPlanos() { + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + @Override + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + ErrorLogger.logException( e ); + log("ListaPlanos Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + @Override + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + @Override + public void prerender() + { + System.out.println("LISTA PLANOS - PRERENDER"); + + Utilizador u = getSessionBean1().getCurrentUser(); + System.out.println( "\tUser Logged In : " + ( u == null ? "NONE !" : "[" + u.getId() + "] : " + u.getLogin() ) ); + + FacesContext fc = getFacesContext(); + String estab_gestor = JSFUtils.getRequestParameter( fc, "estab_gestor" ); + + if ( u != null ) + { + if ( u.getTipo() != null && u.getTipo().intValue() == Global.GESTOR ) + { + try + { + Integer estabelecimento_gestor = new Integer(Integer.parseInt(estab_gestor)); + System.out.println("ESTABELECIMENTO GESTOR : " + estabelecimento_gestor.intValue()); + u.setEstabelecimento_gestor(estabelecimento_gestor); + } catch (Exception ex2) + { + ErrorLogger.logException(ex2); + } + } + + if (u.getTipo().intValue() == Global.DIRECTOR_SIPRP || u.getTipo().intValue() == Global.RH || u.getTipo().intValue() == Global.DIRECTOR_GERAL_RH || u.getTipo().intValue() == Global.GESTOR) + { + gridActual.setRendered( false ); + tableRowGroup2.setEmptyDataMsg( "Sem registos" ); + tableRowGroup3.setEmptyDataMsg( "Sem registos" ); + } + + if (u.getTipo().intValue() != Global.DIRECTOR_SIPRP && u.getTipo().intValue() != Global.RH && u.getTipo().intValue() != Global.DIRECTOR_GERAL_RH) + { + getSessionBean1().setDisableMenuUtilizadores( true ); + tableRowGroup1.setEmptyDataMsg( "Sem registos" ); + tableRowGroup2.setEmptyDataMsg( "Sem registos" ); + tableRowGroup3.setEmptyDataMsg( "Sem registos" ); + } + + //Column para desactivar plano - mostra se o utilizador for DIRECTOR SIPRP + int uType = u.getTipo().intValue(); + boolean renderOrNot = uType == Global.DIRECTOR_SIPRP || uType == Global.TECNICO_HS; + tableColumn55.setRendered(renderOrNot); + buttonDesactivar.setRendered(renderOrNot); + + tableColumn56.setRendered(renderOrNot); + buttonDesactivarSeguimento.setRendered(renderOrNot); + + initialize(); + } + else + { + getSessionBean1().setMsg("Utilizador inválido."); + } + + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + @Override + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1) getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1) getBean("ApplicationBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1) getBean("SessionBean1"); + } + + public String hyperlink1_action() { + // TODO: Process the action. Return value is a navigation + // case name where null will return to the same page. + return "editar_plano"; + } + + public String goDesactivarPlano_action() + { + System.out.println( "\ngoDesactivarPlano_action():" ); + PlanoActuacao p = getTableActivosRowData(); + desactivarPlano( p ); +// System.out.println( "\tPlanoActuacao: " + p.getId() ); + return null; + } + + public String goDesactivarPlanoSeguimento_action() + { + System.out.println( "\ngoDesactivarPlanoSeguimento_action():" ); + PlanoActuacao p = getTableSeguimentoRowData(); + desactivarPlano( p ); +// System.out.println( "\tPlanoActuacao: " + p.getId() ); + return null; + } + + private void desactivarPlano( PlanoActuacao p ) + { + Utilizador currentUser = getSessionBean1().getCurrentUser(); + if ( currentUser.getTipo().intValue() == Global.DIRECTOR_SIPRP || currentUser.getTipo().intValue() == Global.TECNICO_HS ) + { + p.setFase( Global.FASE_CONCLUIDO ); + p.setConcluidoPorDesactivacao( Boolean.TRUE ); + p.setDataDesactivacao( new Date() ); + try + { + PlanosDataProvider pdp = PlanosDataProvider.getInstance(); + pdp.updatePlano( p ); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + } + } + + + public String goEditarPlano_action() { + // TODO: Process the action. Return value is a navigation + // case name where null will return to the same page. + PlanoActuacao p = getTableActivosRowData(); + getSessionBean1().setPlanoActuacao(p); + + + //showPlano(p); + //dummy + //getSessionBean1().setFase(2); + return "editar_plano"; + } + + public String goVerPlanoFromSeguimento_action(){ + PlanoActuacao p = getTableSeguimentoRowData(); + getSessionBean1().setPlanoActuacao(p); + return "ver_plano"; + } + + public String goVerPlanoFromConcluidos_action(){ + PlanoActuacao p = getTableConcluidosRowData(); + getSessionBean1().setPlanoActuacao(p); + return "ver_plano"; + } + + //**** IMPRIMIR PLANO SEM RISCOS PATRIMONIAIS ****// + public String goImprimirPlano_action() + { + PlanoActuacao p = getTableActivosRowData(); + createPdf( p.getId() ); + return null; + } + + public String goImprimirPlanoFromSeguimento_action() + { + PlanoActuacao p = getTableSeguimentoRowData(); + createPdf( p.getId() ); + return null; + } + + public String goImprimirPlanoFromConcluidos_action() + { + Utilizador currentUser = getSessionBean1().getCurrentUser(); + int userType = currentUser == null ? -1 : currentUser.getTipo(); + + PlanoActuacao p = getTableConcluidosRowData(); + if ( ! p.getConcluidoPorDesactivacao() || ( userType == Global.DIRECTOR_SIPRP ) ) + { + createPdf( p.getId() ); + } + return null; + } + + + //*** IMPRIMIR PLANO COM RISCOS PATRIMONIAIS ***// + public String goImprimirPlanoPatrimoniais_action() + { + PlanoActuacao p = getTableActivosRowData(); + createPdf( p.getId(), true ); + return null; + } + + public String goImprimirPlanoSeguimentoPatrimoniais_action() + { + PlanoActuacao p = getTableSeguimentoRowData(); + createPdf( p.getId(), true ); + return null; + } + + public String goImprimirPlanoConcluidoPatrimoniais_action() + { + Utilizador currentUser = getSessionBean1().getCurrentUser(); + int userType = currentUser == null ? -1 : currentUser.getTipo(); + + PlanoActuacao p = getTableConcluidosRowData(); + if ( ! p.getConcluidoPorDesactivacao() || ( userType == Global.DIRECTOR_SIPRP ) ) + { + createPdf( p.getId(), true ); + } + return null; + } + + + + private void createPdf( Integer pID ) + { + createPdf( pID, false ); + } + + private void createPdf( Integer pID, boolean withPatrimoniais ) + { + try + { + PlanoActuacaoPDFCreator pdfCreator = new PlanoActuacaoPDFCreator(); + + System.out.println( "CREATING PDF ..." ); + byte[] pdf = pdfCreator.createPDF( pID, true, withPatrimoniais ); + System.out.println( "\t.. DONE !" ); + showPdf( pdf, withPatrimoniais ); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + System.out.println( "\n\tError creating PDF : " + ex.getMessage() ); + } + } + + private void showPdf( byte[] pdf, boolean isPatrimoniais ) throws Exception + { + String filename = isPatrimoniais ? "Plano_Patrimoniais.pdf" : "Plano.pdf"; + System.out.println( "\nPDF LEN : " + pdf.length ); + System.out.println( "FileName : " + filename ); + + FacesContext context = FacesContext.getCurrentInstance(); + HttpServletResponse response = ( HttpServletResponse ) context.getExternalContext().getResponse(); + + response.setHeader( "Expires", "0" ); + response.setHeader( "Cache-Control", "must-revalidate, post-check=0, pre-check=0" ); + response.setHeader( "Pragma", "public" ); + response.setContentType( "application/pdf" ); + response.addHeader( "Content-disposition", "attachment;filename=\"" + filename + "\"" ); + response.setContentLength( pdf.length ); + + response.getOutputStream().write( pdf ); + response.getOutputStream().flush(); + response.getOutputStream().close(); + context.responseComplete(); + + System.out.println( "SHOW PDF done." ); + } + + + private void initialize() + { + Utilizador u = getSessionBean1().getCurrentUser(); + + Integer estabelecimento_id = null; + if(u.getTipo().intValue() != Global.TECNICO_HS) + { + estabelecimento_id = u.getEstabelecimento_id(); + } + + System.out.println( "INITIALIZE:" ); + + if ( ! getSessionBean1().getIsSearchingPlanosActuacao() ) + { + System.out.println( "\tGETTING INITIAL VALUES FOR EACH TABLE." ); + long startedTime = System.currentTimeMillis(); + + List listPlanosActivos = getPlanosActivos(u); + getSessionBean1().getPlanosActualDataProvider().setList(listPlanosActivos); + + List listPlanosSeguimento = getPlanosSeguimento(u); + getSessionBean1().getPlanosSeguimentoDataProvider().setList(listPlanosSeguimento); + + List listPlanosConcluidos = getPlanosConcluidos(u); + getSessionBean1().getPlanosConcluidosDataProvider().setList(listPlanosConcluidos); + + long endedTime = System.currentTimeMillis(); + System.out.println( "\nGot Planos List in : " + getTime( startedTime, endedTime ) ); + //2010-11-12 : user scampos : 1 min (debug mode) + } + //checkPlanosDelayed(); + } + + private String getTime( long start, long end ) + { + return DateUtils.getTimePassed( start, end ); + } + + + private PlanoActuacao getTableActivosRowData() + { + RowKey rk = tableRowGroup1.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + PlanosActualDataProvider provider = (PlanosActualDataProvider) tableRowGroup1.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + PlanoActuacao p = (PlanoActuacao)list.get(k); + return p; + } + + private PlanoActuacao getTableSeguimentoRowData() + { + RowKey rk = tableRowGroup2.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + PlanosSeguimentoDataProvider provider = (PlanosSeguimentoDataProvider) tableRowGroup2.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + PlanoActuacao p = (PlanoActuacao)list.get(k); + + return p; + } + + private PlanoActuacao getTableConcluidosRowData() + { + RowKey rk = tableRowGroup3.getRowKey(); + int k = Integer.parseInt(rk.getRowId()); + PlanosConcluidosDataProvider provider = (PlanosConcluidosDataProvider) tableRowGroup3.getSourceData(); + ArrayList list = (ArrayList) provider.getList(); + PlanoActuacao p = (PlanoActuacao)list.get(k); + return p; + } + + private void checkPlanosDelayed() + { + + } + + + +// private void showPlano(PlanoActuacao p) +// { +// System.out.println("PLANO : " + p.getData_visita_str() + " | " + p.getFase_nome() + " | " + p.getNome_estabelecimento()); +// System.out.println("================================================================="); +// showAreas(p.getAreas()); +// System.out.println("================================================================="); +// } +// +// private void showAreas(List areas) +// { +// for(Area a : areas) +// { +// System.out.println(" " + a.getDescricao()); +// showRiscos(a.getRiscos()); +// } +// } +// +// private void showRiscos(List riscos) +// { +// for(Risco r : riscos) +// { +// System.out.println(" " + r.getDescricao()); +// showValores(r.getValores()); +// } +// } +// +// private void showValores(List valores) +// { +// for(Valor v : valores) +// { +// System.out.println(" " + v.getValor()); +// showMedidas(v.getMedidas()); +// } +// } +// +// private void showMedidas(List medidas) +// { +// for(Medida m : medidas) +// { +// System.out.println(" " + m.getDescricao()); +// showPostos(m.getPostos()); +// } +// } +// +// private void showPostos(List postos) +// { +// for(PostoTrabalho p : postos) +// { +// System.out.println(" " + p.getDescricao()); +// } +// } + + public List< PlanoActuacao > searchPlanosActivos( Utilizador u, String nome, String estabelecimento, String dataVisita ) + { + List< PlanoActuacao > list = new ArrayList< PlanoActuacao >(); + try + { + if ( u.getTipo().intValue() != Global.DIRECTOR_SIPRP + && u.getTipo().intValue() != Global.GESTOR + && u.getTipo().intValue() != Global.DIRECTOR_GERAL_RH ) + { + PlanosDataProvider pdp = PlanosDataProvider.getInstance(); + list = pdp.searchPlanosActivos( u, nome, estabelecimento, dataVisita ); + } + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + return list; + } + + public List getPlanosActivos(Utilizador u) + { + return searchPlanosActivos( u, null, null, null ); +// List< PlanoActuacao > list = new ArrayList(); +// try +// { +// if ( u.getTipo().intValue() != Global.DIRECTOR_SIPRP +// && u.getTipo().intValue() != Global.GESTOR +// && u.getTipo().intValue() != Global.DIRECTOR_GERAL_RH ) +// { +//// list = pdp.getPlanosActivos(u); +// list = pdp.searchPlanosActivos( u, null, null ); +// } +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } +// return list; + } + + public List< PlanoActuacao > searchPlanosSeguimento( Utilizador u, String nome, String estabelecimento, String dataVisita ) + { + List< PlanoActuacao > list = new ArrayList(); + try + { + PlanosDataProvider pdp = PlanosDataProvider.getInstance(); + list = pdp.searchPlanosSeguimento( u, nome, estabelecimento, dataVisita ); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + return list; + } + + public List getPlanosSeguimento(Utilizador u) + { + return searchPlanosSeguimento( u, null, null, null ); +// List< PlanoActuacao > list = new ArrayList(); +// try +// { +//// list = pdp.getPlanosSeguimento(u); +// list = pdp.searchPlanosSeguimento( u, null, null ); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } +// return list; + } + + public List< PlanoActuacao > searchPlanosConcluidos( Utilizador u, String nome, String estabelecimento, String dataVisita ) + { + List< PlanoActuacao > list = new ArrayList(); + try + { + PlanosDataProvider pdp = PlanosDataProvider.getInstance(); + list = pdp.searchPlanosConcluidos( u, nome, estabelecimento, dataVisita ); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + return list; + } + + public List getPlanosConcluidos(Utilizador u) + { + return searchPlanosConcluidos( u, null, null, null ); +// List< PlanoActuacao > list = new ArrayList(); +// try +// { +//// list = pdp.getPlanosConcluidos(u); +// list = pdp.searchPlanosConcluidos( u, null, null ); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } +// return list; + } + + + + public String buttonFilterActual_action() + { + String nome = null; + if ( textFilterNameActual.getText() != null ) + { + nome = (( String ) textFilterNameActual.getText()).trim(); + if( nome.length() == 0 ) + { + nome = null; + } + } + + String estabelecimento = null; + if ( textFilterEstabelecimentoActual.getText() != null ) + { + estabelecimento = (( String ) textFilterEstabelecimentoActual.getText()).trim(); + if( estabelecimento.length() == 0 ) + { + estabelecimento = null; + } + } + + Date visitaDate = ( Date ) calFilterDateActual.getValue(); + String visitaDateStr = null; + if ( visitaDate != null ) + { + visitaDateStr = D_F.format( visitaDate ); + } + + getSessionBean1().setIsSearchingPlanosActuacao( Boolean.TRUE ); + getSessionBean1().getPlanosActualDataProvider().setList( + searchPlanosActivos( getSessionBean1().getCurrentUser(), nome, estabelecimento, visitaDateStr ) ); + + return null; + } + + public String buttonFilterSeg_action() + { + String nome = null; + if ( textFilterNameSeg.getText() != null ) + { + nome = (( String ) textFilterNameSeg.getText()).trim(); + if( nome.length() == 0 ) + { + nome = null; + } + } + + String estabelecimento = null; + if ( textFilterEstabelecimentoSeg.getText() != null ) + { + estabelecimento = (( String ) textFilterEstabelecimentoSeg.getText()).trim(); + if( estabelecimento.length() == 0 ) + { + estabelecimento = null; + } + } + + Date visitaDate = ( Date ) calFilterDateSeg.getValue(); + String visitaDateStr = null; + if ( visitaDate != null ) + { + visitaDateStr = D_F.format( visitaDate ); + } + + getSessionBean1().setIsSearchingPlanosActuacao( Boolean.TRUE ); + getSessionBean1().getPlanosSeguimentoDataProvider().setList( + searchPlanosSeguimento( getSessionBean1().getCurrentUser(), nome, estabelecimento, visitaDateStr ) ); + + return null; + } + + + public String buttonFilterConc_action() + { + String nome = null; + if ( textFilterNameConc.getText() != null ) + { + nome = (( String ) textFilterNameConc.getText()).trim(); + if( nome.length() == 0 ) + { + nome = null; + } + } + + String estabelecimento = null; + if ( textFilterEstabelecimentoConc.getText() != null ) + { + estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim(); + if( estabelecimento.length() == 0 ) + { + estabelecimento = null; + } + } + + Date visitaDate = ( Date ) calFilterDateConc.getValue(); + String visitaDateStr = null; + if ( visitaDate != null ) + { + visitaDateStr = D_F.format( visitaDate ); + } + + getSessionBean1().setIsSearchingPlanosActuacao( Boolean.TRUE ); + getSessionBean1().getPlanosConcluidosDataProvider().setList( + searchPlanosConcluidos( getSessionBean1().getCurrentUser(), nome, estabelecimento, visitaDateStr ) ); + + return null; + } + +} + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Login.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Login.java new file mode 100644 index 00000000..d483ac1d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Login.java @@ -0,0 +1,271 @@ +/* + * Login.java + * + * Created on Aug 26, 2008, 11:21:02 AM + */ + +package planosactuacao; + +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.webui.jsf.component.Button; +import com.sun.webui.jsf.component.PasswordField; +import com.sun.webui.jsf.component.TextField; +import db.entidades.Utilizador; +import db.providers.UtilizadoresDataProvider; +import javax.faces.FacesException; +import utils.Utils; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ * + * @author lluis + */ +public class Login extends AbstractPageBean +{ + // + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + private TextField txtUtilizador = new TextField(); + + public TextField getTxtUtilizador() { + return txtUtilizador; + } + + public void setTxtUtilizador(TextField tf) { + this.txtUtilizador = tf; + } + private PasswordField txtPassword = new PasswordField(); + + public PasswordField getTxtPassword() { + return txtPassword; + } + + public void setTxtPassword(PasswordField pf) { + this.txtPassword = pf; + } + private Button butLogin = new Button(); + + public Button getButLogin() { + return butLogin; + } + + public void setButLogin(Button b) { + this.butLogin = b; + } + + //
+ + /** + *

Construct a new Page bean instance.

+ */ + public Login() + { +// connect(); + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + @Override + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + ErrorLogger.logException( e ); + log("Login Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + @Override + public void preprocess() { + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + @Override + public void prerender() { + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + @Override + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected RequestBean1 getRequestBean1() { + return (RequestBean1) getBean("RequestBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1) getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1) getBean("ApplicationBean1"); + } + +// private void connect() +// { +// Db db = Db.getInstance(); +// try +// { +// Connection connection = db.connect(); +// } +// catch ( Exception ex ) +// { +// getSessionBean1().setMsg("Erro na ligação à Base de Dados"); +// //***** terminate session +// try { +// getExternalContext().redirect("faces/Erro.jsp"); +// } catch(Exception e) { +// // . . . handle exception . . . +// ErrorLogger.logException( e ); +// } +// ErrorLogger.logException( ex ); +// } +// } + + public String lnkPasswordRecovery_action() + { + return null; + } + + public String butLogin_action() + { + String sRet = null; + + if(txtUtilizador.getText() != null) + { + String utilizador = (String) txtUtilizador.getText(); + if(utilizador.trim().length() > 0) + { + if(txtPassword.getText() != null) + { + String password = (String) txtPassword.getText(); + if( password.trim().length() > 0 ) + { + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + + Utilizador u = udp.getUtilizador( utilizador ); + if( u != null && "y".equals( u.getActivo() ) ) + { + if ( ! password.equals( u.getPassword() ) ) + { + getSessionBean1().setMsg( "Palavra-chave inválida !" ); + } + else + { + Utils.doLogin( u ); + + getSessionBean1().setCurrentUser( u ); + getSessionBean1().setLoggedIn( true ); + + sRet = "lista_planos"; + } + } + else + { + getSessionBean1().setMsg("Utilizador inválido ! "); + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + getSessionBean1().setMsg("Utilizador inválido ! "); + } + } + else + { + getSessionBean1().setMsg("Falta palavra-chave !"); + } + } + else + { + getSessionBean1().setMsg("Falta palavra-chave !"); + } + } + else + { + getSessionBean1().setMsg("Falta utilizador !"); + } + } + else + { + getSessionBean1().setMsg("Falta utilizador !"); + } + return sRet; + } + +} + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/PlanosActuacao.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/PlanosActuacao.java new file mode 100644 index 00000000..a7541bf9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/PlanosActuacao.java @@ -0,0 +1,476 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package planosactuacao; + +import com.evolute.utils.error.ErrorLogger; +import db.entidades.Area; +import db.entidades.Medida; +import db.entidades.PlanoActuacao; +import db.entidades.PostoTrabalho; +import db.entidades.Risco; +import db.entidades.Utilizador; +import db.entidades.Valor; +import db.providers.CreatePlanosDataProvider; +import db.providers.UtilizadoresDataProvider; +import global.Global; +import java.util.ArrayList; +import java.util.Date; +import java.util.Iterator; +import java.util.List; +import java.util.ListIterator; +import mail.Mail; +import shst.data.outer.HsRelatorioData; +import shst.data.provider.PlanoActuacaoDataProvider; +import static com.evolute.utils.strings.UnicodeLatin1Map.*; + +/** + * + * @author lluis + */ +public class PlanosActuacao +{ + //PlanosDataProvider pdp = new PlanosDataProvider(); +// CreatePlanosDataProvider cpdp = new CreatePlanosDataProvider(); + //RelatoriosDataProvider rdp; + private List< PlanoActuacao > planosList; + private List< Date > planosOnlineList; + +// PlanoActuacaoDAO pa = new PlanoActuacaoDAO(); + + //DB + + + public PlanosActuacao() + { + try + { + System.out.println( "Importar planos de actua" + ccedil + atilde + "o" ); + //rdp = new RelatoriosDataProvider(); + // Integer estabelecimentoId = null; +// if(u.getTipo().intValue() != Global.TECNICO_HS && u.getTipo().intValue() != Global.DIRECTOR_SIPRP) +// { +// estabelecimentoId = u.getEstabelecimento_id(); +// } +// +// List planosOnlineList = getPlanosOnline(null); +// System.out.println("PLANOS ONLINE LIST : " + planosOnlineList.size()); + initRelatorios( null, null ); +// System.out.println("LIST RELATORIOS : " + listRelatorios.size()); +// putPlanosOnline(listRelatorios); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + } + + public PlanosActuacao( Utilizador u ) + { + try + { + //rdp = new RelatoriosDataProvider(); + Integer estabelecimentoId = null; + if(u.getTipo().intValue() != Global.TECNICO_HS && u.getTipo().intValue() != Global.DIRECTOR_SIPRP) + { + estabelecimentoId = u.getEstabelecimento_id(); + } + List< Date > planosOnlineList = getPlanosOnline( estabelecimentoId ); + System.out.println("PLANOS ONLINE LIST : " + planosOnlineList.size()); + initRelatorios( planosOnlineList, estabelecimentoId ); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + } + + private List getPlanosOnline(Integer estabelecimentoId) + { + List list = new ArrayList(); + try + { + if( estabelecimentoId != null ) + { + CreatePlanosDataProvider cpdp = CreatePlanosDataProvider.getInstance(); + list = cpdp.getPlanosOnline( estabelecimentoId ); + } + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } + return list; + } + + private void initRelatorios( List< Date > list, Integer estabelecimentoId ) + { + System.out.println("initRelatorios for estabelecimento id: " + estabelecimentoId ); + try + { + CreatePlanosDataProvider cpdp = CreatePlanosDataProvider.getInstance(); + PlanoActuacaoDataProvider pa = PlanoActuacaoDataProvider.getProvider(); + + if( estabelecimentoId == null ) + { + System.out.println("A adicionar planos de estabelecimentos novos"); + List< Integer > estabelecimentos = cpdp.getEstabelecimentosWithPlanos(); + putPlanosOnline( pa.getRelatoriosNotIn( estabelecimentos ) ); + estabelecimentos = cpdp.getEstabelecimentosWithPlanos(); + System.out.println("A adicionar planos a estabelecimentos anteriores"); + for( Integer estabelecimentoID : estabelecimentos ) + { + try + { + System.out.println("A importar relatorio para o estabelecimento: " + estabelecimentoID ); + List datas = cpdp.getPlanosOnline(estabelecimentoID); + if( datas.isEmpty() ) + { + System.out.println("Nenhuma data de relatorio para o estabelecimento: " + estabelecimentoID ); + } + else + { + List< HsRelatorioData > relatorios = pa.getRelatoriosNotIn(datas, estabelecimentoID); + if( relatorios.isEmpty() ) + { + System.out.println("Nenhum relatorio novo para o estabelecimento: " + estabelecimentoID ); + } + else + { + putPlanosOnline( relatorios ); + } + } + } + catch(Exception e ) + { + ErrorLogger.logException( e ); + } + } + } + else + { + putPlanosOnline( pa.getRelatoriosNotIn( list, estabelecimentoId ) ); + } + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + } + + private void putPlanosOnline( List< HsRelatorioData > listRelatorios ) + { + System.out.println("putPlanosOnline (" + listRelatorios == null ? "null" : listRelatorios.size() ); + Iterator< HsRelatorioData > iter = listRelatorios.iterator(); + while ( iter.hasNext() ) + { + HsRelatorioData relatorio = iter.next(); + System.out.println("\tRELATORIO ID : " + relatorio.getId().toString() ); + try + { + PlanoActuacao p = createPlano( relatorio ); + if ( p != null ) + { + enviarMail( p ); + } + //showPlano(p); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + System.out.println( "ERRO NA CRIACAO DOS PLANOS : " + ex.getMessage() ); + } + } + } + + private PlanoActuacao createPlano(HsRelatorioData relatorio) throws Exception + { + System.out.println("CREATE PLANO - RELATORIO ID : " + relatorio.getId().toString()); + + CreatePlanosDataProvider cpdp = CreatePlanosDataProvider.getInstance(); + + PlanoActuacao p = new PlanoActuacao(); + p.setData_visita( relatorio.toMarcacao_id().getData() ); +// p.setData_visita(relatorio.getToHsMarcacoesEstabelecimento().getData()); + + +// if(relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosHst() != null) + if ( relatorio.toMarcacao_id().toTecnico_hst() != null ) + { +// p.setTecnico_hs_id(relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosHst().getId()); +// p.setTecnico_hs_nome(relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosHst().getNome()); + p.setTecnico_hs_id( relatorio.toMarcacao_id().toTecnico_hst().getId() ); + p.setTecnico_hs_nome( relatorio.toMarcacao_id().toTecnico_hst().getNome() ); + } + +// if ( relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosSuperioresHst() != null ) + if ( relatorio.toMarcacao_id().toTecnico_superior_hst() != null ) + { +// p.setTecnico_superior_hs_id( relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosSuperioresHst().getId() ); +// p.setTecnico_superior_hs_nome( relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosSuperioresHst().getNome() ); + p.setTecnico_superior_hs_id( relatorio.toMarcacao_id().toTecnico_superior_hst().getId() ); + p.setTecnico_superior_hs_nome( relatorio.toMarcacao_id().toTecnico_superior_hst().getNome() ); + } + + ///////// + p.setFase(new Integer(Global.FASE_SEGURANCA_PREENCHIMENTO)); + +// p.setEstabelecimento_id(relatorio.getToHsMarcacoesEstabelecimento().getToEstabelecimentos().getId()); +// p.setEmpresa_id(relatorio.getToHsMarcacoesEstabelecimento().getToEstabelecimentos().getToEmpresas().getId()); + p.setEstabelecimento_id( relatorio.toMarcacao_id().toEstabelecimento_id().getId() ); + p.setEmpresa_id( relatorio.toMarcacao_id().toEstabelecimento_id().toEmpresa_id().getId() ); + try + { + //p.setNome_empresa(utils.Utils.unicodeToHTML(rdp.getEmpresaNome(p.getEmpresa_id()))); + p.setNome_empresa(utils.Utils.unicodeToHTML(cpdp.getEmpresaNome(p.getEmpresa_id()))); + } + catch(Exception ex) + { + ErrorLogger.logException( ex ); + } +// p.setNome_estabelecimento(relatorio.getToHsMarcacoesEstabelecimento().getToEstabelecimentos().getNome()); + p.setNome_estabelecimento( relatorio.toMarcacao_id().toEstabelecimento_id().getNome() ); + p.setData_relatorio(relatorio.getData()); + p.setData_disponibilizacao( relatorio.getIs_submetido() ); + p.setHs_relatorio_id( relatorio.getId() ); + + //p = rdp.getFullPlano(p, relatorio.getId()); + p = cpdp.getFullPlano( p, relatorio.getId() ); + + if ( p.getAreas() != null ) + { + if ( p.getAreas().size() > 0 ) + { + p.setId( cpdp.createPlano( p ) ); + System.out.println("CREATE PLANO - PLANO ID : " + p.getId().toString()); + if ( p.getAreas() != null ) + { + createAreas( p.getId(), p.getAreas() ); + } + } + else + { + p = null; + } + } + else + { + p = null; + } + + + + return p; + } + + private void createAreas(Integer plano_id, List areas) throws Exception + { + CreatePlanosDataProvider cpdp = CreatePlanosDataProvider.getInstance(); + + for(Area a : areas) + { + a.setPlano_id( plano_id ); + a.setId( cpdp.createArea( a ) ); + System.out.println("AREA =: " + a.getId().toString()); + if(a.getRiscos() != null) + { + System.out.println("AREA RISCOS: " + a.getRiscos().size()); + createRiscos(a.getId(), a.getRiscos()); + } + + } + } + + /** + * FIXME : importacao -> r.setPatrimonial( ... ) + * + * @param area_id + * @param riscos + * @throws Exception + */ + private void createRiscos( Integer area_id, List< Risco > riscos ) throws Exception + { + CreatePlanosDataProvider cpdp = CreatePlanosDataProvider.getInstance(); + + for ( Risco r : riscos ) + { + r.setArea_id( area_id ); + //r.setId(pdp.createRisco(r)); + System.out.println( "CREATE RISCO: " ); + if ( r.getValores() != null ) + { + for ( Valor v : r.getValores() ) + { + //System.out.println("RISCO -> " + r.getRisco_id().toString() + "VALOR -> " + v.getValor().toString()); + r.setValor( v.getValor() ); + r.setId( cpdp.createRisco( r ) ); + } + } + if ( r.getMedidas() != null ) + { + createMedidas( r.getId(), r.getMedidas() ); + } +// if(r.getValores() != null) +// { +// createValores(r.getId(), r.getValores()); +// } + + } + } + +// private void createValores(Integer risco_id, List valores) throws Exception +// { +// for(Valor v : valores) +// { +// v.setRisco_id(risco_id); +// v.setId(pdp.createValor(v)); +// if(v.getMedidas() != null) +// { +// createMedidas(v.getId(), v.getMedidas()); +// } +// +// } +// } + + private void createMedidas(Integer risco_id, List medidas) throws Exception + { + CreatePlanosDataProvider cpdp = CreatePlanosDataProvider.getInstance(); + + for(Medida m : medidas) + { + m.setRisco_id( risco_id ); + m.setId( cpdp.createMedida( m ) ); + if(m.getPostos() != null) + { + createPostos(m.getId(), m.getPostos()); + } + + } + } + + private void createPostos(Integer medida_id, List postos) throws Exception + { + CreatePlanosDataProvider cpdp = CreatePlanosDataProvider.getInstance(); + + for(PostoTrabalho p : postos) + { + p.setMedida_id( medida_id ); + cpdp.createPostoTrabalho( p ); + } + } + + + + + +// private void showPlano(PlanoActuacao p) +// { +// System.out.println("================================================"); +// System.out.println("PLANO : " + p.getData_visita_str() + " | " + p.getDescricao() + " | " + p.getFase_nome() + " | " + p.getNome_estabelecimento()); +// showAreas(p.getAreas()); +// System.out.println("================================================"); +// } + +// private void showAreas(List areas) +// { +// for(Area a : areas) +// { +// System.out.println(" " + a.getDescricao()); +// showRiscos(a.getRiscos()); +// } +// } + +// private void showRiscos(List riscos) +// { +// for(Risco r : riscos) +// { +// System.out.println(" " + r.getDescricao()); +// showValores(r.getValores()); +// } +// } + +// private void showValores(List valores) +// { +// for(Valor v : valores) +// { +// System.out.println(" " + v.getValor()); +// showMedidas(v.getMedidas()); +// } +// } + +// private void showMedidas(List medidas) +// { +// for(Medida m : medidas) +// { +// System.out.println(" " + m.getDescricao()); +// showPostos(m.getPostos()); +// } +// } + +// private void showPostos(List postos) +// { +// for(PostoTrabalho p : postos) +// { +// System.out.println(" " + p.getDescricao()); +// } +// } + + private void enviarMail( PlanoActuacao p ) + { + String assunto = ""; + String mail_text = ""; + + int fase = p.getFase().intValue(); + int tipo_utilizador = 0; + switch(fase) + { + case Global.FASE_SEGURANCA_PREENCHIMENTO : + tipo_utilizador = Global.RESPONSAVEL_SEGURANCA; + assunto = "Plano de Actuação da Avaliação de Riscos de " + p.getData_visita_str() + " - " + p.getNome_estabelecimento(); + mail_text = "

Exmo. (a) Senhor (a),

"; + mail_text += "

Encontra-se disponível em www.siprp.com o Plano de Actuação referente à auditoria de Avaliação de Riscos Laborais realizada no passado dia " + p.getData_visita_str() + " para que possa efectuar o seu preenchimento.

"; + mail_text += "

Recordamos que dispõe de duas semanas para efectuar o seu preenchimento e passar o respectivo processo para a fase seguinte, ou seja, para o responsável pelo seu estabelecimento.

"; + mail_text += "

Caso tenha alguma dúvida ou necessite de qualquer esclarecimento, contacte, por favor, a área técnica da SIPRP através do telefone 213 504 540.

"; + mail_text += "

Cumprimentos,

"; + mail_text += "

A equipa da SIPRP

"; + mail_text += "

Por favor não responda a esta mensagem, dado tratar-se de um e-mail automático

"; + break; + } + + Mail mail = new Mail(); + + String responsavel_loja = "n"; + if(tipo_utilizador == Global.RESPONSAVEL_SEGURANCA) + { + responsavel_loja = "y"; + } + try + { + UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); + List< Utilizador > list = udp.getUtilizadoresListByTipo( tipo_utilizador, responsavel_loja, p.getEstabelecimento_id() ); + ListIterator iter = list.listIterator(); + while ( iter.hasNext() ) + { + Utilizador u = ( Utilizador ) iter.next(); + System.out.println( "\t\tUSER MAIL NEXT FASE : " + u.getLogin() + " ; " + u.getEmail() ); + try + { + mail.send( u.getEmail(), Mail.ENDERECO_ENVIO, assunto, mail_text ); + System.out.println( "\t\t\tEMAIL ENVIADO !!" ); + } + catch(Exception ex1) + { + ErrorLogger.logException( ex1 ); + System.out.println("\t\t\tMAIL ERROR : " + ex1.getMessage()); + } + + } + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/RequestBean1.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/RequestBean1.java new file mode 100644 index 00000000..dd5b6d32 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/RequestBean1.java @@ -0,0 +1,110 @@ +/* + * RequestBean1.java + * + * Created on Aug 25, 2008, 11:20:16 AM + */ + +package planosactuacao; + +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractRequestBean; +import javax.faces.FacesException; + +/** + *

Request scope data bean for your application. Create properties + * here to represent data that should be made available across different + * pages in the same HTTP request, so that the page bean classes do not + * have to be directly linked to each other.

+ * + *

An instance of this class will be created for you automatically, + * the first time your application evaluates a value binding expression + * or method binding expression that references a managed bean using + * this class.

+ * + * @author lluis + */ +public class RequestBean1 extends AbstractRequestBean { + // + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + //
+ + /** + *

Construct a new request data bean instance.

+ */ + public RequestBean1() { + } + + /** + *

This method is called when this bean is initially added to + * request scope. Typically, this occurs as a result of evaluating + * a value binding or method binding expression, which utilizes the + * managed bean facility to instantiate this bean and store it into + * request scope.

+ * + *

You may customize this method to allocate resources that are required + * for the lifetime of the current request.

+ */ + @Override + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + ErrorLogger.logException( e ); + log("RequestBean1 Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

This method is called when this bean is removed from + * request scope. This occurs automatically when the corresponding + * HTTP response has been completed and sent to the client.

+ * + *

You may customize this method to clean up resources allocated + * during the execution of the init() method, or + * at any later time during the lifetime of the request.

+ */ + @Override + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected SessionBean1 getSessionBean1() { + return (SessionBean1) getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1) getBean("ApplicationBean1"); + } + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/SessionBean1.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/SessionBean1.java new file mode 100644 index 00000000..21ebd6e2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/SessionBean1.java @@ -0,0 +1,455 @@ +/* + * SessionBean1.java + * + * Created on Aug 25, 2008, 11:20:16 AM + */ + +package planosactuacao; + +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractSessionBean; +import db.entidades.Area; +import db.entidades.PlanoActuacao; +import db.entidades.Risco; +import db.entidades.Utilizador; +import db.entidades.Valor; +import java.util.HashMap; +import java.util.Map; +import javax.faces.FacesException; +import pagination.Pagination; + +/** + *

Session scope data bean for your application. Create properties + * here to represent cached data that should be made available across + * multiple HTTP requests for an individual user.

+ * + *

An instance of this class will be created for you automatically, + * the first time your application evaluates a value binding expression + * or method binding expression that references a managed bean using + * this class.

+ * + * @author lluis + */ +public class SessionBean1 extends AbstractSessionBean { + + private boolean loggedIn = false; + private Utilizador currentUser = null; + private String msg; + private String aatSessionID = null; + + private Integer planoId; + private PlanoActuacao planoActuacao = null; + private Risco currentRisco = null; + private Valor currentValor = null; + + + private tabledataproviders.PlanosActualDataProvider planosActualDataProvider; + private tabledataproviders.PlanosSeguimentoDataProvider planosSeguimentoDataProvider; + private tabledataproviders.PlanosConcluidosDataProvider planosConcluidosDataProvider; + // + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + //
+ + //menu + private boolean disableMenu = false; + private boolean disableMenuAnalises = false; + private boolean disableMenuPlanos = false; + private boolean disableMenuUtilizadores = false; + private boolean disableMenuDadosUtilizador = false; + + private boolean renderSubHeader = false; + private boolean renderTopMenuImages = true; + + //fase + private int fase = 1; + + private HashMap valoresHash; + private HashMap areasHash; + private HashMap riscosHash; + + + public enum PAGINATION_ENUM + { + NORMAL( 0, "Normal" ), + PATRIMONIAIS( 1, "Patrimoniais" ) + ; + + private Integer code = null; + private String type = null; + + PAGINATION_ENUM( Integer code, String type ) + { + this.code = code; + this.type = type; + } + + public Integer getCode() + { + return code; + } + + public String getType() + { + return type; + } + + } + + private Map< PAGINATION_ENUM, Pagination > paginationMap = null; +// private Pagination pagination = null; + + private String logoEmpresaUrl = ""; + + private Boolean isSearchingPlanosActuacao = Boolean.FALSE; + + + /** + *

Construct a new session data bean instance.

+ */ + public SessionBean1() { + msg = ""; + + planosActualDataProvider = new tabledataproviders.PlanosActualDataProvider(); + planosSeguimentoDataProvider = new tabledataproviders.PlanosSeguimentoDataProvider(); + planosConcluidosDataProvider = new tabledataproviders.PlanosConcluidosDataProvider(); + planoId = null; + + } + + /** + *

This method is called when this bean is initially added to + * session scope. Typically, this occurs as a result of evaluating + * a value binding or method binding expression, which utilizes the + * managed bean facility to instantiate this bean and store it into + * session scope.

+ * + *

You may customize this method to initialize and cache data values + * or resources that are required for the lifetime of a particular + * user session.

+ */ + @Override + public void init() { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + ErrorLogger.logException( e ); + log("SessionBean1 Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

This method is called when the session containing it is about to be + * passivated. Typically, this occurs in a distributed servlet container + * when the session is about to be transferred to a different + * container instance, after which the activate() method + * will be called to indicate that the transfer is complete.

+ * + *

You may customize this method to release references to session data + * or resources that can not be serialized with the session itself.

+ */ + @Override + public void passivate() { + } + + /** + *

This method is called when the session containing it was + * reactivated.

+ * + *

You may customize this method to reacquire references to session + * data or resources that could not be serialized with the + * session itself.

+ */ + @Override + public void activate() { + } + + /** + *

This method is called when this bean is removed from + * session scope. Typically, this occurs as a result of + * the session timing out or being terminated by the application.

+ * + *

You may customize this method to clean up resources allocated + * during the execution of the init() method, or + * at any later time during the lifetime of the application.

+ */ + @Override + public void destroy() { + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected ApplicationBean1 getApplicationBean1() { + return (ApplicationBean1) getBean("ApplicationBean1"); + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } + + public boolean isLoggedIn() { + return loggedIn; + } + + public void setLoggedIn(boolean loggedIn) { + this.loggedIn = loggedIn; + } + + public tabledataproviders.PlanosActualDataProvider getPlanosActualDataProvider() { + return planosActualDataProvider; + } + + public void setPlanosActualDataProvider(tabledataproviders.PlanosActualDataProvider planosActualDataProvider) { + this.planosActualDataProvider = planosActualDataProvider; + } + + public tabledataproviders.PlanosSeguimentoDataProvider getPlanosSeguimentoDataProvider() { + return planosSeguimentoDataProvider; + } + + public void setPlanosSeguimentoDataProvider(tabledataproviders.PlanosSeguimentoDataProvider planosSeguimentoDataProvider) { + this.planosSeguimentoDataProvider = planosSeguimentoDataProvider; + } + + public tabledataproviders.PlanosConcluidosDataProvider getPlanosConcluidosDataProvider() { + return planosConcluidosDataProvider; + } + + public void setPlanosConcluidosDataProvider(tabledataproviders.PlanosConcluidosDataProvider planosConcluidosDataProvider) { + this.planosConcluidosDataProvider = planosConcluidosDataProvider; + } + + public Integer getPlanoId() { + return planoId; + } + + public void setPlanoId(Integer planoId) { + this.planoId = planoId; + } + + public Utilizador getCurrentUser() { + return currentUser; + } + + public void setCurrentUser(Utilizador currentUser) { + this.currentUser = currentUser; + } + + public boolean isDisableMenu() { + return disableMenu; + } + + public void setDisableMenu(boolean disableMenu) { + System.out.println("DISABLE MENU : " + disableMenu); + setDisableMenuAnalises(disableMenu); + //setDisableMenuPlanos(disableMenu); + setDisableMenuUtilizadores(disableMenu); + setDisableMenuDadosUtilizador(disableMenu); + this.disableMenu = disableMenu; + } + + public boolean isDisableMenuAnalises() { + return disableMenuAnalises; + } + + public void setDisableMenuAnalises(boolean disableMenuAnalises) { + this.disableMenuAnalises = disableMenuAnalises; + } + + public boolean isDisableMenuPlanos() { + return disableMenuPlanos; + } + + public void setDisableMenuPlanos(boolean disableMenuPlanos) { + this.disableMenuPlanos = disableMenuPlanos; + } + + public boolean isDisableMenuUtilizadores() { + return disableMenuUtilizadores; + } + + public void setDisableMenuUtilizadores(boolean disableMenuUtilizadores) { + this.disableMenuUtilizadores = disableMenuUtilizadores; + } + + public boolean isDisableMenuDadosUtilizador() { + return disableMenuDadosUtilizador; + } + + public void setDisableMenuDadosUtilizador(boolean disableMenuDadosUtilizador) { + this.disableMenuDadosUtilizador = disableMenuDadosUtilizador; + } + + public int getFase() { + return fase; + } + + public void setFase(int fase) { + this.fase = fase; + } + + public PlanoActuacao getPlanoActuacao() { + return planoActuacao; + } + + public void setPlanoActuacao(PlanoActuacao planoActuacao) { + this.planoActuacao = planoActuacao; + } + + private Integer irParaChoice; + + public Integer getIrParaChoice() { + return irParaChoice; + } + + public void setIrParaChoice(Integer irParaChoice) { + this.irParaChoice = irParaChoice; + } + + private com.sun.webui.jsf.model.Option[] irParaOptions; + + public com.sun.webui.jsf.model.Option[] getIrParaOptions() { + return irParaOptions; + } + + public void setIrParaOptions(com.sun.webui.jsf.model.Option[] irParaOptions) { + this.irParaOptions = irParaOptions; + } + + public HashMap getAreasHash() { + return areasHash; + } + + public void setAreasHash(HashMap areasHash) { + this.areasHash = areasHash; + } + + public HashMap getRiscosHash() { + return riscosHash; + } + + public void setRiscosHash(HashMap riscosHash) { + this.riscosHash = riscosHash; + } + + + public void addPagination( PAGINATION_ENUM type, Pagination pagination ) + { + if ( paginationMap == null ) + { + paginationMap = new HashMap< PAGINATION_ENUM, Pagination >(); + } + + paginationMap.put( type, pagination ); + } + + public Pagination getPagination( PAGINATION_ENUM type ) + { + Pagination pagination = null; + if ( paginationMap != null ) + { + pagination = paginationMap.get( type ); + } + return pagination; + } +// public Pagination getPagination() { +// return pagination; +// } +// +// public void setPagination(Pagination pagination) { +// this.pagination = pagination; +// } + + public Risco getCurrentRisco() { + return currentRisco; + } + + public void setCurrentRisco(Risco currentRisco) { + this.currentRisco = currentRisco; + } + + public boolean isRenderSubHeader() { + return renderSubHeader; + } + + public void setRenderSubHeader(boolean renderSubHeader) { + this.renderSubHeader = renderSubHeader; + } + + public boolean isRenderTopMenuImages() { + return renderTopMenuImages; + } + + public void setRenderTopMenuImages(boolean renderTopMenuImages) { + this.renderTopMenuImages = renderTopMenuImages; + } + + public Valor getCurrentValor() { + return currentValor; + } + + public void setCurrentValor(Valor currentValor) { + this.currentValor = currentValor; + } + + public HashMap getValoresHash() { + return valoresHash; + } + + public void setValoresHash(HashMap valoresHash) { + this.valoresHash = valoresHash; + } + + public String getLogoEmpresaUrl() { + return logoEmpresaUrl; + } + + public void setLogoEmpresaUrl(String logoEmpresaUrl) { + this.logoEmpresaUrl = logoEmpresaUrl; + } + + public Boolean getIsSearchingPlanosActuacao() { + return isSearchingPlanosActuacao; + } + + public void setIsSearchingPlanosActuacao(Boolean isSearchingPlanosActuacao) { + this.isSearchingPlanosActuacao = isSearchingPlanosActuacao; + } + + public String getAatSessionID() { + return aatSessionID; + } + + public void setAatSessionID(String aatSessionID) { + this.aatSessionID = aatSessionID; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Test.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Test.java new file mode 100644 index 00000000..42b52ec1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/Test.java @@ -0,0 +1,74 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package planosactuacao; + +import db.entidades.Area; +import db.entidades.Medida; +import db.entidades.PlanoActuacao; +import db.entidades.PostoTrabalho; +import db.entidades.Risco; +import db.entidades.Valor; +import java.util.List; + +/** + * + * @author lluis + */ +public class Test { + private PlanoActuacao p; + + public static void showPlanoTree(PlanoActuacao p) + { + System.out.println("====================================================="); + System.out.println(" PLANO : " + p.getData_visita_str()); + showAreas(p.getAreas()); + System.out.println("====================================================="); + } + + private static void showAreas(List areas) + { + for(Area a : areas) + { + System.out.println("\t" + a.getDescricao()); + showRiscos(a.getRiscos()); + } + } + + private static void showRiscos(List riscos) + { + for(Risco r : riscos) + { + System.out.println("\t\t" + r.getDescricao()); + showValores(r.getValores()); + } + } + + private static void showValores(List valores) + { + for(Valor v : valores) + { + System.out.println("\t\t\t" + v.getValor()); + showMedidas(v.getMedidas()); + } + } + + private static void showMedidas(List medidas) + { + for(Medida m : medidas) + { + System.out.println("\t\t\t" + m.getDescricao()); + showPostos(m.getPostos()); + } + } + + private static void showPostos(List postos) + { + for(PostoTrabalho p : postos) + { + System.out.println("\t\t\t\t" + p.getDescricao()); + } + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/ViewPlano.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/ViewPlano.java new file mode 100644 index 00000000..da10169d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/planosactuacao/ViewPlano.java @@ -0,0 +1,1025 @@ +/* + * ViewPlano.java + * + * Created on Oct 20, 2008, 10:39:31 AM + */ + +package planosactuacao; + +import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.appbase.AbstractPageBean; +import com.sun.webui.jsf.component.Button; +import com.sun.webui.jsf.component.PageSeparator; +import com.sun.webui.jsf.component.PanelGroup; +import com.sun.webui.jsf.component.StaticText; +import db.entidades.Area; +import db.entidades.Medida; +import db.entidades.PlanoActuacao; +import db.entidades.PostoTrabalho; +import db.entidades.Risco; +import db.providers.UtilizadoresLogic; +import java.text.SimpleDateFormat; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import javax.faces.FacesException; +import javax.faces.component.html.HtmlPanelGrid; +import javax.sound.midi.SysexMessage; + +/** + *

Page bean that corresponds to a similarly named JSP page. This + * class contains component definitions (and initialization code) for + * all components that you have defined on this page, as well as + * lifecycle methods and event handlers where you may add behavior + * to respond to incoming events.

+ * + * @author lluis + */ +public class ViewPlano extends AbstractPageBean +{ + // + + /** + *

Automatically managed component initialization. WARNING: + * This method is automatically generated, so any user-specified code inserted + * here is subject to being replaced.

+ */ + private void _init() throws Exception { + } + private Button butVoltar = new Button(); + + public Button getButVoltar() { + return butVoltar; + } + + public void setButVoltar(Button b) { + this.butVoltar = b; + } + private HtmlPanelGrid gridLayout = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridLayout() { + return gridLayout; + } + + public void setGridLayout(HtmlPanelGrid hpg) { + this.gridLayout = hpg; + } + + //
+ HtmlPanelGrid gridPlano; + HtmlPanelGrid gridArea; + HtmlPanelGrid gridAreaContainer; + HtmlPanelGrid gridRisco; + HtmlPanelGrid gridValor; + HtmlPanelGrid gridMedida; + HtmlPanelGrid gridPosto; + HtmlPanelGrid gridResponsavel; + PanelGroup pg; + StaticText st; + + /** + *

Construct a new Page bean instance.

+ */ + public ViewPlano() + { + + } + + /** + *

Callback method that is called whenever a page is navigated to, + * either directly via a URL, or indirectly via page navigation. + * Customize this method to acquire resources that will be needed + * for event handlers and lifecycle methods, whether or not this + * page is performing post back processing.

+ * + *

Note that, if the current request is a postback, the property + * values of the components do not represent any + * values submitted with this request. Instead, they represent the + * property values that were saved for this view when it was rendered.

+ */ + @Override + public void init() + { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + // TODO - add your own initialiation code here + + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try { + _init(); + } catch (Exception e) { + ErrorLogger.logException( e ); + log("ViewPlano Initialization Failure", e); + throw e instanceof FacesException ? (FacesException) e: new FacesException(e); + } + + // + // Perform application initialization that must complete + // *after* managed components are initialized + // TODO - add your own initialization code here + } + + /** + *

Callback method that is called after the component tree has been + * restored, but before any event processing takes place. This method + * will only be called on a postback request that + * is processing a form submit. Customize this method to allocate + * resources that will be required in your event handlers.

+ */ + @Override + public void preprocess() + { + + } + + /** + *

Callback method that is called just before rendering takes place. + * This method will only be called for the page that + * will actually be rendered (and not, for example, on a page that + * handled a postback and then navigated to a different page). Customize + * this method to allocate resources that will be required for rendering + * this page.

+ */ + @Override + public void prerender() + { + PlanoActuacao p = getSessionBean1().getPlanoActuacao(); + showPlano( p ); + } + + /** + *

Callback method that is called after rendering is completed for + * this request, if init() was called (regardless of whether + * or not this was the page that was actually rendered). Customize this + * method to release resources acquired in the init(), + * preprocess(), or prerender() methods (or + * acquired during execution of an event handler).

+ */ + @Override + public void destroy() + { + + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected SessionBean1 getSessionBean1() + { + return (SessionBean1) getBean("SessionBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected ApplicationBean1 getApplicationBean1() + { + return (ApplicationBean1) getBean("ApplicationBean1"); + } + + /** + *

Return a reference to the scoped data bean.

+ * + * @return reference to the scoped data bean + */ + protected RequestBean1 getRequestBean1() + { + return (RequestBean1) getBean("RequestBean1"); + } + + private void showPlano( PlanoActuacao p ) + { + System.out.println( "\nViewPlano . showPlano( " + p.getId() + " ) : \n" ); + + gridPlano = new HtmlPanelGrid(); + gridPlano.setId( "gridPlano" ); + gridPlano.setWidth( "100%" ); + gridPlano.setColumns( 1 ); + gridPlano.setStyle( "background-color: #f6f4e8; border: solid 1px #000000" ); + gridPlano.setColumnClasses( "gridColCenter" ); + //lblTop.setText("Plano de actuação da auditoria " + p.getData_visita_str()); + + if ( p.getConcluidoPorDesactivacao() ) + { + StaticText st = new StaticText(); + st.setText( "N\u00E3o realizado por falta de cumprimento do prazo." ); + st.setStyle( "color: #FF0000; font-weight: bold; font-size: 13px;" ); + gridPlano.getChildren().add( st ); + } + gridLayout.getChildren().add( gridPlano ); + showAreas( p.getAreas() ); + showValidacoes( gridPlano, p ); + } + + private void showAreas( List< Area > areas ) + { + int i = 0; + for( Area area : areas ) + { + i++; + gridArea = new HtmlPanelGrid(); + gridArea.setColumns( 1 ); + gridArea.setColumnClasses( "gridColCenter" ); + gridArea.setWidth( "100%" ); + + gridPlano.getChildren().add( gridArea ); + + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Área: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setId( "fakeLink" + i ); + st.setStyleClass( "fakeLink" ); + st.setOnMouseOver( "this.style.textDecoration = 'underline'" ); + st.setOnMouseOut( "this.style.textDecoration = 'none'" ); + st.setOnClick( "expand(this)" ); + st.setEscape( false ); + st.setText( area.getDescricao() ); + pg.getChildren().add( st ); + + gridArea.getChildren().add( pg ); + + gridAreaContainer = new HtmlPanelGrid(); + gridAreaContainer.setId( "area_container" + i ); + ////gridAreaContainer.setStyle("border: solid 1px #000000; width: 100%;"); + gridAreaContainer.setStyleClass( "hidden" ); + //gridAreaContainer.setStyleClass("visible"); + gridAreaContainer.setColumns( 1 ); + gridAreaContainer.setColumnClasses( "gridColLeft" ); + gridAreaContainer.setWidth( "100%" ); + + gridArea.getChildren().add( gridAreaContainer ); + showRiscos( area.getRiscos() ); + } + } + + private void showRiscos( List< Risco > riscos ) + { + int rCount = 0; + Collections.sort( riscos, new Comparator< Risco >() + { + public int compare( Risco o1, Risco o2 ) + { + // false first, true after + return o1.getIsPatrimonial().compareTo( o2.getIsPatrimonial() ); + } + } ); + + for ( Risco risco : riscos ) + { + boolean isPatrimonial = risco.getIsPatrimonial(); + String riscoTitle = "Risco" + ( isPatrimonial ? " Patrimonial" : "" ) + ": "; + + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setColumns( 1 ); + grd.setColumnClasses( "gridColLeft" ); + //grd.setStyle("border: solid 1px #0000FF; display: inline; width: 100%"); + grd.setStyle( "display: block; width: 100%" ); + grd.setWidth( "100%" ); + //grd.setStyleClass("centerBlock"); + //gridArea.getChildren().add(grd); + gridAreaContainer.getChildren().add( grd ); + + gridRisco = new HtmlPanelGrid(); + //gridRisco.setStyleClass("centerBlock"); + gridRisco.setStyle( "display: block; width: 98%" ); + gridRisco.setWidth( "98%" ); + gridRisco.setColumns( 1 ); + gridRisco.setColumnClasses( "gridColLeft" ); + grd.getChildren().add( gridRisco ); + + + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( riscoTitle ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( risco.getDescricao() ); + pg.getChildren().add( st ); + gridRisco.getChildren().add( pg ); + //showValores(risco.getValores()); + showValor( risco ); + //showMedidas(risco.getMedidas()); + + if ( rCount < riscos.size() - 1 ) + { + showSeparator( ); + } + + rCount++; + } + } + + private void showValor( Risco r ) + { + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setColumns( 1 ); + grd.setWidth( "100%" ); + grd.setStyleClass( "centerBlock" ); + grd.setStyle( "display: block" ); + //gridRisco.getChildren().add(grd); + + gridValor = new HtmlPanelGrid(); + gridRisco.getChildren().add( gridValor ); + //gridValor.setStyleClass("centerBlock"); + gridValor.setStyle( "display: block" ); + gridValor.setWidth( "100%" ); + gridValor.setColumns( 1 ); + gridValor.setColumnClasses( "gridColLeft" ); + //grd.getChildren().add(gridValor); + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Valor: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + if ( r.getValor() == null ) + { + st.setText( "IND" ); + } + else + { + st.setText( r.getValor().toString() ); + } + pg.getChildren().add( st ); + gridValor.getChildren().add( pg ); + + showMedidas( r.getMedidas() ); + + grd = new HtmlPanelGrid(); + grd.setColumns( 1 ); + grd.setWidth( "100%" ); + //grd.setStyleClass("centerBlock"); + gridValor.getChildren().add( grd ); + HtmlPanelGrid gridParecer = new HtmlPanelGrid(); + gridParecer.setStyleClass( "centerBlock" ); + gridParecer.setStyle( "display: block" ); + gridParecer.setWidth( "98%" ); + gridParecer.setColumns( 1 ); + gridParecer.setColumnClasses( "gridColLeft" ); + grd.getChildren().add( gridParecer ); + + if ( r.getResponsavel_execucao() != null ) + { + if ( r.getResponsavel_execucao().trim().length() > 0 ) + { + pg = new PanelGroup(); + + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Responsável de execução: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( r.getResponsavel_execucao().toString() ); + pg.getChildren().add( st ); + + if ( r.getPor() != null ) + { + if ( r.getPor().trim().length() > 0 ) + { + st = new StaticText(); + st.setEscape( false ); + st.setText( " " ); + pg.getChildren().add( st ); + + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "POR:  " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( r.getPor().toString() ); + pg.getChildren().add( st ); + } + } + + gridParecer.getChildren().add( pg ); + } + } + + if ( r.getRecursos_necessarios() != null ) + { + if ( r.getRecursos_necessarios().trim().length() > 0 ) + { + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Recursos necessários: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( r.getRecursos_necessarios().toString() ); + pg.getChildren().add( st ); + gridParecer.getChildren().add( pg ); + } + } + + if ( r.getData_inicio() != null ) + { + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Data início: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + String data_str = ""; + SimpleDateFormat formatter = new SimpleDateFormat( "dd/MM/yyyy" ); + data_str = formatter.format( r.getData_inicio() ); + st.setText( data_str ); + pg.getChildren().add( st ); + gridParecer.getChildren().add( pg ); + } + + if ( r.getData_fim() != null ) + { + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Data fim: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + String data_str = ""; + SimpleDateFormat formatter = new SimpleDateFormat( "dd/MM/yyyy" ); + data_str = formatter.format( r.getData_fim() ); + st.setText( data_str ); + pg.getChildren().add( st ); + gridParecer.getChildren().add( pg ); + } + + if ( r.getParecer_dl() != null ) + { + if ( r.getParecer_dl().trim().length() > 0 ) + { + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Parecer DL: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( r.getParecer_dl().toString() ); + pg.getChildren().add( st ); + gridParecer.getChildren().add( pg ); + } + } + + if ( r.getParecer_dns() != null ) + { + if ( r.getParecer_dns().trim().length() > 0 ) + { + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Parecer DNS: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( r.getParecer_dns().toString() ); + pg.getChildren().add( st ); + gridParecer.getChildren().add( pg ); + + } + } + + if ( r.getVerificacao_siprp() != null ) + { + if ( r.getVerificacao_siprp().trim().length() > 0 ) + { + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Verificação SIPRP: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( r.getVerificacao_siprp().toString() ); + pg.getChildren().add( st ); + gridParecer.getChildren().add( pg ); + } + } + } + +// private void showValores( List< Valor > valores ) +// { +// for ( Valor valor : valores ) +// { +// HtmlPanelGrid grd = new HtmlPanelGrid(); +// grd.setColumns( 1 ); +// grd.setWidth( "100%" ); +// //grd.setStyleClass("centerBlock"); +// //gridRisco.getChildren().add(grd); +// +// gridValor = new HtmlPanelGrid(); +// gridRisco.getChildren().add( gridValor ); +// ////gridValor.setStyleClass("centerBlock"); +// gridValor.setWidth( "100%" ); +// gridValor.setColumns( 1 ); +// gridValor.setColumnClasses( "gridColLeft" ); +// //grd.getChildren().add(gridValor); +// pg = new PanelGroup(); +// st = new StaticText(); +// st.setEscape(false); +// st.setStyleClass("label"); +// st.setText("Valor: "); +// pg.getChildren().add(st); +// st = new StaticText(); +// st.setEscape(false); +// if(valor.getValor() == null) +// { +// st.setText(" - "); +// } +// else +// { +// st.setText(valor.getValor().toString()); +// } +// pg.getChildren().add(st); +// gridValor.getChildren().add(pg); +// +// showMedidas(valor.getMedidas()); +// +// grd = new HtmlPanelGrid(); +// grd.setColumns(1); +// grd.setWidth("100%"); +// ////grd.setStyleClass("centerBlock"); +// gridValor.getChildren().add(grd); +// HtmlPanelGrid gridParecer = new HtmlPanelGrid(); +// gridParecer.setStyleClass("centerBlock"); +// gridParecer.setWidth("98%"); +// gridParecer.setColumns(1); +// gridParecer.setColumnClasses("gridColLeft"); +// grd.getChildren().add(gridParecer); +// +// if(valor.getResponsavel_execucao() != null) +// { +// if(valor.getResponsavel_execucao().trim().length() > 0) +// { +// pg = new PanelGroup(); +// st = new StaticText(); +// st.setEscape(false); +// st.setStyleClass("label"); +// st.setText("Responsável de execução: "); +// pg.getChildren().add(st); +// st = new StaticText(); +// st.setEscape(false); +// st.setText(valor.getResponsavel_execucao().toString()); +// pg.getChildren().add(st); +// gridParecer.getChildren().add(pg); +// } +// } +// +// if(valor.getRecursos_necessarios() != null) +// { +// if(valor.getRecursos_necessarios().trim().length() > 0) +// { +// pg = new PanelGroup(); +// st = new StaticText(); +// st.setEscape(false); +// st.setStyleClass("label"); +// st.setText("Recursos necessários: "); +// pg.getChildren().add(st); +// st = new StaticText(); +// st.setEscape(false); +// st.setText(valor.getRecursos_necessarios().toString()); +// pg.getChildren().add(st); +// gridParecer.getChildren().add(pg); +// } +// } +// +// if(valor.getData_inicio() != null) +// { +// pg = new PanelGroup(); +// st = new StaticText(); +// st.setEscape(false); +// st.setStyleClass("label"); +// st.setText("Data início: "); +// pg.getChildren().add(st); +// st = new StaticText(); +// st.setEscape(false); +// String data_str = ""; +// SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); +// data_str = formatter.format(valor.getData_inicio()); +// st.setText(data_str); +// pg.getChildren().add(st); +// gridParecer.getChildren().add(pg); +// } +// +// if(valor.getData_fim() != null) +// { +// pg = new PanelGroup(); +// st = new StaticText(); +// st.setEscape(false); +// st.setStyleClass("label"); +// st.setText("Data fim: "); +// pg.getChildren().add(st); +// st = new StaticText(); +// st.setEscape(false); +// String data_str = ""; +// SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); +// data_str = formatter.format(valor.getData_fim()); +// st.setText(data_str); +// pg.getChildren().add(st); +// gridParecer.getChildren().add(pg); +// } +// +// if(valor.getParecer_dl() != null) +// { +// if(valor.getParecer_dl().trim().length() > 0) +// { +// pg = new PanelGroup(); +// st = new StaticText(); +// st.setEscape(false); +// st.setStyleClass("label"); +// st.setText("Parecer DL: "); +// pg.getChildren().add(st); +// st = new StaticText(); +// st.setEscape(false); +// st.setText(valor.getParecer_dl().toString()); +// pg.getChildren().add(st); +// gridParecer.getChildren().add(pg); +// +// } +// } +// +// if(valor.getParecer_dns() != null) +// { +// if(valor.getParecer_dns().trim().length() > 0) +// { +// pg = new PanelGroup(); +// st = new StaticText(); +// st.setEscape(false); +// st.setStyleClass("label"); +// st.setText("Parecer DNS: "); +// pg.getChildren().add(st); +// st = new StaticText(); +// st.setEscape(false); +// st.setText(valor.getParecer_dns().toString()); +// pg.getChildren().add(st); +// gridParecer.getChildren().add(pg); +// +// } +// } +// +// if(valor.getVerificacao_siprp() != null) +// { +// if(valor.getVerificacao_siprp().trim().length() > 0) +// { +// pg = new PanelGroup(); +// st = new StaticText(); +// st.setEscape(false); +// st.setStyleClass("label"); +// st.setText("Verificação SIPRP: "); +// pg.getChildren().add(st); +// st = new StaticText(); +// st.setEscape(false); +// st.setText(valor.getVerificacao_siprp().toString()); +// pg.getChildren().add(st); +// gridParecer.getChildren().add(pg); +// +// } +// } +// // +// } +// } + + private void showMedidas( List< Medida > medidas ) + { + for( Medida medida : medidas ) + { + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setColumns( 1 ); + grd.setWidth("100%"); + ////grd.setStyleClass("centerBlock"); + grd.setStyle("display: block"); + gridValor.getChildren().add( grd ); + + gridMedida = new HtmlPanelGrid(); + ////gridMedida.setStyleClass("centerBlock"); + gridMedida.setStyle("display: block"); + gridMedida.setWidth("98%"); + gridMedida.setColumns(1); + gridMedida.setColumnClasses("gridColLeft"); + grd.getChildren().add( gridMedida ); + + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape(false); + st.setStyleClass("label"); + st.setText("Medida: "); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( medida.getDescricao() ); + pg.getChildren().add( st ); + gridMedida.getChildren().add( pg ); + + showPostos( medida.getPostos() ); + } + } + + private void showPostos( List< PostoTrabalho > postos ) + { + for ( PostoTrabalho posto : postos ) + { + HtmlPanelGrid grd = new HtmlPanelGrid(); + grd.setColumns( 1 ); + grd.setStyle( "display: block" ); + grd.setWidth( "100%" ); + gridMedida.getChildren().add( grd ); + + gridPosto = new HtmlPanelGrid(); + gridPosto.setStyle( "display: block" ); + gridPosto.setWidth( "98%" ); + gridPosto.setColumns( 1 ); + gridPosto.setColumnClasses( "gridColLeft" ); + grd.getChildren().add( gridPosto ); + pg = new PanelGroup(); + st = new StaticText(); + st.setEscape( false ); + st.setStyleClass( "label" ); + st.setText( "Posto de trabalho: " ); + pg.getChildren().add( st ); + st = new StaticText(); + st.setEscape( false ); + st.setText( posto.getDescricao() ); + pg.getChildren().add( st ); + gridPosto.getChildren().add( pg ); + } + } + + private void showValidacoes( HtmlPanelGrid grid, PlanoActuacao p ) + { + SimpleDateFormat DF = new SimpleDateFormat( "dd-MM-yyyy" ); + + HtmlPanelGrid gridValidacoes = new HtmlPanelGrid(); + gridValidacoes.setColumns( 1 ); + gridValidacoes.setColumnClasses( "gridColLeft" ); + gridValidacoes.setWidth( "100%" ); + + // 1 + System.out.println( "showValidacoes() : 1. (Auditoria) " + p.getData_visita() ); + if ( p.getData_visita() != null ) + { + StaticText visitaText = new StaticText(); + visitaText.setEscape( false ); + visitaText.setText( "Data da auditoria: " + ( p.getData_visita() == null ? "" : DF.format( p.getData_visita() ) ) ); + gridValidacoes.getChildren().add( visitaText ); + } + + // 2 + System.out.println( "showValidacoes() : 2. (Disponibilizacao) " + p.getData_disponibilizacao() ); + if ( p.getData_disponibilizacao() != null ) + { + StaticText dispText = new StaticText(); + dispText.setEscape( false ); + dispText.setText( "Data de disponibilizacao online: " + ( p.getData_disponibilizacao() == null ? "" : DF.format( p.getData_disponibilizacao() ) ) ); + gridValidacoes.getChildren().add( dispText ); + } + + // 3 + System.out.println( "showValidacoes() : 3. (Validacao Seg) " + p.getData_validacao_seg() ); + if ( p.getData_validacao_seg() != null ) + { + StaticText segText = new StaticText(); + segText.setEscape( false ); + String nome = UtilizadoresLogic.getInstance().getNomeUtilizadorByID( p.getUser_seg() ); + segText.setText( "Validado por " + nome + " (Segurança)" + ( p.getData_validacao_seg() == null ? "" : " a " + DF.format( p.getData_validacao_seg() ) ) ); + gridValidacoes.getChildren().add( segText ); + } + + // 4 + System.out.println( "showValidacoes() : 4. (Validacao DL) " + p.getValidacao_director_loja() ); + if ( p.getValidacao_director_loja() ) + { + StaticText valDirLojaText = new StaticText(); + valDirLojaText.setEscape( false ); + String nome = UtilizadoresLogic.getInstance().getNomeUtilizadorByID( p.getUser_dir_loja() ); + + + String validacaoText = "Validado por " + nome + " (Director de Loja)" + + ( p.getData_validacao_dir_loja() == null ? "" : " a " + DF.format( p.getData_validacao_dir_loja() ) ); + valDirLojaText.setText( validacaoText ); + gridValidacoes.getChildren().add( valDirLojaText ); + + if ( p.getObservacoes_dl() != null && ! "".equals( p.getObservacoes_dl().trim() ) ) + { + StaticText obsTitleText = new StaticText(); + obsTitleText.setEscape( false ); + obsTitleText.setText( "Observações gerais DL: " ); + + StaticText obsText = new StaticText(); + obsText.setEscape( false ); + obsText.setText( p.getObservacoes_dl() ); + + gridValidacoes.getChildren().add( obsTitleText ); + gridValidacoes.getChildren().add( obsText ); + } + } + + // 5 + System.out.println( "showValidacoes() : 5. (Validacao DNS) " + p.getValidacao_dns() ); + if ( p.getValidacao_dns() ) + { + StaticText valDnsText = new StaticText(); + valDnsText.setEscape( false ); + String nome = UtilizadoresLogic.getInstance().getNomeUtilizadorByID( p.getUser_dns() ); + valDnsText.setText( "Validado por " + nome + " (Director Nacional de Segurança)" + ( p.getData_validacao_dns() == null ? "" : " a " + DF.format( p.getData_validacao_dns() ) ) ); + gridValidacoes.getChildren().add( valDnsText ); + + if ( p.getObservacoes_dns() != null && ! "".equals( p.getObservacoes_dns().trim() ) ) + { + StaticText obsTitleText = new StaticText(); + obsTitleText.setEscape( false ); + obsTitleText.setText( "Observações gerais DNS: " ); + + StaticText obsText = new StaticText(); + obsText.setEscape( false ); + obsText.setText( p.getObservacoes_dns() ); + + gridValidacoes.getChildren().add( obsTitleText ); + gridValidacoes.getChildren().add( obsText ); + } + } + + // 6 + System.out.println( "showValidacoes() : 6. (Validacao HS) " + p.getValidacao_hs() ); + if ( p.getValidacao_hs() ) + { + StaticText valHsText = new StaticText(); + valHsText.setEscape( false ); + String nome = UtilizadoresLogic.getInstance().getNomeUtilizadorByID( p.getUser_hs() ); + valHsText.setText( "Validado por " + nome + " (Técnico Superior de SHST)" + ( p.getData_validacao_hs() == null ? "" : " a " + DF.format( p.getData_validacao_hs() ) ) ); + gridValidacoes.getChildren().add( valHsText ); + } + + grid.getChildren().add( gridValidacoes ); + } + +// private void showValidacoes(HtmlPanelGrid grid, PlanoActuacao p) +// { +// boolean hasValidations = false; +// HtmlPanelGrid grd = new HtmlPanelGrid(); +// grd.setColumns(1); +// grd.setColumnClasses("gridColLeft"); +// grd.setWidth("100%"); +// if(p.getValidacao_director_loja().booleanValue()) +// { +// hasValidations = true; +// StaticText st = new StaticText(); +// st.setEscape(false); +// //st.setStyleClass("label"); +// String nome = ""; +// try +// { +// UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); +// Utilizador user = udp.getUtilizador(p.getUser_dir_loja()); +// nome = user.getNome(); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } +// st.setText("Validado por " + nome + " (Director de Loja) a " + p.getData_validacao_dir_loja_str()); +// grd.getChildren().add(st); +// +// if(p.getObservacoes_dl() != null) +// { +// if(p.getObservacoes_dl().trim().length() > 0) +// { +// pg = new PanelGroup(); +// st = new StaticText(); +// st.setEscape(false); +// st.setText("Observações gerais DL: "); +// pg.getChildren().add(st); +// st = new StaticText(); +// st.setEscape(false); +// st.setText(p.getObservacoes_dl()); +// pg.getChildren().add(st); +// grd.getChildren().add(pg); +// } +// } +// } +// +// if(p.getValidacao_dns().booleanValue()) +// { +// hasValidations = true; +// StaticText st = new StaticText(); +// st.setEscape(false); +// //st.setStyleClass("label"); +// String nome = ""; +// try +// { +// UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); +// Utilizador user = udp.getUtilizador(p.getUser_dns()); +// nome = user.getNome(); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } +// st.setText("Validado por " + nome + " (Director Nacional de Segurança) a " + p.getData_validacao_dns_str()); +// grd.getChildren().add(st); +// +// if(p.getObservacoes_dns() != null) +// { +// if(p.getObservacoes_dns().trim().length() > 0) +// { +// pg = new PanelGroup(); +// st = new StaticText(); +// st.setEscape(false); +// st.setText("Observações gerais DNS: "); +// pg.getChildren().add(st); +// st = new StaticText(); +// st.setEscape(false); +// st.setText(p.getObservacoes_dns()); +// pg.getChildren().add(st); +// grd.getChildren().add(pg); +// } +// } +// } +// +// if(p.getValidacao_hs().booleanValue()) +// { +// hasValidations = true; +// StaticText st = new StaticText(); +// st.setEscape(false); +// //st.setStyleClass("label"); +// String nome = ""; +// try +// { +// UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance(); +// Utilizador user = udp.getUtilizador(p.getUser_hs()); +// nome = user.getNome(); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } +// st.setText("Validado por " + nome + " (Técnico de SHS) a " + p.getData_validacao_hs_str()); +// grd.getChildren().add(st); +// +//// if(p.getVerificacao_siprp() != null) +//// { +//// if(p.getVerificacao_siprp().trim().length() > 0) +//// { +//// pg = new PanelGroup(); +//// st = new StaticText(); +//// st.setEscape(false); +//// st.setText("Verificação SIPRP: "); +//// pg.getChildren().add(st); +//// st = new StaticText(); +//// st.setEscape(false); +//// st.setText(p.getVerificacao_siprp()); +//// pg.getChildren().add(st); +//// grd.getChildren().add(pg); +//// } +//// } +// } +// +// if(hasValidations) +// { +// grid.getChildren().add(grd); +// } +// } + + + private void showSeparator() + { + PageSeparator separator = new PageSeparator(); +// separator.setStyle( "margin-bottom: 50px;" ); + gridAreaContainer.getChildren().add( separator ); + } + + public String butVoltar_action() + { + return "lista_planos"; + } + +} + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/tabledataproviders/PlanosActualDataProvider.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/tabledataproviders/PlanosActualDataProvider.java new file mode 100644 index 00000000..da83da58 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/tabledataproviders/PlanosActualDataProvider.java @@ -0,0 +1,18 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package tabledataproviders; + +import com.sun.data.provider.impl.ObjectListDataProvider; + +/** + * + * @author lluis + */ +public class PlanosActualDataProvider extends ObjectListDataProvider { + public PlanosActualDataProvider(){ + + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/tabledataproviders/PlanosConcluidosDataProvider.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/tabledataproviders/PlanosConcluidosDataProvider.java new file mode 100644 index 00000000..2b6e511e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/tabledataproviders/PlanosConcluidosDataProvider.java @@ -0,0 +1,18 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package tabledataproviders; + +import com.sun.data.provider.impl.ObjectListDataProvider; + +/** + * + * @author lluis + */ +public class PlanosConcluidosDataProvider extends ObjectListDataProvider { + public PlanosConcluidosDataProvider(){ + + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/tabledataproviders/PlanosSeguimentoDataProvider.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/tabledataproviders/PlanosSeguimentoDataProvider.java new file mode 100644 index 00000000..2615d17d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/tabledataproviders/PlanosSeguimentoDataProvider.java @@ -0,0 +1,18 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package tabledataproviders; + +import com.sun.data.provider.impl.ObjectListDataProvider; + +/** + * + * @author lluis + */ +public class PlanosSeguimentoDataProvider extends ObjectListDataProvider { + public PlanosSeguimentoDataProvider(){ + + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/JSFHTTPUtils.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/JSFHTTPUtils.java new file mode 100644 index 00000000..51d05a2b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/JSFHTTPUtils.java @@ -0,0 +1,23 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package utils; + +import java.util.Map; +import javax.faces.context.FacesContext; + +/** + * + * @author lluis + */ +public class JSFHTTPUtils { + + public static String getReferer(FacesContext context) + { + Map headerMap = context.getCurrentInstance().getExternalContext().getRequestHeaderMap(); + String referer = (String) headerMap.get("referer"); + return referer; + } +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/JSFUtils.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/JSFUtils.java new file mode 100644 index 00000000..11b54276 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/JSFUtils.java @@ -0,0 +1,117 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package utils; + +import java.util.Iterator; +import java.util.Map; +import javax.faces.application.Application; +import javax.faces.context.ExternalContext; +import javax.faces.context.FacesContext; +import javax.faces.render.ResponseStateManager; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import planosactuacao.ApplicationBean1; +import planosactuacao.SessionBean1; + +/** + * + * @author lluis + */ +public class JSFUtils { + + + public static SessionBean1 getSessionBean(FacesContext fc) + { + FacesContext context = fc.getCurrentInstance(); + SessionBean1 session = (SessionBean1) context.getApplication().getELResolver().getValue(context.getELContext(), null, "SessionBean1"); + return session; + } + + public static ApplicationBean1 getApplicationBean(FacesContext fc) + { + FacesContext context = fc.getCurrentInstance(); + System.out.println("CONTEXT : " + context); + ApplicationBean1 application = (ApplicationBean1) context.getApplication().getELResolver().getValue(context.getELContext(), null, "ApplicationBean1"); + return application; + } + + + // + // isPostBack - JSF 1.1 implementation + // + public static boolean isPostBack(FacesContext fc) + { + Map parameterMap = fc.getExternalContext().getRequestParameterMap(); + + if(parameterMap.size() > 0) + { + Iterator iter = parameterMap.keySet().iterator(); + while(iter.hasNext()) + { + String par = (String) iter.next(); + } + return true; + } + return false; + } + + public static boolean isPostback() { + FacesContext facesContext = FacesContext.getCurrentInstance(); + Map requestScope = (Map) facesContext.getApplication().getExpressionFactory().createValueExpression(facesContext.getELContext(), "#{requestScope}", Map.class).getValue(facesContext.getELContext()); + //Map requestScope = (Map)facesContext.getApplication().createValueBinding(?#{requestScope}?).getValue(facesContext); + boolean ispostback = ((Boolean)requestScope.get("ispostback")).booleanValue(); + System.out.println("JSFUtils . isPostback() : " + ispostback ); + return ispostback; + } + + // + // isPostBack - JSF 1.2 implementation + // + public static boolean isPostBack12(FacesContext fc) + { + ResponseStateManager rsm = fc.getRenderKit().getResponseStateManager(); + if(rsm.isPostback(fc)) + { + return true; + } + return false; + } + + public static void logout(FacesContext fc) throws Exception + { + ExternalContext ectx = fc.getCurrentInstance().getExternalContext(); + + Utils.doLogout( fc ); + + HttpSession session = (HttpSession) ectx.getSession(false); + session.invalidate(); + + } + + public static void navigateTo(FacesContext fc, String outcome) + { + FacesContext context = fc.getCurrentInstance(); + Application app = context.getApplication(); + app.getNavigationHandler().handleNavigation(context, null, outcome); + } + + public static void redirect(FacesContext context, String url) throws Exception + { + HttpServletResponse response = (HttpServletResponse) context.getCurrentInstance().getExternalContext().getResponse(); + response.sendRedirect(url); + context.responseComplete(); + } + + public static String getRequestParameter(FacesContext fc, String parameter) + { + Map parameters = fc.getCurrentInstance().getExternalContext().getRequestParameterMap(); + return (String) parameters.get(parameter); + } + + + + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/Logos.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/Logos.java new file mode 100644 index 00000000..699877c4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/Logos.java @@ -0,0 +1,62 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package utils; + +import com.evolute.utils.error.ErrorLogger; +import db.providers.RelatoriosDataProvider; +import global.Global; +import java.io.File; +import java.io.FileOutputStream; +import java.io.OutputStream; +import javax.faces.context.FacesContext; +import javax.servlet.ServletContext; + +/** + * + * @author lluis + */ +public class Logos { + + public String getLogo(Integer empresaId) + { + return null; + } + + public String getLogo( FacesContext fc, Integer empresaId ) + { + String result = null; + try + { + //get image from db : +// RelatoriosDataProvider rdp = new RelatoriosDataProvider(); + RelatoriosDataProvider rdp = RelatoriosDataProvider.getInstance(); + + byte[] logo = rdp.getLogoByEmpresa( empresaId ); + if ( logo != null ) + { + int len = logo.length; + + ServletContext context = (ServletContext) fc.getExternalContext().getContext(); + File logoFolder = new File( context.getRealPath( Global.LOGOS_FOLDER ) ); + + String logoFilename = logoFolder + "/logo_empresa" + empresaId.toString() + ".jpg"; + + OutputStream outImej = new FileOutputStream(logoFilename); + outImej.write(logo, 0, len); + System.out.println("LOGO PATH : " + logoFilename); + outImej.close(); + result = Global.LOGOS_FOLDER + "/logo_empresa" + empresaId.toString() + ".jpg"; + } + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + + return result; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/PlanosActuacaoLogger.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/PlanosActuacaoLogger.java new file mode 100644 index 00000000..a6abe8d5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/PlanosActuacaoLogger.java @@ -0,0 +1,40 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package utils; + +import com.evolute.utils.error.ErrorLogger; +import com.evolute.utils.error.LoggerProperties; +import com.evolute.utils.error.ProjectsEnum; +import com.evolute.utils.error.log4j.DBLogger; +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author dneves + */ +public class PlanosActuacaoLogger +{ + + private static String EVO_LOGGER_DB = "jdbc:postgresql://www.evolute.pt:5436/evo_logging?logUnclosedConnections=true&loginTimeout=5&socketTimeout=5&tcpKeepAlive=true"; + private static String EVO_LOGGER_USER = "evo_logger"; + private static String EVO_LOGGER_PASSWD = "2DD-rg2hLOG"; + + public static void init() + { + Map< LoggerProperties, String > map = new HashMap< LoggerProperties, String >(); + map.put( LoggerProperties.USERNAME, EVO_LOGGER_USER ); + map.put( LoggerProperties.PASSWORD, EVO_LOGGER_PASSWD ); + map.put( LoggerProperties.URL, EVO_LOGGER_DB ); + map.put( LoggerProperties.PROJECT, ProjectsEnum.PLANOS_ACTUACAO.toString() ); + map.put( LoggerProperties.PROJECT_NAME, ProjectsEnum.PLANOS_ACTUACAO.toString() ); + map.put( LoggerProperties.SOFTWARE_VERSION, "1" ); + map.put( LoggerProperties.PROJECT_VERSION, "1" ); + map.put( LoggerProperties.SOFTWARE_NAME, "SIPRP - Planos Actuacao" ); + ErrorLogger.initializeLogger( new DBLogger( map ) ); + } + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/PlanosUpdater.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/PlanosUpdater.java new file mode 100644 index 00000000..9e4f7cae --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/PlanosUpdater.java @@ -0,0 +1,101 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package utils; + +import com.evolute.utils.arrays.Virtual2DArray; +import com.evolute.utils.db.Executer; +import com.evolute.utils.sql.Assignment; +import com.evolute.utils.sql.Expression; +import com.evolute.utils.sql.Field; +import com.evolute.utils.sql.Select2; +import com.evolute.utils.sql.Update; +import db.providers.EvoBaseProvider; +import java.util.Date; +import shst.companydataloaders.SIPRPPropertiesLoader; + +/** + * + * @author dneves + */ +public class PlanosUpdater +{ + + public static void main( String[] args ) + { + try + { + SIPRPPropertiesLoader props = SIPRPPropertiesLoader.getInstance(); + props.load(); + + EvoBaseProvider provider = EvoBaseProvider.getInstance(); + Executer executer = provider.getExecuter(); + Executer localExecuter = provider.getLocalExecuter(); + + // Expression whereExpression = new Field( "planos_actuacao.deleted_date" ).isEqual( null ); + Expression whereExpression = null; + Select2 query = new Select2( + new String[] { "planos_actuacao" }, + new Integer[] {}, + new Expression[] {}, + new String[] { "planos_actuacao.id", "planos_actuacao.estabelecimento_id", "planos_actuacao.data_visita" }, + whereExpression, + new String[] { "planos_actuacao.estabelecimento_id", "planos_actuacao.data_visita" }, + null, null, null + ); + Virtual2DArray array = executer.executeQuery( query ); + if ( array != null ) + { + System.out.println( array.columnLength() + " : " ); + + for ( int i = 0; i < array.columnLength(); i++ ) + { + Integer planoID = array.get( i, 0 ); + Integer estabelecimentoID = array.get( i, 1 ); + Date dataVisita = array.get( i, 2 ); + + System.out.println( planoID + " : " + estabelecimentoID + " : " + dataVisita ); + + Integer relatorioID = null; + Date dataDisponibilizacao = null; + + Expression whereExpression2 = new Field( "marcacoes_estabelecimento.data" ).isEqual( dataVisita ).and( + new Field( "marcacoes_estabelecimento.estabelecimento_id" ).isEqual( estabelecimentoID ) + ); + Select2 query2 = new Select2( + new String[] { "hs_relatorio", "marcacoes_estabelecimento" }, + new Integer[] { Select2.JOIN_INNER }, + new Expression[] { + new Field( "marcacoes_estabelecimento.id" ).isEqual( new Field( "hs_relatorio.marcacao_id" ) ) + }, + new String[] { "hs_relatorio.id", "hs_relatorio.is_submetido" }, + whereExpression2, + null, + null, null, null + ); + Virtual2DArray array2 = localExecuter.executeQuery( query2 ); + if ( array2 != null && array2.columnLength() > 0 ) + { + relatorioID = array2.get( 0, 0 ); + dataDisponibilizacao = array2.get( 0, 1 ); + } + + System.out.println( "\tRelatorioID : " + relatorioID ); + + Update upd = new Update( "planos_actuacao", new Assignment[] { + new Assignment( new Field( "hs_relatorio_id" ), relatorioID ), + new Assignment( new Field( "data_disponibilizacao" ), dataDisponibilizacao ) + }, new Field( "id" ).isEqual( planoID ) ); + executer.executeQuery( upd ); + } + } + } + catch ( Exception e ) + { + System.out.println( e.getMessage() ); + } + } + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/Utils.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/Utils.java new file mode 100644 index 00000000..5772973d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/utils/Utils.java @@ -0,0 +1,137 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package utils; + +import com.evolute.utils.Singleton; +import com.evolute.utils.error.ErrorLogger; +import db.entidades.Utilizador; +import java.util.Map; +import javax.faces.context.ExternalContext; +import javax.faces.context.FacesContext; +import javax.servlet.ServletContext; +import javax.servlet.http.HttpSession; +import planosactuacao.SessionBean1; + +/** + * + * @author lluis + */ +public class Utils { + + public static String unicodeToHTML( String text ) + { + if( text == null || text.length() < 6 ) + { + return text; + } + + String output = text; + output = output.replaceAll( "\\\\u0009", " " ); + output = output.replaceAll( "\\\\u000a", "
" ); + + output = output.replaceAll( "\\\\u00a0", " " ); + output = output.replaceAll( "\\\\u00aa", "ª" ); + output = output.replaceAll( "\\\\u00ba", "º" ); + + output = output.replaceAll( "\\\\u00c0", "À" ); + output = output.replaceAll( "\\\\u00c1", "Á" ); + output = output.replaceAll( "\\\\u00c2", "Â" ); + output = output.replaceAll( "\\\\u00c3", "Ã" ); + output = output.replaceAll( "\\\\u00c7", "Ç" ); + output = output.replaceAll( "\\\\u00c8", "È" ); + output = output.replaceAll( "\\\\u00c9", "É" ); + output = output.replaceAll( "\\\\u00d3", "Ó" ); + output = output.replaceAll( "\\\\u00d2", "Ò" ); + + output = output.replaceAll( "\\\\u00ca", "Ê" ); + output = output.replaceAll( "\\\\u00cc", "Ì" ); + output = output.replaceAll( "\\\\u00cd", "Í" ); + output = output.replaceAll( "\\\\u00ce", "Î" ); + output = output.replaceAll( "\\\\u00d2", "ò" ); + output = output.replaceAll( "\\\\u00d3", "ó" ); + output = output.replaceAll( "\\\\u00d4", "ô" ); + output = output.replaceAll( "\\\\u00d5", "õ" ); + output = output.replaceAll( "\\\\u00d9", "Ù" ); + output = output.replaceAll( "\\\\u00da", "Ú" ); + output = output.replaceAll( "\\\\u00db", "Û" ); + + output = output.replaceAll( "\\\\u00e0", "à" ); + output = output.replaceAll( "\\\\u00e1", "á" ); + output = output.replaceAll( "\\\\u00e2", "â" ); + output = output.replaceAll( "\\\\u00e3", "ã" ); + output = output.replaceAll( "\\\\u00e7", "ç" ); + output = output.replaceAll( "\\\\u00e8", "è" ); + output = output.replaceAll( "\\\\u00e9", "é" ); + output = output.replaceAll( "\\\\u00ea", "ê" ); + output = output.replaceAll( "\\\\u00ec", "ì" ); + output = output.replaceAll( "\\\\u00ed", "í" ); + output = output.replaceAll( "\\\\u00ee", "î" ); + output = output.replaceAll( "\\\\u00f2", "ò" ); + output = output.replaceAll( "\\\\u00f3", "ó" ); + output = output.replaceAll( "\\\\u00f4", "ô" ); + output = output.replaceAll( "\\\\u00f5", "õ" ); + output = output.replaceAll( "\\\\u00f9", "ù" ); + output = output.replaceAll( "\\\\u00fa", "ú" ); + output = output.replaceAll( "\\\\u00fb", "û" ); + + output = output.replaceAll( "\\\\u0153", "œ" ); + + output = output.replaceAll( "\\\\u2013", "-" ); + output = output.replaceAll( "\\\\u2014", "-" ); + output = output.replaceAll( "\\\\u2018|\\\\u2019", "'" ); + output = output.replaceAll( "\\\\u201c|\\\\u201d", "\"" ); + + output = output.replaceAll( "\\\\u2022", "*" ); + output = output.replaceAll( "\\\\u2026", "..." ); + + return output; + } + + + public static void doLogin( Utilizador u ) + { + if ( u != null ) + { + Singleton.setInstance( Singleton.USERNAME, u.getLogin() ); + } + else + { + ErrorLogger.logException( new Exception( "Utils.doLogin() : Utilizador is null !" ) ); + } + } + + public static void doLogout( FacesContext fc ) + { + Singleton.setInstance( Singleton.USERNAME, null ); + + SessionBean1 sessionBean = JSFUtils.getSessionBean( fc ); + sessionBean.setCurrentUser( null ); + sessionBean.setLoggedIn( false ); + String aatSessionID = sessionBean.getAatSessionID(); + + ExternalContext ec = fc.getExternalContext(); + HttpSession session = ( HttpSession ) ec.getSession( false ); + + ServletContext paContext = session.getServletContext(); + ServletContext aatContext = paContext.getContext( "/AnaliseAcidentesTrabalho" ); + + Map< String, Object > mapData = ( Map< String, Object > ) aatContext.getAttribute( aatSessionID ); + if ( mapData != null ) + { + HttpSession aatSession = ( HttpSession ) mapData.get( "session" ); + try + { + aatSession.invalidate(); + } + catch ( IllegalStateException e ) + { +// ErrorLogger.logException( e ); + System.out.println( "Session already invalidated." ); + } + } + } + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/viewhandler/CustomViewHandler.java b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/viewhandler/CustomViewHandler.java new file mode 100644 index 00000000..83199b57 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/src/java/viewhandler/CustomViewHandler.java @@ -0,0 +1,75 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package viewhandler; + +import java.io.IOException; +import java.util.Locale; +import java.util.Map; +import javax.el.ValueExpression; +import javax.faces.FacesException; +import javax.faces.application.ViewHandler; +import javax.faces.component.UIViewRoot; +import javax.faces.context.FacesContext; + +/** + * + * @author lluis + */ +public class CustomViewHandler extends ViewHandler{ + protected ViewHandler baseViewHandler; + + public CustomViewHandler(ViewHandler viewHandler) { + super(); + this.baseViewHandler = viewHandler; + } + + public Locale calculateLocale(FacesContext facesContext) { + return baseViewHandler.calculateLocale(facesContext); + } + + public String calculateRenderKitId(FacesContext facesContext) { + return baseViewHandler.calculateRenderKitId(facesContext); + } + + public UIViewRoot createView(FacesContext facesContext, String arg1) { + setPostback(facesContext, false); + return baseViewHandler.createView(facesContext, arg1); + } + + public String getActionURL(FacesContext facesContext, String arg1) { + return baseViewHandler.getActionURL(facesContext, arg1); + } + + public String getResourceURL(FacesContext facesContext, String arg1) { + return baseViewHandler.getResourceURL(facesContext, arg1); + } + + public void renderView(FacesContext facesContext, UIViewRoot arg1) throws IOException, FacesException { + baseViewHandler.renderView(facesContext, arg1); + + } + + public UIViewRoot restoreView(FacesContext facesContext, String arg1) { + setPostback(facesContext, true); + return baseViewHandler.restoreView(facesContext, arg1); + } + + public void writeState(FacesContext facesContext) throws IOException { + baseViewHandler.writeState(facesContext); + } + + public Map getRequestScope(FacesContext facesContext) { + //return (Map)facesContext.getApplication().createValueBinding(?#{requestScope}?).getValue(facesContext); + //return (Map)facesContext.getApplication(). + return (Map) facesContext.getApplication().getExpressionFactory().createValueExpression(facesContext.getELContext(), "#{requestScope}", Map.class).getValue(facesContext.getELContext()); + } + + public void setPostback(FacesContext facesContext, boolean value) { + getRequestScope(facesContext).put("ispostback", new Boolean(value)); + } + + +} diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/Dummy.jsp b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/Dummy.jsp new file mode 100644 index 00000000..d857c45b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/Dummy.jsp @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/EditarPlano.jsp b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/EditarPlano.jsp new file mode 100644 index 00000000..37b9015b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/EditarPlano.jsp @@ -0,0 +1,269 @@ + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ + + +
+
+
+
+
diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/EnviarCorrecao.jsp b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/EnviarCorrecao.jsp new file mode 100644 index 00000000..1d667e71 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/EnviarCorrecao.jsp @@ -0,0 +1,61 @@ + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+
+
diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/Erro.jsp b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/Erro.jsp new file mode 100644 index 00000000..0c699b2f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/Erro.jsp @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/Footer.jsp b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/Footer.jsp new file mode 100644 index 00000000..9e3306f5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/Footer.jsp @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/Header.jspf b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/Header.jspf new file mode 100644 index 00000000..3e543a9c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/Header.jspf @@ -0,0 +1,60 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/ListaPlanos.jsp b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/ListaPlanos.jsp new file mode 100644 index 00000000..3b004caa --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/ListaPlanos.jsp @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/Login.jsp b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/Login.jsp new file mode 100644 index 00000000..fb2c4c09 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/Login.jsp @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/META-INF/context.xml b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/META-INF/context.xml new file mode 100644 index 00000000..0246acc6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/META-INF/context.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/ViewPlano.jsp b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/ViewPlano.jsp new file mode 100644 index 00000000..aa62c1dc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/ViewPlano.jsp @@ -0,0 +1,101 @@ + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/WEB-INF/faces-config.xml b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/WEB-INF/faces-config.xml new file mode 100644 index 00000000..0ed3934d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/WEB-INF/faces-config.xml @@ -0,0 +1,136 @@ + + + + + + + viewhandler.CustomViewHandler + + pt_PT + + + + phaselistener.MainPhaseListener + + + SessionBean1 + planosactuacao.SessionBean1 + session + + + Login + planosactuacao.Login + request + + + ApplicationBean1 + planosactuacao.ApplicationBean1 + application + + + RequestBean1 + planosactuacao.RequestBean1 + request + + + Erro + planosactuacao.Erro + request + + + EditarPlano + planosactuacao.EditarPlano + request + + + ListaPlanos + planosactuacao.ListaPlanos + request + + + /Login.jsp + + lista_planos + /ListaPlanos.jsp + + + + /ListaPlanos.jsp + + editar_plano + /EditarPlano.jsp + + + ver_plano + /ViewPlano.jsp + + + erro + /Erro.jsp + + + + /EditarPlano.jsp + + lista_planos + /ListaPlanos.jsp + + + enviar_correcao + /EnviarCorrecao.jsp + + + + Header + planosactuacao.Header + request + + + /ViewPlano.jsp + + lista_planos + /ListaPlanos.jsp + + + + /EditarPlano.jsp + + lista_planos + /ListaPlanos.jsp + + + + Dummy + planosactuacao.Dummy + request + + + Footer + planosactuacao.Footer + request + + + ViewPlano + planosactuacao.ViewPlano + request + + + EnviarCorrecao + planosactuacao.EnviarCorrecao + request + + + /EnviarCorrecao.jsp + + editar_plano + /EditarPlano.jsp + + + lista_planos + /ListaPlanos.jsp + + + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/WEB-INF/web.xml b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/WEB-INF/web.xml new file mode 100644 index 00000000..ebfe1b02 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/WEB-INF/web.xml @@ -0,0 +1,126 @@ + + + + javax.faces.STATE_SAVING_METHOD + client + + + com.sun.faces.validateXml + true + + + com.sun.faces.verifyObjects + false + + + + UploadFilter + com.sun.webui.jsf.util.UploadFilter + + The maximum allowed upload size in bytes. If this is set to a negative value, there is no maximum. The default value is 1000000. + maxSize + 1000000 + + + The size (in bytes) of an uploaded file which, if it is exceeded, will cause the file to be written directly to disk instead of stored in memory. Files smaller than or equal to this size will be stored in memory. The default value is 4096. + sizeThreshold + 4096 + + + + UploadFilter + Faces Servlet + + + + Faces Servlet + javax.faces.webapp.FacesServlet + + javax.faces.LIFECYCLE_ID + com.sun.faces.lifecycle.PARTIAL + + 1 + + + ExceptionHandlerServlet + com.sun.errorhandler.ExceptionHandler + + errorHost + localhost + + + errorPort + 24444 + + + + ThemeServlet + com.sun.webui.theme.ThemeServlet + + + Faces Servlet + /faces/* + + + ExceptionHandlerServlet + /error/ExceptionHandler + + + ThemeServlet + /theme/* + + + + 30 + + + + faces/Dummy.jsp + + + + javax.servlet.ServletException + /error/ExceptionHandler + + + java.io.IOException + /error/ExceptionHandler + + + javax.faces.FacesException + /error/ExceptionHandler + + + com.sun.rave.web.ui.appbase.ApplicationException + /error/ExceptionHandler + + + + + *.jspf + true + + + + + phaselistener.ContextListener + + + phaselistener.SessionListener + + + + diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/images/Logo_Auchan_novo.jpg b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/images/Logo_Auchan_novo.jpg new file mode 100644 index 00000000..1b79d4cb Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/images/Logo_Auchan_novo.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/images/SIPRP_logo_small.jpg b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/images/SIPRP_logo_small.jpg new file mode 100755 index 00000000..240f2358 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/images/SIPRP_logo_small.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/images/logo_auchan_small.jpg b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/images/logo_auchan_small.jpg new file mode 100755 index 00000000..376eee0e Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/images/logo_auchan_small.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/images/logo_evolute_small.png b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/images/logo_evolute_small.png new file mode 100644 index 00000000..0198da2b Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/images/logo_evolute_small.png differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/images/puls_more.gif b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/images/puls_more.gif new file mode 100755 index 00000000..f10da648 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/images/puls_more.gif differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/pdf/AAA.pdf b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/pdf/AAA.pdf new file mode 100644 index 00000000..9c205b33 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/pdf/AAA.pdf differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/pdf/planos_actuacao_ajuda.pdf b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/pdf/planos_actuacao_ajuda.pdf new file mode 100644 index 00000000..333e4938 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/pdf/planos_actuacao_ajuda.pdf differ diff --git a/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/stylesheet.css b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/stylesheet.css new file mode 100644 index 00000000..04b07f81 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/PlanosActuacao/web/resources/stylesheet.css @@ -0,0 +1,189 @@ +/* + * After modifying this style sheet, refresh the page being designed to see the effect of the modification. + * Click the Refresh button in the Visual Designer toolbar to refresh the page. + */ + +/* Style rules to make Java Server faces Standarad data tables look better */ + +body {background-color: #f8f8f0;} + +.list-header { + background-color: #eeeeee; + font-size: larger; + font-weight: bold; +} + +.list-paging-header { + background-color: white; +} + +.list-paging-footer { + background-color: white; +} + +.list-row-even { +} + +.list-row-odd { + background-color: #eeeeee; +} + +/* Labels */ + +.label{ + font-size : 12px; + font-weight : bold; +} + +/* center blocks */ + +.centerBlock{ + text-align: center; + left: 0; + right: 0; + margin-left: auto; + margin-right: auto;} + +/* Grid panel column alignment */ + +.gridColLeft { + text-align : left; +} + +.gridColLeft10{ + text-align : left; + vertical-align: top; + width : 10%; +} + +.gridColLeft20{ + text-align : left; + vertical-align: top; + width : 20%; +} + +.gridColLeft30{ + text-align : left; + vertical-align: top; + width : 30%; +} + +.gridColLeft80{ + text-align : left; + vertical-align: top; + width : 80%; +} + +.gridColLeft90{ + text-align : left; + vertical-align: top; + width : 90%; +} + +.gridColCenter40 { + text-align: center; +} + +.gridColCenter { + text-align: center; + width : 40%; +} + +.gridColRight30 { + text-align: right; + width : 30%; +} + +.gridColRight { + text-align: right; +} + +.gridCol10{ + width: 10%; +} +.gridCol15{ + width: 15%; +} +.gridCol20{ + width: 20%; +} +.gridCol30{ + width: 30%; +} + +.gridCol40{ + width: 40%; +} + +.gridCol50{ + width: 50%; +} + +.gridCol60{ + width: 60%; +} + +.gridCol70{ + width: 70%; +} +.gridCol80{ + width: 80%; +} +.gridCol85{ + width: 85%; +} +.gridCol90{ + width: 90%; +} + +.gridPlanosList{ + background-color: #f6f4e8; + border: solid 1px #000000; +} + +/* Style rules for message severity levels */ +.labelMsg{ + font-weight : bold; + color: #cc0033; + font-size :14px ; +} + +.visible { + /* visibility: visible; */ + display : block; +} + +.hidden { + /* visibility: hidden; */ + display : none; +} + +.fakeLink{ + cursor: pointer; + color: #0000cc; +} + +.infoMessage { + font-size : 13px; + color: black; +} + +.warnMessage { + font-size : 13px; + color: orange; + font-weight: bold; +} + +.errorMessage { + color: #990000; + font-weight: bold; + font-size : 13px; +} + +.fatalMessage { + color: red; + font-style: italic; + font-size : 13px; + font-weight: bold; +} + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/.classpath b/tags/Site antigo e SIPRPSoft/SIPRPSoft/.classpath new file mode 100644 index 00000000..3ba54ec2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/.classpath @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/.project b/tags/Site antigo e SIPRPSoft/SIPRPSoft/.project new file mode 100644 index 00000000..a33bc2b6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/.project @@ -0,0 +1,17 @@ + + + SIPRPSoft + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/.settings/org.eclipse.jdt.core.prefs b/tags/Site antigo e SIPRPSoft/SIPRPSoft/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..3c586dc3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +#Wed Jun 23 14:57:38 WEST 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-build-common.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-build-common.xml new file mode 100644 index 00000000..fadecbb0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-build-common.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-build-obfuscate-common.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-build-obfuscate-common.xml new file mode 100644 index 00000000..1c844aae --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/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/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-compile-common.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-compile-common.xml new file mode 100644 index 00000000..459012e3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-compile-common.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-deploy-common.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-deploy-common.xml new file mode 100644 index 00000000..49b46ba0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-deploy-common.xml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deploy cancelled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-load-properties.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-load-properties.xml new file mode 100644 index 00000000..68ae9785 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-load-properties.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-multiple-client-common.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-multiple-client-common.xml new file mode 100644 index 00000000..84b2469a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/common/evo-app-multiple-client-common.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-build-java5.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-build-java5.xml new file mode 100644 index 00000000..3280e098 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-build-java5.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-build-jdo.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-build-jdo.xml new file mode 100644 index 00000000..d9d46f46 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-build-jdo.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-build-obfuscate-jdo.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-build-obfuscate-jdo.xml new file mode 100644 index 00000000..3b1f2ba1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-build-obfuscate-jdo.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-build-obfuscate.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-build-obfuscate.xml new file mode 100644 index 00000000..168357f6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-build-obfuscate.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-build.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-build.xml new file mode 100644 index 00000000..099651cb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-build.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-multiple-client-build.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-multiple-client-build.xml new file mode 100644 index 00000000..e50cb65f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-multiple-client-build.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-multiple-client-obfuscated-build.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-multiple-client-obfuscated-build.xml new file mode 100644 index 00000000..aaf21aed --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-multiple-client-obfuscated-build.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-ws-client-build.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-ws-client-build.xml new file mode 100644 index 00000000..9c9e3e96 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-app-ws-client-build.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-gwt-library-build.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-gwt-library-build.xml new file mode 100644 index 00000000..925b756e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-gwt-library-build.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-library-build.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-library-build.xml new file mode 100644 index 00000000..545cbb40 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-library-build.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-tool-build.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-tool-build.xml new file mode 100644 index 00000000..043576b7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/ant/evo-tool-build.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/production/PDFRenderer.jnlp b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/production/PDFRenderer.jnlp new file mode 100644 index 00000000..0cb81326 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/production/PDFRenderer.jnlp @@ -0,0 +1,25 @@ + + + + SIPRPSoft + Evolute Lda + + Software de Gestão de Higiene e Segurança no Trabalho + SIPRPSoft + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/production/iText-2.0.7.jnlp b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/production/iText-2.0.7.jnlp new file mode 100644 index 00000000..705f35dc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/production/iText-2.0.7.jnlp @@ -0,0 +1,25 @@ + + + + SIPRPSoft + Evolute Lda + + Software de Gestão de Higiene e Segurança no Trabalho + SIPRPSoft + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/production/mail.jnlp b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/production/mail.jnlp new file mode 100644 index 00000000..4c5323cb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/production/mail.jnlp @@ -0,0 +1,25 @@ + + + + SIPRPSoft + Evolute Lda + + Software de Gestão de Higiene e Segurança no Trabalho + SIPRPSoft + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/production/smtp.jnlp b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/production/smtp.jnlp new file mode 100644 index 00000000..4ad1ac28 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/production/smtp.jnlp @@ -0,0 +1,25 @@ + + + + SIPRPSoft + Evolute Lda + + Software de Gestão de Higiene e Segurança no Trabalho + SIPRPSoft + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/test/PDFRenderer.jnlp b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/test/PDFRenderer.jnlp new file mode 100644 index 00000000..d816439d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/test/PDFRenderer.jnlp @@ -0,0 +1,25 @@ + + + + SIPRPSoft + Evolute Lda + + Software de Gestão de Higiene e Segurança no Trabalho + SIPRPSoft + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/test/iText-2.0.7.jnlp b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/test/iText-2.0.7.jnlp new file mode 100644 index 00000000..b3cdd3f8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/test/iText-2.0.7.jnlp @@ -0,0 +1,25 @@ + + + + SIPRPSoft + Evolute Lda + + Software de Gestão de Higiene e Segurança no Trabalho + SIPRPSoft + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/test/mail.jnlp b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/test/mail.jnlp new file mode 100644 index 00000000..6264856b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/test/mail.jnlp @@ -0,0 +1,25 @@ + + + + SIPRPSoft + Evolute Lda + + Software de Gestão de Higiene e Segurança no Trabalho + SIPRPSoft + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/test/smtp.jnlp b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/test/smtp.jnlp new file mode 100644 index 00000000..79b8a5e6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/extensions/test/smtp.jnlp @@ -0,0 +1,25 @@ + + + + SIPRPSoft + Evolute Lda + + Software de Gestão de Higiene e Segurança no Trabalho + SIPRPSoft + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/production/siprp_itext.jnlp b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/production/siprp_itext.jnlp new file mode 100644 index 00000000..0af1a639 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/production/siprp_itext.jnlp @@ -0,0 +1,27 @@ + + + + SIPRP + EVOLUTE 2010 + + SIPRP, v11 + SIPRP + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/production/siprp_mail.jnlp b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/production/siprp_mail.jnlp new file mode 100644 index 00000000..af448c62 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/production/siprp_mail.jnlp @@ -0,0 +1,28 @@ + + + + SIPRP + EVOLUTE 2010 + + SIPRP, v11 + SIPRP + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/production/siprp_pdfrenderer.jnlp b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/production/siprp_pdfrenderer.jnlp new file mode 100644 index 00000000..352ee212 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/production/siprp_pdfrenderer.jnlp @@ -0,0 +1,29 @@ + + + + + SIPRP + EVOLUTE 2010 + + SIPRP, v11 + SIPRP + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/production/siprpsoft-local3.jnlp b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/production/siprpsoft-local3.jnlp new file mode 100644 index 00000000..f2ba6a24 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/production/siprpsoft-local3.jnlp @@ -0,0 +1,57 @@ + + + + SIPRP/local3 + EVOLUTE 2010 + + SIPRP, v11 + SIPRP/local3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/production/siprpsoft.jnlp b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/production/siprpsoft.jnlp new file mode 100644 index 00000000..0c4ec122 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/production/siprpsoft.jnlp @@ -0,0 +1,72 @@ + + + + SIPRPSoft + Evolute Lda + + Software de Gestão de Higiene e Segurança no Trabalho + SIPRPSoft + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/test/siprpsoft.jnlp b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/test/siprpsoft.jnlp new file mode 100644 index 00000000..23fd92b3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/jnlp/test/siprpsoft.jnlp @@ -0,0 +1,72 @@ + + + + SIPRPSoft + Evolute Lda + + Software de Gestão de Higiene e Segurança no Trabalho + SIPRPSoft + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/ant-classloadertask.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/ant-classloadertask.jar new file mode 100644 index 00000000..d2f58d9f Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/ant-classloadertask.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/asm-all-3.1.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/asm-all-3.1.jar new file mode 100644 index 00000000..5f37af52 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/asm-all-3.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/datanucleus-enhancer-1.1.4.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/datanucleus-enhancer-1.1.4.jar new file mode 100644 index 00000000..6f7dd6c3 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/datanucleus-enhancer-1.1.4.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/evo-ant.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/evo-ant.jar new file mode 100644 index 00000000..3617ed4d Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/evo-ant.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/evoservices.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/evoservices.jar new file mode 100644 index 00000000..f4e1417a Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/evoservices.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/jaxen-1.1.1.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/jaxen-1.1.1.jar new file mode 100644 index 00000000..b6336311 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/jaxen-1.1.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/jdom.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/jdom.jar new file mode 100644 index 00000000..288e64cb Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/jdom.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/jsch-0.1.41.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/jsch-0.1.41.jar new file mode 100644 index 00000000..eb1e7647 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/jsch-0.1.41.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/leaf.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/leaf.jar new file mode 100644 index 00000000..2e4d3c44 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/leaf.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/proguard.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/proguard.jar new file mode 100644 index 00000000..3a9aebcf Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/proguard.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/svnClientAdapter.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/svnClientAdapter.jar new file mode 100644 index 00000000..ed37ba46 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/svnClientAdapter.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/svnant.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/svnant.jar new file mode 100644 index 00000000..af52be0d Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/svnant.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/svnjavahl.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/svnjavahl.jar new file mode 100644 index 00000000..71873057 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/svnjavahl.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/truelicense.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/truelicense.jar new file mode 100644 index 00000000..8c56bd12 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/truelicense.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/truexml.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/truexml.jar new file mode 100644 index 00000000..6ce23e31 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib.tools/truexml.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/PDFRenderer.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/PDFRenderer.jar new file mode 100644 index 00000000..1c3fed2f Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/PDFRenderer.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/TableLayout.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/TableLayout.jar new file mode 100755 index 00000000..81c1fc3c Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/TableLayout.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/ashwood-2.0.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/ashwood-2.0.jar new file mode 100644 index 00000000..55fcc9b1 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/ashwood-2.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/avalon-framework-4.2.0.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/avalon-framework-4.2.0.jar new file mode 100644 index 00000000..22a7ab34 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/avalon-framework-4.2.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/batik-all-1.7.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/batik-all-1.7.jar new file mode 100644 index 00000000..58932858 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/batik-all-1.7.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-codec-1.4.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-codec-1.4.jar new file mode 100644 index 00000000..458d432d Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-codec-1.4.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-collections-3.1.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-collections-3.1.jar new file mode 100644 index 00000000..41e230fe Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-collections-3.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-httpclient-3.1.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-httpclient-3.1.jar new file mode 100755 index 00000000..7c59774a Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-httpclient-3.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-io-1.4.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-io-1.4.jar new file mode 100644 index 00000000..133dc6cb Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-io-1.4.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-lang-2.1.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-lang-2.1.jar new file mode 100644 index 00000000..87b80ab5 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-lang-2.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-logging-1.1.1.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-logging-1.1.1.jar new file mode 100644 index 00000000..8758a96b Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/commons-logging-1.1.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/cursos.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/cursos.jar new file mode 100644 index 00000000..0cd29241 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/cursos.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/dom4j-1.6.1.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/dom4j-1.6.1.jar new file mode 100644 index 00000000..c8c4dbb9 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/dom4j-1.6.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/evologger.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/evologger.jar new file mode 100644 index 00000000..4308a04f Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/evologger.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/evolute.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/evolute.jar new file mode 100644 index 00000000..385312b9 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/evolute.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/evospellchecker.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/evospellchecker.jar new file mode 100644 index 00000000..328243e6 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/evospellchecker.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/fop.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/fop.jar new file mode 100644 index 00000000..24419bcf Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/fop.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/iText-2.0.7.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/iText-2.0.7.jar new file mode 100644 index 00000000..d6267523 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/iText-2.0.7.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jai_imageio.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jai_imageio.jar new file mode 100644 index 00000000..359551eb Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jai_imageio.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jaxen-1.1.1.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jaxen-1.1.1.jar new file mode 100644 index 00000000..b6336311 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jaxen-1.1.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jazzy-core.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jazzy-core.jar new file mode 100644 index 00000000..50d31354 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jazzy-core.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jcalendar-1.3.2.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jcalendar-1.3.2.jar new file mode 100644 index 00000000..b5e5a2d8 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jcalendar-1.3.2.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jdom.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jdom.jar new file mode 100644 index 00000000..288e64cb Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jdom.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jxl-2.6.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jxl-2.6.jar new file mode 100644 index 00000000..313cab7f Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/jxl-2.6.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/log4j-1.2.15.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/log4j-1.2.15.jar new file mode 100644 index 00000000..c930a6ab Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/log4j-1.2.15.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/mail.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/mail.jar new file mode 100644 index 00000000..59543774 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/mail.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/miglayout-3.7.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/miglayout-3.7.jar new file mode 100644 index 00000000..4e57b469 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/miglayout-3.7.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/nimrodlf.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/nimrodlf.jar new file mode 100644 index 00000000..3dcad2e7 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/nimrodlf.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/nlog4j-1.2.25.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/nlog4j-1.2.25.jar new file mode 100644 index 00000000..e398699b Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/nlog4j-1.2.25.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/org.springframework.beans-3.0.0.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/org.springframework.beans-3.0.0.jar new file mode 100644 index 00000000..37b9abe7 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/org.springframework.beans-3.0.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/org.springframework.context-3.0.0.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/org.springframework.context-3.0.0.jar new file mode 100644 index 00000000..7869adbb Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/org.springframework.context-3.0.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/org.springframework.core-3.0.0.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/org.springframework.core-3.0.0.jar new file mode 100644 index 00000000..8f0134ee Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/org.springframework.core-3.0.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/postgresql-8.4-701.jdbc4.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/postgresql-8.4-701.jdbc4.jar new file mode 100644 index 00000000..e21beec5 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/postgresql-8.4-701.jdbc4.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/serializer-2.7.0.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/serializer-2.7.0.jar new file mode 100644 index 00000000..7cd80696 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/serializer-2.7.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/shst.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/shst.jar new file mode 100644 index 00000000..07acb9cd Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/shst.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/smtp.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/smtp.jar new file mode 100644 index 00000000..1fb647ce Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/smtp.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/spring-ws-core-1.5.9.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/spring-ws-core-1.5.9.jar new file mode 100644 index 00000000..8c944048 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/spring-ws-core-1.5.9.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/spring-ws-core-tiger-1.5.9.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/spring-ws-core-tiger-1.5.9.jar new file mode 100644 index 00000000..8dabf02e Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/spring-ws-core-tiger-1.5.9.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/spring-ws-support-1.5.9.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/spring-ws-support-1.5.9.jar new file mode 100644 index 00000000..82796229 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/spring-ws-support-1.5.9.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/spring-xml-1.5.9.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/spring-xml-1.5.9.jar new file mode 100644 index 00000000..10a8905b Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/spring-xml-1.5.9.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/swingx.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/swingx.jar new file mode 100644 index 00000000..b0bcc878 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/swingx.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/truelicense.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/truelicense.jar new file mode 100644 index 00000000..8c56bd12 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/truelicense.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/xalan-2.7.0.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/xalan-2.7.0.jar new file mode 100644 index 00000000..979ee761 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/xalan-2.7.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/xercesImpl-2.7.1.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/xercesImpl-2.7.1.jar new file mode 100644 index 00000000..eac75ae8 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/xercesImpl-2.7.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/xmlgraphics-commons-1.3.1.jar b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/xmlgraphics-commons-1.3.1.jar new file mode 100644 index 00000000..81a485dc Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/lib/xmlgraphics-commons-1.3.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/nbproject/project.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/nbproject/project.xml new file mode 100644 index 00000000..c553f648 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/nbproject/project.xml @@ -0,0 +1,85 @@ + + + org.netbeans.modules.ant.freeform + + + SIPRPSoft + + + + SIPRPSoft + + + + + java + src + UTF-8 + + + + java + jnlp + UTF-8 + + + + . + UTF-8 + + + + + app-build + + + app-clean + + + docs-generate + + + app-run + + + app-clean + app-build + + + + + + + src + + + + jnlp + + + build.xml + + + + + + + + + + + + + + + src + lib/ashwood-2.0.jar:lib/avalon-framework-4.2.0.jar:lib/batik-all-1.7.jar:lib/commons-codec-1.4.jar:lib/commons-collections-3.1.jar:lib/commons-httpclient-3.1.jar:lib/commons-io-1.4.jar:lib/commons-lang-2.1.jar:lib/commons-logging-1.0.4.jar:lib/commons-logging-1.1.1.jar:lib/commons-logging-1.1.jar:lib/dom4j-1.6.1.jar:lib/evologger.jar:lib/evolute.jar:lib/evospellchecker.jar:lib/fop.jar:lib/iText-2.0.7.jar:lib/jai_imageio.jar:lib/jaxen-1.1.1.jar:lib/jazzy-core.jar:lib/jcalendar-1.3.2.jar:lib/jdo.jar:lib/jdom.jar:lib/jpox-1.0.4.jar:lib/jxl-2.6.jar:lib/log4j-1.2.15.jar:lib/log4j-1.2.8.jar:lib/mail.jar:lib/nimrodlf.jar:lib/nlog4j-1.2.25.jar:lib/org.springframework.beans-3.0.0.jar:lib/org.springframework.context-3.0.0.jar:lib/org.springframework.core-3.0.0.jar:lib/PDFRenderer.jar:lib/postgresql-8.4-701.jdbc4.jar:lib/serializer-2.7.0.jar:lib/shst.jar:lib/smtp.jar:lib/spring-ws-core-1.5.9.jar:lib/spring-ws-core-tiger-1.5.9.jar:lib/spring-ws-support-1.5.9.jar:lib/spring-xml-1.5.9.jar:lib/swingx.jar:lib/TableLayout.jar:lib/truelicense.jar:lib/xalan-2.7.0.jar:lib/xercesImpl-2.7.1.jar:lib/xmlgraphics-commons-1.3.1.jar:lib/cursos.jar + 1.5 + + + jnlp + 1.5 + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/print/open.bat b/tags/Site antigo e SIPRPSoft/SIPRPSoft/print/open.bat new file mode 100644 index 00000000..c7bed697 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/print/open.bat @@ -0,0 +1 @@ +c:\temp\acrord32.lnk "%1" \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/print/print.bat b/tags/Site antigo e SIPRPSoft/SIPRPSoft/print/print.bat new file mode 100644 index 00000000..757aee95 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/print/print.bat @@ -0,0 +1 @@ +c:\temp\acrord32.lnk /t "%1" %2 \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/1-development/app.properties b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/1-development/app.properties new file mode 100644 index 00000000..7de8309d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/1-development/app.properties @@ -0,0 +1,48 @@ +#APP level +app.appName = siprpsoft +app.main-class = siprp.Main +app.main = siprp.Main +app.max.mem=512M + +db.url.prefix = jdbc:postgresql:// +db.user = postgres +#db.password = rg2h-opksiprp +db.password = Typein +db.name = siprp_local_3_20100813 +db.connection.driver = org.postgresql.Driver + +jnlp.resources.property.server.address = evoserver +jnlp.resources.property.server.port = 5432 + +app.resources.j2se.max-heap-size=512m +app.resources.j2se.initial-heap-size=256m +app.resources.j2se.version=1.6.0+ + +shst.prestador.omissao.id = 35 +shst.prestador.omissao.nome = SIPRP +shst.prestador.analisador.tab = true + +module_spellchecker=true +module_cursos=true +module_utilizadores=false +module_ficha=true +module_clientes=true +module_relatorio=true +module_listagens=true +module_medicina_controlo_fluxo_ecd=true +module_hs_trabalho_plano_actuacao=true + +app.icon.path=logo/icon.png + +mail.sender.from=departamentotecnico@siprp.pt + +#usado em UserDataProvider (shst.jar) +web_aware.default_role = siprpuser + +web.images_app_url = http://www.evolute.pt:13080/SIPRPImages/image?id= + +lembrete.desmarcou = SIPRP Desmarcou +lembrete.notice_exame_periodico_days=60 +lembrete.notice_exame_admissao_days=60 +lembrete.notice_exame_ocasional_days=60 +lembrete.notice_visita_days=11 \ No newline at end of file diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/1-development/cursos/templates/certificado_empresas.xsl b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/1-development/cursos/templates/certificado_empresas.xsl new file mode 100644 index 00000000..c51d15e9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/1-development/cursos/templates/certificado_empresas.xsl @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + +   +   +   +   + Certificado +   +   +   +   + + A S.I.P.R.P – Sociedade Ibérica de Prevenção de Riscos Profissionais Unipessoal, certifica que + , + + é formadora certificada ( com CAP nº + + ), ministrou uma acção de formação relativa ao + + , com duração de no dia + + , aos seguintes trabalhadores: + + + + + + + Nome + + + Numero + + + + + + + + + + + + + + + + + + + + + +   + + Formadora +   +   +   +   + + Responsável de Formação + +   +   +   +   +   +   +   +   + +   +   +   +   +   +   +   +   +   +   +   + + Este certificado está registado no Livro de Registo de Formação nº + sob o nº +   +   + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/1-development/cursos/templates/certificado_formador.xsl b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/1-development/cursos/templates/certificado_formador.xsl new file mode 100644 index 00000000..b5adeea7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/1-development/cursos/templates/certificado_formador.xsl @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + +   +   +   +   + + +   +   + +   + Certificado +   +   + + A S.I.P.R.P – Sociedade Ibérica de Prevenção de Riscos Profissionais Unipessoal, Lda ( localizada no Atrium do Saldanha – Praça Duque de Saldanha, 1 – 9ºG, Lisboa ), certifica que + , + + + + de sexo , + + + + ministrou uma acção de formação no dia , + com duração total de , + relativa a + +   +   + +   +   +   +   +   +   + + + + + + + + + + + + + + Responsável de Formação + + + Director + + + + +   +   +   +   +   +   +   + + + + + + + + +   + + + + + Formadora + + +   + + + + +   +   +   +   +   +   +   +   +   + Este certificado está registado no Livro de Registo de Formação nº sob o nº + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/1-development/cursos/templates/certificado_formando.xsl b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/1-development/cursos/templates/certificado_formando.xsl new file mode 100644 index 00000000..7ecae65a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/1-development/cursos/templates/certificado_formando.xsl @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + +   +   +   + Certificado de Frequência de Formação Profissional + (de acordo com o Dec. Reg. 35/2002 de 23 de Abril ) +   +   + + A S.I.P.R.P – Sociedade Ibérica de Prevenção de Riscos Profissionais Unipessoal, Lda ( localizada no Atrium do Saldanha – Praça Duque de Saldanha, 1 – 9ºG, Lisboa ), certifica que + + nascida em + a , + com nacionalidade , + de sexo , + + frequentou no dia , + com a duração total de , + o Curso de Formação Profissional de + +   +   + +   +   +   +   +   +   +   + + + + + + + + + + + + + + Formadora + + + Formadora e Responsável de Formação + + + + +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   + Este certificado está registado no Livro de Registo de Formação nº sob o nº + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/1-development/ficha/ficha_aptidao.xsl b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/1-development/ficha/ficha_aptidao.xsl new file mode 100644 index 00000000..55536878 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/1-development/ficha/ficha_aptidao.xsl @@ -0,0 +1,487 @@ + + + + + + + + + + + + + FICHA DE APTIDÃO + + ( + + ) + + + + + + + + Empresa/Entidade + + + + + + DESIGNAÇÃO SOCIAL: + + + + + + + + ESTABELECIMENTO: + + + + + + LOCALIDADE: + + + + + + + + + + + + + + + + + + + + SERVIÇO DE + SAÚDE: Tipo + + + + â +      + + + ✓ + + + + Interno + + + + â +      + + + ✓ + + + + Interempresas + + + + â +      + + + ✓ + + + + Externo + + + + â +      + + + ✓ + + + + Serviço + Nacional de + Saúde + + + + + + DESIGNAÇÃO: + + + + + + + + + + + + + + + + SERVIÇO DE + HIGIENE E + SEGURANÇA: + Tipo + + + â + + ✓ + + + + Interno + + + â + + ✓ + + + + Interempresas + + + â + + ✓ + + + + Externo + + + â + + ✓ + + + + Outro + + + + + + DESIGNAÇÃO: + + + + + + + + + + + + + + + + + Trabalhador + + + + + + NOME: + + + + + + + + SEXO: + + + + + + DATA DE NASCIMENTO: + + + + + + NACIONALIDADE: + + + + + + + + NÚMERO + MECANOGRÃFICO/OUTRO: + + + + CATEGORIA PROFISSIONAL: + + + + FUNÇÃO PROPOSTA: + + + + + + DATA DE ADMISSÃO: + + + + LOCAL DE TRABALHO: + + + + DATA DE ADMISSÃO NA + FUNÇÃO: + + + + + + + + + + + + + Observações + + + + + + + + + + + + + + + + + + Exame Médico + + + + + + DATA DO EXAME: + + + TIPO + + â + ADMISSÃO + + + ✓ + + + â + PERIÓDICO + + + ✓ + + + â + OCASIONAL + + + ✓ + + + â + APÓS DOENÇA + + + ✓ + + + â + APÓS ACIDENTE + + + ✓ + + + â + A PEDIDO DO TRABALHADOR + + + ✓ + + + â + A PEDIDO DO SERVIÇO + + + ✓ + + + â + POR MUDANCA DE FUNÇÃO + + + ✓ + + + â + POR ALTERAÇÃO DAS + CONDIÇÕES DE TRABALHO + + + ✓ + + + â + OUTRO + + + ✓ + + + ESPECIFIQUE: + + + + + RESULTADO + + â + APTO + + + ✓ + + + â + APTO CONDICIONALMENTE + + + ✓ + + + â + INAPTO TEMPORARIAMENTE + + + ✓ + + + â + INAPTO DEFINITIVAMENTE + + + ✓ + + + OUTRAS FUNÇÕES QUE + PODE DESEMPENHAR + + 1 + + + + 2 + + + + 3 + + + + 4 + + +   + + + + + + + + + + + Outras Recomendações + + + + + + PRÓXIMO EXAME: + + + + + + + + + + + + + + + + + MÉDICO DO TRABALHO: + + + + + + C.P. + + + + + + + ASSINATURA + _____________________________________________________________________________________________ + TOMEI CONHECIMENTO + ___________________________________________________________________ + DATA: ___/___/______ + O RESPONSÃVEL DOS RECURSOS + HUMANOS + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/2-testing/app.properties b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/2-testing/app.properties new file mode 100644 index 00000000..c90707ba --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/2-testing/app.properties @@ -0,0 +1,107 @@ +#APP level +app.appName = siprpsoft +app.main-class = siprp.Main +app.main = siprp.Main +app.max.mem=512M + +db.url.prefix = jdbc:postgresql:// +db.user = siprp +db.password = rg2h-opksiprp +db.name = siprp_local_3 +db.connection.driver = org.postgresql.Driver + +jnlp.resources.property.server.address = www.evolute.pt +jnlp.resources.property.server.port = 5436 + +module_spellchecker=true +module_cursos=true +module_utilizadores=false +module_ficha=true +module_clientes=true +module_relatorio=true +module_listagens=true +module_medicina_controlo_fluxo_ecd=true +module_hs_trabalho_plano_actuacao=true + +mail.sender.from=departamentotecnico@siprp.pt + +#app.max.mem=512M +#app.run.args=test 1 2 3 + +app.resources.j2se.max-heap-size=512m +app.resources.j2se.initial-heap-size=256m +app.resources.j2se.version=1.6.0+ + +jnlp.information.description.short=SIPRPSoft +jnlp.information.description=Software de Gestão de Higiene e Segurança no Trabalho +jnlp.information.icon=logo/icon.png +jnlp.information.vendor=Evolute Lda +jnlp.information.title=SIPRPSoft + +shst.prestador.omissao.id=35 +shst.prestador.omissao.nome = SIPRP +shst.prestador.analisador.tab = true + +app.icon.path=logo/icon.png + +#usado em UserDataProvider (shst.jar) +web_aware.default_role = siprpuser + +web.images_app_url = http://www.evolute.pt:13080/SIPRPImages/image?id= + +lembrete.desmarcou = SIPRP Desmarcou +lembrete.notice_exame_days = 15 +lembrete.notice_visita_days = -11 + +#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/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/2-testing/cursos/templates/certificado_empresas.xsl b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/2-testing/cursos/templates/certificado_empresas.xsl new file mode 100644 index 00000000..c51d15e9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/2-testing/cursos/templates/certificado_empresas.xsl @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + +   +   +   +   + Certificado +   +   +   +   + + A S.I.P.R.P – Sociedade Ibérica de Prevenção de Riscos Profissionais Unipessoal, certifica que + , + + é formadora certificada ( com CAP nº + + ), ministrou uma acção de formação relativa ao + + , com duração de no dia + + , aos seguintes trabalhadores: + + + + + + + Nome + + + Numero + + + + + + + + + + + + + + + + + + + + + +   + + Formadora +   +   +   +   + + Responsável de Formação + +   +   +   +   +   +   +   +   + +   +   +   +   +   +   +   +   +   +   +   + + Este certificado está registado no Livro de Registo de Formação nº + sob o nº +   +   + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/2-testing/cursos/templates/certificado_formador.xsl b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/2-testing/cursos/templates/certificado_formador.xsl new file mode 100644 index 00000000..b5adeea7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/2-testing/cursos/templates/certificado_formador.xsl @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + +   +   +   +   + + +   +   + +   + Certificado +   +   + + A S.I.P.R.P – Sociedade Ibérica de Prevenção de Riscos Profissionais Unipessoal, Lda ( localizada no Atrium do Saldanha – Praça Duque de Saldanha, 1 – 9ºG, Lisboa ), certifica que + , + + + + de sexo , + + + + ministrou uma acção de formação no dia , + com duração total de , + relativa a + +   +   + +   +   +   +   +   +   + + + + + + + + + + + + + + Responsável de Formação + + + Director + + + + +   +   +   +   +   +   +   + + + + + + + + +   + + + + + Formadora + + +   + + + + +   +   +   +   +   +   +   +   +   + Este certificado está registado no Livro de Registo de Formação nº sob o nº + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/2-testing/cursos/templates/certificado_formando.xsl b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/2-testing/cursos/templates/certificado_formando.xsl new file mode 100644 index 00000000..7ecae65a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/2-testing/cursos/templates/certificado_formando.xsl @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + +   +   +   + Certificado de Frequência de Formação Profissional + (de acordo com o Dec. Reg. 35/2002 de 23 de Abril ) +   +   + + A S.I.P.R.P – Sociedade Ibérica de Prevenção de Riscos Profissionais Unipessoal, Lda ( localizada no Atrium do Saldanha – Praça Duque de Saldanha, 1 – 9ºG, Lisboa ), certifica que + + nascida em + a , + com nacionalidade , + de sexo , + + frequentou no dia , + com a duração total de , + o Curso de Formação Profissional de + +   +   + +   +   +   +   +   +   +   + + + + + + + + + + + + + + Formadora + + + Formadora e Responsável de Formação + + + + +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   + Este certificado está registado no Livro de Registo de Formação nº sob o nº + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/2-testing/ficha/ficha_aptidao.xsl b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/2-testing/ficha/ficha_aptidao.xsl new file mode 100644 index 00000000..55536878 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/2-testing/ficha/ficha_aptidao.xsl @@ -0,0 +1,487 @@ + + + + + + + + + + + + + FICHA DE APTIDÃO + + ( + + ) + + + + + + + + Empresa/Entidade + + + + + + DESIGNAÇÃO SOCIAL: + + + + + + + + ESTABELECIMENTO: + + + + + + LOCALIDADE: + + + + + + + + + + + + + + + + + + + + SERVIÇO DE + SAÚDE: Tipo + + + + â +      + + + ✓ + + + + Interno + + + + â +      + + + ✓ + + + + Interempresas + + + + â +      + + + ✓ + + + + Externo + + + + â +      + + + ✓ + + + + Serviço + Nacional de + Saúde + + + + + + DESIGNAÇÃO: + + + + + + + + + + + + + + + + SERVIÇO DE + HIGIENE E + SEGURANÇA: + Tipo + + + â + + ✓ + + + + Interno + + + â + + ✓ + + + + Interempresas + + + â + + ✓ + + + + Externo + + + â + + ✓ + + + + Outro + + + + + + DESIGNAÇÃO: + + + + + + + + + + + + + + + + + Trabalhador + + + + + + NOME: + + + + + + + + SEXO: + + + + + + DATA DE NASCIMENTO: + + + + + + NACIONALIDADE: + + + + + + + + NÚMERO + MECANOGRÃFICO/OUTRO: + + + + CATEGORIA PROFISSIONAL: + + + + FUNÇÃO PROPOSTA: + + + + + + DATA DE ADMISSÃO: + + + + LOCAL DE TRABALHO: + + + + DATA DE ADMISSÃO NA + FUNÇÃO: + + + + + + + + + + + + + Observações + + + + + + + + + + + + + + + + + + Exame Médico + + + + + + DATA DO EXAME: + + + TIPO + + â + ADMISSÃO + + + ✓ + + + â + PERIÓDICO + + + ✓ + + + â + OCASIONAL + + + ✓ + + + â + APÓS DOENÇA + + + ✓ + + + â + APÓS ACIDENTE + + + ✓ + + + â + A PEDIDO DO TRABALHADOR + + + ✓ + + + â + A PEDIDO DO SERVIÇO + + + ✓ + + + â + POR MUDANCA DE FUNÇÃO + + + ✓ + + + â + POR ALTERAÇÃO DAS + CONDIÇÕES DE TRABALHO + + + ✓ + + + â + OUTRO + + + ✓ + + + ESPECIFIQUE: + + + + + RESULTADO + + â + APTO + + + ✓ + + + â + APTO CONDICIONALMENTE + + + ✓ + + + â + INAPTO TEMPORARIAMENTE + + + ✓ + + + â + INAPTO DEFINITIVAMENTE + + + ✓ + + + OUTRAS FUNÇÕES QUE + PODE DESEMPENHAR + + 1 + + + + 2 + + + + 3 + + + + 4 + + +   + + + + + + + + + + + Outras Recomendações + + + + + + PRÓXIMO EXAME: + + + + + + + + + + + + + + + + + MÉDICO DO TRABALHO: + + + + + + C.P. + + + + + + + ASSINATURA + _____________________________________________________________________________________________ + TOMEI CONHECIMENTO + ___________________________________________________________________ + DATA: ___/___/______ + O RESPONSÃVEL DOS RECURSOS + HUMANOS + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/3-production/app.properties b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/3-production/app.properties new file mode 100644 index 00000000..dc37c2f0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/3-production/app.properties @@ -0,0 +1,110 @@ +#APP level +app.appName = siprpsoft +app.main-class = siprp.Main +app.main = siprp.Main +app.max.mem=512M + +db.url.prefix = jdbc:postgresql:// +db.user = postgres +db.password = Typein +db.name = siprp_local +db.connection.driver = org.postgresql.Driver + +jnlp.resources.property.server.address=10.158.2.2 +jnlp.resources.property.server.port=5432 + +#app.max.mem=512M +#app.run.args=test 1 2 3 + +app.resources.j2se.max-heap-size=512m +app.resources.j2se.initial-heap-size=256m +app.resources.j2se.version=1.6.0+ + +jnlp.information.description.short=SIPRPSoft +jnlp.information.description=Software de Gestão de Higiene e Segurança no Trabalho +jnlp.information.icon=logo/icon.png +jnlp.information.vendor=Evolute Lda +jnlp.information.title=SIPRPSoft + +shst.prestador.omissao.id=35 +shst.prestador.omissao.nome = SIPRP +shst.prestador.analisador.tab = true + +module_spellchecker=true +module_cursos=true +module_utilizadores=false +module_ficha=true +module_clientes=true +module_relatorio=true +module_listagens=true +module_medicina_controlo_fluxo_ecd=true +module_hs_trabalho_plano_actuacao=true + + +app.icon.path=logo/icon.png + +#usado em UserDataProvider (shst.jar) +web_aware.default_role = siprpuser + +web.images_app_url = http://www.evolute.pt:13080/SIPRPImages/image?id= + +lembrete.desmarcou = SIPRP Desmarcou +lembrete.notice_exame_periodico_days=60 +lembrete.notice_exame_admissao_days=60 +lembrete.notice_exame_ocasional_days=60 +lembrete.notice_visita_days=11 + +mail.sender.from=departamentotecnico@siprp.pt + +#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/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/3-production/cursos/templates/certificado_empresas.xsl b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/3-production/cursos/templates/certificado_empresas.xsl new file mode 100644 index 00000000..c51d15e9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/3-production/cursos/templates/certificado_empresas.xsl @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + +   +   +   +   + Certificado +   +   +   +   + + A S.I.P.R.P – Sociedade Ibérica de Prevenção de Riscos Profissionais Unipessoal, certifica que + , + + é formadora certificada ( com CAP nº + + ), ministrou uma acção de formação relativa ao + + , com duração de no dia + + , aos seguintes trabalhadores: + + + + + + + Nome + + + Numero + + + + + + + + + + + + + + + + + + + + + +   + + Formadora +   +   +   +   + + Responsável de Formação + +   +   +   +   +   +   +   +   + +   +   +   +   +   +   +   +   +   +   +   + + Este certificado está registado no Livro de Registo de Formação nº + sob o nº +   +   + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/3-production/cursos/templates/certificado_formador.xsl b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/3-production/cursos/templates/certificado_formador.xsl new file mode 100644 index 00000000..b5adeea7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/3-production/cursos/templates/certificado_formador.xsl @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + +   +   +   +   + + +   +   + +   + Certificado +   +   + + A S.I.P.R.P – Sociedade Ibérica de Prevenção de Riscos Profissionais Unipessoal, Lda ( localizada no Atrium do Saldanha – Praça Duque de Saldanha, 1 – 9ºG, Lisboa ), certifica que + , + + + + de sexo , + + + + ministrou uma acção de formação no dia , + com duração total de , + relativa a + +   +   + +   +   +   +   +   +   + + + + + + + + + + + + + + Responsável de Formação + + + Director + + + + +   +   +   +   +   +   +   + + + + + + + + +   + + + + + Formadora + + +   + + + + +   +   +   +   +   +   +   +   +   + Este certificado está registado no Livro de Registo de Formação nº sob o nº + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/3-production/cursos/templates/certificado_formando.xsl b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/3-production/cursos/templates/certificado_formando.xsl new file mode 100644 index 00000000..7ecae65a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/3-production/cursos/templates/certificado_formando.xsl @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + +   +   +   + Certificado de Frequência de Formação Profissional + (de acordo com o Dec. Reg. 35/2002 de 23 de Abril ) +   +   + + A S.I.P.R.P – Sociedade Ibérica de Prevenção de Riscos Profissionais Unipessoal, Lda ( localizada no Atrium do Saldanha – Praça Duque de Saldanha, 1 – 9ºG, Lisboa ), certifica que + + nascida em + a , + com nacionalidade , + de sexo , + + frequentou no dia , + com a duração total de , + o Curso de Formação Profissional de + +   +   + +   +   +   +   +   +   +   + + + + + + + + + + + + + + Formadora + + + Formadora e Responsável de Formação + + + + +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   + Este certificado está registado no Livro de Registo de Formação nº sob o nº + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/3-production/ficha/ficha_aptidao.xsl b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/3-production/ficha/ficha_aptidao.xsl new file mode 100644 index 00000000..55536878 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/3-production/ficha/ficha_aptidao.xsl @@ -0,0 +1,487 @@ + + + + + + + + + + + + + FICHA DE APTIDÃO + + ( + + ) + + + + + + + + Empresa/Entidade + + + + + + DESIGNAÇÃO SOCIAL: + + + + + + + + ESTABELECIMENTO: + + + + + + LOCALIDADE: + + + + + + + + + + + + + + + + + + + + SERVIÇO DE + SAÚDE: Tipo + + + + â +      + + + ✓ + + + + Interno + + + + â +      + + + ✓ + + + + Interempresas + + + + â +      + + + ✓ + + + + Externo + + + + â +      + + + ✓ + + + + Serviço + Nacional de + Saúde + + + + + + DESIGNAÇÃO: + + + + + + + + + + + + + + + + SERVIÇO DE + HIGIENE E + SEGURANÇA: + Tipo + + + â + + ✓ + + + + Interno + + + â + + ✓ + + + + Interempresas + + + â + + ✓ + + + + Externo + + + â + + ✓ + + + + Outro + + + + + + DESIGNAÇÃO: + + + + + + + + + + + + + + + + + Trabalhador + + + + + + NOME: + + + + + + + + SEXO: + + + + + + DATA DE NASCIMENTO: + + + + + + NACIONALIDADE: + + + + + + + + NÚMERO + MECANOGRÃFICO/OUTRO: + + + + CATEGORIA PROFISSIONAL: + + + + FUNÇÃO PROPOSTA: + + + + + + DATA DE ADMISSÃO: + + + + LOCAL DE TRABALHO: + + + + DATA DE ADMISSÃO NA + FUNÇÃO: + + + + + + + + + + + + + Observações + + + + + + + + + + + + + + + + + + Exame Médico + + + + + + DATA DO EXAME: + + + TIPO + + â + ADMISSÃO + + + ✓ + + + â + PERIÓDICO + + + ✓ + + + â + OCASIONAL + + + ✓ + + + â + APÓS DOENÇA + + + ✓ + + + â + APÓS ACIDENTE + + + ✓ + + + â + A PEDIDO DO TRABALHADOR + + + ✓ + + + â + A PEDIDO DO SERVIÇO + + + ✓ + + + â + POR MUDANCA DE FUNÇÃO + + + ✓ + + + â + POR ALTERAÇÃO DAS + CONDIÇÕES DE TRABALHO + + + ✓ + + + â + OUTRO + + + ✓ + + + ESPECIFIQUE: + + + + + RESULTADO + + â + APTO + + + ✓ + + + â + APTO CONDICIONALMENTE + + + ✓ + + + â + INAPTO TEMPORARIAMENTE + + + ✓ + + + â + INAPTO DEFINITIVAMENTE + + + ✓ + + + OUTRAS FUNÇÕES QUE + PODE DESEMPENHAR + + 1 + + + + 2 + + + + 3 + + + + 4 + + +   + + + + + + + + + + + Outras Recomendações + + + + + + PRÓXIMO EXAME: + + + + + + + + + + + + + + + + + MÉDICO DO TRABALHO: + + + + + + C.P. + + + + + + + ASSINATURA + _____________________________________________________________________________________________ + TOMEI CONHECIMENTO + ___________________________________________________________________ + DATA: ___/___/______ + O RESPONSÃVEL DOS RECURSOS + HUMANOS + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/4-WebApps/app.properties b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/4-WebApps/app.properties new file mode 100644 index 00000000..daee042a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/4-WebApps/app.properties @@ -0,0 +1,96 @@ +#APP level +app.appName = siprpsoft +app.main-class = siprp.Main +app.main = siprp.Main + +db.url.prefix = jdbc:postgresql:// +db.user = siprp +db.password = rg2h-opksiprp +db.name = siprp_local_3 +db.connection.driver = org.postgresql.Driver + +jnlp.resources.property.server.address = localhost +jnlp.resources.property.server.port = 5436 + + +#app.max.mem=512M +#app.run.args=test 1 2 3 + +app.resources.j2se.max-heap-size=512m +app.resources.j2se.initial-heap-size=256m +app.resources.j2se.version=1.6.0+ + +jnlp.information.description.short=SIPRPSoft +jnlp.information.description=Software de Gestão de Higiene e Segurança no Trabalho +jnlp.information.icon=logo/icon.png +jnlp.information.vendor=Evolute Lda +jnlp.information.title=SIPRPSoft + +shst.prestador.omissao.id=35 +shst.prestador.omissao.nome = SIPRP +shst.prestador.analisador.tab = true + +app.icon.path=logo/icon.png + +#usado em UserDataProvider (shst.jar) +web_aware.default_role = siprpuser + +web.images_app_url = http://www.evolute.pt:13080/SIPRPImages/image?id= + +lembrete.desmarcou = SIPRP Desmarcou +lembrete.notice_exame_days = 15 +lembrete.notice_visita_days = -11 + + +#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/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/codegen.xml b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/codegen.xml new file mode 100644 index 00000000..6d6006d3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/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/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/project.properties b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/project.properties new file mode 100644 index 00000000..5d747fdc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/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/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/version.properties b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/version.properties new file mode 100644 index 00000000..4a3cb7d5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/properties/version.properties @@ -0,0 +1,6 @@ +#siprpsoft versioning file +#Mon Dec 06 01:08:10 WET 2010 +major=12 +name=siprpsoft +minor=3 +build=13 diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo/icon.png b/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo/icon.png new file mode 100644 index 00000000..57c398e6 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo/icon.png differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo/logo_combo.jpg b/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo/logo_combo.jpg new file mode 100644 index 00000000..24d6543a Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo/logo_combo.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo/logo_w400.jpg b/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo/logo_w400.jpg new file mode 100644 index 00000000..97fa4634 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo/logo_w400.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo/logo_w400.png b/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo/logo_w400.png new file mode 100644 index 00000000..2e9fe434 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo/logo_w400.png differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo_combo.jpg b/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo_combo.jpg new file mode 100644 index 00000000..24d6543a Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo_combo.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo_evo.jpg b/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo_evo.jpg new file mode 100644 index 00000000..230ae585 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/logo_evo.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/siprp/Main.java b/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/siprp/Main.java new file mode 100644 index 00000000..84d85844 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/siprp/Main.java @@ -0,0 +1,268 @@ +package siprp; + +import static shst.ProcessoConstants.ESTADO_PROCESSO_BY_CODE; +import static shst.ProcessoConstants.PROCESSO_ABERTO_CODE; +import static shst.ProcessoConstants.PROCESSO_ABERTO_DESCRIPTION; +import static shst.ProcessoConstants.PROCESSO_CANCELADO_CODE; +import static shst.ProcessoConstants.PROCESSO_CANCELADO_DESCRIPTION; +import static shst.ProcessoConstants.PROCESSO_FECHADO_CODE; +import static shst.ProcessoConstants.PROCESSO_FECHADO_DESCRIPTION; + +import java.awt.Color; +import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.util.Date; + +import javax.swing.JPanel; +import javax.swing.SwingUtilities; +import javax.swing.UIManager; +import javax.swing.plaf.ColorUIResource; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.MutableTreeNode; + +import shst.SHSTPropertiesConstants; +import shst.SHSTShutdownHook; +import shst.SHSTTracker; +import shst.companydataloaders.SIPRPPropertiesLoader; +import shst.initializer.SHSTORMInitializer; +import shst.initializer.SHSTUIInitializer; +import shst.lembretes.LembretesDaemon; +import shst.update.SHSTUpdateList; +import siprp.initializer.SIPRPLoggerInit; + +import com.evolute.module.updater.UpdateListener; +import com.evolute.module.updater.Updater; +import com.evolute.project.ProjectTools; +import com.evolute.properties.EvoPropertyKey; +import com.evolute.utils.Singleton; +import com.evolute.utils.db.DBException; +import com.evolute.utils.db.DBManager; +import com.evolute.utils.db.JDBCManager; +import com.evolute.utils.db.keyretrievers.JDBCAutoKeyRetriever; +import com.evolute.utils.error.ErrorLogger; +import com.evolute.utils.image.EvoImage; +import com.evolute.utils.jdbc.DBStatementExecuter; +import com.evolute.utils.jdbc.StatementExecuterFactory; +import com.evolute.utils.sql.Insert; +import com.evolute.utils.strings.UnicodeChecker; +import com.evolute.utils.ui.DialogException; +import com.evolute.utils.ui.window.LoginWindow; + +public class Main implements com.evolute.utils.ui.window.Connector +{ + + private static String dbase; + private static SHSTTracker shstTracker; + private static LoginWindow loginWindow; + + public static File fopConfigFile; + + static + { + ESTADO_PROCESSO_BY_CODE.put( PROCESSO_ABERTO_CODE, PROCESSO_ABERTO_DESCRIPTION ); + ESTADO_PROCESSO_BY_CODE.put( PROCESSO_FECHADO_CODE, PROCESSO_FECHADO_DESCRIPTION ); + ESTADO_PROCESSO_BY_CODE.put( PROCESSO_CANCELADO_CODE, PROCESSO_CANCELADO_DESCRIPTION ); + } + + public static void main( String args[] ) throws Exception + { + + UIManager.put( "TextField.inactiveForeground", ColorUIResource.BLACK ); + UIManager.put( "TextField.foreground", ColorUIResource.RED.darker() ); + + UIManager.put( "TextArea.inactiveForeground", ColorUIResource.BLACK ); + UIManager.put( "TextArea.foreground", ColorUIResource.RED.darker() ); + + UIManager.put( "ComboBox.disabledForeground", ColorUIResource.BLACK ); + UIManager.put( "ComboBox.foreground", ColorUIResource.RED.darker() ); + + UIManager.put( "FormattedTextField.inactiveForeground", ColorUIResource.BLACK ); + UIManager.put( "FormattedTextField.foreground", ColorUIResource.RED.darker() ); + + new SHSTShutdownHook().init(); + + new SHSTUIInitializer().doInit(); + + SIPRPPropertiesLoader.getInstance().load(); + + dbase = (String) Singleton.getInstance( SHSTPropertiesConstants.LOCAL_DB_NAME ); + + Insert.setDefaultKeyRetriever( JDBCAutoKeyRetriever.DEFAULT ); + + UnicodeChecker.setUseDoubleSlash( true ); + + final String logoFileName = ( String ) Singleton.getInstance( SHSTPropertiesConstants.COMPANY_LOGO ); + + String url = null; + try + { + String server = null; + if( server == null ) + { + server = (String)Singleton.getInstance( SHSTPropertiesConstants.LOCAL_URL ); + } + String prefix = (String)Singleton.getInstance( SHSTPropertiesConstants.LOCAL_URL_PREFIX ); + url = prefix + server + "/" + dbase; + DBManager dbm = new JDBCManager( url, + (String)Singleton.getInstance( SHSTPropertiesConstants.LOCAL_USER ), + (String)Singleton.getInstance( SHSTPropertiesConstants.LOCAL_PASSWORD ) , 10, 8, 8, null ); + Singleton.setInstance( Singleton.DEFAULT_DBMANAGER, dbm ); + + StatementExecuterFactory.initialize( new DBStatementExecuter( dbm.getSharedExecuter( Main.class ) ) ); + + Updater.getInstance().addUpdateListener( new UpdateListener() + { + @Override + public void updateStarted() + { + } + @Override + public void updateDone() + { + try + { + new SHSTORMInitializer().doInit(); + Singleton.setInstance( Singleton.TODAY, new Date() ); + loginWindow = new LoginWindow( new Main(), logoFileName, + new String[] { (String) Singleton.getInstance( SHSTPropertiesConstants.SOFTWARE_NAME ) }, + new String[] { "Vers\u00E3o " + ProjectTools.getInstance().getVersion(), "(EVOLUTE 2004-2010)" }, "", + (String)Singleton.getInstance( SHSTPropertiesConstants.LOCAL_USER ), + (String)Singleton.getInstance( SHSTPropertiesConstants.LOCAL_PASSWORD ), null, false ); + loginWindow.setTitle( (String) Singleton.getInstance( SHSTPropertiesConstants.SOFTWARE_NAME ) ); + + String iconPath = ( String ) Singleton.getInstance( EvoPropertyKey.APP.ICON_PATH ); + if ( iconPath != null && ! "".equals( iconPath.trim() ) ) + { + loginWindow.setIconImage( new EvoImage( iconPath ).getImage() ); + } + + loginWindow.getButtOK().setEnabled( false ); + JPanel left = loginWindow.getLeftPanel(); + left.setBackground( Color.white ); + + loginWindow.setSize( 600, 500 ); + loginWindow.setExtendedState( loginWindow.getExtendedState() | LoginWindow.MAXIMIZED_BOTH ); + loginWindow.setVisible( true ); + SwingUtilities.invokeLater( new Runnable() + { + @Override + public void run() + { + try + { + loginWindow.expandAll(); + } + catch ( Exception e ) + { + ErrorLogger.logExceptionAndShow( new Exception( "Erro ao iniciar o SIPRPSoft", e ) ); + } + } + } ); + fopConfigFile = loadFopConfigFile(); + } + catch( Exception e ) + { + ErrorLogger.logExceptionAndShow( e ); + } + } + } ); + Updater.getInstance().executeUpdates( SHSTUpdateList.getUpdatesOnly() ); + } + catch( Exception ex ) + { + DialogException.showExceptionMessage( ex, "N\u00E3o foi poss\u00EDvel estabelecer a liga\u00E7\u00E3o \u00E0 base de dados.\n(" + url + ")", false ); + } + } + + private static File loadFopConfigFile() + { + try + { + InputStream is = ClassLoader.getSystemClassLoader() + .getResourceAsStream("shst/util/fop/fop.xconf"); + if (is != null) + { + File tempFile = File.createTempFile("fop", ".xconf"); + FileOutputStream fos = new FileOutputStream(tempFile); + byte[] buf = new byte[256]; + int read = 0; + while ((read = is.read(buf)) > 0) + { + fos.write(buf, 0, read); + } + return tempFile; + } + return null; + } + catch (Exception e) + { + e.printStackTrace(); + return null; + } + } + + @Override + public boolean connect( String user, String passwd ) + { + Singleton.setInstance( Singleton.USERNAME, user ); + SIPRPLoggerInit.init(); + shstTracker = SHSTTracker.getInstance();//new SIPRPTracker( avisos ); + + + LembretesDaemon.go(); + return true; + } + + @Override + public boolean disconnect() + { + if( shstTracker.quit() ) + { + shstTracker = null; + try + { + ( ( DBManager )Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ) ).close(); + Singleton.clear(); + } + catch( DBException ex ) + { + DialogException.showException( ex ); + } + return true; + } + return false; + } + + @Override + public void executeAction( DefaultMutableTreeNode node ) + { + try + { + shstTracker.openWindow( ( String )node.getUserObject() ); + } + catch( Exception ex ) + { + DialogException.showException( ex ); + } + + } + + @Override + public void exit() + { + if( shstTracker == null || shstTracker.quit() ) + { + loginWindow.setVisible( false ); + loginWindow.dispose(); + System.exit( 0 ); + } + } + + @Override + public MutableTreeNode getTree() + { + return shstTracker.getRoot(); + } + +} diff --git a/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/siprp/initializer/SIPRPLoggerInit.java b/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/siprp/initializer/SIPRPLoggerInit.java new file mode 100644 index 00000000..d00dd649 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/SIPRPSoft/src/siprp/initializer/SIPRPLoggerInit.java @@ -0,0 +1,38 @@ +package siprp.initializer; + +import java.util.HashMap; +import java.util.Map; + +import com.evolute.project.ProjectTools; +import com.evolute.utils.error.ErrorLogger; +import com.evolute.utils.error.LoggerProperties; +import com.evolute.utils.error.ProjectsEnum; +import com.evolute.utils.error.ws.WSLogger; +import com.evolute.utils.network.proxy.EvoProxyObject; + +public class SIPRPLoggerInit +{ + + public static void init() + { + Map map = new HashMap(); + + map.put( LoggerProperties.PROJECT, ProjectsEnum.SIPRP.toString() ); + map.put( LoggerProperties.PROJECT_NAME, ProjectTools.getInstance().getProjectName() ); + map.put( LoggerProperties.SOFTWARE_VERSION, ProjectTools.getInstance().getVersion().toString() ); + map.put( LoggerProperties.SOFTWARE_NAME, "SIPRPSoft" ); + + try + { + EvoProxyObject.configSystemProxySelector(); + EvoProxyObject.getProxy(); + ErrorLogger.initializeLogger( new WSLogger( map ) ); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + + } + +} diff --git a/tags/Site antigo e SIPRPSoft/WebImages/build.xml b/tags/Site antigo e SIPRPSoft/WebImages/build.xml new file mode 100644 index 00000000..76801527 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/WebImages/build.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + Builds, tests, and runs the project WebImages. + + + diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar new file mode 100644 index 00000000..0d5f9d10 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/ashwood-2.0.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/ashwood-2.0.jar new file mode 100644 index 00000000..55fcc9b1 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/ashwood-2.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/avalon-framework-4.2.0.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/avalon-framework-4.2.0.jar new file mode 100644 index 00000000..b1aa6d7c Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/avalon-framework-4.2.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/batik-all-1.7.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/batik-all-1.7.jar new file mode 100644 index 00000000..58932858 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/batik-all-1.7.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-codec-1.4.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-codec-1.4.jar new file mode 100644 index 00000000..458d432d Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-codec-1.4.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-collections-3.1.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-collections-3.1.jar new file mode 100644 index 00000000..41e230fe Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-collections-3.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-httpclient-3.1.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-httpclient-3.1.jar new file mode 100755 index 00000000..7c59774a Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-httpclient-3.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-io-1.4.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-io-1.4.jar new file mode 100644 index 00000000..133dc6cb Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-io-1.4.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-lang-2.4.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-lang-2.4.jar new file mode 100644 index 00000000..532939ec Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-lang-2.4.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-logging-1.1.1.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-logging-1.1.1.jar new file mode 100644 index 00000000..8758a96b Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-logging-1.1.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-validator-1.3.1.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-validator-1.3.1.jar new file mode 100644 index 00000000..55b12b1a Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/commons-validator-1.3.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/evologger.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/evologger.jar new file mode 100644 index 00000000..f0579f0c Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/evologger.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/evolute.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/evolute.jar new file mode 100644 index 00000000..c3bcf984 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/evolute.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/junit/junit-3.8.2-api.zip b/tags/Site antigo e SIPRPSoft/WebImages/lib/junit/junit-3.8.2-api.zip new file mode 100644 index 00000000..6d792fda Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/junit/junit-3.8.2-api.zip differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/junit/junit-3.8.2.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/junit/junit-3.8.2.jar new file mode 100644 index 00000000..d8358726 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/junit/junit-3.8.2.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/junit_4/junit-4.5-api.zip b/tags/Site antigo e SIPRPSoft/WebImages/lib/junit_4/junit-4.5-api.zip new file mode 100644 index 00000000..5748c444 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/junit_4/junit-4.5-api.zip differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/junit_4/junit-4.5-src.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/junit_4/junit-4.5-src.jar new file mode 100644 index 00000000..18774a57 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/junit_4/junit-4.5-src.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/junit_4/junit-4.5.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/junit_4/junit-4.5.jar new file mode 100644 index 00000000..83f8bc79 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/junit_4/junit-4.5.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/log4j-1.2.15.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/log4j-1.2.15.jar new file mode 100644 index 00000000..c930a6ab Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/log4j-1.2.15.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/nblibraries.properties b/tags/Site antigo e SIPRPSoft/WebImages/lib/nblibraries.properties new file mode 100644 index 00000000..b1910954 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/WebImages/lib/nblibraries.properties @@ -0,0 +1,12 @@ +libs.junit.classpath=\ + ${base}/junit/junit-3.8.2.jar +libs.junit.javadoc=\ + ${base}/junit/junit-3.8.2-api.zip +libs.junit_4.classpath=\ + ${base}/junit_4/junit-4.5.jar +libs.junit_4.javadoc=\ + ${base}/junit_4/junit-4.5-api.zip +libs.junit_4.src=\ + ${base}/junit_4/junit-4.5-src.jar +libs.CopyLibs.classpath=\ + ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/org.springframework.beans-3.0.0.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/org.springframework.beans-3.0.0.jar new file mode 100644 index 00000000..37b9abe7 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/org.springframework.beans-3.0.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/org.springframework.context-3.0.0.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/org.springframework.context-3.0.0.jar new file mode 100644 index 00000000..7869adbb Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/org.springframework.context-3.0.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/org.springframework.core-3.0.0.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/org.springframework.core-3.0.0.jar new file mode 100644 index 00000000..8f0134ee Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/org.springframework.core-3.0.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/postgresql-8.2-506.jdbc4.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/postgresql-8.2-506.jdbc4.jar new file mode 100644 index 00000000..260a95eb Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/postgresql-8.2-506.jdbc4.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/siprpsoft.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/siprpsoft.jar new file mode 100644 index 00000000..e39630db Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/siprpsoft.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/spring-ws-core-1.5.9.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/spring-ws-core-1.5.9.jar new file mode 100644 index 00000000..8c944048 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/spring-ws-core-1.5.9.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/spring-ws-core-tiger-1.5.9.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/spring-ws-core-tiger-1.5.9.jar new file mode 100644 index 00000000..8dabf02e Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/spring-ws-core-tiger-1.5.9.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/spring-ws-support-1.5.9.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/spring-ws-support-1.5.9.jar new file mode 100644 index 00000000..82796229 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/spring-ws-support-1.5.9.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/spring-xml-1.5.9.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/spring-xml-1.5.9.jar new file mode 100644 index 00000000..10a8905b Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/spring-xml-1.5.9.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/truelicense.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/truelicense.jar new file mode 100644 index 00000000..8c56bd12 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/truelicense.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/xalan-2.7.0.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/xalan-2.7.0.jar new file mode 100644 index 00000000..979ee761 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/xalan-2.7.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/xercesImpl-2.7.1.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/xercesImpl-2.7.1.jar new file mode 100644 index 00000000..eac75ae8 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/xercesImpl-2.7.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/xml-apis-1.3.04.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/xml-apis-1.3.04.jar new file mode 100644 index 00000000..d42c0ea6 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/xml-apis-1.3.04.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/xml-apis-ext-1.3.04.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/xml-apis-ext-1.3.04.jar new file mode 100644 index 00000000..a7869d68 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/xml-apis-ext-1.3.04.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/lib/xmlgraphics-commons-1.3.1.jar b/tags/Site antigo e SIPRPSoft/WebImages/lib/xmlgraphics-commons-1.3.1.jar new file mode 100644 index 00000000..81a485dc Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/WebImages/lib/xmlgraphics-commons-1.3.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/WebImages/nbproject/ant-deploy.xml b/tags/Site antigo e SIPRPSoft/WebImages/nbproject/ant-deploy.xml new file mode 100644 index 00000000..a6f1480c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/WebImages/nbproject/ant-deploy.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/WebImages/nbproject/build-impl.xml b/tags/Site antigo e SIPRPSoft/WebImages/nbproject/build-impl.xml new file mode 100644 index 00000000..09b32045 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/WebImages/nbproject/build-impl.xml @@ -0,0 +1,920 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.test.dir + Must set build.dir + Must set build.web.dir + Must set build.generated.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.war + +The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file) +or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +The libs.CopyLibs.classpath property is not set up. +This property must point to +org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part +of NetBeans IDE installation and is usually located at +<netbeans_installation>/java<version>/ant/extra folder. +Either open the project in the IDE and make sure CopyLibs library +exists or setup the property manually. For example like this: + ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.jsp.includes + + + + + + + + + + + + + + + + + + + + + + + Must select a file in the IDE or set jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. + + + Launching ${browse.url} + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/WebImages/nbproject/genfiles.properties b/tags/Site antigo e SIPRPSoft/WebImages/nbproject/genfiles.properties new file mode 100644 index 00000000..5f37f164 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/WebImages/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=d81d303c +build.xml.script.CRC32=04f3d76d +build.xml.stylesheet.CRC32=c0ebde35@1.15.2.1 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=d81d303c +nbproject/build-impl.xml.script.CRC32=25989aa0 +nbproject/build-impl.xml.stylesheet.CRC32=8ab4467e@1.15.2.1 diff --git a/tags/Site antigo e SIPRPSoft/WebImages/nbproject/project.properties b/tags/Site antigo e SIPRPSoft/WebImages/nbproject/project.properties new file mode 100644 index 00000000..6b38c156 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/WebImages/nbproject/project.properties @@ -0,0 +1,128 @@ +build.classes.dir=${build.web.dir}/WEB-INF/classes +build.classes.excludes=**/*.java,**/*.form +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +build.web.dir=${build.dir}/web +build.web.excludes=${build.classes.excludes} +client.urlPart= +compile.jsps=false +conf.dir=conf +debug.classpath=${build.classes.dir}:${javac.classpath} +debug.test.classpath=\ + ${run.test.classpath} +display.browser=true +dist.dir=dist +dist.ear.war=${dist.dir}/${war.ear.name} +dist.javadoc.dir=${dist.dir}/javadoc +dist.war=${dist.dir}/${war.name} +excludes= +file.reference.ashwood-2.0.jar=lib/ashwood-2.0.jar +file.reference.avalon-framework-4.2.0.jar=lib/avalon-framework-4.2.0.jar +file.reference.batik-all-1.7.jar=lib/batik-all-1.7.jar +file.reference.commons-codec-1.4.jar=lib/commons-codec-1.4.jar +file.reference.commons-collections-3.1.jar=lib/commons-collections-3.1.jar +file.reference.commons-httpclient-3.1.jar=lib/commons-httpclient-3.1.jar +file.reference.commons-io-1.4.jar=lib/commons-io-1.4.jar +file.reference.commons-lang-2.4.jar=lib/commons-lang-2.4.jar +file.reference.commons-logging-1.1.1.jar=lib/commons-logging-1.1.1.jar +file.reference.commons-validator-1.3.1.jar=lib/commons-validator-1.3.1.jar +file.reference.evologger.jar=lib/evologger.jar +file.reference.evolute.jar=lib/evolute.jar +file.reference.log4j-1.2.15.jar=lib/log4j-1.2.15.jar +file.reference.org.springframework.beans-3.0.0.jar=lib/org.springframework.beans-3.0.0.jar +file.reference.org.springframework.context-3.0.0.jar=lib/org.springframework.context-3.0.0.jar +file.reference.org.springframework.core-3.0.0.jar=lib/org.springframework.core-3.0.0.jar +file.reference.postgresql-8.2-506.jdbc4.jar=lib/postgresql-8.2-506.jdbc4.jar +file.reference.siprpsoft.jar=lib/siprpsoft.jar +file.reference.spring-ws-core-1.5.9.jar=lib/spring-ws-core-1.5.9.jar +file.reference.spring-ws-core-tiger-1.5.9.jar=lib/spring-ws-core-tiger-1.5.9.jar +file.reference.spring-ws-support-1.5.9.jar=lib/spring-ws-support-1.5.9.jar +file.reference.spring-xml-1.5.9.jar=lib/spring-xml-1.5.9.jar +file.reference.truelicense.jar=lib/truelicense.jar +file.reference.WebImages-src=src +file.reference.xalan-2.7.0.jar=lib/xalan-2.7.0.jar +file.reference.xercesImpl-2.7.1.jar=lib/xercesImpl-2.7.1.jar +file.reference.xml-apis-1.3.04.jar=lib/xml-apis-1.3.04.jar +file.reference.xml-apis-ext-1.3.04.jar=lib/xml-apis-ext-1.3.04.jar +file.reference.xmlgraphics-commons-1.3.1.jar=lib/xmlgraphics-commons-1.3.1.jar +includes=** +j2ee.deploy.on.save=false +j2ee.platform=1.5 +j2ee.server.type=Tomcat60 +jar.compress=false +java.source.based=true +javac.classpath=\ + ${file.reference.ashwood-2.0.jar}:\ + ${file.reference.avalon-framework-4.2.0.jar}:\ + ${file.reference.batik-all-1.7.jar}:\ + ${file.reference.commons-collections-3.1.jar}:\ + ${file.reference.evologger.jar}:\ + ${file.reference.evolute.jar}:\ + ${file.reference.log4j-1.2.15.jar}:\ + ${file.reference.postgresql-8.2-506.jdbc4.jar}:\ + ${file.reference.xalan-2.7.0.jar}:\ + ${file.reference.xercesImpl-2.7.1.jar}:\ + ${file.reference.xml-apis-1.3.04.jar}:\ + ${file.reference.xml-apis-ext-1.3.04.jar}:\ + ${file.reference.xmlgraphics-commons-1.3.1.jar}:\ + ${file.reference.org.springframework.beans-3.0.0.jar}:\ + ${file.reference.commons-httpclient-3.1.jar}:\ + ${file.reference.commons-lang-2.4.jar}:\ + ${file.reference.commons-logging-1.1.1.jar}:\ + ${file.reference.commons-validator-1.3.1.jar}:\ + ${file.reference.org.springframework.context-3.0.0.jar}:\ + ${file.reference.org.springframework.core-3.0.0.jar}:\ + ${file.reference.spring-ws-core-1.5.9.jar}:\ + ${file.reference.spring-ws-core-tiger-1.5.9.jar}:\ + ${file.reference.spring-ws-support-1.5.9.jar}:\ + ${file.reference.spring-xml-1.5.9.jar}:\ + ${file.reference.commons-codec-1.4.jar}:\ + ${file.reference.commons-io-1.4.jar}:\ + ${file.reference.truelicense.jar}:\ + ${file.reference.siprpsoft.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.debug=true +javac.deprecation=false +javac.source=1.5 +javac.target=1.5 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir}:\ + ${libs.junit.classpath}:\ + ${libs.junit_4.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.preview=true +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +jspcompilation.classpath=${jspc.classpath}:${javac.classpath} +persistence.xml.dir=${conf.dir} +platform.active=default_platform +resource.dir=setup +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +# Space-separated list of JVM arguments used when running a class with a main method or a unit test +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): +runmain.jvmargs= +source.encoding=UTF-8 +source.root=. +src.dir=${file.reference.WebImages-src} +test.src.dir= +test.test.dir=test +war.content.additional= +war.ear.name=WebImages.war +war.name=WebImages.war +web.docbase.dir=web +webinf.dir=web/WEB-INF diff --git a/tags/Site antigo e SIPRPSoft/WebImages/nbproject/project.xml b/tags/Site antigo e SIPRPSoft/WebImages/nbproject/project.xml new file mode 100644 index 00000000..71b26db4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/WebImages/nbproject/project.xml @@ -0,0 +1,134 @@ + + + org.netbeans.modules.web.project + + + WebImages + 1.6.5 + + + ${file.reference.ashwood-2.0.jar} + WEB-INF/lib + + + ${file.reference.avalon-framework-4.2.0.jar} + WEB-INF/lib + + + ${file.reference.batik-all-1.7.jar} + WEB-INF/lib + + + ${file.reference.commons-collections-3.1.jar} + WEB-INF/lib + + + ${file.reference.evologger.jar} + WEB-INF/lib + + + ${file.reference.evolute.jar} + WEB-INF/lib + + + ${file.reference.log4j-1.2.15.jar} + WEB-INF/lib + + + ${file.reference.postgresql-8.2-506.jdbc4.jar} + WEB-INF/lib + + + ${file.reference.xalan-2.7.0.jar} + WEB-INF/lib + + + ${file.reference.xercesImpl-2.7.1.jar} + WEB-INF/lib + + + ${file.reference.xml-apis-1.3.04.jar} + WEB-INF/lib + + + ${file.reference.xml-apis-ext-1.3.04.jar} + WEB-INF/lib + + + ${file.reference.xmlgraphics-commons-1.3.1.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.beans-3.0.0.jar} + WEB-INF/lib + + + ${file.reference.commons-httpclient-3.1.jar} + WEB-INF/lib + + + ${file.reference.commons-lang-2.4.jar} + WEB-INF/lib + + + ${file.reference.commons-logging-1.1.1.jar} + WEB-INF/lib + + + ${file.reference.commons-validator-1.3.1.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.context-3.0.0.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.core-3.0.0.jar} + WEB-INF/lib + + + ${file.reference.spring-ws-core-1.5.9.jar} + WEB-INF/lib + + + ${file.reference.spring-ws-core-tiger-1.5.9.jar} + WEB-INF/lib + + + ${file.reference.spring-ws-support-1.5.9.jar} + WEB-INF/lib + + + ${file.reference.spring-xml-1.5.9.jar} + WEB-INF/lib + + + ${file.reference.commons-codec-1.4.jar} + WEB-INF/lib + + + ${file.reference.commons-io-1.4.jar} + WEB-INF/lib + + + ${file.reference.truelicense.jar} + WEB-INF/lib + + + ${file.reference.siprpsoft.jar} + WEB-INF/lib + + + + + + + + + + + + lib/nblibraries.properties + + + diff --git a/tags/Site antigo e SIPRPSoft/WebImages/src/SIPRPNode.driver.xml b/tags/Site antigo e SIPRPSoft/WebImages/src/SIPRPNode.driver.xml new file mode 100644 index 00000000..3c75ecb8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/WebImages/src/SIPRPNode.driver.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/WebImages/src/siprp/images/servlet/DBConstants.java b/tags/Site antigo e SIPRPSoft/WebImages/src/siprp/images/servlet/DBConstants.java new file mode 100644 index 00000000..90452e5e --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/WebImages/src/siprp/images/servlet/DBConstants.java @@ -0,0 +1,25 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package siprp.images.servlet; + +/** + * + * @author dneves + */ +public interface DBConstants +{ + +// public static final String SERVER = "evoserver"; +// public static final String PORT = "5432"; + + public static final String SERVER = "localhost"; + public static final String PORT = "5436"; + + public static final String USER = "postgres"; + public static final String PASSWORD = ""; + + public static final String DATABASE = "siprp_local_3"; +} diff --git a/tags/Site antigo e SIPRPSoft/WebImages/src/siprp/images/servlet/ImageDataProvider.java b/tags/Site antigo e SIPRPSoft/WebImages/src/siprp/images/servlet/ImageDataProvider.java new file mode 100644 index 00000000..130f48b0 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/WebImages/src/siprp/images/servlet/ImageDataProvider.java @@ -0,0 +1,59 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package siprp.images.servlet; + +import com.evolute.application.initializer.DefaultDatabaseInitializer; +import com.evolute.entity.ProviderInterface; +import com.evolute.utils.Singleton; +import com.evolute.utils.dataedition.persistence.Persistent; +import com.evolute.utils.error.ErrorLogger; +import siprp.data.outer.ImageData; + +/** + * + * @author dneves + */ +public class ImageDataProvider +{ + private static ImageDataProvider INSTANCE = null; + + private ProviderInterface< Persistent< ? >, Exception > ENTITY_PROVIDER = null; + + private ImageDataProvider() throws Exception + { + if ( Singleton.getInstance( Singleton.DEFAULT_EVO_DATA_PROVIDER ) == null ) + { + new DefaultDatabaseInitializer( DBConstants.SERVER, DBConstants.PORT, DBConstants.DATABASE, + DBConstants.USER, DBConstants.PASSWORD ).doInit(); + } + + ENTITY_PROVIDER = ( ProviderInterface< Persistent< ? >, Exception > ) Singleton.getInstance( Singleton.DEFAULT_EVO_DATA_PROVIDER ); + } + + public static synchronized ImageDataProvider getProvider() throws Exception + { + if ( INSTANCE == null ) + { + INSTANCE = new ImageDataProvider(); + } + return INSTANCE; + } + + public ImageData loadImageDataByID( Integer imageID ) + { + ImageData result = null; + try + { + result = ENTITY_PROVIDER.load( ImageData.class, imageID, ImageData.ID ); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + return result; + } + +} diff --git a/tags/Site antigo e SIPRPSoft/WebImages/src/siprp/images/servlet/ImagesServlet.java b/tags/Site antigo e SIPRPSoft/WebImages/src/siprp/images/servlet/ImagesServlet.java new file mode 100644 index 00000000..05615c20 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/WebImages/src/siprp/images/servlet/ImagesServlet.java @@ -0,0 +1,97 @@ +package siprp.images.servlet; + +import com.evolute.utils.error.ErrorLogger; + +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import siprp.data.outer.ImageData; + +public final class ImagesServlet extends HttpServlet +{ + private static final long serialVersionUID = 999506147931075031L; +// private static final double MAX_WIDTH = 4.5; +// private static final double MAX_HEIGHT = 2.0; + + private static final String PARAMETER_ID = "id"; + +// private static Boolean logger = false; +// static +// { +// if ( ! logger ) +// { +// WebImagesLogger.init(); +// logger = true; +// } +// } + + public void doGet( HttpServletRequest request, HttpServletResponse response ) //throws IOException, ServletException + { + response.setContentType( "image/png" ); + String param = request.getParameter( PARAMETER_ID ); + + System.out.println( "SIPRPImages . ImagesServlet . doGet() : ImageData.ID = " + param ); + + try + { + ServletOutputStream out = response.getOutputStream(); + + if ( param != null && ! "".equals( param.trim() ) ) + { + try + { + Integer imageID = new Integer( param ); + + ImageDataProvider imgProvider = ImageDataProvider.getProvider(); + ImageData img = imgProvider.loadImageDataByID( imageID ); + if ( img != null ) + { + out.write( img.getImage_data() ); + } + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + } + + out.flush(); + out.close(); + } + catch ( Exception e ) + { + e.printStackTrace(); +// ErrorLogger.logException( e ); + } + + + +// response.setContentType( "image/png" ); +// ServletOutputStream out = response.getOutputStream(); +// String param = request.getParameter( PARAMETER_ID ); +// System.out.println(param); +// try +// { +// Integer id = new Integer( param ); +// Image img = new ImageDAO().getImageForID( id ); +//// int width = img.getWidth( null ); +//// int height = img.getHeight( null ); +//// double wrel = ((double)width ) / MAX_WIDTH; +//// double hrel = ((double)height ) / MAX_HEIGHT; +//// if( wrel > 1 && wrel > hrel ) +//// { +//// img = img.getScaledInstance( MAX_WIDTH, -1, Image.SCALE_FAST ); +//// } +//// else if( hrel > 1 && hrel > wrel ) +//// { +//// img = img.getScaledInstance( -1, MAX_HEIGHT, Image.SCALE_FAST ); +//// } +// out.write( img.getImageData() ); +// } +// catch (Exception e) { +// e.printStackTrace(); +// } + } + +} diff --git a/tags/Site antigo e SIPRPSoft/WebImages/src/siprp/images/servlet/WebImagesLogger.java b/tags/Site antigo e SIPRPSoft/WebImages/src/siprp/images/servlet/WebImagesLogger.java new file mode 100644 index 00000000..6d8a0dfe --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/WebImages/src/siprp/images/servlet/WebImagesLogger.java @@ -0,0 +1,35 @@ +package siprp.images.servlet; + +import com.evolute.utils.error.ErrorLogger; +import com.evolute.utils.error.LoggerProperties; +import com.evolute.utils.error.ProjectsEnum; +import com.evolute.utils.error.log4j.DBLogger; +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author dneves + */ +public class WebImagesLogger +{ + + private static String EVO_LOGGER_DB = "jdbc:postgresql://www.evolute.pt:5436/evo_logging?logUnclosedConnections=true&loginTimeout=5&socketTimeout=5&tcpKeepAlive=true"; + private static String EVO_LOGGER_USER = "evo_logger"; + private static String EVO_LOGGER_PASSWD = "2DD-rg2hLOG"; + + public static void init() + { + Map< LoggerProperties, String > map = new HashMap< LoggerProperties, String >(); + map.put( LoggerProperties.USERNAME, EVO_LOGGER_USER ); + map.put( LoggerProperties.PASSWORD, EVO_LOGGER_PASSWD ); + map.put( LoggerProperties.URL, EVO_LOGGER_DB ); + map.put( LoggerProperties.PROJECT, ProjectsEnum.PLANOS_ACTUACAO.toString() ); + map.put( LoggerProperties.PROJECT_NAME, ProjectsEnum.PLANOS_ACTUACAO.toString() ); + map.put( LoggerProperties.SOFTWARE_VERSION, "1.1" ); + map.put( LoggerProperties.SOFTWARE_NAME, "SIPRP - Planos Actuacao : SIPRPImages (WebImages)" ); + // TODO - firewall - must be implemented over http (ws) + ErrorLogger.initializeLogger( new DBLogger( map ) ); + } + +} diff --git a/tags/Site antigo e SIPRPSoft/WebImages/web/META-INF/context.xml b/tags/Site antigo e SIPRPSoft/WebImages/web/META-INF/context.xml new file mode 100644 index 00000000..57bfa45b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/WebImages/web/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/tags/Site antigo e SIPRPSoft/WebImages/web/WEB-INF/web.xml b/tags/Site antigo e SIPRPSoft/WebImages/web/WEB-INF/web.xml new file mode 100644 index 00000000..8a856d65 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/WebImages/web/WEB-INF/web.xml @@ -0,0 +1,19 @@ + + + + + + + + siprp.images.servlet.ImagesServlet + imageServlet + + + + imageServlet + /image + + + diff --git a/tags/Site antigo e SIPRPSoft/common/lib/TableLayout.jar b/tags/Site antigo e SIPRPSoft/common/lib/TableLayout.jar new file mode 100755 index 00000000..81c1fc3c Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/common/lib/TableLayout.jar differ diff --git a/tags/Site antigo e SIPRPSoft/common/lib/ashwood-2.0.jar b/tags/Site antigo e SIPRPSoft/common/lib/ashwood-2.0.jar new file mode 100644 index 00000000..55fcc9b1 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/common/lib/ashwood-2.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/common/lib/cayenne-server-3.0M6.jar b/tags/Site antigo e SIPRPSoft/common/lib/cayenne-server-3.0M6.jar new file mode 100644 index 00000000..fdf0d056 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/common/lib/cayenne-server-3.0M6.jar differ diff --git a/tags/Site antigo e SIPRPSoft/common/lib/commons-collections-3.1.jar b/tags/Site antigo e SIPRPSoft/common/lib/commons-collections-3.1.jar new file mode 100644 index 00000000..41e230fe Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/common/lib/commons-collections-3.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/common/lib/commons-lang-2.1.jar b/tags/Site antigo e SIPRPSoft/common/lib/commons-lang-2.1.jar new file mode 100644 index 00000000..87b80ab5 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/common/lib/commons-lang-2.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/common/lib/commons-logging-1.1.jar b/tags/Site antigo e SIPRPSoft/common/lib/commons-logging-1.1.jar new file mode 100644 index 00000000..2ff9bbd9 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/common/lib/commons-logging-1.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/common/lib/evolute.jar b/tags/Site antigo e SIPRPSoft/common/lib/evolute.jar new file mode 100644 index 00000000..122596d7 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/common/lib/evolute.jar differ diff --git a/tags/Site antigo e SIPRPSoft/common/lib/jcalendar-1.3.2.jar b/tags/Site antigo e SIPRPSoft/common/lib/jcalendar-1.3.2.jar new file mode 100755 index 00000000..b5e5a2d8 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/common/lib/jcalendar-1.3.2.jar differ diff --git a/tags/Site antigo e SIPRPSoft/common/lib/log4j-1.2.8.jar b/tags/Site antigo e SIPRPSoft/common/lib/log4j-1.2.8.jar new file mode 100644 index 00000000..493a3ccc Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/common/lib/log4j-1.2.8.jar differ diff --git a/tags/Site antigo e SIPRPSoft/common/lib/mail.jar b/tags/Site antigo e SIPRPSoft/common/lib/mail.jar new file mode 100644 index 00000000..59543774 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/common/lib/mail.jar differ diff --git a/tags/Site antigo e SIPRPSoft/common/src/SIPRPMap.map.xml b/tags/Site antigo e SIPRPSoft/common/src/SIPRPMap.map.xml new file mode 100644 index 00000000..af99153b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/common/src/SIPRPMap.map.xml @@ -0,0 +1,2117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + ORACLE + + + + + + + + + + ORACLE + ecd_oficial_id_seq + 1 + + + + + + + + ORACLE + email_plano_de_actuacao_id_seq + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ORACLE + etiquetas_id_seq + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ORACLE + exames_portaria_id_seq + 1 + + + + + + + + + + + + + + + + ORACLE + hs_area_id_seq + 1 + + + + + + + ORACLE + hs_email_id_seq + 1 + + + + + + + + + + + + + + + + + + ORACLE + hs_equipamento_id_seq + 1 + + + + + + + + + ORACLE + hs_legislacao_id_seq + 1 + + + + + + + + ORACLE + hs_legislacao_categoria_id_seq + 1 + + + + + + + + + + + + + + + + + + ORACLE + hs_medida_id_seq + 1 + + + + + + + + + + ORACLE + hs_normalizacao_id_seq + 1 + + + + + + + + + + + + + + + + + + ORACLE + hs_posto_id_seq + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ORACLE + hs_relatorio_id_seq + 1 + + + + + + + + + + + ORACLE + hs_relatorio_area_id_seq + 1 + + + + + + + + + + + + ORACLE + hs_relatorio_equipamento_id_seq + 1 + + + + + + + + + + + ORACLE + hs_relatorio_legislacao_id_seq + 1 + + + + + + + + + + + ORACLE + hs_relatorio_medida_id_seq + 1 + + + + + + + + + + + ORACLE + hs_relatorio_legislacao_id_seq + 1 + + + + + + + + + + + ORACLE + hs_relatorio_posto_id_seq + 1 + + + + + + + + + + + + + + + + ORACLE + hs_relatorio_posto_risco_id_seq + 1 + + + + + + + + + + ORACLE + hs_relatorio_risco_id_seq + 1 + + + + + + + + + + + + + ORACLE + hs_risco_id_seq + 1 + + + + + + + + + + + + + + + + ORACLE + hs_risco_tema_id_seq + 1 + + + + + + + + ORACLE + image_id_seq + 1 + + + + + + + + + + + + + + + + + + + ORACLE + lembretes_id_seq + 1 + + + + + + + + + + ORACLE + lembretes_tipos_id_seq + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + ORACLE + marcacoes_grupos_realizados_id_seq + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ORACLE + marcacoes_trabalhador_estados_id_seq + 1 + + + + + + + + + + + + + + + + + + + + + + + + ORACLE + prestadores_id_seq + 1 + + + + + + + + ORACLE + prestadores_grupos_protocolo_id_seq + 1 + + + + + + + + + ORACLE + prt_elementos_protocolo_id_seq + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ORACLE + trabalhadores_consultas_id_seq + 1 + + + + + + + + + + ORACLE + trabalhadores_consultas_datas_id_seq + 1 + + + + + + + + + + + ORACLE + trabalhadores_consultas_datas_emails_id_seq + 1 + + + + + + + + ORACLE + trabalhadores_consultas_datas_observacoes_id_seq + 1 + + + + + + + + + + + + + + ORACLE + trabalhadores_ecd_id_seq + 1 + + + + + + + + + + ORACLE + trabalhadores_ecds_id_seq + 1 + + + + + + + + + + + + + + + + + + + ORACLE + trabalhadores_ecds_datas_id_seq + 1 + + + + + + + + + + + ORACLE + trabalhadores_ecds_datas_emails_id_seq + 1 + + + + + + + + ORACLE + trabalhadores_ecds_datas_observacoes_id_seq + 1 + + + + + + + + ORACLE + trabalhadores_fichas_aptidao_id_seq + 1 + + + + + + + + + + + + + ORACLE + trabalhadores_processo_id_seq + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/common/src/cayenne.xml b/tags/Site antigo e SIPRPSoft/common/src/cayenne.xml new file mode 100644 index 00000000..2b962b58 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/common/src/cayenne.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/tags/Site antigo e SIPRPSoft/lib.netbeans/appbase.jar b/tags/Site antigo e SIPRPSoft/lib.netbeans/appbase.jar new file mode 100644 index 00000000..a72c3466 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/lib.netbeans/appbase.jar differ diff --git a/tags/Site antigo e SIPRPSoft/lib.netbeans/dataprovider.jar b/tags/Site antigo e SIPRPSoft/lib.netbeans/dataprovider.jar new file mode 100644 index 00000000..349e5f56 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/lib.netbeans/dataprovider.jar differ diff --git a/tags/Site antigo e SIPRPSoft/lib.netbeans/jsf-api.jar b/tags/Site antigo e SIPRPSoft/lib.netbeans/jsf-api.jar new file mode 100644 index 00000000..c4e24d1e Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/lib.netbeans/jsf-api.jar differ diff --git a/tags/Site antigo e SIPRPSoft/lib.netbeans/jsf-impl.jar b/tags/Site antigo e SIPRPSoft/lib.netbeans/jsf-impl.jar new file mode 100644 index 00000000..c2ee4b9d Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/lib.netbeans/jsf-impl.jar differ diff --git a/tags/Site antigo e SIPRPSoft/lib.netbeans/webui.jar b/tags/Site antigo e SIPRPSoft/lib.netbeans/webui.jar new file mode 100644 index 00000000..556dfc89 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/lib.netbeans/webui.jar differ diff --git a/tags/Site antigo e SIPRPSoft/lib.tools/bcel-5.1.jar b/tags/Site antigo e SIPRPSoft/lib.tools/bcel-5.1.jar new file mode 100644 index 00000000..524e375c Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/lib.tools/bcel-5.1.jar differ diff --git a/tags/Site antigo e SIPRPSoft/lib.tools/catalina-ant.jar b/tags/Site antigo e SIPRPSoft/lib.tools/catalina-ant.jar new file mode 100644 index 00000000..f4e61e61 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/lib.tools/catalina-ant.jar differ diff --git a/tags/Site antigo e SIPRPSoft/lib.tools/jdo.jar b/tags/Site antigo e SIPRPSoft/lib.tools/jdo.jar new file mode 100644 index 00000000..2cee6e86 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/lib.tools/jdo.jar differ diff --git a/tags/Site antigo e SIPRPSoft/lib.tools/jpox-enhancer-1.0.4.jar b/tags/Site antigo e SIPRPSoft/lib.tools/jpox-enhancer-1.0.4.jar new file mode 100644 index 00000000..48c5ab13 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/lib.tools/jpox-enhancer-1.0.4.jar differ diff --git a/tags/Site antigo e SIPRPSoft/lib.tools/servlet-api.jar b/tags/Site antigo e SIPRPSoft/lib.tools/servlet-api.jar new file mode 100644 index 00000000..38cf06c0 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/lib.tools/servlet-api.jar differ diff --git a/tags/Site antigo e SIPRPSoft/lib/evospellchecker.jar b/tags/Site antigo e SIPRPSoft/lib/evospellchecker.jar new file mode 100644 index 00000000..ea686619 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/lib/evospellchecker.jar differ diff --git a/tags/Site antigo e SIPRPSoft/lib/swingx.jar b/tags/Site antigo e SIPRPSoft/lib/swingx.jar new file mode 100644 index 00000000..dec67850 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/lib/swingx.jar differ diff --git a/tags/Site antigo e SIPRPSoft/web/WEB-INF/web.xml b/tags/Site antigo e SIPRPSoft/web/WEB-INF/web.xml new file mode 100644 index 00000000..1676e79a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/WEB-INF/web.xml @@ -0,0 +1,64 @@ + + + + + + SIPRP WEB + SIPRP WEB + + SIPRP WEB + siprp.pagina.siprpServlet + + + SIPRP WEB + /index.html + + + + Request + siprp.pagina.RequestServlet + + + Request + /request + + + + Schedule + siprp.pagina.ScheduleServlet + + + Schedule + /schedule + + + + Relatorio + siprp.pagina.RelatorioServlet + + + Relatorio + /relatorio + + + + Noticias + siprp.pagina.NewsServlet + + + Noticias + /noticias + + + + Recrutamento + siprp.pagina.RecruitServlet + + + Recrutamento + /recruit + + + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/clientes.html b/tags/Site antigo e SIPRPSoft/web/contents/clientes.html new file mode 100644 index 00000000..75220e84 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/clientes.html @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + +
   os +nossos clientes
+ + + + + + + + + + +

+

+
em +desenvolvimento...
+

+

+
+

+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/colaboradores.html b/tags/Site antigo e SIPRPSoft/web/contents/colaboradores.html new file mode 100644 index 00000000..1030ce98 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/colaboradores.html @@ -0,0 +1,50 @@ + + + + + SIPRP - Colaboradores + + + + + + + + + + + + + + + +
   parceiros
+ + + + + + + + + + +

+

+

+

+

+
+

+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/contactos.html b/tags/Site antigo e SIPRPSoft/web/contents/contactos.html new file mode 100644 index 00000000..ccd32346 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/contactos.html @@ -0,0 +1,52 @@ + + + + + SIPRP - Apresentação + + + + + + + + + + + + + + + +
   +contactos
+
+ + + + + + + + + + +

+

+

+

+

+
+

+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/bomba_amostr_ar.jpg b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/bomba_amostr_ar.jpg new file mode 100644 index 00000000..e98b0ee2 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/bomba_amostr_ar.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/bomba_asp_man.jpg b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/bomba_asp_man.jpg new file mode 100644 index 00000000..f27ce08b Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/bomba_asp_man.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/dosimetro.jpg b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/dosimetro.jpg new file mode 100644 index 00000000..07c2c3ef Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/dosimetro.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/explosivimetro.jpg b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/explosivimetro.jpg new file mode 100644 index 00000000..dc4b9378 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/explosivimetro.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_.html new file mode 100644 index 00000000..361778ee --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_.html @@ -0,0 +1,28 @@ + + + + + SIPRP - Serviços + + + + + + + + + + + + + + +

+

+
+ +
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_BA.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_BA.html new file mode 100644 index 00000000..2f346c68 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_BA.html @@ -0,0 +1,30 @@ + + + + + SIPRP - Serviços + + + + + + + + + + + + + + +

+
Bomba +de Amostragem de Ar
+
+ +
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_Dos.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_Dos.html new file mode 100644 index 00000000..7046acc3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_Dos.html @@ -0,0 +1,29 @@ + + + + + SIPRP - Serviços + + + + + + + + + + + + + + +

+
Dosímetro
+
+ +
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_Ex.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_Ex.html new file mode 100644 index 00000000..ab750922 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_Ex.html @@ -0,0 +1,29 @@ + + + + + SIPRP - Serviços + + + + + + + + + + + + + + +

+
Explosivímetro
+
+ +
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_Lux.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_Lux.html new file mode 100644 index 00000000..48581bb3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_Lux.html @@ -0,0 +1,29 @@ + + + + + SIPRP - Serviços + + + + + + + + + + + + + + +

+
Luxímetro
+
+ +
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_MCT.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_MCT.html new file mode 100644 index 00000000..d2c5738c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_MCT.html @@ -0,0 +1,30 @@ + + + + + SIPRP - Serviços + + + + + + + + + + + + + + +

+
Monitor +de Stress Térmico
+
+ +
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_Outr.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_Outr.html new file mode 100644 index 00000000..e5e98410 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_Outr.html @@ -0,0 +1,30 @@ + + + + + SIPRP - Serviços + + + + + + + + + + + + + + +

+
Bomba +de Aspiração Manual
+
+ +
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_RC.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_RC.html new file mode 100644 index 00000000..6a8b968c --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_RC.html @@ -0,0 +1,30 @@ + + + + + SIPRP - Serviços + + + + + + + + + + + + + + +

+
Regulador +de Caudal
+
+ +
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_SI.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_SI.html new file mode 100644 index 00000000..909a5aaa --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_SI.html @@ -0,0 +1,29 @@ + + + + + SIPRP - Serviços + + + + + + + + + + + + + + +

+
Sonómetro
+
+ +
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_T.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_T.html new file mode 100644 index 00000000..4391a445 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/higiene_foto_equip_T.html @@ -0,0 +1,29 @@ + + + + + SIPRP - Serviços + + + + + + + + + + + + + + +

+
Termoanemómetro
+
+ +
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/luximetro.jpg b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/luximetro.jpg new file mode 100644 index 00000000..90407d7b Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/luximetro.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/regulador_caudal.jpg b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/regulador_caudal.jpg new file mode 100644 index 00000000..397db268 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/regulador_caudal.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/sonometro.jpg b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/sonometro.jpg new file mode 100644 index 00000000..e54c3cb3 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/sonometro.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/stress_termico.jpg b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/stress_termico.jpg new file mode 100644 index 00000000..9a1652f7 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/stress_termico.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/termoanemometro.jpg b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/termoanemometro.jpg new file mode 100644 index 00000000..bda7a07f Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/Images/termoanemometro.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/colaboradores_text.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/colaboradores_text.html new file mode 100644 index 00000000..cde0ae2d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/colaboradores_text.html @@ -0,0 +1,114 @@ + + + + + + SIPRP - Apresentação + + +Área reservada a parceiros da SIPRP.
+Esta página dá acesso a funcionalidades exclusivas e confidenciais.
+
    +
  • + Acesso ao webmail SIPRP +
  • +
  • + Acesso a Aplicações de Gestão de SHST - Acesso reservado +
  • +
  • + Junte-se a Nós
    +
    + +
  • +
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/contactos_text.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/contactos_text.html new file mode 100644 index 00000000..49d25e25 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/contactos_text.html @@ -0,0 +1,105 @@ + + + + + SIPRP - Apresentação + + + + +SIPRP – Sociedade Ibérica de Prevenção de Riscos +Profissionais
+
+Edifício Atrium Saldanha
+Praça Duque de Saldanha, 1 – +9º G
+1050 – 094 Lisboa
+
+Telefone: 21 350 45 40
+Fax: 21 350 45 49
+E-mail: geral@siprp.pt
+
+
+Pedir mais informações
+
+ + + + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/higiene_foto_equip_BA.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/higiene_foto_equip_BA.html new file mode 100644 index 00000000..27998fee --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/higiene_foto_equip_BA.html @@ -0,0 +1,29 @@ + + + + + SIPRP - Serviços + + + + + + + + + + + + + + +

+
Bomba de Amostragem de ar
+
voltar +»
+
+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/higiene_text.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/higiene_text.html new file mode 100644 index 00000000..26d9268a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/higiene_text.html @@ -0,0 +1,59 @@ + + + + + SIPRP - Serviços + + +Para a prestação deste serviço, a SIPRP +colocará à disposição um dos seus +Técnicos Superiores de Higiene e Segurança, que +garantirá o cumprimento das seguintes actividades nas +várias instalações da empresa espalhadas por todo +o país:
+

+ - Identificação e avaliação dos +riscos;
+ - Planeamento da prevenção, integrando-a a todos os +níveis da hierarquia;
+ - Elaboração de um programa de +prevenção de riscos profissionais;
+ - Informação sobre riscos e medidas de +protecção;
+ - Organização de medidas a adoptar em caso de +perigo +grave;
+ - Coordenação das auditorias internas para controlo +da aplicação das medidas a implementar;
+  +- Análise dos acidentes de trabalho e doenças +profissionais;
+  +- Recolha e organização de elementos +estatísticos.
+

+Estas actividades estão englobadas nas várias auditorias, +medições, avaliações e respectivos +relatórios efectuados pelo técnico.
+A SIPRP efectuará, no mínimo, DUAS auditorias por cada +estabelecimento e ano, que originarão os respectivos +relatórios técnicos com o levantamento das +condições verificadas e as recomendações +para a resolução das não conformidades encontradas.
+Com esse relatório será elaborado um Plano de +Actuação que será entregue ao coordenador do +serviço na empresa com as acções a desenvolver, +prazos de implementação e responsabilidades.
+Para além dos serviços incluídos e exigidos pela +legislação, a SIPRP possui capacidade (técnica e +humana) para efectuar avaliações específicas no +âmbito da Higiene e Segurança.
+Desde Estudos de Ruído, Iluminação, Conforto +Térmico, Qualidade do Ar, bem como outros factores relacionados +com outros riscos físicos, químicos ou biológicos.
+Para o cumprimento destes requisitos a SIPRP possui equipamento +técnico próprio, de acordo com as normas nacionais e +internacionais.
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/higiene_text_equip.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/higiene_text_equip.html new file mode 100644 index 00000000..a972d096 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/higiene_text_equip.html @@ -0,0 +1,36 @@ + + + + + SIPRP - Serviços + + +Bombas de Amostragem
+ - Para captação do volume de ar pretendido para a +amostra
+Reguladores de Caudal
+ - Para regulação do caudal de ar pretendido para +amostra
+Monitores de Conforto +Térmico
+ - Para determinação dos parâmetros de +conforto térmico
+Termoanemómetros
+ - Para medição da temperatura, humidade relativa e +velocidade do ar
+Explosivímetros
+ - Para medir a concentração de oxigénio, +CO2, Metano, entre outros
+Luxímetros
+ - Para medição de luminância e +iluminância
+Dosímetros
+ - Para avaliação da exposição pessoal +diária de um trabalhador ao ruído
+Sonómetros +Integradores
+ - Para avaliação dos níveis de ruído +ocupacional ou ambiental
+Outros
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/links_text.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/links_text.html new file mode 100644 index 00000000..d76b4468 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/links_text.html @@ -0,0 +1,87 @@ + + + + + SIPRP - Apresentação + + +

+ACT +– www.act.gov.pt
+Agência Europeia para a +Segurança +e Saúde do Trabalho – www.agency.osha.eu.int
+American +Institute of Chemical Engineers – www.aiche.org
+American +Industrial Hygiene Association – www.aiha.org
+Associação +Portuguesa de Seguradores – www.apseguradores.pt
+Bureau +of Labour Statistics – www.stats.bls.gov
+Cornell +University Ergonomics Web – www.ergo.human.cornell.edu
+Direcção +Geral de Saúde – www.dgs.pt
+Factor +Segurança – www.factor-segur.pt
+ Gabinete de Estratégia e Planeamento – +www.dgeep.mtss.gov.pt
+Industrial +Safety and Health News – www.ishn.com
+Institut +Nacional de Recherche et de Securité – www.inrs.fr
+Institute +for Research in Construction – +www.irc.nrc-cnrc.gc.ca/irccontents.html
+Instituto +de Apoio às Pequenas e Médias Empresas e ao +Investimento – www.iapmei.pt
+Instituto +Nacional de Estatística – www.ine.pt
+Instituto +para a Qualidade na Formação – +www.inofor.pt
+International +Labor Organization – www.ilo.org
+International +Organization for Standardization – ISO – +www.iso.org/iso/en/isoonline.frontpage
+International +Society for Respiratory Protection – www.isrp.com.au
+Ministério do Trabalho e +da Segurança Social – www.mtss.gov.pt
+National +Fire Protection Association – www.nfpa.org
+Occupational +Safety and Health Administration – OSHA – www.osha.gov
+Ordem +dos Enfermeiros – www.ordemenfermeiros.pt
+Ordem +dos Médicos – www.ordemdosmedicos.pt
+Revista +Proteção – www.protecao.com.br
+Revista +Segurança – www.revistaseguranca.com
+World +Health Organization (OMS) – www.who.int/en

+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/medicina_text.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/medicina_text.html new file mode 100644 index 00000000..cdbeef47 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/medicina_text.html @@ -0,0 +1,32 @@ + + + + + SIPRP - Serviços + + +A SIPRP possui um gabinete médico completamente equipado na sua +sede do Atrium Saldanha, em Lisboa, onde se encontra a sua Directora +Clínica, especialista em Medicina do Trabalho.
+Para além disso, e uma vez que tem a possibilidade de prestar o +serviço em todo o território nacional, possui uma rede de +clínicas, médicos, enfermeiros e laboratórios de +análises clínicas contratados com capacidade de poder +prestar o serviço dentro dos parâmetros de qualidade que +preconiza.
+Por último, tem, também, capacidade para fazer deslocar +Médicos do Trabalho às empresas, desde que estas possuam +gabinete médico próprio com as condições +mínimas exigidas pela legislação portuguesa.
+A Direcção Clínica da SIPRP desenha perfis +médicos adequados aos riscos a que estão expostos os +trabalhadores das suas empresas Clientes, não excluindo, +inclusivamente, a possibilidade de serem efectuados outros exames +complementares de diagnóstico conforme os riscos +específicos de cada actividade, como sejam os trabalhadores +expostos a factores físicos (como ruído, stress +térmico, iluminação, entre outros), +químicos (por exemplo, pessoal de limpeza) ou biológicos +(por exemplo, manipuladores de alimentos).
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/politica_text.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/politica_text.html new file mode 100644 index 00000000..3e52de72 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/politica_text.html @@ -0,0 +1,69 @@ + + + + + SIPRP - Serviços + + + +Porque sabemos que a gestão administrativa do serviço de +SHST é difícil para a empresa, a SIPRP tomará a +seu cargo essas tarefas, simplificando todo o processo.
+Notificações ao ISHST(ex-IDICT) (Mod. 1360)
+ +Relatório Anual de Actividade de SHST
+ +Marcações de Consultas
+ +Informação on line
+ +Informação sobre legislação
+ +Controlos de Qualidade
+ + + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/politica_text_20050106.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/politica_text_20050106.html new file mode 100644 index 00000000..cc78d7ab --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/politica_text_20050106.html @@ -0,0 +1,59 @@ + + + + + SIPRP - Serviços + + +Porque sabemos que a gestão administrativa do serviço de +SHST é difícil para a empresa, a SIPRP tomará a +seu cargo essas tarefas, simplificando todo o processo.
+Notificações ao ISHST +(ex-IDICT) (Mod. 1360)
+Elaboração e entrega da Notificação em cada +delegação ou subdelegação do ISHST +(ex-IDICT) onde a empresa tenha estabelecimento. Após a +confirmação da recepção desses documentos +por parte do ISHST, serão enviadas cópias autenticadas +para a empresa.
+Relatório Anual de Actividade +de SHST
+Compilação da informação, +elaboração e entrega dos Relatórios (um por cada +estabelecimento) através de suporte informático pela +Internet. Após a confirmação da +recepção desses documentos por parte dos serviços +competentes, serão enviadas cópias para a empresa.
+Marcações de Consultas
+A SIPRP, através do seu avançado sistema +informático, será responsável pela +marcação dos exames de Medicina do Trabalho +(Admissão, Periódico ou Ocasional) conforme a +periodicidade indicada pela legislação (anualmente para +os trabalhadores com menos de 18 e mais de 50 anos e de dois em dois +anos para os restantes).
+Informação on line
+A SIPRP possibilita à empresa, através deste site, a +visualização do histórico do serviço +(consultas efectuadas, marcações, faltas, data da +próxima consulta, se tem Ficha de Aptidão emitida, entre +outros) durante as 24 horas do dia, todos os dias do ano. Essa +informação será, logicamente, confidencial, +não tendo qualquer dado médico (ao abrigo do sigilo +profissional) e exigirá a introdução de uma +palavra passe previamente remetida à empresa.
+Informação sobre +legislação
+A SIPRP será responsável pelo envio, com periodicidade +acordada, da actualização de toda a +legislação de SHST (portuguesa e europeia) sobre a +actividade específica da empresa Cliente, mantendo-a a par de +todas as obrigações legais inerentes.
+Controlos de Qualidade
+Serão efectuados questionários de controlo de qualidade, +por amostragem, tanto aos funcionários da empresas bem como aos +responsáveis directos pelo serviço, com o objectivo de se +poder aperfeiçoar, melhorar ou intervir rapidamente nalgum +aspecto que não corresponda às expectativas da empresa.
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/servicos_compl_text.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/servicos_compl_text.html new file mode 100644 index 00000000..ce16c605 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/servicos_compl_text.html @@ -0,0 +1,71 @@ + + + + + SIPRP - Serviços + + + +A SIPRP, devido à sua competência técnica e humana, +põe à disposição dos seus Clientes um leque +de serviços muito abrangente, tendo sempre em conta o respeito +pela legislação vigente e pelos princípios de +rigor, transparência e qualidade.
+
+Poderá consultar, seguidamente, alguns dos serviços que +poderemos oferecer:
+
+
+Segurança, Higiene e Saúde do Trabalho
+ +Formação
+ +Ergonomia
+ +Estudos e Análises Técnicas de Agentes Físicos (Iluminação, Ruído, Radiações, Ambiente Térmico e Vibrações)
+ +Estudos e Análises Técnicas de Contaminantes Químicos (Poeiras, Gases e Vapores, Líquidos e Fumos)
+ +Estudos e Análises Técnicas de Contaminantes Biológicos (Vírus, Bactérias, Fungos e Parasitas)
+ +Outros
+ +
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/servicos_compl_text_20050106.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/servicos_compl_text_20050106.html new file mode 100644 index 00000000..94ebe148 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/servicos_compl_text_20050106.html @@ -0,0 +1,71 @@ + + + + + SIPRP - Serviços + + +A SIPRP, devido à sua competência técnica e humana, +põe à disposição dos seus Clientes um leque +de serviços muito abrangente, tendo sempre em conta o respeito +pela legislação vigente e pelos princípios de +rigor, transparência e qualidade.
+
+Poderá consultar, seguidamente, alguns dos serviços que +poderemos oferecer:
+
+

+Segurança, Higiene e Saúde do Trabalho
+ - Serviços à Medida do Cliente ou sua actividade +obedecendo à legislação portuguesa em vigor
+ - Medicina do Trabalho
+ - Levantamento e Avaliação de Riscos
+ - Apoio Administrativo
+Formação
+ - Primeiros Socorros
+ - Acções de Sensibilização em Higiene +e +Segurança e EPI’s
+ - Meios de Combate a Incêndios
+ - Movimentação Mecânica de Cargas +(Empilhadores +e outros)
+ - Manipulação de Cargas
+Ergonomia
+ - Avaliação da Carga Física
+ - Movimentação Manual de Cargas
+ - Prevenção de Lesões +Músculo-Esqueléticas
+ - Análise de Postos de Trabalho
+Estudos e Análises Técnicas de Agentes Físicos +(Iluminação, Ruído, Radiações, +Ambiente Térmico e Vibrações)
+ - Estudos de Luminância e Iluminância
+ - Estudos de Ruído Ocupacional
+ - Estudos de Radiações Ionizantes (i.e. RX) e +Não Ionizantes (i.e. Campos Electromagnéticos dos +Computadores)
+ - Estudos de Conforto e Stress Térmico
+ - Estudos de Vibrações
+Estudos e Análises Técnicas de Contaminantes +Químicos (Poeiras, Gases e Vapores, Líquidos e Fumos)
+ - Estudos de Poeiras (Totais e Respiráveis)
+ - Compostos Orgânicos Voláteis, Formaldaído e +Nicotina
+Estudos e Análises Técnicas de Contaminantes +Biológicos (Vírus, Bactérias, Fungos e Parasitas)
+ - Legionella Pneumóphila
+ - Exames Microbiológicos (i.e. interior de condutas do +sistema AVAC)
+ - Estudos de Microrganismos em Suspensão no Ar
+ Outros
+ - Planos de Emergência / Evacuação
+ - Medicina Curativa
+ - Enfermagem
+ - Análises Clínicas
+ - Exames Complementares de Diagnóstico
+ - Comercialização de Sinalética de +Segurança
+

+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/siprp_text.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/siprp_text.html new file mode 100644 index 00000000..0595b656 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/siprp_text.html @@ -0,0 +1,27 @@ + + + + + SIPRP - Apresentação + + +A SIPRP - Sociedade Ibérica de Prevenção de Riscos +Profissionais é uma empresa de origem espanhola formada com a +finalidade de optimizar as sinergias entre empresas de sectores e +âmbitos geográficos diferentes, resultando num grupo +sólido e competitivo, capaz de oferecer as respostas adequadas +para uma gestão eficaz dos serviços de Segurança, +Higiene e Saúde do Trabalho (SHST) junto dos seus Clientes.
+
+A SIPRP aposta fortemente na inovação +e pretende ser uma +empresa de referência no sector, assentando a sua +actuação no rigor, seriedade e em compromissos +sólidos com os seus Clientes e suas necessidades.
+
+Porque a prevenção é a base de todo o trabalho +nesta área, na SIPRP temos em conta a especificidade da +actividade de cada empresa, as condições de trabalho dos +seus colaboradores e todos os factores que os rodeiam.
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/conteudos/siprp_text_inovacao.html b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/siprp_text_inovacao.html new file mode 100644 index 00000000..a04576ab --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/conteudos/siprp_text_inovacao.html @@ -0,0 +1,22 @@ + + + + + SIPRP - Apresentação + + +Como factores de sucesso na inovação, salientamos:
+
+- Atendimento personalizado, baseado numa sólida plataforma +informática;
+- Informação actualizada on-line;
+- Equipamento técnico de última geração;
+- Instalações modernas e funcionais;
+- Técnicos Superiores qualificados;
+- Acompanhamento permanente das necessidades e exigências dos +Clientes;
+- Diversas opções para prestação dos +serviços (à medida de cada actividade)
+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/css/funcs.js b/tags/Site antigo e SIPRPSoft/web/contents/css/funcs.js new file mode 100644 index 00000000..099f6df4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/css/funcs.js @@ -0,0 +1,64 @@ +function showhide( id ) +{ + if( document.getElementById ) + { + obj = document.getElementById( id ); + if ( obj.style.display == "none" ) + { + obj.style.display = ""; + document.getElementById( 'span_' + id ).style.color = "#C13F45"; + } + else + { + obj.style.display = "none"; + document.getElementById( 'span_' + id ).style.color = "#497895"; + } + } +} + +function isValidDate( year, month, day ) +{ + return day > 0 && ( day <= [, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][ month ] || + day == 29 && month == 2 && year % 4 == 0 && ( year % 100 > 0 || year % 400 == 0 ) ); +} + +function isValid( element, type ) +{ + switch( type ) + { + // date + case 0: + if( element.value.search( /^\d\d?\/\d\d?\/\d{1,4}$/ ) != 0 ) + { + alert( "Formato da data incorrecto." ); + window.setTimeout( "document.getElementById( '" + element.name + "').focus()", 1 ); + return false; + } + date_value = element.value.split( "/" ); + if( ! isValidDate( date_value[ 2 ], date_value[ 1 ], date_value[ 0 ] ) ) + { + alert( "Data inválida." ); + window.setTimeout( "document.getElementById( '" + element.name + "').focus()", 1 ); + return false; + } + break; + // integer + case 1: + if( element.value.search( /^\d\d:\d\d$/ ) != 0 ) + { + alert( "Formato da hora incorrecto." ); + window.setTimeout( "document.getElementById( '" + element.name + "' ).focus()", 1 ); + return false; + } + time_value = element.value.split( ":" ); + if( time_value[ 0 ] > 23 || time_value[ 1 ] > 59 ) + { + alert( "Hora inválida." ); + window.setTimeout( "document.getElementById( '" + element.name + "').focus()", 1 ); + return false; + } + break; + } + + return true; +} diff --git a/tags/Site antigo e SIPRPSoft/web/contents/css/style.css b/tags/Site antigo e SIPRPSoft/web/contents/css/style.css new file mode 100644 index 00000000..78159917 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/css/style.css @@ -0,0 +1,129 @@ +body +{ + color: #497895; + font-family: verdana; + margin-top: 0px; +} + +.text +{ + color: #497895; + font-family: verdana; + font-size: 10pt; + text-align: justify; +} + +.noticias +{ + color: #497895; + font-family: verdana; + font-size: 9pt; + text-align: left; +} + +td.asd +{ + border-width: 1px 1px 1px 1px; + border-style: solid; +} + +td.title +{ + color: #ffffff; + font-family: verdana; + font-size: 10pt; + font-weight: bold; +} + +td.noticias +{ + font-size: 9pt; +} + +td.footer +{ + color: #ffffff; + font-family: verdana; + font-size: 8pt; + text-align: right; +} + +a:link, +a:visited, +a:active +{ + color: #497895; + font-family: verdana; + font-size: 10pt; + font-weight: bold; + text-decoration: none; +} + +a:hover +{ + color: #C13F45; + font-family: verdana; + font-size: 10pt; + font-weight: bold; + text-decoration: none; +} + +a.menu:link, +a.menu:visited, +a.menu:active +{ + color: #FFFFFF; + font-family: verdana; + font-size: 10pt; + font-weight: bold; + text-decoration: none; +} + +a.menu:hover +{ + color: #C13F45; + font-family: verdana; + font-size: 10pt; + font-weight: bold; + text-decoration: none; +} + +a.big:link, +a.big:visited, +a.big:active +{ + color: #497895; + font-family: verdana; + font-size: 12pt; + font-weight: bold; + text-decoration: none; +} + +a.big:hover +{ + color: #C13F45; + font-family: verdana; + font-size: 12pt; + font-weight: bold; + text-decoration: none; +} + +a.copy:link, +a.copy:visited, +a.copy:active +{ + color: #FFFFFF; + font-family: verdana; + font-size: 8pt; + font-weight: normal; + text-decoration: underline; +} + +select, +option, +input +{ + color: #497895; + font-family: verdana; + margin-top: 0px; +} diff --git a/tags/Site antigo e SIPRPSoft/web/contents/erro.html b/tags/Site antigo e SIPRPSoft/web/contents/erro.html new file mode 100644 index 00000000..ce6f9d47 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/erro.html @@ -0,0 +1,44 @@ + + + + + SIPRP - Erro + + + + + + + + + + + + + + + +
  erro
+
+ + + + + + + + + + +

+

+
+ $msg +
+

+
+

+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/frame_erro.html b/tags/Site antigo e SIPRPSoft/web/contents/frame_erro.html new file mode 100644 index 00000000..f97eab0b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/frame_erro.html @@ -0,0 +1,254 @@ + + + + + + SIPRP + + + + + + + + + + + +

+
+ + + + + + + + + + + + + + + +

+

+
a SIPRPserviçoscolaboradorescontactoslinks 
+ + + + + + + + + + + + + + + + +
+ + +
+
+ + + + + + +
+
+ + + + + + + + + + + + + + + +
user
password
+
+
+

+
+ + + + + + + + + + + + + + +
   notícias
+
+ + + + + + + + + + +

+

+
A SIPRP apresenta o +seu novo site em www.siprp.pt.
+
+Além de conteúdos sobre a empresa e o grupo, é +disponibilizado um portal online com funcionalidades para os seus +clientes.

+

+
+

+
+
+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/higiene.html b/tags/Site antigo e SIPRPSoft/web/contents/higiene.html new file mode 100644 index 00000000..1ef5315b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/higiene.html @@ -0,0 +1,52 @@ + + + + + SIPRP - Higiene + + + + + + + + + + + + + + + +
   +higiene e segurança
+
+ + + + + + + + + + +

+

+

+

+

+
+

+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/Siprp.htm b/tags/Site antigo e SIPRPSoft/web/contents/images/Siprp.htm new file mode 100644 index 00000000..9878b626 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/images/Siprp.htm @@ -0,0 +1,60 @@ + + +Siprp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +









em + construção





+
SIPRP - Sociedade Ibérica de Prevenção + de Riscos Profissionais
+
ATRIUM SALDANHA
+
Praça Duque de Saldanha, 1 - 9º + C
+
1050-094 Lisboa
+
Telefone:  (+351) 213 504 + 540
+
Fax: (+351) 213 504 + 549
+





Desenvolvimento + por: Evolute - Consultoria Informática, Lda

diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/_vti_cnf/Siprp.htm b/tags/Site antigo e SIPRPSoft/web/contents/images/_vti_cnf/Siprp.htm new file mode 100644 index 00000000..b9799b2a --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/images/_vti_cnf/Siprp.htm @@ -0,0 +1,18 @@ +vti_encoding:SR|utf8-nl +vti_timelastmodified:TR|06 Sep 2004 16:01:35 -0000 +vti_extenderversion:SR|5.0.2.2623 +vti_cacheddtm:TX|06 Sep 2004 16:01:35 -0000 +vti_filesize:IR|2907 +vti_cachedtitle:SR|Siprp +vti_cachedbodystyle:SR| +vti_cachedlinkinfo:VX|S|Siprp_ficheiros/logo_siprp.jpg H|mailto:geral@siprp.pt +vti_cachedsvcrellinks:VX|NSUS|images/Siprp_ficheiros/logo_siprp.jpg NHUS|mailto:geral@siprp.pt +vti_cachedneedsrewrite:BR|false +vti_cachedhasbots:BR|false +vti_cachedhastheme:BR|false +vti_cachedhasborder:BR|false +vti_metatags:VR|HTTP-EQUIV=content-type text/html;\\ charset=ISO-8859-1 GENERATOR MSHTML\\ 6.00.2800.1458 +vti_charset:SR|windows-1252 +vti_generator:SR|MSHTML 6.00.2800.1458 +vti_title:SR|Siprp +vti_backlinkinfo:VX| diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/_vti_cnf/logo_siprp.jpg b/tags/Site antigo e SIPRPSoft/web/contents/images/_vti_cnf/logo_siprp.jpg new file mode 100644 index 00000000..0855abb5 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/images/_vti_cnf/logo_siprp.jpg @@ -0,0 +1,11 @@ +vti_encoding:SR|utf8-nl +vti_author:SR|op233351b +vti_modifiedby:SR|op233351b +vti_timelastmodified:TR|06 Sep 2004 17:07:36 -0000 +vti_timecreated:TR|06 Sep 2004 17:07:36 -0000 +vti_cacheddtm:TX|06 Sep 2004 17:07:36 -0000 +vti_filesize:IR|6174 +vti_extenderversion:SR|5.0.2.2623 +vti_lastwidth:IX|449 +vti_lastheight:IX|101 +vti_backlinkinfo:VX|index.html diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/base_740.gif b/tags/Site antigo e SIPRPSoft/web/contents/images/base_740.gif new file mode 100644 index 00000000..4525df88 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/base_740.gif differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/fundo.jpg b/tags/Site antigo e SIPRPSoft/web/contents/images/fundo.jpg new file mode 100644 index 00000000..75bdae11 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/fundo.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/green.gif b/tags/Site antigo e SIPRPSoft/web/contents/images/green.gif new file mode 100644 index 00000000..3ad4957f Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/green.gif differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/login.jpg b/tags/Site antigo e SIPRPSoft/web/contents/images/login.jpg new file mode 100644 index 00000000..904f0ff3 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/login.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/logo_siprp.jpg b/tags/Site antigo e SIPRPSoft/web/contents/images/logo_siprp.jpg new file mode 100644 index 00000000..408fba09 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/logo_siprp.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/logout.gif b/tags/Site antigo e SIPRPSoft/web/contents/images/logout.gif new file mode 100644 index 00000000..5499567d Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/logout.gif differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/noticias_base.jpg b/tags/Site antigo e SIPRPSoft/web/contents/images/noticias_base.jpg new file mode 100644 index 00000000..c684b17c Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/noticias_base.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/noticias_top.jpg b/tags/Site antigo e SIPRPSoft/web/contents/images/noticias_top.jpg new file mode 100644 index 00000000..ea853228 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/noticias_top.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/red.gif b/tags/Site antigo e SIPRPSoft/web/contents/images/red.gif new file mode 100644 index 00000000..8939cc78 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/red.gif differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/rodape.jpg b/tags/Site antigo e SIPRPSoft/web/contents/images/rodape.jpg new file mode 100644 index 00000000..ef0b3344 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/rodape.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/texto_base.gif b/tags/Site antigo e SIPRPSoft/web/contents/images/texto_base.gif new file mode 100644 index 00000000..cf7fab7a Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/texto_base.gif differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/texto_base.jpg b/tags/Site antigo e SIPRPSoft/web/contents/images/texto_base.jpg new file mode 100644 index 00000000..3f95026a Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/texto_base.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/texto_base_1.jpg b/tags/Site antigo e SIPRPSoft/web/contents/images/texto_base_1.jpg new file mode 100644 index 00000000..3504d370 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/texto_base_1.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/texto_top.jpg b/tags/Site antigo e SIPRPSoft/web/contents/images/texto_top.jpg new file mode 100644 index 00000000..5a5a6612 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/texto_top.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/texto_top_1.jpg b/tags/Site antigo e SIPRPSoft/web/contents/images/texto_top_1.jpg new file mode 100644 index 00000000..92b7c389 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/texto_top_1.jpg differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/texto_topo.gif b/tags/Site antigo e SIPRPSoft/web/contents/images/texto_topo.gif new file mode 100644 index 00000000..82c67ebf Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/texto_topo.gif differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/topo_740.gif b/tags/Site antigo e SIPRPSoft/web/contents/images/topo_740.gif new file mode 100644 index 00000000..61466a24 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/topo_740.gif differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/white.gif b/tags/Site antigo e SIPRPSoft/web/contents/images/white.gif new file mode 100644 index 00000000..cdf578c9 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/white.gif differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/images/yellow.gif b/tags/Site antigo e SIPRPSoft/web/contents/images/yellow.gif new file mode 100644 index 00000000..c98503a3 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/contents/images/yellow.gif differ diff --git a/tags/Site antigo e SIPRPSoft/web/contents/index.html b/tags/Site antigo e SIPRPSoft/web/contents/index.html new file mode 100644 index 00000000..0f17056d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/index.html @@ -0,0 +1,229 @@ + + + + + + + SIPRP + + + + + + + + + + + +

+
+ + + + + + + + + + + + + + + +

+

+
a SIPRPserviçosparceiroscontactoslinks 
+ + + + + + + + + + + + + + +

+
+ + + + + + +
+
+ + + + + + + + + + + + + + + +
user
password
+
+
+
+ + + + + + + + + + + + + +
   notícias
+
+ + + + + + + + + + +

+

+
+ +
+

+
+

+
+
+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/links.html b/tags/Site antigo e SIPRPSoft/web/contents/links.html new file mode 100644 index 00000000..ae2134b2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/links.html @@ -0,0 +1,52 @@ + + + + + SIPRP - Links + + + + + + + + + + + + + + + +
   +links úteis
+
+ + + + + + + + + + +

+

+

+

+

+
+

+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/mail/cv_enviado.html b/tags/Site antigo e SIPRPSoft/web/contents/mail/cv_enviado.html new file mode 100644 index 00000000..0bd37216 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/mail/cv_enviado.html @@ -0,0 +1,11 @@ + + + + + + Enviado + + + A sua informação foi enviada com sucesso. + + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/mail/cv_nao_enviado.html b/tags/Site antigo e SIPRPSoft/web/contents/mail/cv_nao_enviado.html new file mode 100644 index 00000000..dd8c1671 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/mail/cv_nao_enviado.html @@ -0,0 +1,12 @@ + + + + + + Erro a enviar + + + Erro a enviar a sua informação.
+ Verifique que preencheu "Nome Completo", "Telefone" e "E-Mail" com um valor válido. + + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/mail/envio_cv.txt b/tags/Site antigo e SIPRPSoft/web/contents/mail/envio_cv.txt new file mode 100644 index 00000000..69a3da74 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/mail/envio_cv.txt @@ -0,0 +1,7 @@ +Envio de CV + +Função: $rec_funcao +Nome: $rec_nome +Morada: $rec_morada +Telefone: $rec_telefone +E-mail: $rec_email diff --git a/tags/Site antigo e SIPRPSoft/web/contents/mail/pedido_enviado.html b/tags/Site antigo e SIPRPSoft/web/contents/mail/pedido_enviado.html new file mode 100644 index 00000000..ec1854c9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/mail/pedido_enviado.html @@ -0,0 +1,11 @@ + + + + + + Enviado + + + O seu pedido foi enviado com sucesso + + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/mail/pedido_informacao.txt b/tags/Site antigo e SIPRPSoft/web/contents/mail/pedido_informacao.txt new file mode 100644 index 00000000..3178db98 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/mail/pedido_informacao.txt @@ -0,0 +1,5 @@ +Pedido de informação de: +Nome: $request_name +Telefone: $request_phone +E-mail: $request_email +Assunto: $request_details diff --git a/tags/Site antigo e SIPRPSoft/web/contents/mail/pedido_nao_enviado.html b/tags/Site antigo e SIPRPSoft/web/contents/mail/pedido_nao_enviado.html new file mode 100644 index 00000000..4dcb63f4 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/mail/pedido_nao_enviado.html @@ -0,0 +1,11 @@ + + + + + + Erro a enviar + + + Erro a enviar o seu pedido + + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/marcacao/CalendarPopup.js b/tags/Site antigo e SIPRPSoft/web/contents/marcacao/CalendarPopup.js new file mode 100644 index 00000000..03f4daa3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/marcacao/CalendarPopup.js @@ -0,0 +1,1462 @@ +// =================================================================== +// Author: Matt Kruse +// WWW: http://www.mattkruse.com/ +// +// NOTICE: You may use this code for any purpose, commercial or +// private, without any further permission from the author. You may +// remove this notice from your final code if you wish, however it is +// appreciated by the author if at least my web site address is kept. +// +// You may *NOT* re-distribute this code in any way except through its +// use. That means, you can include it in your product, or your web +// site, or any other form where the code is actually being used. You +// may not put the plain javascript up on your site for download or +// include it in your javascript libraries for download. +// If you wish to share this code with others, please just point them +// to the URL instead. +// Please DO NOT link directly to my .js files from your site. Copy +// the files to your server and use them there. Thank you. +// =================================================================== + + +/* SOURCE FILE: AnchorPosition.js */ + +/* +AnchorPosition.js +Author: Matt Kruse +Last modified: 10/11/02 + +DESCRIPTION: These functions find the position of an tag in a document, +so other elements can be positioned relative to it. + +COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small +positioning errors - usually with Window positioning - occur on the +Macintosh platform. + +FUNCTIONS: +getAnchorPosition(anchorname) + Returns an Object() having .x and .y properties of the pixel coordinates + of the upper-left corner of the anchor. Position is relative to the PAGE. + +getAnchorWindowPosition(anchorname) + Returns an Object() having .x and .y properties of the pixel coordinates + of the upper-left corner of the anchor, relative to the WHOLE SCREEN. + +NOTES: + +1) For popping up separate browser windows, use getAnchorWindowPosition. + Otherwise, use getAnchorPosition + +2) Your anchor tag MUST contain both NAME and ID attributes which are the + same. For example: + + +3) There must be at least a space between for IE5.5 to see the + anchor tag correctly. Do not do with no space. +*/ + +// getAnchorPosition(anchorname) +// This function returns an object having .x and .y properties which are the coordinates +// of the named anchor, relative to the page. +function getAnchorPosition(anchorname) { + // This function will return an Object with x and y properties + var useWindow=false; + var coordinates=new Object(); + var x=0,y=0; + // Browser capability sniffing + var use_gebi=false, use_css=false, use_layers=false; + if (document.getElementById) { use_gebi=true; } + else if (document.all) { use_css=true; } + else if (document.layers) { use_layers=true; } + // Logic to find position + if (use_gebi && document.all) { + x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]); + y=AnchorPosition_getPageOffsetTop(document.all[anchorname]); + } + else if (use_gebi) { + var o=document.getElementById(anchorname); + x=AnchorPosition_getPageOffsetLeft(o); + y=AnchorPosition_getPageOffsetTop(o); + } + else if (use_css) { + x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]); + y=AnchorPosition_getPageOffsetTop(document.all[anchorname]); + } + else if (use_layers) { + var found=0; + for (var i=0; i9?"":"0")+x} + +// ------------------------------------------------------------------ +// isDate ( date_string, format_string ) +// Returns true if date string matches format of format string and +// is a valid date. Else returns false. +// It is recommended that you trim whitespace around the value before +// passing it to this function, as whitespace is NOT ignored! +// ------------------------------------------------------------------ +function isDate(val,format) { + var date=getDateFromFormat(val,format); + if (date==0) { return false; } + return true; + } + +// ------------------------------------------------------------------- +// compareDates(date1,date1format,date2,date2format) +// Compare two date strings to see which is greater. +// Returns: +// 1 if date1 is greater than date2 +// 0 if date2 is greater than date1 of if they are the same +// -1 if either of the dates is in an invalid format +// ------------------------------------------------------------------- +function compareDates(date1,dateformat1,date2,dateformat2) { + var d1=getDateFromFormat(date1,dateformat1); + var d2=getDateFromFormat(date2,dateformat2); + if (d1==0 || d2==0) { + return -1; + } + else if (d1 > d2) { + return 1; + } + return 0; + } + +// ------------------------------------------------------------------ +// formatDate (date_object, format) +// Returns a date in the output format specified. +// The format string uses the same abbreviations as in getDateFromFormat() +// ------------------------------------------------------------------ +function formatDate(date,format) { + format=format+""; + var result=""; + var i_format=0; + var c=""; + var token=""; + var y=date.getYear()+""; + var M=date.getMonth()+1; + var d=date.getDate(); + var E=date.getDay(); + var H=date.getHours(); + var m=date.getMinutes(); + var s=date.getSeconds(); + var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k; + // Convert real date parts into formatted versions + var value=new Object(); + if (y.length < 4) {y=""+(y-0+1900);} + value["y"]=""+y; + value["yyyy"]=y; + value["yy"]=y.substring(2,4); + value["M"]=M; + value["MM"]=LZ(M); + value["MMM"]=MONTH_NAMES[M-1]; + value["NNN"]=MONTH_NAMES[M+11]; + value["d"]=d; + value["dd"]=LZ(d); + value["E"]=DAY_NAMES[E+7]; + value["EE"]=DAY_NAMES[E]; + value["H"]=H; + value["HH"]=LZ(H); + if (H==0){value["h"]=12;} + else if (H>12){value["h"]=H-12;} + else {value["h"]=H;} + value["hh"]=LZ(value["h"]); + if (H>11){value["K"]=H-12;} else {value["K"]=H;} + value["k"]=H+1; + value["KK"]=LZ(value["K"]); + value["kk"]=LZ(value["k"]); + if (H > 11) { value["a"]="PM"; } + else { value["a"]="AM"; } + value["m"]=m; + value["mm"]=LZ(m); + value["s"]=s; + value["ss"]=LZ(s); + while (i_format < format.length) { + c=format.charAt(i_format); + token=""; + while ((format.charAt(i_format)==c) && (i_format < format.length)) { + token += format.charAt(i_format++); + } + if (value[token] != null) { result=result + value[token]; } + else { result=result + token; } + } + return result; + } + +// ------------------------------------------------------------------ +// Utility functions for parsing in getDateFromFormat() +// ------------------------------------------------------------------ +function _isInteger(val) { + var digits="1234567890"; + for (var i=0; i < val.length; i++) { + if (digits.indexOf(val.charAt(i))==-1) { return false; } + } + return true; + } +function _getInt(str,i,minlength,maxlength) { + for (var x=maxlength; x>=minlength; x--) { + var token=str.substring(i,i+x); + if (token.length < minlength) { return null; } + if (_isInteger(token)) { return token; } + } + return null; + } + +// ------------------------------------------------------------------ +// getDateFromFormat( date_string , format_string ) +// +// This function takes a date string and a format string. It matches +// If the date string matches the format string, it returns the +// getTime() of the date. If it does not match, it returns 0. +// ------------------------------------------------------------------ +function getDateFromFormat(val,format) { + val=val+""; + format=format+""; + var i_val=0; + var i_format=0; + var c=""; + var token=""; + var token2=""; + var x,y; + var now=new Date(); + var year=now.getYear(); + var month=now.getMonth()+1; + var date=1; + var hh=now.getHours(); + var mm=now.getMinutes(); + var ss=now.getSeconds(); + var ampm=""; + + while (i_format < format.length) { + // Get next token from format string + c=format.charAt(i_format); + token=""; + while ((format.charAt(i_format)==c) && (i_format < format.length)) { + token += format.charAt(i_format++); + } + // Extract contents of value based on format token + if (token=="yyyy" || token=="yy" || token=="y") { + if (token=="yyyy") { x=4;y=4; } + if (token=="yy") { x=2;y=2; } + if (token=="y") { x=2;y=4; } + year=_getInt(val,i_val,x,y); + if (year==null) { return 0; } + i_val += year.length; + if (year.length==2) { + if (year > 70) { year=1900+(year-0); } + else { year=2000+(year-0); } + } + } + else if (token=="MMM"||token=="NNN"){ + month=0; + for (var i=0; i11)) { + month=i+1; + if (month>12) { month -= 12; } + i_val += month_name.length; + break; + } + } + } + if ((month < 1)||(month>12)){return 0;} + } + else if (token=="EE"||token=="E"){ + for (var i=0; i12)){return 0;} + i_val+=month.length;} + else if (token=="dd"||token=="d") { + date=_getInt(val,i_val,token.length,2); + if(date==null||(date<1)||(date>31)){return 0;} + i_val+=date.length;} + else if (token=="hh"||token=="h") { + hh=_getInt(val,i_val,token.length,2); + if(hh==null||(hh<1)||(hh>12)){return 0;} + i_val+=hh.length;} + else if (token=="HH"||token=="H") { + hh=_getInt(val,i_val,token.length,2); + if(hh==null||(hh<0)||(hh>23)){return 0;} + i_val+=hh.length;} + else if (token=="KK"||token=="K") { + hh=_getInt(val,i_val,token.length,2); + if(hh==null||(hh<0)||(hh>11)){return 0;} + i_val+=hh.length;} + else if (token=="kk"||token=="k") { + hh=_getInt(val,i_val,token.length,2); + if(hh==null||(hh<1)||(hh>24)){return 0;} + i_val+=hh.length;hh--;} + else if (token=="mm"||token=="m") { + mm=_getInt(val,i_val,token.length,2); + if(mm==null||(mm<0)||(mm>59)){return 0;} + i_val+=mm.length;} + else if (token=="ss"||token=="s") { + ss=_getInt(val,i_val,token.length,2); + if(ss==null||(ss<0)||(ss>59)){return 0;} + i_val+=ss.length;} + else if (token=="a") { + if (val.substring(i_val,i_val+2).toLowerCase()=="am") {ampm="AM";} + else if (val.substring(i_val,i_val+2).toLowerCase()=="pm") {ampm="PM";} + else {return 0;} + i_val+=2;} + else { + if (val.substring(i_val,i_val+token.length)!=token) {return 0;} + else {i_val+=token.length;} + } + } + // If there are any trailing characters left in the value, it doesn't match + if (i_val != val.length) { return 0; } + // Is date valid for month? + if (month==2) { + // Check for leap year + if ( ( (year%4==0)&&(year%100 != 0) ) || (year%400==0) ) { // leap year + if (date > 29){ return 0; } + } + else { if (date > 28) { return 0; } } + } + if ((month==4)||(month==6)||(month==9)||(month==11)) { + if (date > 30) { return 0; } + } + // Correct hours value + if (hh<12 && ampm=="PM") { hh=hh-0+12; } + else if (hh>11 && ampm=="AM") { hh-=12; } + var newdate=new Date(year,month-1,date,hh,mm,ss); + return newdate.getTime(); + } + +// ------------------------------------------------------------------ +// parseDate( date_string [, prefer_euro_format] ) +// +// This function takes a date string and tries to match it to a +// number of possible date formats to get the value. It will try to +// match against the following international formats, in this order: +// y-M-d MMM d, y MMM d,y y-MMM-d d-MMM-y MMM d +// M/d/y M-d-y M.d.y MMM-d M/d M-d +// d/M/y d-M-y d.M.y d-MMM d/M d-M +// A second argument may be passed to instruct the method to search +// for formats like d/M/y (european format) before M/d/y (American). +// Returns a Date object or null if no patterns match. +// ------------------------------------------------------------------ +function parseDate(val) { + var preferEuro=(arguments.length==2)?arguments[1]:false; + generalFormats=new Array('y-M-d','MMM d, y','MMM d,y','y-MMM-d','d-MMM-y','MMM d'); + monthFirst=new Array('M/d/y','M-d-y','M.d.y','MMM-d','M/d','M-d'); + dateFirst =new Array('d/M/y','d-M-y','d.M.y','d-MMM','d/M','d-M'); + var checkList=new Array('generalFormats',preferEuro?'dateFirst':'monthFirst',preferEuro?'monthFirst':'dateFirst'); + var d=null; + for (var i=0; i tags may cause errors. + +USAGE: +// Create an object for a WINDOW popup +var win = new PopupWindow(); + +// Create an object for a DIV window using the DIV named 'mydiv' +var win = new PopupWindow('mydiv'); + +// Set the window to automatically hide itself when the user clicks +// anywhere else on the page except the popup +win.autoHide(); + +// Show the window relative to the anchor name passed in +win.showPopup(anchorname); + +// Hide the popup +win.hidePopup(); + +// Set the size of the popup window (only applies to WINDOW popups +win.setSize(width,height); + +// Populate the contents of the popup window that will be shown. If you +// change the contents while it is displayed, you will need to refresh() +win.populate(string); + +// set the URL of the window, rather than populating its contents +// manually +win.setUrl("http://www.site.com/"); + +// Refresh the contents of the popup +win.refresh(); + +// Specify how many pixels to the right of the anchor the popup will appear +win.offsetX = 50; + +// Specify how many pixels below the anchor the popup will appear +win.offsetY = 100; + +NOTES: +1) Requires the functions in AnchorPosition.js + +2) Your anchor tag MUST contain both NAME and ID attributes which are the + same. For example: + + +3) There must be at least a space between for IE5.5 to see the + anchor tag correctly. Do not do with no space. + +4) When a PopupWindow object is created, a handler for 'onmouseup' is + attached to any event handler you may have already defined. Do NOT define + an event handler for 'onmouseup' after you define a PopupWindow object or + the autoHide() will not work correctly. +*/ + +// Set the position of the popup window based on the anchor +function PopupWindow_getXYPosition(anchorname) { + var coordinates; + if (this.type == "WINDOW") { + coordinates = getAnchorWindowPosition(anchorname); + } + else { + coordinates = getAnchorPosition(anchorname); + } + this.x = coordinates.x; + this.y = coordinates.y; + } +// Set width/height of DIV/popup window +function PopupWindow_setSize(width,height) { + this.width = width; + this.height = height; + } +// Fill the window with contents +function PopupWindow_populate(contents) { + this.contents = contents; + this.populated = false; + } +// Set the URL to go to +function PopupWindow_setUrl(url) { + this.url = url; + } +// Set the window popup properties +function PopupWindow_setWindowProperties(props) { + this.windowProperties = props; + } +// Refresh the displayed contents of the popup +function PopupWindow_refresh() { + if (this.divName != null) { + // refresh the DIV object + if (this.use_gebi) { + document.getElementById(this.divName).innerHTML = this.contents; + } + else if (this.use_css) { + document.all[this.divName].innerHTML = this.contents; + } + else if (this.use_layers) { + var d = document.layers[this.divName]; + d.document.open(); + d.document.writeln(this.contents); + d.document.close(); + } + } + else { + if (this.popupWindow != null && !this.popupWindow.closed) { + if (this.url!="") { + this.popupWindow.location.href=this.url; + } + else { + this.popupWindow.document.open(); + this.popupWindow.document.writeln(this.contents); + this.popupWindow.document.close(); + } + this.popupWindow.focus(); + } + } + } +// Position and show the popup, relative to an anchor object +function PopupWindow_showPopup(anchorname) { + this.getXYPosition(anchorname); + this.x += this.offsetX; + this.y += this.offsetY; + if (!this.populated && (this.contents != "")) { + this.populated = true; + this.refresh(); + } + if (this.divName != null) { + // Show the DIV object + if (this.use_gebi) { + document.getElementById(this.divName).style.left = this.x + "px"; + document.getElementById(this.divName).style.top = this.y + "px"; + document.getElementById(this.divName).style.visibility = "visible"; + } + else if (this.use_css) { + document.all[this.divName].style.left = this.x; + document.all[this.divName].style.top = this.y; + document.all[this.divName].style.visibility = "visible"; + } + else if (this.use_layers) { + document.layers[this.divName].left = this.x; + document.layers[this.divName].top = this.y; + document.layers[this.divName].visibility = "visible"; + } + } + else { + if (this.popupWindow == null || this.popupWindow.closed) { + // If the popup window will go off-screen, move it so it doesn't + if (this.x<0) { this.x=0; } + if (this.y<0) { this.y=0; } + if (screen && screen.availHeight) { + if ((this.y + this.height) > screen.availHeight) { + this.y = screen.availHeight - this.height; + } + } + if (screen && screen.availWidth) { + if ((this.x + this.width) > screen.availWidth) { + this.x = screen.availWidth - this.width; + } + } + var avoidAboutBlank = window.opera || ( document.layers && !navigator.mimeTypes['*'] ) || navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled ); + this.popupWindow = window.open(avoidAboutBlank?"":"about:blank","window_"+anchorname,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+""); + } + this.refresh(); + } + } +// Hide the popup +function PopupWindow_hidePopup() { + if (this.divName != null) { + if (this.use_gebi) { + document.getElementById(this.divName).style.visibility = "hidden"; + } + else if (this.use_css) { + document.all[this.divName].style.visibility = "hidden"; + } + else if (this.use_layers) { + document.layers[this.divName].visibility = "hidden"; + } + } + else { + if (this.popupWindow && !this.popupWindow.closed) { + this.popupWindow.close(); + this.popupWindow = null; + } + } + } +// Pass an event and return whether or not it was the popup DIV that was clicked +function PopupWindow_isClicked(e) { + if (this.divName != null) { + if (this.use_layers) { + var clickX = e.pageX; + var clickY = e.pageY; + var t = document.layers[this.divName]; + if ((clickX > t.left) && (clickX < t.left+t.clip.width) && (clickY > t.top) && (clickY < t.top+t.clip.height)) { + return true; + } + else { return false; } + } + else if (document.all) { // Need to hard-code this to trap IE for error-handling + var t = window.event.srcElement; + while (t.parentElement != null) { + if (t.id==this.divName) { + return true; + } + t = t.parentElement; + } + return false; + } + else if (this.use_gebi && e) { + var t = e.originalTarget; + while (t.parentNode != null) { + if (t.id==this.divName) { + return true; + } + t = t.parentNode; + } + return false; + } + return false; + } + return false; + } + +// Check an onMouseDown event to see if we should hide +function PopupWindow_hideIfNotClicked(e) { + if (this.autoHideEnabled && !this.isClicked(e)) { + this.hidePopup(); + } + } +// Call this to make the DIV disable automatically when mouse is clicked outside it +function PopupWindow_autoHide() { + this.autoHideEnabled = true; + } +// This global function checks all PopupWindow objects onmouseup to see if they should be hidden +function PopupWindow_hidePopupWindows(e) { + for (var i=0; i0) { + this.type="DIV"; + this.divName = arguments[0]; + } + else { + this.type="WINDOW"; + } + this.use_gebi = false; + this.use_css = false; + this.use_layers = false; + if (document.getElementById) { this.use_gebi = true; } + else if (document.all) { this.use_css = true; } + else if (document.layers) { this.use_layers = true; } + else { this.type = "WINDOW"; } + this.offsetX = 0; + this.offsetY = 0; + // Method mappings + this.getXYPosition = PopupWindow_getXYPosition; + this.populate = PopupWindow_populate; + this.setUrl = PopupWindow_setUrl; + this.setWindowProperties = PopupWindow_setWindowProperties; + this.refresh = PopupWindow_refresh; + this.showPopup = PopupWindow_showPopup; + this.hidePopup = PopupWindow_hidePopup; + this.setSize = PopupWindow_setSize; + this.isClicked = PopupWindow_isClicked; + this.autoHide = PopupWindow_autoHide; + this.hideIfNotClicked = PopupWindow_hideIfNotClicked; + } + +/* SOURCE FILE: CalendarPopup.js */ + +// HISTORY +// ------------------------------------------------------------------ +// Feb 7, 2005: Fixed a CSS styles to use px unit +// March 29, 2004: Added check in select() method for the form field +// being disabled. If it is, just return and don't do anything. +// March 24, 2004: Fixed bug - when month name and abbreviations were +// changed, date format still used original values. +// January 26, 2004: Added support for drop-down month and year +// navigation (Thanks to Chris Reid for the idea) +// September 22, 2003: Fixed a minor problem in YEAR calendar with +// CSS prefix. +// August 19, 2003: Renamed the function to get styles, and made it +// work correctly without an object reference +// August 18, 2003: Changed showYearNavigation and +// showYearNavigationInput to optionally take an argument of +// true or false +// July 31, 2003: Added text input option for year navigation. +// Added a per-calendar CSS prefix option to optionally use +// different styles for different calendars. +// July 29, 2003: Fixed bug causing the Today link to be clickable +// even though today falls in a disabled date range. +// Changed formatting to use pure CSS, allowing greater control +// over look-and-feel options. +// June 11, 2003: Fixed bug causing the Today link to be unselectable +// under certain cases when some days of week are disabled +// March 14, 2003: Added ability to disable individual dates or date +// ranges, display as light gray and strike-through +// March 14, 2003: Removed dependency on graypixel.gif and instead +/// use table border coloring +// March 12, 2003: Modified showCalendar() function to allow optional +// start-date parameter +// March 11, 2003: Modified select() function to allow optional +// start-date parameter +/* +DESCRIPTION: This object implements a popup calendar to allow the user to +select a date, month, quarter, or year. + +COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small +positioning errors - usually with Window positioning - occur on the +Macintosh platform. +The calendar can be modified to work for any location in the world by +changing which weekday is displayed as the first column, changing the month +names, and changing the column headers for each day. + +USAGE: +// Create a new CalendarPopup object of type WINDOW +var cal = new CalendarPopup(); + +// Create a new CalendarPopup object of type DIV using the DIV named 'mydiv' +var cal = new CalendarPopup('mydiv'); + +// Easy method to link the popup calendar with an input box. +cal.select(inputObject, anchorname, dateFormat); +// Same method, but passing a default date other than the field's current value +cal.select(inputObject, anchorname, dateFormat, '01/02/2000'); +// This is an example call to the popup calendar from a link to populate an +// input box. Note that to use this, date.js must also be included!! +Select + +// Set the type of date select to be used. By default it is 'date'. +cal.setDisplayType(type); + +// When a date, month, quarter, or year is clicked, a function is called and +// passed the details. You must write this function, and tell the calendar +// popup what the function name is. +// Function to be called for 'date' select receives y, m, d +cal.setReturnFunction(functionname); +// Function to be called for 'month' select receives y, m +cal.setReturnMonthFunction(functionname); +// Function to be called for 'quarter' select receives y, q +cal.setReturnQuarterFunction(functionname); +// Function to be called for 'year' select receives y +cal.setReturnYearFunction(functionname); + +// Show the calendar relative to a given anchor +cal.showCalendar(anchorname); + +// Hide the calendar. The calendar is set to autoHide automatically +cal.hideCalendar(); + +// Set the month names to be used. Default are English month names +cal.setMonthNames("January","February","March",...); + +// Set the month abbreviations to be used. Default are English month abbreviations +cal.setMonthAbbreviations("Jan","Feb","Mar",...); + +// Show navigation for changing by the year, not just one month at a time +cal.showYearNavigation(); + +// Show month and year dropdowns, for quicker selection of month of dates +cal.showNavigationDropdowns(); + +// Set the text to be used above each day column. The days start with +// sunday regardless of the value of WeekStartDay +cal.setDayHeaders("S","M","T",...); + +// Set the day for the first column in the calendar grid. By default this +// is Sunday (0) but it may be changed to fit the conventions of other +// countries. +cal.setWeekStartDay(1); // week is Monday - Sunday + +// Set the weekdays which should be disabled in the 'date' select popup. You can +// then allow someone to only select week end dates, or Tuedays, for example +cal.setDisabledWeekDays(0,1); // To disable selecting the 1st or 2nd days of the week + +// Selectively disable individual days or date ranges. Disabled days will not +// be clickable, and show as strike-through text on current browsers. +// Date format is any format recognized by parseDate() in date.js +// Pass a single date to disable: +cal.addDisabledDates("2003-01-01"); +// Pass null as the first parameter to mean "anything up to and including" the +// passed date: +cal.addDisabledDates(null, "01/02/03"); +// Pass null as the second parameter to mean "including the passed date and +// anything after it: +cal.addDisabledDates("Jan 01, 2003", null); +// Pass two dates to disable all dates inbetween and including the two +cal.addDisabledDates("January 01, 2003", "Dec 31, 2003"); + +// When the 'year' select is displayed, set the number of years back from the +// current year to start listing years. Default is 2. +// This is also used for year drop-down, to decide how many years +/- to display +cal.setYearSelectStartOffset(2); + +// Text for the word "Today" appearing on the calendar +cal.setTodayText("Hoje"); + +// The calendar uses CSS classes for formatting. If you want your calendar to +// have unique styles, you can set the prefix that will be added to all the +// classes in the output. +// For example, normal output may have this: +// Today +// But if you set the prefix like this: +cal.setCssPrefix("Test"); +// The output will then look like: +// Today +// And you can define that style somewhere in your page. + +// When using Year navigation, you can make the year be an input box, so +// the user can manually change it and jump to any year +cal.showYearNavigationInput(); + +// Set the calendar offset to be different than the default. By default it +// will appear just below and to the right of the anchorname. So if you have +// a text box where the date will go and and anchor immediately after the +// text box, the calendar will display immediately under the text box. +cal.offsetX = 20; +cal.offsetY = 20; + +NOTES: +1) Requires the functions in AnchorPosition.js and PopupWindow.js + +2) Your anchor tag MUST contain both NAME and ID attributes which are the + same. For example: + + +3) There must be at least a space between for IE5.5 to see the + anchor tag correctly. Do not do with no space. + +4) When a CalendarPopup object is created, a handler for 'onmouseup' is + attached to any event handler you may have already defined. Do NOT define + an event handler for 'onmouseup' after you define a CalendarPopup object + or the autoHide() will not work correctly. + +5) The calendar popup display uses style sheets to make it look nice. + +*/ + +// CONSTRUCTOR for the CalendarPopup Object +function CalendarPopup() { + var c; + if (arguments.length>0) { + c = new PopupWindow(arguments[0]); + } + else { + c = new PopupWindow(); + c.setSize(150,175); + } + c.offsetX = -152; + c.offsetY = 25; + c.autoHide(); + // Calendar-specific properties + c.monthNames = new Array("Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outobro","Novembro","Dezembro"); + c.monthAbbreviations = new Array("Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"); + c.dayHeaders = new Array("D","S","T","Q","Q","S","S"); + c.returnFunction = "CP_tmpReturnFunction"; + c.returnMonthFunction = "CP_tmpReturnMonthFunction"; + c.returnQuarterFunction = "CP_tmpReturnQuarterFunction"; + c.returnYearFunction = "CP_tmpReturnYearFunction"; + c.weekStartDay = 0; + c.isShowYearNavigation = false; + c.displayType = "date"; + c.disabledWeekDays = new Object(); + c.disabledDatesExpression = ""; + c.yearSelectStartOffset = 2; + c.currentDate = null; + c.todayText="Hoje"; + c.cssPrefix=""; + c.isShowNavigationDropdowns=false; + c.isShowYearNavigationInput=false; + window.CP_calendarObject = null; + window.CP_targetInput = null; + window.CP_dateFormat = "dd/MM/yyyy"; + // Method mappings + c.copyMonthNamesToWindow = CP_copyMonthNamesToWindow; + c.setReturnFunction = CP_setReturnFunction; + c.setReturnMonthFunction = CP_setReturnMonthFunction; + c.setReturnQuarterFunction = CP_setReturnQuarterFunction; + c.setReturnYearFunction = CP_setReturnYearFunction; + c.setMonthNames = CP_setMonthNames; + c.setMonthAbbreviations = CP_setMonthAbbreviations; + c.setDayHeaders = CP_setDayHeaders; + c.setWeekStartDay = CP_setWeekStartDay; + c.setDisplayType = CP_setDisplayType; + c.setDisabledWeekDays = CP_setDisabledWeekDays; + c.addDisabledDates = CP_addDisabledDates; + c.setYearSelectStartOffset = CP_setYearSelectStartOffset; + c.setTodayText = CP_setTodayText; + c.showYearNavigation = CP_showYearNavigation; + c.showCalendar = CP_showCalendar; + c.hideCalendar = CP_hideCalendar; + c.getStyles = getCalendarStyles; + c.refreshCalendar = CP_refreshCalendar; + c.getCalendar = CP_getCalendar; + c.select = CP_select; + c.setCssPrefix = CP_setCssPrefix; + c.showNavigationDropdowns = CP_showNavigationDropdowns; + c.showYearNavigationInput = CP_showYearNavigationInput; + c.copyMonthNamesToWindow(); + // Return the object + return c; + } +function CP_copyMonthNamesToWindow() { + // Copy these values over to the date.js + if (typeof(window.MONTH_NAMES)!="undefined" && window.MONTH_NAMES!=null) { + window.MONTH_NAMES = new Array(); + for (var i=0; i\n"; + result += '
\n'; + } + else { + result += '
\n'; + result += '
\n'; + result += '
\n'; + } + // Code for DATE display (default) + // ------------------------------- + if (this.displayType=="date" || this.displayType=="week-end") { + if (this.currentDate==null) { this.currentDate = now; } + if (arguments.length > 0) { var month = arguments[0]; } + else { var month = this.currentDate.getMonth()+1; } + if (arguments.length > 1 && arguments[1]>0 && arguments[1]-0==arguments[1]) { var year = arguments[1]; } + else { var year = this.currentDate.getFullYear(); } + var daysinmonth= new Array(0,31,28,31,30,31,30,31,31,30,31,30,31); + if ( ( (year%4 == 0)&&(year%100 != 0) ) || (year%400 == 0) ) { + daysinmonth[2] = 29; + } + var current_month = new Date(year,month-1,1); + var display_year = year; + var display_month = month; + var display_date = 1; + var weekday= current_month.getDay(); + var offset = 0; + + offset = (weekday >= this.weekStartDay) ? weekday-this.weekStartDay : 7-this.weekStartDay+weekday ; + if (offset > 0) { + display_month--; + if (display_month < 1) { display_month = 12; display_year--; } + display_date = daysinmonth[display_month]-offset+1; + } + var next_month = month+1; + var next_month_year = year; + if (next_month > 12) { next_month=1; next_month_year++; } + var last_month = month-1; + var last_month_year = year; + if (last_month < 1) { last_month=12; last_month_year--; } + var date_class; + if (this.type!="WINDOW") { + result += ""; + } + result += '\n'; + var refresh = windowref+'CP_refreshCalendar'; + var refreshLink = 'javascript:' + refresh; + if (this.isShowNavigationDropdowns) { + result += ''; + result += ''; + + result += ''; + } + else { + if (this.isShowYearNavigation) { + result += ''; + result += ''; + result += ''; + result += ''; + + result += ''; + if (this.isShowYearNavigationInput) { + result += ''; + } + else { + result += ''; + } + result += ''; + } + else { + result += '\n'; + result += '\n'; + result += '\n'; + } + } + result += '
 <'+this.monthNames[month-1]+'> <'+year+'><<'+this.monthNames[month-1]+' '+year+'>>
\n'; + result += '\n'; + result += '\n'; + for (var j=0; j<7; j++) { + + result += '\n'; + } + result += '\n'; + for (var row=1; row<=6; row++) { + result += '\n'; + for (var col=1; col<=7; col++) { + var disabled=false; + if (this.disabledDatesExpression!="") { + var ds=""+display_year+LZ(display_month)+LZ(display_date); + eval("disabled=("+this.disabledDatesExpression+")"); + } + var dateClass = ""; + if ((display_month == this.currentDate.getMonth()+1) && (display_date==this.currentDate.getDate()) && (display_year==this.currentDate.getFullYear())) { + dateClass = "cpCurrentDate"; + } + else if (display_month == month) { + dateClass = "cpCurrentMonthDate"; + } + else { + dateClass = "cpOtherMonthDate"; + } + if (disabled || this.disabledWeekDays[col-1]) { + result += ' \n'; + } + else { + var selected_date = display_date; + var selected_month = display_month; + var selected_year = display_year; + if (this.displayType=="week-end") { + var d = new Date(selected_year,selected_month-1,selected_date,0,0,0,0); + d.setDate(d.getDate() + (7-col)); + selected_year = d.getYear(); + if (selected_year < 1000) { selected_year += 1900; } + selected_month = d.getMonth()+1; + selected_date = d.getDate(); + } + result += ' \n'; + } + display_date++; + if (display_date > daysinmonth[display_month]) { + display_date=1; + display_month++; + } + if (display_month > 12) { + display_month=1; + display_year++; + } + } + result += ''; + } + var current_weekday = now.getDay() - this.weekStartDay; + if (current_weekday < 0) { + current_weekday += 7; + } + result += '\n'; + result += '
'+this.dayHeaders[(this.weekStartDay+j)%7]+'
'+display_date+''+display_date+'
\n'; + if (this.disabledDatesExpression!="") { + var ds=""+now.getFullYear()+LZ(now.getMonth()+1)+LZ(now.getDate()); + eval("disabled=("+this.disabledDatesExpression+")"); + } + if (disabled || this.disabledWeekDays[current_weekday+1]) { + result += ' '+this.todayText+'\n'; + } + else { + result += ' '+this.todayText+'\n'; + } + result += '
\n'; + result += '
\n'; + } + + // Code common for MONTH, QUARTER, YEAR + // ------------------------------------ + if (this.displayType=="month" || this.displayType=="quarter" || this.displayType=="year") { + if (arguments.length > 0) { var year = arguments[0]; } + else { + if (this.displayType=="year") { var year = now.getFullYear()-this.yearSelectStartOffset; } + else { var year = now.getFullYear(); } + } + if (this.displayType!="year" && this.isShowYearNavigation) { + result += ""; + result += '\n'; + result += ' \n'; + result += ' \n'; + result += ' \n'; + result += '
<<'+year+'>>
\n'; + } + } + + // Code for MONTH display + // ---------------------- + if (this.displayType=="month") { + // If POPUP, write entire HTML document + result += '\n'; + for (var i=0; i<4; i++) { + result += ''; + for (var j=0; j<3; j++) { + var monthindex = ((i*3)+j); + result += ''; + } + result += ''; + } + result += '
'+this.monthAbbreviations[monthindex]+'
\n'; + } + + // Code for QUARTER display + // ------------------------ + if (this.displayType=="quarter") { + result += '
\n'; + for (var i=0; i<2; i++) { + result += ''; + for (var j=0; j<2; j++) { + var quarter = ((i*2)+j+1); + result += ''; + } + result += ''; + } + result += '

Q'+quarter+'

\n'; + } + + // Code for YEAR display + // --------------------- + if (this.displayType=="year") { + var yearColumnSize = 4; + result += ""; + result += '\n'; + result += ' \n'; + result += ' \n'; + result += '
<<>>
\n'; + result += '\n'; + for (var i=0; i'+currentyear+''; + } + result += ''; + } + result += '
\n'; + } + // Common + if (this.type == "WINDOW") { + result += "\n"; + } + return result; + } diff --git a/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao.html b/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao.html new file mode 100644 index 00000000..0418a3c1 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao.html @@ -0,0 +1,14 @@ + + + + + +Empresa: $empresa
+Estabelecimento: $estabelecimento
+Funcionário: $funcionario
+
+Pedido de marcação de $marcacao_tipo + data(s): $data#if( $marcacao_tipo == 'Consulta' ) + Horário: $hora#end.
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_consulta.html b/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_consulta.html new file mode 100644 index 00000000..96d6b4ea --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_consulta.html @@ -0,0 +1,49 @@ + + + + + Marcação de consulta + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ Marcação de Consulta para:
+ $funcionario +
Data(s)*:
Horário:
+ Nota: a marcação está sujeita a confirmação via email.
+ * - campo de preenchimento obrigatório +
+ +
+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_enviada.html b/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_enviada.html new file mode 100644 index 00000000..481963aa --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_enviada.html @@ -0,0 +1,11 @@ + + + + + Marcação de consulta / exame + + + + O pedido de marcação foi enviado com sucesso. + + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_exame.html b/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_exame.html new file mode 100644 index 00000000..3bcddc85 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_exame.html @@ -0,0 +1,43 @@ + + + + + Marcação de exames + + + + + +
+ + + + + + + + + + + + + + +
+ Marcação de Exames para:
+ $funcionario +
Data(s)*:
+ Nota: a marcação está sujeita a confirmação via email.
+ * - campo de preenchimento obrigatório +
+ +
+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_menu.html b/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_menu.html new file mode 100644 index 00000000..0c605749 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_menu.html @@ -0,0 +1,62 @@ + + + + + Marcação de consulta / exame + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ Marcação para:
+ $funcionario +
+ Consulta + Exame +
Data:dd/mm/aaaa
Hora:hh:mm
+ Nota: a marcação está sujeita a confirmação via email. +
+ +
+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_nao_enviada.html b/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_nao_enviada.html new file mode 100644 index 00000000..5621b521 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_nao_enviada.html @@ -0,0 +1,11 @@ + + + + + Marcação de consulta / exame + + + + Ocorreu um erro a enviar o pedido de marcação. + + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_sessao_expirou.html b/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_sessao_expirou.html new file mode 100644 index 00000000..3a84b5fc --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/marcacao/marcacao_sessao_expirou.html @@ -0,0 +1,11 @@ + + + + + Sessão expirou + + + + A sua sessão expirou. Para efectuar uma marcação, autentique-se novamente. + + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/medicina.html b/tags/Site antigo e SIPRPSoft/web/contents/medicina.html new file mode 100644 index 00000000..d52815fb --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/medicina.html @@ -0,0 +1,52 @@ + + + + + SIPRP - Medicina + + + + + + + + + + + + + + + +
   +medicina do trabalho
+
+ + + + + + + + + + +

+

+

+

+

+
+

+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/noticias/mostrar_noticias.html b/tags/Site antigo e SIPRPSoft/web/contents/noticias/mostrar_noticias.html new file mode 100644 index 00000000..ddea30a6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/noticias/mostrar_noticias.html @@ -0,0 +1,11 @@ + + + + + Notícias + + + + $noticias + + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/politica.html b/tags/Site antigo e SIPRPSoft/web/contents/politica.html new file mode 100644 index 00000000..3713c26b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/politica.html @@ -0,0 +1,52 @@ + + + + + SIPRP + + + + + + + + + + + + + + + +
   +política de qualidade e apoio administrativo
+
+ + + + + + + + + + +

+

+

+

+

+
+

+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/relatorio/pedido.html b/tags/Site antigo e SIPRPSoft/web/contents/relatorio/pedido.html new file mode 100644 index 00000000..427733c2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/relatorio/pedido.html @@ -0,0 +1,9 @@ + + + + +Empresa: $empresa
+
+Pedido de envio de relatório do ano: $ano
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/relatorio/pedido_enviado.html b/tags/Site antigo e SIPRPSoft/web/contents/relatorio/pedido_enviado.html new file mode 100644 index 00000000..9b530aa6 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/relatorio/pedido_enviado.html @@ -0,0 +1,11 @@ + + + + + Envio de dados do relatório anual + + + + O pedido foi enviado com sucesso. + + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/relatorio/pedido_nao_enviado.html b/tags/Site antigo e SIPRPSoft/web/contents/relatorio/pedido_nao_enviado.html new file mode 100644 index 00000000..196da035 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/relatorio/pedido_nao_enviado.html @@ -0,0 +1,11 @@ + + + + + Envio de dados do relatório anual + + + + Ocorreu um erro a enviar o pedido. + + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/relatorio/pedido_relatorio.html b/tags/Site antigo e SIPRPSoft/web/contents/relatorio/pedido_relatorio.html new file mode 100644 index 00000000..5dd5bf9f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/relatorio/pedido_relatorio.html @@ -0,0 +1,35 @@ + + + + + Pedido de dados do relatório anual + + + + + +
+ + + + + + + + + + +
+ Pedido de dados do relatório anual +
Ano pretendido:
+ +
+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/relatorio/pedido_sessao_expirou.html b/tags/Site antigo e SIPRPSoft/web/contents/relatorio/pedido_sessao_expirou.html new file mode 100644 index 00000000..0311eda3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/relatorio/pedido_sessao_expirou.html @@ -0,0 +1,11 @@ + + + + + Sessão expirou + + + + A sua sessão expirou. Para efectuar o pedido, autentique-se novamente. + + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/servicos.html b/tags/Site antigo e SIPRPSoft/web/contents/servicos.html new file mode 100644 index 00000000..f4585f4f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/servicos.html @@ -0,0 +1,31 @@ + + + + + SIPRP - Serviços + + + + + + + + + + + + +

+
-Serviços +Complementares
+ -Medicina do +Trabalho
+ -Política de +Qualidade e Apoio Administrativo
+ -Higiene e +Segurança
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/servicos_compl.html b/tags/Site antigo e SIPRPSoft/web/contents/servicos_compl.html new file mode 100644 index 00000000..163977df --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/servicos_compl.html @@ -0,0 +1,52 @@ + + + + + SIPRP - Serviços + + + + + + + + + + + + + + + +
   +serviços complementares
+
+ + + + + + + + + + +

+

+

+

+

+
+

+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/siprp.html b/tags/Site antigo e SIPRPSoft/web/contents/siprp.html new file mode 100644 index 00000000..37d5babe --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/siprp.html @@ -0,0 +1,52 @@ + + + + + SIPRP - Apresentação + + + + + + + + + + + + + + + +
   +a +siprp
+ + + + + + + + + + +

+

+

+

+

+
+

+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/user.html b/tags/Site antigo e SIPRPSoft/web/contents/user.html new file mode 100644 index 00000000..b3d8a59f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/user.html @@ -0,0 +1,396 @@ + + + + + SIPRP + + + + + + + + + + + + + +

+ + + + + + + + + + #if( $userRole != "manager" ) + + + #end + + + +
   $userName    pedido de relatório anual...logout »   
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + #if( $query == "empresas" ) + #set( $listaTitle = "empresas" ) + #elseif( $query == "estabelecimentos" ) + #set( $listaTitle = "estabelecimentos" ) + #elseif( $query == "trabalhadores" || $query == "trabalhadores_tudo" || $query == "trabalhadores_pendentes" ) + #set( $listaTitle = "funcionários:" ) + #set( $lista_funcionarios = 1 ) + #else ##( $query == "trabalhador" ) + #set( $listaTitle = "funcionário" ) + #end + + + #if( $lista_funcionarios ) + + + + #end + + + + + + + + + + + + + + +
   acesso restrito
+ + + + + + + + + + + + + + +
+ #if( $userRole == "manager" && $empresa_nome ) + Empresa: $!empresa_nome + #else + Empresa: $!empresa_nome + #end +
+ #if( $estabelecimento_id ) + Estabelecimento: $!estabelecimento_nome + #else + Estabelecimento: + #end +
+ #if( $query == "trabalhador" ) + Funcionário: $!funcionario.nome  - Data de Nascimento: $!funcionario.data_nascimento + #else + Funcionário: + #end + + #if( $query == "trabalhador" ) + + #end +
+ +
+
+ + + + + + + + +
   funcionários:   todos   com ficha de aptidão   com pendências         imprimir
+ #else +
   $listaTitle
+ #if ($query == "trabalhador") + (*)ECD - Exames Complementares de Diagnóstico

+ + + + + + + + + + + + + + + + + + + + +
Último ECD(*)RealizadoÚltima ConsultaRealizadaResultadoPróximo ECD(*)Próxima Consulta
$!funcionario.ultimo_exame $!funcionario.realizado $!funcionario.ultima_consulta $!funcionario.realizada $!funcionario.resultado $!funcionario.proximo_exame $!funcionario.proxima_consulta 
+ #elseif( $query == "trabalhadores" ) + (*)ECD - Exames Complementares de Diagnóstico

+ + + + + + + + #foreach( $element in $v1 ) + #set ( $counter = $velocityCount - 1 ) + #set ( $dados_trabalhador = $v2.get($counter) ) + + + + + + + #end +
  NomeÚltimo ECD(*)Última consultaPróxima consulta
$dados_trabalhador.Nome $dados_trabalhador.ultimo_exame $dados_trabalhador.ultima_consulta $dados_trabalhador.proxima_consulta 
+ #elseif( $query == "trabalhadores_tudo" ) + + + + + + #foreach( $element in $v1 ) + #set ( $counter = $velocityCount - 1 ) + #set ( $dados_trabalhador = $v2.get($counter) ) + + + + + #end +
  NomeData da Ficha de Aptidão
  $dados_trabalhador.Nome$dados_trabalhador.Data  
+ #elseif( $query == "trabalhadores_pendentes" ) + - pendente    + - marcado    + - tratado
+ (*)ECD - Exames Complementares de Diagnóstico

+ + + + + + + #foreach( $element in $v1 ) + #set ( $counter = $velocityCount - 1 ) + #set ( $dados_trabalhador = $v2.get($counter) ) + + + + + + #end +
  NomeECD(*)Consulta
  $dados_trabalhador.Nome
+ #else + #foreach( $element in $v1 ) + #set ( $counter = $velocityCount - 1 ) + $v2.get($counter)
+ #end + #end +
+
+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/contents/user_print.html b/tags/Site antigo e SIPRPSoft/web/contents/user_print.html new file mode 100644 index 00000000..821ac555 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/contents/user_print.html @@ -0,0 +1,284 @@ + + + + + SIPRP + + + + + + + + + + + +

+ + + + + + +
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + #if( $query == "trabalhadores" ) + #set( $listaTitle = "Todos os Funcionários" ) + #elseif( $query == "trabalhadores_tudo" ) + #set( $listaTitle = "Funcionários com Tudo Resolvido" ) + #elseif( $query == "trabalhadores_pendentes" ) + #set( $listaTitle = "Funcionários com Pendências" ) + #end + + + + + + + + + + + + +
   
+ + + + + + + + + + +
+ Empresa: $!empresa_nome +
+ Estabelecimento: $!estabelecimento_nome +
+ +
+
   $listaTitle
+ #if( $query == "trabalhadores" ) + (*)ECD - Exames Complementares de Diagnóstico

+ + + + + + + + #foreach( $element in $v1 ) + #set ( $counter = $velocityCount - 1 ) + #set ( $dados_trabalhador = $v2.get($counter) ) + + + + + + + #end +
  NomeÚltimo ECD(*)Última consultaPróxima consulta
$dados_trabalhador.Nome $dados_trabalhador.ultimo_exame $dados_trabalhador.ultima_consulta $dados_trabalhador.proxima_consulta 
+ + #elseif( $query == "trabalhadores_tudo" ) + + + + + + #foreach( $element in $v1 ) + #set ( $counter = $velocityCount - 1 ) + #set ( $dados_trabalhador = $v2.get($counter) ) + + + + + #end +
  NomeData da Ficha de Aptidão
  $dados_trabalhador.Nome$dados_trabalhador.Data  
+ #elseif( $query == "trabalhadores_pendentes" ) + + (*)ECD - Exames Complementares de Diagnóstico

+ + + + + + + #foreach( $element in $v1 ) + #set ( $counter = $velocityCount - 1 ) + #set ( $dados_trabalhador = $v2.get($counter) ) + + + + + + + #end +
  NomeECD(*)Consulta
  $dados_trabalhador.Nome$dados_trabalhador.Exame_estado$dados_trabalhador.Consulta_estado
+ #end +
+
+
+ + diff --git a/tags/Site antigo e SIPRPSoft/web/lib/commons-email-1.0-dev.jar b/tags/Site antigo e SIPRPSoft/web/lib/commons-email-1.0-dev.jar new file mode 100644 index 00000000..aab523d5 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/lib/commons-email-1.0-dev.jar differ diff --git a/tags/Site antigo e SIPRPSoft/web/lib/commons-fileupload-1.0.jar b/tags/Site antigo e SIPRPSoft/web/lib/commons-fileupload-1.0.jar new file mode 100644 index 00000000..1ca4a9cd Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/lib/commons-fileupload-1.0.jar differ diff --git a/tags/Site antigo e SIPRPSoft/web/lib/postgresql-8.2-504.jdbc3.jar b/tags/Site antigo e SIPRPSoft/web/lib/postgresql-8.2-504.jdbc3.jar new file mode 100644 index 00000000..b450671d Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/lib/postgresql-8.2-504.jdbc3.jar differ diff --git a/tags/Site antigo e SIPRPSoft/web/lib/velocity-dep-1.4.jar b/tags/Site antigo e SIPRPSoft/web/lib/velocity-dep-1.4.jar new file mode 100644 index 00000000..375712b0 Binary files /dev/null and b/tags/Site antigo e SIPRPSoft/web/lib/velocity-dep-1.4.jar differ diff --git a/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/GlobalConstants.java b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/GlobalConstants.java new file mode 100644 index 00000000..09ad89c3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/GlobalConstants.java @@ -0,0 +1,53 @@ +/* + * GlobalConstant.java + * + * Created on 27 de Abril de 2005, 18:20 + */ + +package siprp.pagina; + +/** + * + * @author fpalma + */ +public interface GlobalConstants +{ + // BD + public static final String bdHost = "www.evolute.pt"; + public static final String bdPort = "5436"; + public static final String bdUsername = "siprp"; + public static final String bdPassword = "rg2h-opksiprp"; + public static final String bdDriver = "org.postgresql.Driver"; + public static final String bdUrl = "jdbc:postgresql://" + bdHost + ":" + bdPort + "/siprp"; + + public static final String bdLocalHost = "www.evolute.pt"; + public static final String bdLocalPort = "5436"; + public static final String bdLocalUsername = "siprp"; + public static final String bdLocalPassword = "rg2h-opksiprp"; + public static final String bdLocalDriver = "org.postgresql.Driver"; + public static final String bdLocalUrl = "jdbc:postgresql://" + bdHost + ":" + bdPort + "/siprp_local_3"; + +// public static final String bdHost = "www.evolute.pt"; +// public static final String bdPort = "5436"; +// public static final String bdUsername = "postgres"; +// public static final String bdPassword = "-rg2hpgsql"; +// public static final String bdDriver = "org.postgresql.Driver"; +// public static final String bdUrl = "jdbc:postgresql://" + bdHost + ":" + bdPort + "/siprp"; +// +// public static final String bdLocalHost = "www.evolute.pt"; +// public static final String bdLocalPort = "5436"; +// public static final String bdLocalUsername = "postgres"; +// public static final String bdLocalPassword = "-rg2hpgsql"; +// public static final String bdLocalDriver = "org.postgresql.Driver"; +// public static final String bdLocalUrl = "jdbc:postgresql://" + bdHost + ":" + bdPort + "/siprp_local_3"; + + + public static final String DEFAULT_EMAIL = "geral@siprp.pt"; + + public static final int TIPO_MARCACAO_EXAMES = 0; + public static final int TIPO_MARCACAO_CONSULTA = 1; + + public static final Integer ESTADO_POR_REALIZAR = new Integer( 0 ); + public static final Integer ESTADO_PARCIALMENTE_REALIZADO = new Integer( 1 ); + public static final Integer ESTADO_REALIZADO = new Integer( 2 ); +} diff --git a/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/MailerServlet.java b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/MailerServlet.java new file mode 100644 index 00000000..35013af8 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/MailerServlet.java @@ -0,0 +1,240 @@ +/* + * ServletAux.java + * + * Created on 10 de Marco de 2005, 12:24 + */ + +package siprp.pagina; + +import javax.activation.*; +import java.io.*; +import java.util.*; + +import javax.mail.*; +import javax.mail.internet.*; +import javax.servlet.*; +import javax.servlet.http.*; +import java.sql.*; + +import org.apache.commons.mail.*; +import org.apache.velocity.*; +import org.apache.velocity.app.*; + +import com.evolute.utils.arrays.*; +/** + * + * @author psantos + */ +public class MailerServlet extends HttpServlet + implements GlobalConstants +{ + public static final String EMAIL = "email"; + public static final String EMAIL_MARCACAO = "email_marcacao"; + public static final String EMAIL_RECRUTAMENTO = "email_recrutamento"; + + protected static Hashtable PROPERTIES; + + public void init() + { + + try + { + String TEMPLATE_DIR = this.getServletContext().getRealPath( "/" ) + "html/"; + + Properties props = new Properties(); + props.setProperty( "file.resource.loader.path", TEMPLATE_DIR ); + Velocity.init( props ); + if( PROPERTIES == null ) + { + Class.forName(bdDriver); + Connection con = DriverManager.getConnection( bdUrl, bdUsername, bdPassword ); + Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + ResultSet2DArray array = new ResultSet2DArray( + stmt.executeQuery( "Select name, value FROM properties;" ) ); + PROPERTIES = new Hashtable(); + for( int n = 0; n < array.columnLength(); n++ ) + { + PROPERTIES.put( array.get( n, 0 ), array.get( n, 1 ) ); + } + con.close(); + } + } + catch( Exception e ) + { + e.printStackTrace(); + } + } + + protected String createContent( Hashtable parameters, String[] form_fields, String template ) + { + VelocityContext context = new VelocityContext(); + StringWriter output = new StringWriter(); + + try + { + for( int i = 0; i < form_fields.length; i++ ) + { + context.put( form_fields[ i ], parameters.get( form_fields[ i ] ) ); + } + + Velocity.mergeTemplate( template, Velocity.ENCODING_DEFAULT, context, output ); + + return output.toString(); + } + catch( Exception e ) + { + e.printStackTrace(); + } + + return null; + } + + protected String showResultPage( boolean success, String success_template, String fail_template ) + { + VelocityContext context = new VelocityContext(); + StringWriter output = new StringWriter(); + String template; + if( success ) + { + template = success_template; + } + else + { + template = fail_template; + } + try + { + Velocity.mergeTemplate( template, Velocity.ENCODING_DEFAULT, context, output ); + return output.toString(); + } + catch( Exception e ) + { + e.printStackTrace(); + } + + return null; + } + + protected boolean sendMail( String from, String destination, String subject, String content, boolean html ) + { + String smtp_server = "localhost"; + String mailer = "Evolute Mailer"; + + Properties props = System.getProperties(); + props.put( "mail.smtp.host", smtp_server ); + + String content_type = ( html ) ? "text/html" : "text/plain"; + + Session session = Session.getInstance( props, null ); + Message msg = new MimeMessage( session ); + try + { + if( from != null ) + { + msg.setFrom( new InternetAddress( from ) ); + } + msg.setRecipients( Message.RecipientType.TO, InternetAddress.parse( destination, true ) ); + msg.setSubject( subject ); + + msg.setContent( content.toString(), content_type ); + + msg.setHeader( "X-Mailer", mailer ); + msg.setSentDate( new java.util.Date() ); + Transport.send( msg ); + + return true; + } + catch( Exception e ) + { + e.printStackTrace(); + } + + return false; + } + + protected boolean sendMail( String from, String destination, String subject, String content, boolean html, + String filename, byte attachment[], String type ) + { + String smtp_server = "localhost"; + String mailer = "Evolute Mailer"; + + Properties props = System.getProperties(); + props.put( "mail.smtp.host", smtp_server ); + + String content_type = ( html ) ? "text/html" : "text/plain"; + + Session session = Session.getInstance( props, null ); + Message msg = new MimeMessage( session ); + try + { + if( from != null ) + { + msg.setFrom( new InternetAddress( from ) ); + } + msg.setRecipients( Message.RecipientType.TO, InternetAddress.parse( destination, true ) ); + msg.setSubject( subject ); + msg.setHeader( "X-Mailer", mailer ); + msg.setSentDate( new java.util.Date() ); + + Multipart multipart = new MimeMultipart(); + BodyPart messageBodyPart = new MimeBodyPart(); + messageBodyPart.setContent( content.toString(), content_type ); + multipart.addBodyPart(messageBodyPart); + + messageBodyPart = new MimeBodyPart(); +// messageBodyPart.setDataHandler( +// new DataHandler( new ByteArrayDataSource( attachment, "/siprpWeb/test.txt" ))); + messageBodyPart.setContent( attachment, content_type ); + DataSource source = new ByteArrayDataSource(attachment, type); + messageBodyPart.setDataHandler( + new DataHandler(source)); + messageBodyPart.setFileName(filename); + + multipart.addBodyPart(messageBodyPart); + msg.setContent(multipart); + + Transport.send( msg ); + + return true; + } + catch( Exception e ) + { + e.printStackTrace(); + } + + return false; + } + + private String checkParameter( String parameter ) + { + if( parameter != null && parameter.trim().length() > 0 ) + { + return parameter.trim(); + } + + return null; + } + + protected Hashtable parseParameters( Hashtable parameters ) + { + Hashtable tmp = new Hashtable(); + String[] element; + String key; + String new_element; + for( Enumeration e = parameters.keys(); e.hasMoreElements(); ) + { + key = ( String ) e.nextElement(); + element = ( String[] ) parameters.get( key ); + if( element != null ) + { + new_element = checkParameter( element[ 0 ] ); + if( new_element != null ) + { + tmp.put( key, new_element ); + } + } + } + + return tmp; + } +} diff --git a/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/NewsServlet.java b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/NewsServlet.java new file mode 100644 index 00000000..5122d6b2 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/NewsServlet.java @@ -0,0 +1,168 @@ +/* + * NewsServlet.java + * + * Created on 20 de Maio de 2005, 17:48 + */ + +package siprp.pagina; + +import java.io.*; +import java.util.*; +import javax.servlet.*; +import javax.servlet.http.*; +import java.sql.*; +import org.apache.velocity.*; +import org.apache.velocity.app.*; + +import com.evolute.utils.*; +import com.evolute.utils.arrays.*; +import com.evolute.utils.db.*; +import com.evolute.utils.sql.*; +import com.evolute.utils.strings.*; + +/** + * + * @author lflores + */ +public class NewsServlet extends HttpServlet + implements GlobalConstants +{ + private static DBManager DBM = null; + + private static final Select SELECT = new Select( new String[]{ "not_noticias" }, + new String[]{"data", "noticia"}, new Field( "id" ).in( + new Field( "( SELECT MAX( id ) FROM not_noticias )" ) ) ); + + private SQLExecuter executer = null; + + private static boolean velocityInit = false; + + public void init() + { + if( !velocityInit ) + { + try + { + String TEMPLATE_DIR = this.getServletContext().getRealPath( "/" ) + "html/"; + + Properties props = new Properties(); + props.setProperty( "file.resource.loader.path", TEMPLATE_DIR ); + Velocity.init( props ); + } + catch( Exception ex ) + { + ex.printStackTrace(); + } + velocityInit = true; + } + + if( DBM != null ) + { + return; + } + + try + { + DBM = new JDBCManager( bdUrl + "?prepareThreshold=1", + bdUsername, bdPassword , 8, 8, 0, new SQLQuery[] {} ); + } + catch( Exception e ) + { + e.printStackTrace(); + } + } + + private void close() + { + try + { + DBM.close(); + DBM = null; + } + catch( Exception ex ) + { + // we come here after an error + // so we discard this exception + } + } + + private String getNews() + { +//System.err.println( "NEWS: BEGIN" ); + try + { + if( executer == null ) + { + executer = ( SQLExecuter )DBM.getSharedExecuter(); + } + Virtual2DArray array = executer.executeQuery( SELECT ); + Object o[][] = array.getObjects(); + if( o != null && o.length > 0 ) + { +//System.err.println( "NEWS: " + o[ 0 ][ 0 ].toString() ); + return + //o[ 0 ][ 0 ].toString() + + StringConverter.unicodeToHTML( o[ 0 ][ 1 ].toString() ); + } + } + catch( Exception ex ) + { +//System.err.println( "NEWS: EX" ); + ex.printStackTrace(); + close(); + } +//System.err.println( "NEWS: END" ); + return null; + } + + public void doGet( HttpServletRequest req, HttpServletResponse res ) + throws IOException + { +//System.err.println( "NEWS: GET BEGIN" ); + init(); +//System.err.println( "NEWS: AF INIT" ); + ServletOutputStream out = res.getOutputStream(); +// String queryString = req.getQueryString(); + res.setContentType( "text/html" ); + String news = getNews(); + Hashtable parameters = new Hashtable(); + if( news == null ) + { + parameters.put( "noticias", "" ); + } + else + { + parameters.put( "noticias", news ); + } +//System.err.println( "NEWS: BF SHOW" ); + out.println( showPage( "noticias/mostrar_noticias.html", parameters ) ); + } + + private String showPage( String page, Hashtable parameters ) + { + VelocityContext context = new VelocityContext(); + StringWriter output = new StringWriter(); + + try + { + if( parameters != null ) + { + String key; + for( Enumeration e = parameters.keys(); e.hasMoreElements(); ) + { + key = ( String ) e.nextElement(); + context.put( key, parameters.get( key ) ); + } + } + + Velocity.mergeTemplate( page, Velocity.ENCODING_DEFAULT, context, output ); + + return output.toString(); + } + catch( Exception e ) + { + e.printStackTrace(); + } + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/RecruitServlet.java b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/RecruitServlet.java new file mode 100644 index 00000000..ff69f10d --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/RecruitServlet.java @@ -0,0 +1,127 @@ +/* + * RequestServlet.java + * + * Created on 4 de Marco de 2005, 18:19 + */ + +package siprp.pagina; + +import java.io.*; +import java.util.*; + +import javax.servlet.*; +import javax.servlet.http.*; + +import org.apache.commons.fileupload.*; + +/** + * + * @author psantos + */ +public class RecruitServlet extends MailerServlet +{ + private final static String REC_FUNCAO = "rec_funcao"; + private final static String REC_NOME = "rec_nome"; + private final static String REC_MORADA = "rec_morada"; + private final static String REC_TELEFONE = "rec_telefone"; + private final static String REC_EMAIL = "rec_email"; + private final static String REC_CV = "rec_cv"; + + private final static String[] FORM_FIELDS = new String[]{ + REC_FUNCAO, REC_NOME, REC_MORADA, + REC_TELEFONE, REC_EMAIL, REC_CV + }; + + public void doPost( HttpServletRequest req, HttpServletResponse res ) + throws IOException + { + Hashtable parameters; + String fileName = ""; + String type = ""; + byte file[] = new byte[0]; + boolean isMultipart = FileUpload.isMultipartContent( req ); + + ServletOutputStream out = res.getOutputStream(); + res.setContentType( "text/html" ); + + if( isMultipart ) + { + parameters = new Hashtable(); + DiskFileUpload upload = new DiskFileUpload(); + upload.setSizeThreshold(1000000); + upload.setSizeMax(1000000); + List items; + try + { + items = upload.parseRequest(req); + } + catch( FileUploadException ex ) + { + out.println( showResultPage( false, "mail/pedido_enviado.html", "mail/pedido_nao_enviado.html" ) ); + return; + } + Iterator iter = items.iterator(); + while( iter.hasNext() ) + { + FileItem item = (FileItem) iter.next(); + + if (item.isFormField()) + { + String name = item.getFieldName(); + String value = item.getString(); + parameters.put( name, value ); + } + else + { + String fieldName = item.getFieldName(); + fileName = item.getName(); + file = item.get(); + if( file == null || file.length == 0 ) + { + isMultipart = false; + } + type = item.getContentType(); + } + } + } + else + { + parameters = parseParameters( new Hashtable( req.getParameterMap() ) ); + } + String content = createContent( parameters, FORM_FIELDS, "mail/envio_cv.txt" ); + + String email = DEFAULT_EMAIL; + if( PROPERTIES != null && PROPERTIES.containsKey( EMAIL_RECRUTAMENTO ) ) + { + email = ( String ) PROPERTIES.get( EMAIL_RECRUTAMENTO ); + } + String from = email; + String destination = email; + String subject = "Envio de CV atrav\u00e9s do site www.siprp.pt"; + // manda mail + boolean success; + String nome = ( String ) parameters.get( REC_NOME ); + String telefone = ( String ) parameters.get( REC_TELEFONE ); + String mail = ( String ) parameters.get( REC_EMAIL ); + if( nome == null || nome.trim().length() == 0 || telefone == null || telefone.trim().length() == 0 || + mail == null || mail.trim().length() == 0 || mail.indexOf( '@' ) == -1 ) + { +System.out.println( "nome: " + nome + " teefone: " + telefone + " email : " + email ); + success = false; + } + else if( isMultipart ) + { +System.out.println( "Multipart" ); + success = sendMail( from, destination, subject, content, false, fileName, file, type ); + } + else + { +System.out.println( "Normal" ); + success = sendMail( from, destination, subject, content, false ); + } + + // mostra pagina correspondente + + out.println( showResultPage( success, "mail/cv_enviado.html", "mail/cv_nao_enviado.html" ) ); + } +} diff --git a/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/RelatorioServlet.java b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/RelatorioServlet.java new file mode 100644 index 00000000..7a7c5e9b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/RelatorioServlet.java @@ -0,0 +1,121 @@ +/* + * RelatorioServlet.java + * + * Created on 27 de Abril de 2005, 16:16 + */ + +package siprp.pagina; + +import java.io.*; +import java.util.*; + +import javax.servlet.*; +import javax.servlet.http.*; + +import org.apache.velocity.*; +import org.apache.velocity.app.*; +/** + * + * @author fpalma + */ +public class RelatorioServlet extends MailerServlet +{ + private final static String EMPRESA = "empresa"; + private final static String EMAIL_EMPRESA = "email_empresa"; + private final static String ANO = "ano"; + + private final static String[] FORM_FIELDS = new String[]{ + EMPRESA, ANO, EMAIL_EMPRESA }; + + public void doGet( HttpServletRequest req, HttpServletResponse res ) + throws IOException + { + ServletOutputStream out = res.getOutputStream(); + String queryString = req.getQueryString(); + res.setContentType( "text/html" ); + + Hashtable parameters = new Hashtable(); + + // Ir buscar os parametros 'a sessao + HttpSession session = req.getSession( false ); + if( session == null ) + { + // timeout + out.println( showPage( "relatorio/pedido_sessao_expirou.html", null ) ); + return; + } + + out.println( showPage( "relatorio/pedido_relatorio.html", parameters ) ); + } + + public void doPost( HttpServletRequest req, HttpServletResponse res ) + throws IOException + { + ServletOutputStream out = res.getOutputStream(); + String queryString = req.getQueryString(); + res.setContentType( "text/html" ); + + // Info de marcacao + // Dados que vem no pedido: marcacao_tipo, data, hora + Hashtable parameters = parseParameters( new Hashtable( req.getParameterMap() ) ); + + // Ir buscar o resto dos parametros 'a sessao + HttpSession session = req.getSession( false ); + if( session == null ) + { + // timeout + out.println( showPage( "relatorio/pedido_sessao_expirou.html", null ) ); + return; + } + + parameters.put( EMPRESA, session.getAttribute( siprpServlet.sessionCompanyName ) ); + String from = ( String ) session.getAttribute( siprpServlet.sessionCompanyEmail ); + + String email = DEFAULT_EMAIL; + if( PROPERTIES != null && PROPERTIES.containsKey( EMAIL ) ) + { + email = ( String ) PROPERTIES.get( EMAIL ); + } + String destination = email; + String subject = "Pedido de envio de relatorio via web"; + if( parameters.get( ANO ) == null ) + { + parameters.put( ANO, "corrente" ); + } + String content = createContent( parameters, FORM_FIELDS, "relatorio/pedido.html" ); + // manda mail + boolean success = sendMail( from, destination, subject, content, true ); + + // mostra pagina correspondente + out.println( showResultPage( success, "relatorio/pedido_enviado.html", "relatorio/pedido_nao_enviado.html" ) ); + } + + private String showPage( String page, Hashtable parameters ) + { + VelocityContext context = new VelocityContext(); + StringWriter output = new StringWriter(); + + try + { + if( parameters != null ) + { + String key; + for( Enumeration e = parameters.keys(); e.hasMoreElements(); ) + { + key = ( String ) e.nextElement(); + context.put( key, parameters.get( key ) ); + } + } + + Velocity.mergeTemplate( page, Velocity.ENCODING_DEFAULT, context, output ); + + return output.toString(); + } + catch( Exception e ) + { + e.printStackTrace(); + } + + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/RequestServlet.java b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/RequestServlet.java new file mode 100644 index 00000000..10891c80 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/RequestServlet.java @@ -0,0 +1,63 @@ +/* + * RequestServlet.java + * + * Created on 4 de Marco de 2005, 18:19 + */ + +package siprp.pagina; + +import java.io.*; +import java.util.*; + +import javax.servlet.*; +import javax.servlet.http.*; + +/** + * + * @author psantos + */ +public class RequestServlet extends MailerServlet +{ + private final static String REQUEST_NAME = "request_name"; + private final static String REQUEST_PHONE = "request_phone"; + private final static String REQUEST_EMAIL = "request_email"; + private final static String REQUEST_DETAILS = "request_details"; + + private final static String[] FORM_FIELDS = new String[]{ + REQUEST_NAME, REQUEST_PHONE, + REQUEST_EMAIL, REQUEST_DETAILS + }; + + public void doPost( HttpServletRequest req, HttpServletResponse res ) + throws IOException + { + ServletOutputStream out = res.getOutputStream(); + res.setContentType( "text/html" ); + + /* + parametros: + request_name + request_phone + request_email + request_details + */ + // recebe info de contacto + Hashtable parameters = parseParameters( new Hashtable( req.getParameterMap() ) ); + + String content = createContent( parameters, FORM_FIELDS, "mail/pedido_informacao.txt" ); + + String from = ( String ) parameters.get( REQUEST_EMAIL ); + String email = DEFAULT_EMAIL; + if( PROPERTIES != null && PROPERTIES.containsKey( EMAIL ) ) + { + email = ( String ) PROPERTIES.get( EMAIL ); + } + String destination = email; + String subject = "Pedido de informacao atrav\u00e9s do site www.siprp.pt"; + // manda mail + boolean success = sendMail( from, destination, subject, content, false ); + + // mostra pagina correspondente + out.println( showResultPage( success, "mail/pedido_enviado.html", "mail/pedido_nao_enviado.html" ) ); + } +} diff --git a/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/ScheduleServlet.java b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/ScheduleServlet.java new file mode 100644 index 00000000..ad66ee43 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/ScheduleServlet.java @@ -0,0 +1,142 @@ +/* + * ScheduleServlet.java + * + * Created on 10 de Marco de 2005, 12:22 + */ + +package siprp.pagina; + +import java.io.*; +import java.util.*; + +import javax.servlet.*; +import javax.servlet.http.*; + +import org.apache.velocity.*; +import org.apache.velocity.app.*; + +/** + * + * @author psantos + */ +public class ScheduleServlet extends MailerServlet +{ + private final static String EMPRESA = "empresa"; + private final static String ESTABELECIMENTO = "estabelecimento"; + private final static String FUNCIONARIO = "funcionario"; + private final static String MARCACAO_TIPO = "marcacao_tipo"; + private final static String DATA = "data"; + private final static String HORA = "hora"; + private final static String EMAIL_EMPRESA = "email_empresa"; + + private final static String[] FORM_FIELDS = new String[]{ + EMPRESA, ESTABELECIMENTO, FUNCIONARIO, + MARCACAO_TIPO, DATA, HORA, EMAIL_EMPRESA + }; + + public void doGet( HttpServletRequest req, HttpServletResponse res ) + throws IOException + { + ServletOutputStream out = res.getOutputStream(); + String queryString = req.getQueryString(); + res.setContentType( "text/html" ); + + Hashtable parameters = new Hashtable(); + + // Ir buscar os parametros 'a sessao + HttpSession session = req.getSession( false ); + if( session == null ) + { + // timeout + out.println( showPage( "marcacao/marcacao_sessao_expirou.html", null ) ); + return; + } + + parameters.put( EMPRESA, session.getAttribute( siprpServlet.sessionCompanyName ) ); + parameters.put( ESTABELECIMENTO, session.getAttribute( "session_estabelecimento_nome" ) ); + parameters.put( FUNCIONARIO, session.getAttribute( "session_funcionario_nome" ) ); + + String tokens[] = queryString.split( "[?]" ); + if( tokens.length > 0 && tokens[ tokens.length - 1 ].equals( "consulta" ) ) + { + out.println( showPage( "marcacao/marcacao_consulta.html", parameters ) ); + } + else + { + out.println( showPage( "marcacao/marcacao_exame.html", parameters ) ); + } + } + + public void doPost( HttpServletRequest req, HttpServletResponse res ) + throws IOException + { + ServletOutputStream out = res.getOutputStream(); + String queryString = req.getQueryString(); + res.setContentType( "text/html" ); + + // Info de marcacao + // Dados que vem no pedido: marcacao_tipo, data, hora + Hashtable parameters = parseParameters( new Hashtable( req.getParameterMap() ) ); + + // Ir buscar o resto dos parametros 'a sessao + HttpSession session = req.getSession( false ); + if( session == null ) + { + // timeout + out.println( showPage( "marcacao/marcacao_sessao_expirou.html", null ) ); + return; + } + + parameters.put( EMPRESA, session.getAttribute( siprpServlet.sessionCompanyName ) ); + parameters.put( ESTABELECIMENTO, session.getAttribute( "session_estabelecimento_nome" ) ); + parameters.put( FUNCIONARIO, session.getAttribute( "session_funcionario_nome" ) ); + //parameters.put( session.getAttribute( "session_funcionario_numero" ) ); + + String from = ( String ) session.getAttribute( siprpServlet.sessionCompanyEmail ); + + String marcacao_tipo = ( String )parameters.get( MARCACAO_TIPO ); + + String email = DEFAULT_EMAIL; + if( PROPERTIES != null && PROPERTIES.containsKey( EMAIL_MARCACAO ) ) + { + email = ( String ) PROPERTIES.get( EMAIL_MARCACAO ); + } + String destination = email; + String subject = "Pedido de marca\u00e7\u00e3o de " + marcacao_tipo + " via web"; + String content = createContent( parameters, FORM_FIELDS, "marcacao/marcacao.html" ); + // manda mail + boolean success = sendMail( from, destination, subject, content, true ); + + // mostra pagina correspondente + out.println( showResultPage( success, "marcacao/marcacao_enviada.html", "marcacao/marcacao_nao_enviada.html" ) ); + } + + private String showPage( String page, Hashtable parameters ) + { + VelocityContext context = new VelocityContext(); + StringWriter output = new StringWriter(); + + try + { + if( parameters != null ) + { + String key; + for( Enumeration e = parameters.keys(); e.hasMoreElements(); ) + { + key = ( String ) e.nextElement(); + context.put( key, parameters.get( key ) ); + } + } + + Velocity.mergeTemplate( page, Velocity.ENCODING_DEFAULT, context, output ); + + return output.toString(); + } + catch( Exception e ) + { + e.printStackTrace(); + } + + return null; + } +} diff --git a/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetListaEmpresas.java b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetListaEmpresas.java new file mode 100644 index 00000000..60303b2f --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetListaEmpresas.java @@ -0,0 +1,113 @@ +package siprp.pagina; + +import com.evolute.utils.arrays.*; +import com.evolute.utils.strings.*; +import java.io.*; +import java.util.*; +import java.sql.*; +import java.lang.reflect.Array; +import javax.servlet.*; +import javax.servlet.http.*; +import org.apache.velocity.*; +import org.apache.velocity.app.*; + +public class doGetListaEmpresas extends siprpServlet{ + + /** Creates a new instance of doGetListaEmpresas */ + public doGetListaEmpresas(HttpServletRequest req, HttpServletResponse res) throws IOException + { + ServletOutputStream out = res.getOutputStream(); + Connection con = null ; + Statement stmt = null ; + ResultSet2DArray rs; + StringBuffer dbQuery; + String userRole="", temp=""; + HttpSession session = req.getSession(false); + Vector links = new Vector(); + Vector desc = new Vector(); +String empresa_nome; + try + { + userRole = (String)session.getAttribute(super.sessionUserRole); +empresa_nome = ( String ) session.getAttribute( sessionCompanyName ); + + if (userRole == null) + { + throw new IllegalStateException(); + } + + if ( userRole.equals ( super.superUserRole ) ) + { +empresa_nome = null; + Class.forName(super.bdDriver); + con = DriverManager.getConnection( bdLocalUrl, bdLocalUsername, bdLocalPassword ); + dbQuery = new StringBuffer(); + dbQuery.append( "SELECT id, designacao_social, designacao_social_plain FROM empresas WHERE inactivo <> 'y' ORDER BY designacao_social_plain" ); + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( dbQuery.toString()) ); + + int index=0; + int max = rs.columnLength(); + + while ( index < max ) + { + String str = (String)rs.get(index,1); + if( str != null && str.trim().length() > 0 ) + { + temp=""+rs.get(index,0); // converter de int para String + dbQuery = new StringBuffer(); + dbQuery.append("/"+super.servletName+"/?"+temp); // contruir url + links.add(dbQuery.toString()); + desc.add((String)rs.get(index,1)); + } + ++index; + } + stmt.close(); + con.close(); + + +session.setAttribute( sessionEstabelecimentoId, null ); + +HashMap hmValues = new HashMap(); +//hmValues.put( "empresa_nome", session.getAttribute( sessionCompanyName ) ); +hmValues.put( "empresa_nome", empresa_nome ); +hmValues.put( "empresa_id", session.getAttribute( sessionEmpresaId ) ); +hmValues.put( "estabelecimento_id", session.getAttribute( sessionEstabelecimentoId ) ); +hmValues.put( "userRole", userRole ); +hmValues.put( "userName", session.getAttribute( sessionUser ) ); +hmValues.put( msgTemplate , super.msgListaEmpresas ) ; +hmValues.put( templateUserRole, userRole); +hmValues.put( templateQuery, super.queryStringEmpresas ); +hmValues.put( templateVector1,links); +hmValues.put( templateVector2,desc); +hmValues.put( templateVector3,null); +out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate)); + + + //out.println( mergeTemplate( super.msgListaEmpresas, userRole, super.queryStringEmpresas, links, desc, null, super.authenticatedUserTemplate) ); + + } + else + { + out.println( mergeTemplate( super.msgAcessoNegado , userRole, super.errorTemplate) ); + } + + } + catch ( IllegalStateException e ) // session timeout + { + e.printStackTrace(); + out.println( mergeTemplate(msgSessionTimeout, super.errorTemplate) ); + } + catch ( SQLException e ) + { + e.printStackTrace(); + out.println( mergeTemplate( super.msgErroBd , super.errorTemplate) ); + } + catch ( Exception e ) + { + e.printStackTrace(); + out.println( mergeTemplate( super.msgGenericError , userRole, super.errorTemplate) ); + } + } + +} diff --git a/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetListaEstabelecimentos.java b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetListaEstabelecimentos.java new file mode 100644 index 00000000..4e8b9642 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetListaEstabelecimentos.java @@ -0,0 +1,105 @@ +package siprp.pagina; + +import com.evolute.utils.arrays.*; +import com.evolute.utils.strings.*; +import java.io.*; +import java.util.*; +import java.sql.*; +import java.lang.reflect.Array; +import javax.servlet.*; +import javax.servlet.http.*; +import org.apache.velocity.*; +import org.apache.velocity.app.*; + +public class doGetListaEstabelecimentos extends siprpServlet{ + + /** Creates a new instance of doGetListaEstabelecimentos */ + public doGetListaEstabelecimentos(HttpServletRequest req, HttpServletResponse res) throws IOException + { + ServletOutputStream out = res.getOutputStream(); + Connection con = null ; + Statement stmt = null ; + ResultSet2DArray rs; + StringBuffer dbQuery, sBuffer; + String userRole, empresaId, temp; + HttpSession session = req.getSession(false); + Vector links = new Vector(); + Vector desc = new Vector(); + try + { + userRole = (String)session.getAttribute(super.sessionUserRole); + empresaId = (String)session.getAttribute(super.sessionEmpresaId); + + if ( userRole.equals ( super.superUserRole ) || userRole.equals ( empresaId ) ) + { + Class.forName(super.bdDriver); + con = DriverManager.getConnection( bdLocalUrl, bdLocalUsername, bdLocalPassword ); + dbQuery = new StringBuffer(); + dbQuery.append( " SELECT id, nome, nome_plain FROM estabelecimentos WHERE inactivo <> 'y' AND empresa_id = '"+empresaId+"' order by nome_plain" ); + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( dbQuery.toString()) ); + + int index=0; + int max = rs.columnLength(); + + while ( index < max ) + { + temp=""+rs.get(index,0); // converter de int para String + dbQuery = new StringBuffer(); + dbQuery.append("/"+super.servletName+"/?"+empresaId+"/"+temp); // contruir url + links.add(dbQuery.toString()); + desc.add((String)rs.get(index,1)); + ++index; + } + sBuffer = new StringBuffer(); + sBuffer.append(""+super.nomeEmpresa(con,empresaId)+""); + +if( userRole.equals( "manager" ) ) +{ + session.setAttribute( sessionCompanyName, nomeEmpresa( con, ( String ) session.getAttribute( sessionEmpresaId ) ) ); +} +else +{ + session.setAttribute( sessionCompanyName, nomeEmpresa( con, userRole ) ); +} + +session.setAttribute( sessionCompanyEmail, emailEmpresa( con, empresaId ) ); + +session.setAttribute( sessionEstabelecimentoId, null ); + +HashMap hmValues = new HashMap(); +hmValues.put( "empresa_nome", session.getAttribute( sessionCompanyName ) ); +hmValues.put( "empresa_id", session.getAttribute( sessionEmpresaId ) ); +hmValues.put( "estabelecimento_id", session.getAttribute( sessionEstabelecimentoId ) ); +hmValues.put( "userRole", userRole ); +hmValues.put( "userName", session.getAttribute( sessionUser ) ); +hmValues.put( msgTemplate , sBuffer.toString() ) ; +hmValues.put( templateUserRole, userRole); +hmValues.put( templateQuery, super.queryStringEstabelecimentos ); +hmValues.put( templateVector1,links); +hmValues.put( templateVector2,desc); +hmValues.put( templateVector3,null); +out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate)); + +// out.println( mergeTemplate( sBuffer.toString(), userRole, super.queryStringEstabelecimentos, links, desc, null, super.authenticatedUserTemplate) ); + stmt.close(); + con.close(); + } + else + { + out.println( mergeTemplate( super.msgAcessoNegado , userRole, super.errorTemplate) ); + } + } + catch ( SQLException e ) + { + e.printStackTrace(); + out.println( mergeTemplate( super.msgErroBd , super.errorTemplate) ); + } + catch ( Exception e ) + { + e.printStackTrace(); + out.println( mergeTemplate( super.msgGenericError , super.errorTemplate) ); + } + } + +} diff --git a/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetListaTrabalhadores.java b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetListaTrabalhadores.java new file mode 100644 index 00000000..3a4baa92 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetListaTrabalhadores.java @@ -0,0 +1,301 @@ +package siprp.pagina; + +import com.evolute.utils.arrays.*; +import com.evolute.utils.strings.*; +import java.io.*; +import java.util.*; +import java.sql.*; +import java.lang.reflect.Array; +import javax.servlet.*; +import javax.servlet.http.*; +import org.apache.velocity.*; +import org.apache.velocity.app.*; + +public class doGetListaTrabalhadores extends siprpServlet{ + + /** Creates a new instance of doGetListaTrabalhadores */ + public doGetListaTrabalhadores(HttpServletRequest req, HttpServletResponse res, String query) throws IOException + { + boolean print = false; + if( query != null ) + { + print = query.indexOf( "_print" ) != -1; + if( query.indexOf( "trabalhadores_tudo" ) == 0 ) + { + new doGetListaTrabalhadoresTudo( req, res, print ); + return; + } + else if( query.indexOf( "trabalhadores_pendentes" ) == 0 ) + { + new doGetListaTrabalhadoresPendentes( req, res, print ); + return; + } + } + ServletOutputStream out = res.getOutputStream(); + Connection con = null ; + Statement stmt = null ; + ResultSet2DArray rs, rsTrab; + StringBuffer sBuffer; + String userRole, empresaId, estabelecimentoId, temp; + HttpSession session = req.getSession(false); + Vector links = new Vector(); + Vector desc = new Vector(); + Vector descAdicional = new Vector(); + java.util.Date today = new java.util.Date(); + try + { + userRole = (String)session.getAttribute(super.sessionUserRole); + empresaId = (String)session.getAttribute(super.sessionEmpresaId); + estabelecimentoId = (String)session.getAttribute(super.sessionEstabelecimentoId); + + if ( userRole.equals ( super.superUserRole ) || userRole.equals ( empresaId ) ) + { + Class.forName(super.bdDriver); + con = DriverManager.getConnection( bdLocalUrl, bdLocalUsername, bdLocalPassword ); + if ( super.verificaEstabelecimento(con, empresaId, estabelecimentoId) ) // estabelecimento pertence 'a empresa ?? + { + //Class.forName(super.bdDriver); + //con = DriverManager.getConnection( super.bdUrl, super.bdUsername, super.bdPassword ); + String dbQuery = "SELECT id, nome, nome_plain FROM trabalhadores WHERE inactivo <> 'y' AND data_demissao IS NULL AND estabelecimento_id = '"+estabelecimentoId+"' ORDER BY nome_plain"; + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rsTrab = new ResultSet2DArray( stmt.executeQuery( dbQuery ) ); + rsTrab.getObjects(); + stmt.close(); + + final int max = rsTrab.columnLength(); + + for ( int index = 0; index < max; index++ ) + { + Integer id = (Integer)rsTrab.get(index,0); + String link = "/"+super.servletName+"/?"+empresaId+"/"+estabelecimentoId+"/"+id; + links.add(link); + HashMap trabalhador = new HashMap(); + trabalhador.put( "Nome", (String)rsTrab.get(index,1) ); + + + dbQuery = "SELECT id, data, estado FROM marcacoes_trabalhador " + + "WHERE tipo = 1 and trabalhador_id = " + id + + " ORDER BY data DESC"; + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( dbQuery ) ); + rs.getObjects(); + stmt.close(); + if( rs.columnLength() > 0 ) + { + java.util.Date dataConsulta2 = ( java.util.Date ) rs.get( 0, 1 ); + Integer estado2 = ( Integer ) rs.get( 0, 2 ); + java.util.Date dataConsulta1; + // java.util.Date dataRelatorio1; + // java.util.Date dataRelatorio2 = (java.util.Date) rs.get( 0, 3 ); + Integer estado1; + String realizada1 = ""; + String realizada2 = ""; + if( rs.columnLength() >= 2 ) + { + dataConsulta1 = ( java.util.Date ) rs.get( 1, 1 ); + estado1 = ( Integer ) rs.get( 1, 2 ); + // dataRelatorio1 = (java.util.Date) rs.get( 1, 3 ); + } + else + { + dataConsulta1 = dataConsulta2; + estado1 = estado2; + // dataRelatorio1 = dataRelatorio2; + } + +// System.out.println( "\nEstado : " + estado2 + " ; today : " + today + " ; data : " + dataConsulta2 ); + if( ESTADO_REALIZADO.equals( estado2 ) || ( dataConsulta2 != null && today.after( dataConsulta2 ) ) ) + { + trabalhador.put( "ultima_consulta", dataConsulta2 ); + if( estado2.equals( ESTADO_POR_REALIZAR ) ) + { + realizada2 = "não"; + } + else if( estado2.equals( ESTADO_REALIZADO ) ) + { + realizada2 = "sim"; + } + trabalhador.put( "realizada", realizada2 ); + trabalhador.put( "proxima_consulta", "" ); + } + else + { + try + { + for( int c = 1; c < rs.columnLength(); c++ ) + { + java.util.Date dataTemp = ( java.util.Date ) rs.get( c, 1 ); + dataConsulta1 = dataTemp; + estado1 = ( Integer ) rs.get( c, 2 ); + if( dataTemp.after( today ) ) + { + dataConsulta2 = dataTemp; + } + else + { + break; + } + } + } + catch( Exception ex ) + { + ex.printStackTrace(); + } + trabalhador.put( "proxima_consulta", dataConsulta2 ); + + if( !dataConsulta2.equals( dataConsulta1 ) ) + { + if( estado1.equals( ESTADO_POR_REALIZAR ) ) + { + realizada1 = "não"; + } + else if( estado1.equals( ESTADO_REALIZADO ) ) + { + realizada1 = "sim"; + } + trabalhador.put( "realizada", realizada1 ); + trabalhador.put( "ultima_consulta", dataConsulta1 ); + } + else + { + trabalhador.put( "ultima_consulta", "" ); + trabalhador.put( "realizada", null ); + } + } + } + else + { + trabalhador.put( "ultima_consulta", "" ); + trabalhador.put( "realizada", null ); + trabalhador.put( "proxima_consulta", "" ); + } + + + dbQuery = "SELECT id, data, estado FROM marcacoes_trabalhador " + + "WHERE tipo = 0 and trabalhador_id = " + id + + " ORDER BY data DESC"; + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( dbQuery ) ); + rs.getObjects(); + stmt.close(); + if( rs.columnLength() > 0 ) + { + java.util.Date dataConsulta2 = ( java.util.Date ) rs.get( 0, 1 ); + Integer estado2 = ( Integer ) rs.get( 0, 2 ); + Integer estado1; + java.util.Date dataConsulta1; + // java.util.Date dataRelatorio1; + // java.util.Date dataRelatorio2 = (java.util.Date) rs.get( 0, 3 ); + String realizada1 = ""; + String realizada2 = ""; + if( rs.columnLength() >= 2 ) + { + dataConsulta1 = ( java.util.Date ) rs.get( 1, 1 ); + estado1 = ( Integer ) rs.get( 1, 2 ); + // dataRelatorio1 = (java.util.Date) rs.get( 1, 3 ); + } + else + { + dataConsulta1 = dataConsulta2; + estado1 = estado2; + // dataRelatorio1 = dataRelatorio2; + } + if( ESTADO_REALIZADO.equals( estado2 ) || today.after( dataConsulta2 ) ) + { + trabalhador.put( "ultimo_exame", dataConsulta2 ); + if( estado2.equals( ESTADO_POR_REALIZAR ) ) + { + realizada2 = "não"; + } + else if( estado2.equals( ESTADO_REALIZADO ) ) + { + realizada2 = "sim"; + } + trabalhador.put( "realizado", realizada2 ); + trabalhador.put( "proximo_exame", "" ); + } + else + { + trabalhador.put( "proximo_exame", dataConsulta2 ); + if( !dataConsulta2.equals( dataConsulta1 ) ) + { + if( estado1.equals( ESTADO_POR_REALIZAR ) ) + { + realizada1 = "não"; + } + else if( estado1.equals( ESTADO_REALIZADO ) ) + { + realizada1 = "sim"; + } + trabalhador.put( "realizado", realizada1 ); + trabalhador.put( "ultimo_exame", dataConsulta1 ); + } + else + { + trabalhador.put( "ultimo_exame", "" ); + trabalhador.put( "realizado", null ); + } + } + } + else + { + trabalhador.put( "ultimo_exame", "" ); + trabalhador.put( "realizado", null ); + trabalhador.put( "proximo_exame", "" ); + } + + desc.add( trabalhador ); + } + + + sBuffer = new StringBuffer(); + sBuffer.append(""+super.nomeEmpresa(con,empresaId)+"

" + +super.nomeEstabelecimento(con, estabelecimentoId)+"" ); + + HashMap hmValues = new HashMap(); + hmValues.put( "empresa_nome", session.getAttribute( sessionCompanyName ) ); + hmValues.put( "empresa_id", session.getAttribute( sessionEmpresaId ) ); + hmValues.put( "estabelecimento_nome", super.nomeEstabelecimento( con, estabelecimentoId ) ); + hmValues.put( "estabelecimento_id", estabelecimentoId ); + hmValues.put( "userRole", userRole ); + hmValues.put( "userName", session.getAttribute( sessionUser ) ); + hmValues.put( msgTemplate , sBuffer.toString() ) ; + hmValues.put( templateUserRole, userRole); + hmValues.put( templateQuery, super.queryStringTrabalhadores ); + hmValues.put( templateVector1,links); + hmValues.put( templateVector2,desc); + hmValues.put( templateVector3,null); + if( !print ) + { + out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate)); + } + else + { + out.println( mergeTemplate( hmValues, super.authenticatedUserPrintTemplate)); + } +// out.println( mergeTemplate( sBuffer.toString(), userRole, super.queryStringTrabalhadores, links, desc, null, super.authenticatedUserTemplate) ); + } + else // est nao pertence 'a empresa + { + out.println( mergeTemplate( super.msgLinkFormatError , userRole, super.errorTemplate) ); + } + con.close(); + } + else // Role nao permite ver esta informacao + { + out.println( mergeTemplate( super.msgAcessoNegado , userRole, super.errorTemplate) ); + } + } + catch ( SQLException e ) + { + e.printStackTrace(); + out.println( mergeTemplate( super.msgErroBd , super.errorTemplate) ); + } + catch ( Exception e ) + { + e.printStackTrace(); + out.println( mergeTemplate( super.msgGenericError , super.errorTemplate) ); + } + } + +} diff --git a/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetListaTrabalhadoresPendentes.java b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetListaTrabalhadoresPendentes.java new file mode 100644 index 00000000..2eb9acc9 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetListaTrabalhadoresPendentes.java @@ -0,0 +1,879 @@ +/* + * doGetListaTrabalhadoresPendentes.java + * + * Created on 22 de Abril de 2005, 15:56 + */ + +package siprp.pagina; + +import java.io.*; +import java.lang.reflect.Array; +import javax.servlet.*; +import javax.servlet.http.*; +import java.sql.*; +import java.util.*; + +import org.apache.velocity.*; +import org.apache.velocity.app.*; + +import com.evolute.utils.arrays.*; +import com.evolute.utils.data.*; +import com.evolute.utils.db.*; +import com.evolute.utils.sql.*; +import com.evolute.utils.strings.*; + +/** + * + * @author fpalma + */ +public class doGetListaTrabalhadoresPendentes + extends siprpServlet +{ + private static final long TRES_MESES = 3L * 30L * 24L * 60L * 60L * 1000L; + private static final long CATORZE_DIAS = 14L * 24L * 60L * 60L * 1000L; + + protected static final int ESTADO_NAO_APLICAVEL = 0; + protected static final int ESTADO_PENDENTE = 1; + protected static final int ESTADO_MARCADO = 2; + protected static final int ESTADO_TRATADO = 3; + + protected static int MOTIVO_ADMISSAO = 1; + protected static int MOTIVO_PERIODICA = 2; + protected static int MOTIVO_OCASIONAL = 3; + protected static int MOTIVO_PERIODICA_INICIAL = 5; + + protected static final Hashtable CORES_ESTADOS = new Hashtable(); + protected static final Hashtable TEXTOS_ESTADOS = new Hashtable(); + static + { + CORES_ESTADOS.put( new Integer( ESTADO_NAO_APLICAVEL ), "white" ); + CORES_ESTADOS.put( new Integer( ESTADO_PENDENTE ), "red" ); + CORES_ESTADOS.put( new Integer( ESTADO_MARCADO ), "yellow" ); + CORES_ESTADOS.put( new Integer( ESTADO_TRATADO ), "green" ); + + TEXTOS_ESTADOS.put( new Integer( ESTADO_NAO_APLICAVEL ), "n.a." ); + TEXTOS_ESTADOS.put( new Integer( ESTADO_PENDENTE ), "pendente" ); + TEXTOS_ESTADOS.put( new Integer( ESTADO_MARCADO ), "pendente" ); +// TEXTOS_ESTADOS.put( new Integer( ESTADO_TRATADO ), "green" ); + } + + protected java.sql.Date today; + protected long todayMillis; + + /** Creates a new instance of doGetListaTrabalhadores */ +// public doGetListaTrabalhadoresPendentes(HttpServletRequest req, HttpServletResponse res, boolean print) +// throws IOException +// { +// ServletOutputStream out = res.getOutputStream(); +// Connection con = null ; +// Statement stmt = null ; +// ResultSet2DArray rs; +// StringBuffer dbQuery, sBuffer; +// String userRole, empresaId, estabelecimentoId, temp; +// HttpSession session = req.getSession(false); +// Vector links = new Vector(); +// Vector desc = new Vector(); +// Vector descAdicional = new Vector(); +//// today = new java.util.Date(); +//// todayMillis = today.getTime(); +// +// try +// { +// stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); +// rs = new ResultSet2DArray( stmt.executeQuery( "SELECT CURRENT_DATE" ) ); +// today = ( java.sql.Date ) rs.get( 0, 0 ); +// stmt.close(); +// todayMillis = today.getTime(); +// +// userRole = (String)session.getAttribute(super.sessionUserRole); +// empresaId = (String)session.getAttribute(super.sessionEmpresaId); +// estabelecimentoId = (String)session.getAttribute(super.sessionEstabelecimentoId); +// +// if ( userRole.equals ( super.superUserRole ) || userRole.equals ( empresaId ) ) +// { +// Class.forName(super.bdDriver); +// con = DriverManager.getConnection( bdLocalUrl, bdLocalUsername, bdLocalPassword ); +// if ( super.verificaEstabelecimento(con, empresaId, estabelecimentoId) ) // estabelecimento pertence a empresa ?? +// { +// //Class.forName(super.bdDriver); +// //con = DriverManager.getConnection( super.bdUrl, super.bdUsername, super.bdPassword ); +// dbQuery = new StringBuffer(); +// dbQuery.append( "SELECT trabalhadores.id, trabalhadores.nome, " +// + "marcacoes_trabalhador.tipo, marcacoes_trabalhador.data, marcacoes_trabalhador.estado, " +// + " trabalhadores.nome_plain, marcacoes_trabalhador.motivo " +// + "FROM trabalhadores LEFT JOIN marcacoes_trabalhador ON ( marcacoes_trabalhador.trabalhador_id = trabalhadores.id )" +// + "WHERE estabelecimento_id = " + estabelecimentoId +// + " AND trabalhadores.inactivo <> 'y' AND data_demissao IS NULL " +// + " AND marcacoes_trabalhador.estado NOT IN ( 3, 4, 5) " +// + "ORDER BY 6, 3, 4 DESC " ); +// // dbQuery.append( "SELECT id, nome, ( ultima_consulta IS NOT NULL AND realizada = 'y' )," +// // + " ( ultimo_exame IS NOT NULL AND realizado = 'y' )," +// // + " proxima_consulta IS NOT NULL, proximo_exame IS NOT NULL, " +// // + " ( proxima_consulta IS NOT NULL AND proxima_consulta - current_date <= 14 ), " +// // + " ( proximo_exame IS NOT NULL AND proximo_exame - current_date <= 14 )" +// // + " FROM trabalhadores " +// // + " WHERE estabelecimento_id = '"+estabelecimentoId+"'" +// // + " AND ( ultima_consulta IS NULL OR realizada = 'n' OR" +// // + " ( proxima_consulta IS NOT NULL AND proxima_consulta - current_date <= 14 )" +// // + " OR ( proximo_exame IS NOT NULL AND proximo_exame - current_date <= 14 ) )" +// // + " ORDER BY nome" ); +// stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); +// rs = new ResultSet2DArray( stmt.executeQuery( dbQuery.toString()) ); +// +// int index=0; +// int max = rs.columnLength(); +// +// Integer trabalhadorID = new Integer( -1 ); +// String nomeTrabalhador = ""; +// Vector consultas = new Vector(); +// Vector exames = new Vector(); +// +// for ( index = 0; index <= max; index++ ) +// { +// Integer id = index < max ? ( Integer ) rs.get( index, 0 ) : new Integer( -1 ); +// if( !id.equals( trabalhadorID ) ) +// { +// Object listaConsultas[][] = ( Object[][] ) consultas.toArray( new Object[consultas.size()][3] ); +// Object listaExames[][] = ( Object[][] ) exames.toArray( new Object[exames.size()][3] ); +// if( trabalhadorID.intValue() > -1 && +// verificarTrabalhador( listaConsultas, listaExames ) ) +// { +// temp=""+rs.get(index - 1,0); // converter de int para String +// dbQuery = new StringBuffer(); +// dbQuery.append("/"+super.servletName+"/?"+empresaId+"/"+estabelecimentoId+"/"+temp); // contruir url +// links.add(dbQuery.toString()); +// desc.add( criarDadosTrabalhador( con, trabalhadorID, nomeTrabalhador, listaConsultas, listaExames ) ); +// } +// exames.clear(); +// consultas.clear(); +// } +// if( index == max ) +// { +// break; +// } +// Integer tipo = ( Integer ) rs.get( index, 2 ); +// +// String nome = ( String ) rs.get( index, 1 ); +// java.util.Date data = ( java.util.Date ) rs.get( index, 3 ); +// Integer estado = ( Integer ) rs.get( index, 4 ); +// Integer motivo = ( Integer ) rs.get( index, 6 ); +// trabalhadorID = id; +// nomeTrabalhador = nome; +// Object marcacao[] = new Object[]{ data, estado, motivo }; +// if( tipo == null ) +// { +// continue; +// } +// switch( tipo.intValue() ) +// { +// case TIPO_MARCACAO_EXAMES: +// exames.add( marcacao ); +// break; +// +// case TIPO_MARCACAO_CONSULTA: +// consultas.add( marcacao ); +// break; +// } +// } +// stmt.close(); +// +// sBuffer = new StringBuffer(); +// sBuffer.append(""+super.nomeEmpresa(con,empresaId)+"

" +// +super.nomeEstabelecimento(con, estabelecimentoId)+"" ); +// +// HashMap hmValues = new HashMap(); +// hmValues.put( "empresa_nome", session.getAttribute( sessionCompanyName ) ); +// hmValues.put( "empresa_id", session.getAttribute( sessionEmpresaId ) ); +// hmValues.put( "estabelecimento_nome", super.nomeEstabelecimento( con, estabelecimentoId ) ); +// hmValues.put( "estabelecimento_id", estabelecimentoId ); +// hmValues.put( "userRole", userRole ); +// hmValues.put( "userName", session.getAttribute( sessionUser ) ); +// hmValues.put( msgTemplate , sBuffer.toString() ) ; +// hmValues.put( templateUserRole, userRole); +// hmValues.put( templateQuery, "trabalhadores_pendentes" ); +// hmValues.put( templateVector1,links); +// hmValues.put( templateVector2,desc); +// hmValues.put( templateVector3,null); +// if( !print ) +// { +// out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate)); +// } +// else +// { +// out.println( mergeTemplate( hmValues, super.authenticatedUserPrintTemplate)); +// } +//// out.println( mergeTemplate( sBuffer.toString(), userRole, super.queryStringTrabalhadores, links, desc, null, super.authenticatedUserTemplate) ); +// } +// else // est nao pertence 'a empresa +// { +// out.println( mergeTemplate( super.msgLinkFormatError , userRole, super.errorTemplate) ); +// } +// con.close(); +// } +// else // Role nao permite ver esta informacao +// { +// out.println( mergeTemplate( super.msgAcessoNegado , userRole, super.errorTemplate) ); +// } +// } +// catch ( SQLException e ) +// { +// e.printStackTrace(); +// out.println( mergeTemplate( super.msgErroBd , super.errorTemplate) ); +// } +// catch ( Exception e ) +// { +// e.printStackTrace(); +// out.println( mergeTemplate( super.msgGenericError , super.errorTemplate) ); +// } +// } + + public doGetListaTrabalhadoresPendentes(HttpServletRequest req, HttpServletResponse res, boolean print ) + throws IOException + { + ServletOutputStream out = res.getOutputStream(); + String userRole, empresaId, estabelecimentoId; + HttpSession session = req.getSession(false); + Vector links = new Vector(); + Vector desc = new Vector(); + Vector descAdicional = new Vector(); +// today = new java.util.Date(); +// todayMillis = today.getTime(); + + try + { + Executer executer = getExecuter(); + Virtual2DArray array = executer.executeQuery( new Select( "SELECT CURRENT_DATE" ) ); + today = ( java.sql.Date ) array.get( 0, 0 ); + todayMillis = today.getTime(); + + userRole = (String)session.getAttribute(sessionUserRole); + empresaId = (String)session.getAttribute(sessionEmpresaId); + estabelecimentoId = (String)session.getAttribute(sessionEstabelecimentoId); + + if ( userRole.equals ( superUserRole ) || userRole.equals ( empresaId ) ) + { + if ( verificaEstabelecimento(null, empresaId, estabelecimentoId) ) // estabelecimento pertence 'a empresa ?? + { + //Class.forName(super.bdDriver); + //con = DriverManager.getConnection( super.bdUrl, super.bdUsername, super.bdPassword ); + String query = "( SELECT trabalhadores.id, trabalhadores.nome, " + + "marcacoes_trabalhador.tipo, marcacoes_trabalhador.data, marcacoes_trabalhador.estado, " + + " trabalhadores.nome_plain, marcacoes_trabalhador.motivo, marcacoes_trabalhador.data " + + "FROM trabalhadores LEFT JOIN marcacoes_trabalhador ON ( marcacoes_trabalhador.trabalhador_id = trabalhadores.id ) " + + "WHERE estabelecimento_id = " + estabelecimentoId + + " AND trabalhadores.inactivo <> 'y' AND data_demissao IS NULL " + + " AND marcacoes_trabalhador.estado NOT IN ( 3, 4, 5) " + + " AND marcacoes_trabalhador.tipo = " + TIPO_MARCACAO_CONSULTA + + " AND marcacoes_trabalhador.motivo <> " + MOTIVO_OCASIONAL + " )" + + " UNION " + + "( SELECT trabalhadores.id, trabalhadores.nome, " + + "marcacoes_trabalhador.tipo, marcacoes_trabalhador.data, marcacoes_trabalhador.estado, " + + " trabalhadores.nome_plain, marcacoes_trabalhador.motivo, marcacoes_trabalhador.data + 90 " + + "FROM trabalhadores LEFT JOIN marcacoes_trabalhador ON ( marcacoes_trabalhador.trabalhador_id = trabalhadores.id ) " + + "WHERE estabelecimento_id = " + estabelecimentoId + + " AND trabalhadores.inactivo <> 'y' AND data_demissao IS NULL " + + " AND marcacoes_trabalhador.estado NOT IN ( 3, 4, 5) " + + " AND marcacoes_trabalhador.tipo = " + TIPO_MARCACAO_EXAMES + " )" + + "ORDER BY 6, 8, 3 DESC "; + array = executer.executeQuery( new Select( query ) ); + + query = "SELECT trabalhadores.id, trabalhadores.nome, " + + "marcacoes_trabalhador.tipo, marcacoes_trabalhador.data, marcacoes_trabalhador.estado, " + + " trabalhadores.nome_plain, marcacoes_trabalhador.motivo, marcacoes_trabalhador.data " + + "FROM trabalhadores LEFT JOIN marcacoes_trabalhador ON ( marcacoes_trabalhador.trabalhador_id = trabalhadores.id ) " + + "WHERE estabelecimento_id = " + estabelecimentoId + + " AND trabalhadores.inactivo <> 'y' AND data_demissao IS NULL " + + " AND marcacoes_trabalhador.estado NOT IN ( 3, 4, 5) " + + " AND marcacoes_trabalhador.tipo = " + TIPO_MARCACAO_CONSULTA + + " AND marcacoes_trabalhador.motivo = " + MOTIVO_OCASIONAL + + " ORDER BY 6, 8, 3 DESC"; + Virtual2DArray ocasionaisArray = executer.executeQuery( new Select( query ) ); + + query = "SELECT trabalhadores.id, trabalhadores.nome " + + "FROM trabalhadores " + + "WHERE estabelecimento_id = " + estabelecimentoId + + " AND trabalhadores.inactivo <> 'y' AND data_demissao IS NULL;"; + Virtual2DArray trabalhadoresArray = executer.executeQuery( new Select( query ) ); + + Hashtable marcacoesPorID = new Hashtable(); + Hashtable ocasionaisPorID = new Hashtable(); + Hashtable nomesPorID = new Hashtable(); + for( int n = 0; n < trabalhadoresArray.columnLength(); n++ ) + { + nomesPorID.put( trabalhadoresArray.get( n, 0 ), trabalhadoresArray.get( n, 1 ) ); + } + + preencherMarcacoes( array, nomesPorID, marcacoesPorID ); + preencherMarcacoes( ocasionaisArray, nomesPorID, ocasionaisPorID ); + + Integer ids[] = ( Integer[] ) nomesPorID.keySet().toArray( new Integer[0] ); + IDObject trabalhadores[] = new IDObject[ ids.length ]; + for( int n = 0; n < ids.length; n++ ) + { + trabalhadores[ n ] = new MappableObject( ids[ n ], nomesPorID.get( ids[ n ] ) ); + } + Arrays.sort( trabalhadores, new Comparator(){ + public int compare( Object o1, Object o2 ) + { + String nome1 = StringPlainer.convertString( o1.toString() ); + String nome2 = StringPlainer.convertString( o2.toString() ); + return nome1.compareTo( nome2 ); + } + } ); + + for( int n = 0; n < trabalhadores.length; n++ ) + { + Object marcacoes[][]; + if( marcacoesPorID.containsKey( trabalhadores[ n ].getID() ) ) + { + marcacoes = ( Object[][] ) ( ( Vector )marcacoesPorID.get( trabalhadores[ n ].getID() ) ).toArray( new Object[ 0 ][] ); + } + else + { + marcacoes = new Object[0][]; + } + Object ocasionais[][]; + if( ocasionaisPorID.containsKey( trabalhadores[ n ].getID() ) ) + { + ocasionais = ( Object[][] ) ( ( Vector )ocasionaisPorID.get( trabalhadores[ n ].getID() ) ).toArray( new Object[ 0 ][] ); + } + else + { + ocasionais = new Object[ 0 ][]; + } + Object agrupadas[][] = agruparMarcacoes( marcacoes, ocasionais ); + acrescentarTrabalhador( empresaId, estabelecimentoId, + trabalhadores[ n ], null, + agrupadas, links, desc, + perfilTemConsultas( trabalhadores[ n ].getID(), new Integer( empresaId ) ), + perfilTemExames( trabalhadores[ n ].getID(), new Integer( empresaId ) ) ); + } + + HashMap hmValues = new HashMap(); + hmValues.put( "empresa_nome", session.getAttribute( sessionCompanyName ) ); + hmValues.put( "empresa_id", session.getAttribute( sessionEmpresaId ) ); + hmValues.put( "estabelecimento_nome", nomeEstabelecimento( null, estabelecimentoId ) ); + hmValues.put( "estabelecimento_id", estabelecimentoId ); + hmValues.put( "userRole", userRole ); + hmValues.put( "userName", session.getAttribute( sessionUser ) ); + hmValues.put( msgTemplate , ""+nomeEmpresa(null,empresaId)+"

" + +nomeEstabelecimento(null, estabelecimentoId)+"" ) ; + hmValues.put( templateUserRole, userRole); + hmValues.put( templateQuery, "trabalhadores_pendentes" ); + hmValues.put( templateVector1,links); + hmValues.put( templateVector2,desc); + hmValues.put( templateVector3,null); + if( !print ) + { + out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate)); + } + else + { + out.println( mergeTemplate( hmValues, super.authenticatedUserPrintTemplate)); + } +// out.println( mergeTemplate( sBuffer.toString(), userRole, super.queryStringTrabalhadores, links, desc, null, super.authenticatedUserTemplate) ); + } + else // est nao pertence 'a empresa + { + out.println( mergeTemplate( super.msgLinkFormatError , userRole, super.errorTemplate) ); + } + } + else // Role nao permite ver esta informacao + { + out.println( mergeTemplate( super.msgAcessoNegado , userRole, super.errorTemplate) ); + } + } + catch ( SQLException e ) + { + e.printStackTrace(); + out.println( mergeTemplate( super.msgErroBd , super.errorTemplate) ); + } + catch ( Exception e ) + { + e.printStackTrace(); + out.println( mergeTemplate( super.msgGenericError , super.errorTemplate) ); + } + } + + protected void preencherMarcacoes( Virtual2DArray array, Hashtable nomesPorID, Hashtable marcacoesPorID ) + { + int max = array.columnLength(); + for( int index = 0; index < max; index++ ) + { + Integer id = index < max ? ( Integer ) array.get( index, 0 ) : new Integer( -1 ); + Integer tipo = ( Integer ) array.get( index, 2 ); + String nome = ( String ) array.get( index, 1 ); + java.util.Date data = ( java.util.Date ) array.get( index, 3 ); + Integer estado = ( Integer ) array.get( index, 4 ); + Integer motivo = ( Integer ) array.get( index, 6 ); + if( !marcacoesPorID.containsKey( id ) ) + { + nomesPorID.put( id, nome ); + marcacoesPorID.put( id, new Vector() ); + } + if( data != null ) + { + Object marcacao[] = new Object[]{ data, estado, motivo, tipo }; + ( ( Vector ) marcacoesPorID.get( id ) ).add( marcacao ); + } + } + } + + protected Object[][] agruparMarcacoes( Object marcacoes[][], Object ocasionais[][] ) + { + long tresMeses = TRES_MESES; + java.util.Date dataExame = null; + Integer estadoExame = null; + java.util.Date dataConsulta = null; + Integer motivoConsulta = null; + Integer estadoConsulta = null; + Object grupo[] = null; + Vector grupos = new Vector(); + + if( marcacoes != null ) + { + for( int n = 0; n < marcacoes.length; n++ ) + { + if( grupo == null ) + { + grupo = new Object[ 5 ]; + dataExame = null; + estadoExame = null; + dataConsulta = null; + motivoConsulta = null; + estadoConsulta = null; + grupos.add( grupo ); + } + + java.util.Date data = ( java.util.Date ) marcacoes[ n ][ 0 ]; + Integer estado = ( Integer ) marcacoes[ n ][ 1 ]; + Integer motivo = ( Integer ) marcacoes[ n ][ 2 ]; + Integer tipo = ( Integer ) marcacoes[ n ][ 3 ]; + switch( tipo.intValue() ) + { + case TIPO_MARCACAO_EXAMES: + if( dataConsulta == null && + ( dataExame == null || estadoExame.intValue() < 2 ) ) + { + dataExame = data; + estadoExame = estado; + } + else if( dataConsulta != null && Math.abs( dataConsulta.getTime() - data.getTime() ) < tresMeses ) + { + dataExame = data; + estadoExame = estado; + } + else + { + grupo = null; + n--; + } + if( grupo != null ) + { + grupo[ 3 ] = dataExame; + grupo[ 4 ] = estadoExame; + } + break; + + case TIPO_MARCACAO_CONSULTA: + if( dataExame == null || Math.abs( dataExame.getTime() - data.getTime() ) < tresMeses ) + { + dataConsulta = data; + estadoConsulta = estado; + motivoConsulta = motivo; + } + else + { + grupo = null; + n--; + } + if( grupo != null ) + { + grupo[ 0 ] = dataConsulta; + grupo[ 1 ] = estadoConsulta; + grupo[ 2 ] = motivoConsulta; + } + break; + } + } + } + if( ocasionais != null ) + { + for( int n = 0; n < ocasionais.length; n++ ) + { + grupo = new Object[ 5 ]; + for( int i = 0; i < 3; i++ ) + { + grupo[ i ] = ocasionais[ n ][ i ]; + } + grupos.add( grupo ); + } + } + + Object agrupadas[][] = ( Object[][] ) grupos.toArray( new Object[ grupos.size() ][] ); + Arrays.sort( agrupadas, new Comparator(){ + public int compare( Object o1, Object o2 ) + { + Object g1[] = ( Object[] ) o1; + Object g2[] = ( Object[] ) o2; + java.util.Date d1 = ( java.util.Date ) ( g1[ 0 ] != null ? g1[ 0 ] : g1[ 3 ] ); + java.util.Date d2 = ( java.util.Date ) ( g2[ 0 ] != null ? g2[ 0 ] : g2[ 3 ] ); + return d2.compareTo( d1 ); + } + } ); + return agrupadas; + } + + protected void acrescentarTrabalhador( String empresaID, String estabelecimentoID, + IDObject trabalhador, java.util.Date dataFicha, + Object marcacoes[][], Vector links, Vector dados, + boolean perfilConsultas, boolean perfilExames ) + { + int estado[] = new int[ 2 ]; + int index = 0; + boolean pendente = false; + if( marcacoes.length == 0 ) + { + estado[ 0 ] = perfilConsultas ? ESTADO_PENDENTE : ESTADO_NAO_APLICAVEL; + estado[ 1 ] = perfilExames ? ESTADO_PENDENTE : ESTADO_NAO_APLICAVEL; + } + else + { + java.util.Date dataConsulta; + java.util.Date dataExame; + index = -1; + for( ; index + 1 < marcacoes.length; index++ ) + { + int n = index + 1; + dataConsulta = ( java.util.Date ) marcacoes[ n ][ 0 ]; + dataExame = ( java.util.Date ) marcacoes[ n ][ 3 ]; + boolean temConsulta = dataConsulta != null; + boolean consultaAntiga = temConsulta && dataConsulta.before( today ); + boolean temExame = dataExame != null; + boolean exameAntigo = temExame && dataExame.before( today ); + + if( ( temConsulta && consultaAntiga && temExame && exameAntigo ) || + ( temConsulta && consultaAntiga && !temExame && !exameAntigo ) || + ( !temConsulta && !consultaAntiga && temExame && exameAntigo ) ) + { + break; + } + } + if( index == -1 ) + { + index = 0; + } +// else if( index < marcacoes.length - 1 ) +// { +// index = 0; +// } + for( ; index < marcacoes.length; index++ ) + { + dataConsulta = ( java.util.Date ) marcacoes[ index ][ 0 ]; + dataExame = ( java.util.Date ) marcacoes[ index ][ 3 ]; + boolean temConsulta = dataConsulta != null; + long diffConsulta = temConsulta ? dataConsulta.getTime() - today.getTime() : 0; + boolean temExame = dataExame != null; + long diffExame = temExame ? dataExame.getTime() - today.getTime() : 0; + if( ( temConsulta && diffConsulta < CATORZE_DIAS ) || ( temExame && diffExame < CATORZE_DIAS ) ) + { + break; + } + } + if( index >= marcacoes.length ) + { + index = marcacoes.length - 1; + } + else + { + if( marcacoes.length > 1 ) + { + dataConsulta = ( java.util.Date ) marcacoes[ index ][ 0 ]; + dataExame = ( java.util.Date ) marcacoes[ index ][ 3 ]; + Calendar calToday = Calendar.getInstance(); + calToday.setTime( today ); + calToday.add( Calendar.YEAR, -2 ); + if( ( dataConsulta != null && dataConsulta.before( calToday.getTime() ) ) + || ( dataConsulta == null && dataExame != null && dataExame.before( calToday.getTime() ) ) ) + { + if( index > 0 ) + { + index--; + } + else + { + pendente = true; + } + } + } + } + dataConsulta = ( java.util.Date ) marcacoes[ index ][ 0 ]; + Integer estadoConsulta = ( Integer ) marcacoes[ index ][ 1 ]; + Integer motivoConsulta = ( Integer ) marcacoes[ index ][ 2 ]; + dataExame = ( java.util.Date ) marcacoes[ index ][ 3 ]; + Integer estadoExame = ( Integer ) marcacoes[ index ][ 4 ]; + if( perfilConsultas ) + { + if( dataConsulta == null || pendente ) + { + estado[ 0 ] = ESTADO_PENDENTE; + } + else if( estadoConsulta == null || estadoConsulta.intValue() != 2 ) + { + estado[ 0 ] = ESTADO_MARCADO; + } + else + { + estado[ 0 ] = ESTADO_TRATADO; + } + } + else + { + estado[ 0 ] = ESTADO_NAO_APLICAVEL; + } + if( perfilExames ) + { + if( dataExame == null || pendente ) + { + if( motivoConsulta != null && motivoConsulta.intValue() != MOTIVO_OCASIONAL ) + { + estado[ 1 ] = ESTADO_PENDENTE; + } + else + { + estado[ 1 ] = ESTADO_NAO_APLICAVEL; + } + } + else if( estadoExame == null || estadoExame.intValue() != 2 ) + { + estado[ 1 ] = ESTADO_MARCADO; + } + else + { + estado[ 1 ] = ESTADO_TRATADO; + } + } + else + { + estado[ 1 ] = ESTADO_NAO_APLICAVEL; + } + } + if( estado[ 0 ] == 1 || estado[ 0 ] == 2 || + estado[ 1 ] == 1 || estado[ 1 ] == 2 ) + { + links.add( "/"+servletName+"/?"+empresaID+"/"+estabelecimentoID+"/"+trabalhador.getID() ); + HashMap dadosTrabalhador = new HashMap(); + dadosTrabalhador.put( "Nome", trabalhador.toString() ); + dadosTrabalhador.put( "Consulta", CORES_ESTADOS.get( new Integer( estado[ 0 ] ) ) ); + Object text = TEXTOS_ESTADOS.get( new Integer( estado[ 0 ] ) ); + dadosTrabalhador.put( "Consulta_estado", text != null ? text : marcacoes[ index ][ 0 ] ); + dadosTrabalhador.put( "Exame", CORES_ESTADOS.get( new Integer( estado[ 1 ] ) ) ); + text = TEXTOS_ESTADOS.get( new Integer( estado[ 1 ] ) ); + dadosTrabalhador.put( "Exame_estado", text != null ? text : marcacoes[ index ][ 3 ] ); + dados.add( dadosTrabalhador ); + } + } + + protected boolean perfilTemConsultas( Integer trabalhadorID, Integer empresaID ) + throws Exception + { + Executer executer = getExecuter(); + String query = "SELECT a_consultas, b_consultas FROM empresas WHERE id = " + empresaID; + Virtual2DArray array = executer.executeQuery( new Select( query ) ); + boolean consultas[] = new boolean[]{ "y".equals( array.get( 0, 0 ) ), "n".equals( array.get( 0, 0 ) ) }; + query = "SELECT perfil FROM trabalhadores WHERE id = " + trabalhadorID; + array = executer.executeQuery( new Select( query ) ); + Integer perfil = ( Integer )array.get( 0, 0 ); + if( perfil != null ) + { + return consultas[ perfil.intValue() - 1 ]; + } + else + { + return false; + } + } + + protected boolean perfilTemExames( Integer trabalhadorID, Integer empresaID ) + throws Exception + { + Executer executer = getExecuter(); + String query = "SELECT a_exames, b_exames FROM empresas WHERE id = " + empresaID; + Virtual2DArray array = executer.executeQuery( new Select( query ) ); + boolean consultas[] = new boolean[]{ "y".equals( array.get( 0, 0 ) ), "n".equals( array.get( 0, 0 ) ) }; + query = "SELECT perfil FROM trabalhadores WHERE id = " + trabalhadorID; + array = executer.executeQuery( new Select( query ) ); + Integer perfil = ( Integer )array.get( 0, 0 ); + if( perfil != null ) + { + return consultas[ perfil.intValue() - 1 ]; + } + else + { + return false; + } + } + +// protected boolean verificarTrabalhador( Object consultas[][], Object exames[][] ) +// { +// boolean estadoConsultas = false; +// boolean estadoExames = ( exames.length == 0 ) || ( ( java.util.Date )exames[ 0 ][ 0 ] ).before(today) || +// ( ( ( ( java.util.Date )exames[ 0 ][ 0 ] ).getTime() - todayMillis ) / 86400000 > 14 ); +// if( consultas.length > 0 ) +// { +// int anterior; +// int proxima; +// if( ( (java.util.Date) consultas[ 0 ][ 0 ] ).after( today ) ) +// { +// proxima = 0; +// if( consultas.length >= 2 ) +// { +// anterior = 1; +// } +// else +// { +// anterior = -1; +// } +// } +// else +// { +// proxima = -1; +// anterior = 0; +// } +// estadoConsultas = anterior >= 0 && "y".equals( consultas[ anterior ][ 1 ] ) && +// ( proxima == -1 || ( ( ( java.util.Date )consultas[ proxima ][ 0 ] ).getTime() - todayMillis ) / 86400000 > 14 ); +// } +// return !(estadoConsultas && estadoExames); +// } + +// protected HashMap criarDadosTrabalhador( Integer id, String nome, +// Object consultas[][], Object exames[][] ) +// throws Exception +// { +//// dbQuery.append( "SELECT id, nome, ( ultima_consulta IS NOT NULL AND realizada = 'y' )," +//// + " ( ultimo_exame IS NOT NULL AND realizado = 'y' )," +//// + " proxima_consulta IS NOT NULL, proximo_exame IS NOT NULL, " +//// + " ( proxima_consulta IS NOT NULL AND proxima_consulta - current_date <= 14 ), " +//// + " ( proximo_exame IS NOT NULL AND proximo_exame - current_date <= 14 )" +//// + " FROM trabalhadores " +//// + " WHERE estabelecimento_id = '"+estabelecimentoId+"'" +//// + " AND ( ultima_consulta IS NULL OR realizada = 'n' OR" +//// + " ( proxima_consulta IS NOT NULL AND proxima_consulta - current_date <= 14 )" +//// + " OR ( proximo_exame IS NOT NULL AND proximo_exame - current_date <= 14 ) )" +//// + " ORDER BY nome" ); +// HashMap trabalhador = new HashMap(); +// trabalhador.put( "Nome", nome ); +// boolean uc = false; +// boolean ue = false; +// boolean pc = false; +// boolean pe = false; +// boolean quase_c = false; +// boolean quase_e = false; +// java.util.Date consultaAnterior = null; +// java.util.Date exameAnterior = null; +// if( consultas.length > 0 ) +// { +// int anterior; +// int proxima; +// if( ( (java.util.Date) consultas[ 0 ][ 0 ] ).after( today ) ) +// { +// proxima = 0; +// if( consultas.length >= 2 ) +// { +// anterior = 1; +// } +// else +// { +// anterior = -1; +// } +// } +// else +// { +// proxima = -1; +// anterior = 0; +// } +// long diff = proxima > -1 ? ( ( ( java.util.Date )consultas[ proxima ][ 0 ] ).getTime() - todayMillis ) / 86400000 : 15; +// uc = anterior > -1 && "y".equals( consultas[ anterior ][ 1 ] ); +// if( uc ) +// { +// consultaAnterior = ( java.util.Date ) consultas[ anterior ][ 0 ]; +// } +// pc = proxima > -1; +// quase_c = pc && diff <= 14; +// } +// +// if( exames.length > 0 ) +// { +// int anterior; +// int proximo; +// if( ( (java.util.Date) exames[ 0 ][ 0 ] ).after( today ) ) +// { +// proximo = 0; +// if( exames.length >= 2 ) +// { +// anterior = 1; +// } +// else +// { +// anterior = -1; +// } +// } +// else +// { +// proximo = -1; +// anterior = 0; +// } +// long diff = proximo > -1 ? ( ( ( java.util.Date )exames[ proximo ][ 0 ] ).getTime() - todayMillis ) / 86400000 : 15; +// ue = anterior > -1 && "y".equals( exames[ anterior ][ 1 ] ); +// if( ue ) +// { +// exameAnterior = ( java.util.Date ) exames[ anterior ][ 0 ]; +// } +// pe = proximo > -1; +// quase_e = pe && diff <= 14; +// } +// +// if( quase_c ) +// { +// trabalhador.put( "Consulta", "yellow" ); +// trabalhador.put( "Consulta_estado", "pendente" ); +// } +// else if( uc ) +// { +// trabalhador.put( "Consulta", "green" ); +// trabalhador.put( "Consulta_estado", consultaAnterior ); +// } +// else if( pc ) +// { +// trabalhador.put( "Consulta", "yellow" ); +// trabalhador.put( "Consulta_estado", "pendente" ); +// } +// else +// { +// trabalhador.put( "Consulta", "red" ); +// trabalhador.put( "Consulta_estado", "pendente" ); +// } +// +// if( quase_e ) +// { +// trabalhador.put( "Exame", "yellow" ); +// trabalhador.put( "Exame_estado", "pendente" ); +// } +// else if( ue ) +// { +// trabalhador.put( "Exame", "green" ); +// trabalhador.put( "Exame_estado", exameAnterior ); +// } +// else if( pe ) +// { +// trabalhador.put( "Exame", "yellow" ); +// trabalhador.put( "Exame_estado", "pendente" ); +// } +// else +// { +// trabalhador.put( "Exame", "red" ); +// trabalhador.put( "Exame_estado", "pendente" ); +// } +// return trabalhador; +// } +} diff --git a/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetListaTrabalhadoresTudo.java b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetListaTrabalhadoresTudo.java new file mode 100644 index 00000000..1a501aa3 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetListaTrabalhadoresTudo.java @@ -0,0 +1,260 @@ +/* + * doGetListaTrabalhadoresTudo.java + * + * Created on 21 de Abril de 2005, 17:35 + */ + +package siprp.pagina; + +import java.io.*; +import java.util.*; +import java.sql.*; +import java.lang.reflect.Array; +import javax.servlet.*; +import javax.servlet.http.*; + +import org.apache.velocity.*; +import org.apache.velocity.app.*; + + +import com.evolute.utils.arrays.*; +import com.evolute.utils.db.*; +import com.evolute.utils.sql.*; +import com.evolute.utils.strings.*; +/** + * + * @author fpalma + */ +public class doGetListaTrabalhadoresTudo + extends siprpServlet + implements GlobalConstants +{ + protected java.util.Date today; + protected long todayMillis; + + /** Creates a new instance of doGetListaTrabalhadores */ + public doGetListaTrabalhadoresTudo(HttpServletRequest req, HttpServletResponse res, boolean print) throws IOException + { + ServletOutputStream out = res.getOutputStream(); + Connection con = null ; + Statement stmt = null ; + ResultSet2DArray rs; + StringBuffer dbQuery, sBuffer; + String userRole, empresaId, estabelecimentoId, temp; + HttpSession session = req.getSession(false); + Vector links = new Vector(); + Vector desc = new Vector(); + Vector descAdicional = new Vector(); + today = new java.util.Date(); + todayMillis = today.getTime(); + + try + { + userRole = (String)session.getAttribute(super.sessionUserRole); + empresaId = (String)session.getAttribute(super.sessionEmpresaId); + estabelecimentoId = (String)session.getAttribute(super.sessionEstabelecimentoId); + + if ( userRole.equals ( super.superUserRole ) || userRole.equals ( empresaId ) ) + { + Class.forName(super.bdDriver); + con = DriverManager.getConnection( bdLocalUrl, bdLocalUsername, bdLocalPassword ); + if ( super.verificaEstabelecimento(con, empresaId, estabelecimentoId) ) // estabelecimento pertence 'a empresa ?? + { + //Class.forName(super.bdDriver); + //con = DriverManager.getConnection( super.bdUrl, super.bdUsername, super.bdPassword ); + dbQuery = new StringBuffer(); +// dbQuery.append( "SELECT id, nome, data_ficha FROM trabalhadores " +// + "WHERE estabelecimento_id = '"+estabelecimentoId+"'" +// + " AND ultima_consulta IS NOT NULL AND realizada = 'y' AND" +// + " ( proxima_consulta IS NULL OR proxima_consulta - current_date > 14 )" +// + " AND ( proximo_exame IS NULL OR proximo_exame - current_date > 14 )" +// + " ORDER BY nome" ); + dbQuery.append( "SELECT trabalhadores.id, trabalhadores.nome, " + + "marcacoes_trabalhador.tipo, marcacoes_trabalhador.data, " +// + "marcacoes_trabalhador.estado, " + + " trabalhadores.nome_plain " + + "FROM trabalhadores, marcacoes_trabalhador " + + "WHERE estabelecimento_id = " + estabelecimentoId + + " AND marcacoes_trabalhador.trabalhador_id = trabalhadores.id " + + " AND trabalhadores.inactivo <> 'y' AND data_demissao IS NULL " + + "ORDER BY 5, 3, 4 DESC " ); + +// System.out.println( "\nSQL : " + dbQuery.toString() ); + + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( dbQuery.toString()) ); + + int index=0; + int max = rs.columnLength(); + + Integer trabalhadorID = new Integer( -1 ); + String nomeTrabalhador = ""; + Vector consultas = new Vector(); + Vector exames = new Vector(); + + for ( index = 0; index <= max; index++ ) + { + Integer id = index < max ? ( Integer ) rs.get( index, 0 ) : new Integer( -1 ); +// System.out.println( "\tIndex : " + index + " ; " + id ); + if( !id.equals( trabalhadorID ) ) + { + Object listaConsultas[][] = ( Object[][] ) consultas.toArray( new Object[consultas.size()][2] ); + Object listaExames[][] = ( Object[][] ) exames.toArray( new Object[exames.size()][2] ); + if( trabalhadorID.intValue() > -1 && + verificarTrabalhador( listaConsultas, listaExames ) ) + { + temp=""+rs.get(index - 1,0); // converter de int para String + java.util.Date dataUltimaConsulta = null; + for( int c = 0; c < listaConsultas.length; c++ ) + { + if( new Integer( 2 ).equals( listaConsultas[ c ][ 1 ] ) ) + { + dataUltimaConsulta = ( java.util.Date ) listaConsultas[ c ][ 0 ]; + break; + } + } + HashMap dadosTrabalhador = criarDadosTrabalhador( trabalhadorID, nomeTrabalhador, dataUltimaConsulta ); + if( dadosTrabalhador != null ) + { + dbQuery = new StringBuffer(); + dbQuery.append("/"+super.servletName+"/?"+empresaId+"/"+estabelecimentoId+"/"+temp); // construir url + links.add(dbQuery.toString()); + desc.add( dadosTrabalhador ); + } + } + exames.clear(); + consultas.clear(); + } + if( index == max ) + { + break; + } + Integer tipo = ( Integer ) rs.get( index, 2 ); + String nome = ( String ) rs.get( index, 1 ); + java.util.Date data = ( java.util.Date ) rs.get( index, 3 ); +// Integer estado = ( Integer ) rs.get( index, 4 ); + trabalhadorID = id; + nomeTrabalhador = nome; +// Object marcacao[] = new Object[]{ data, estado }; +// switch( tipo.intValue() ) +// { +// case TIPO_MARCACAO_EXAMES: +// exames.add( marcacao ); +// break; +// +// case TIPO_MARCACAO_CONSULTA: +// consultas.add( marcacao ); +// break; +// } + } + stmt.close(); + + sBuffer = new StringBuffer(); + sBuffer.append(""+super.nomeEmpresa(con,empresaId)+"

" + +super.nomeEstabelecimento(con, estabelecimentoId)+"" ); + + HashMap hmValues = new HashMap(); + hmValues.put( "empresa_nome", session.getAttribute( sessionCompanyName ) ); + hmValues.put( "empresa_id", session.getAttribute( sessionEmpresaId ) ); + hmValues.put( "estabelecimento_nome", super.nomeEstabelecimento( con, estabelecimentoId ) ); + hmValues.put( "estabelecimento_id", estabelecimentoId ); + hmValues.put( "userRole", userRole ); + hmValues.put( "userName", session.getAttribute( sessionUser ) ); + hmValues.put( msgTemplate , sBuffer.toString() ) ; + hmValues.put( templateUserRole, userRole); + hmValues.put( templateQuery, "trabalhadores_tudo" ); + hmValues.put( templateVector1,links); + hmValues.put( templateVector2,desc); + hmValues.put( templateVector3,null); + if( !print ) + { + out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate)); + } + else + { + out.println( mergeTemplate( hmValues, super.authenticatedUserPrintTemplate)); + } +// out.println( mergeTemplate( sBuffer.toString(), userRole, super.queryStringTrabalhadores, links, desc, null, super.authenticatedUserTemplate) ); + } + else // est nao pertence 'a empresa + { + out.println( mergeTemplate( super.msgLinkFormatError , userRole, super.errorTemplate) ); + } + con.close(); + } + else // Role nao permite ver esta informacao + { + out.println( mergeTemplate( super.msgAcessoNegado , userRole, super.errorTemplate) ); + } + } + catch ( SQLException e ) + { + e.printStackTrace(); + out.println( mergeTemplate( super.msgErroBd , super.errorTemplate) ); + } + catch ( Exception e ) + { + e.printStackTrace(); + out.println( mergeTemplate( super.msgGenericError , super.errorTemplate) ); + } + } + + protected boolean verificarTrabalhador( Object consultas[][], Object exames[][] ) + { + boolean estadoConsultas = false; + boolean estadoExames = ( exames.length == 0 ) || ( ( java.util.Date )exames[ 0 ][ 0 ] ).before(today) || + ( ( ( ( java.util.Date )exames[ 0 ][ 0 ] ).getTime() - todayMillis ) / 86400000 > 14 ); + if( consultas.length > 0 ) + { + int anterior; + int proxima; + if( ( (java.util.Date) consultas[ 0 ][ 0 ] ).after( today ) ) + { + proxima = 0; + if( consultas.length >= 2 ) + { + anterior = 1; + } + else + { + anterior = -1; + } + } + else + { + proxima = -1; + anterior = 0; + } + estadoConsultas = anterior >= 0 && new Integer( 2 ).equals( consultas[ anterior ][ 1 ] ) && + ( proxima == -1 || ( ( ( java.util.Date )consultas[ proxima ][ 0 ] ).getTime() - todayMillis ) / 86400000 > 14 ); + } + return estadoConsultas && estadoExames; + } + + protected HashMap criarDadosTrabalhador( Integer id, String nome, java.util.Date ultimaConsulta ) + throws Exception + { + Executer executer = getExecuter(); + HashMap trabalhador = new HashMap(); + trabalhador.put( "Nome", nome ); + Select select = + new Select( new String[]{ "exames" }, new String[]{ "data" }, + new Field( "trabalhador_id" ).isEqual( id ).and( + new Field( "data" ).isGreaterOrEqual( ultimaConsulta ) ), + new String[]{ "data" }, null ); + +// Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); +// ResultSet2DArray rs = new ResultSet2DArray( stmt.executeQuery( select.toString() ) ); + Virtual2DArray rs = executer.executeQuery( select ); + Object data_ficha = rs.columnLength() > 0 ? rs.get( 0, 0 ) : null; +// stmt.close(); + if( data_ficha == null ) + { + return null; +// data_ficha = ""; + } + trabalhador.put( "Data", data_ficha ); + return trabalhador; + } +} + diff --git a/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetTrabalhador.java b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetTrabalhador.java new file mode 100644 index 00000000..267421e7 --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doGetTrabalhador.java @@ -0,0 +1,324 @@ +package siprp.pagina; + +import com.evolute.utils.arrays.*; +import com.evolute.utils.strings.*; +import java.io.*; +import java.util.*; +import java.sql.*; +import java.lang.reflect.Array; +import javax.servlet.*; +import javax.servlet.http.*; +import org.apache.velocity.*; +import org.apache.velocity.app.*; + +public class doGetTrabalhador extends siprpServlet +{ + + /** Creates a new instance of doGetTrabalhador */ + public doGetTrabalhador(HttpServletRequest req, HttpServletResponse res) throws IOException + { + ServletOutputStream out = res.getOutputStream(); + Connection con = null ; + Statement stmt = null ; + ResultSet2DArray rs; + StringBuffer dbQuery, sBuffer; + String userRole, empresaId, estabelecimentoId, trabalhadorId, temp; + HttpSession session = req.getSession(false); + Vector names = new Vector(); + Vector values = new Vector(); + java.util.Date today = new java.util.Date(); + + try + { + userRole = (String)session.getAttribute(super.sessionUserRole); + empresaId = (String)session.getAttribute(super.sessionEmpresaId); + estabelecimentoId = (String)session.getAttribute(super.sessionEstabelecimentoId); + trabalhadorId = (String)session.getAttribute(super.sessionTrabalhadorId); + + Class.forName(super.bdDriver); + con = DriverManager.getConnection( bdLocalUrl, bdLocalUsername, bdLocalPassword ); + + if ( ( userRole.equals ( super.superUserRole ) || userRole.equals ( empresaId ) ) + && super.verificaEstabelecimento(con, empresaId, estabelecimentoId) + && super.verificaTrabalhador(con, estabelecimentoId, trabalhadorId) ) + { + + dbQuery = new StringBuffer(); + dbQuery.append( " SELECT sexo, categoria, data_nascimento, nome, numero_mecanografico " + + "FROM trabalhadores where id='"+trabalhadorId+"'"); + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( dbQuery.toString()) ); + + // int index=0; + // int max = super.trabalhadorDescFields.length; + + HashMap hmFuncionario = new HashMap(); + if( rs.columnLength() > 0 ) + { + String tmp; + hmFuncionario.put( "sexo", rs.get( 0, "sexo" ) ); + hmFuncionario.put( "categoria", rs.get( 0, "categoria" ) ); + hmFuncionario.put( "data_nascimento", rs.get( 0, "data_nascimento" ) ); + hmFuncionario.put( "nome", rs.get( 0, "nome" ) ); + hmFuncionario.put( "numero", rs.get( 0, "numero_mecanografico" ) ); + stmt.close(); + + String query = "SELECT id, data, estado, data_relatorio FROM marcacoes_trabalhador " + + "WHERE tipo = 0 and trabalhador_id = " + trabalhadorId + + " ORDER BY data DESC"; + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( query ) ); + if( rs.columnLength() > 0 ) + { + java.util.Date dataExame2 = ( java.util.Date ) rs.get( 0, 1 ); + Integer estado1; + Integer estado2 = ( Integer ) rs.get( 0, 2 ); + java.util.Date dataExame1; + String realizado1 = ""; + String realizado2 = ""; + if( rs.columnLength() > 1 ) + { + dataExame1 = ( java.util.Date ) rs.get( 1, 1 ); + estado1 = ( Integer ) rs.get( 1, 2 ); + } + else + { + dataExame1 = dataExame2; + estado1 = estado2; + } + if( ESTADO_REALIZADO.equals( estado2 ) || ESTADO_PARCIALMENTE_REALIZADO.equals( estado2 ) + || today.after( dataExame2 ) ) + { + hmFuncionario.put( "ultimo_exame", dataExame2 ); + if( estado2.equals( ESTADO_REALIZADO ) || estado2.equals( ESTADO_PARCIALMENTE_REALIZADO ) ) + { + realizado2 = "sim"; + } + else + { + realizado2 = "não"; + } + hmFuncionario.put( "realizado", realizado2 ); + hmFuncionario.put( "proximo_exame", null ); + } + else + { + hmFuncionario.put( "proximo_exame", dataExame2 ); + if( !dataExame2.equals( dataExame1 ) ) + { + hmFuncionario.put( "ultimo_exame", dataExame1 ); + if( estado1.equals( ESTADO_REALIZADO ) || estado1.equals( ESTADO_PARCIALMENTE_REALIZADO ) ) + { + realizado1 = "sim"; + } + else + { + realizado1 = "não"; + } + hmFuncionario.put( "realizado", realizado1 ); + } + else + { + hmFuncionario.put( "ultimo_exame", null ); + hmFuncionario.put( "realizado", null ); + } + } + } + else + { + hmFuncionario.put( "ultimo_exame", null ); + hmFuncionario.put( "realizado", null ); + hmFuncionario.put( "proximo_exame", null ); + } + stmt.close(); + + query = "SELECT MAX(id) FROM exames WHERE trabalhador_id = " + trabalhadorId + " AND inactivo <> 'y'"; + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( query ) ); + Integer fichaId = null; + if( rs.columnLength() > 0 ) + { + fichaId = ( Integer ) rs.get( 0, 0 ); + } + stmt.close(); + + if( fichaId != null ) + { + query = "SELECT data, resultado FROM exames WHERE id = " + fichaId; + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( query ) ); + Integer resultadoFicha = (Integer) rs.get( 0, 1 ); + stmt.close(); + if( resultadoFicha != null ) + { + switch( resultadoFicha.intValue() ) + { + case 1: + hmFuncionario.put( "resultado", "Apto" ); + break; + case 2: + hmFuncionario.put( "resultado", "Apto Condicionalmente" ); + break; + case 3: + hmFuncionario.put( "resultado", "Inapto Temporariamente" ); + break; + case 4: + hmFuncionario.put( "resultado", "Inapto Definitivamente" ); + break; + default: + hmFuncionario.put( "resultado", null ); + } + } + else + { + hmFuncionario.put( "resultado", null ); + } + } + else + { + hmFuncionario.put( "resultado", null ); + } + + query = "SELECT id, data, estado FROM marcacoes_trabalhador " + + "WHERE tipo = 1 and trabalhador_id = " + trabalhadorId + + " ORDER BY data DESC"; + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( query ) ); + if( rs.columnLength() > 0 ) + { + java.util.Date dataConsulta2 = ( java.util.Date ) rs.get( 0, 1 ); + Integer estado1; + Integer estado2 = ( Integer ) rs.get( 0, 2 ); + java.util.Date dataConsulta1; +// java.util.Date dataRelatorio1; +// java.util.Date dataRelatorio2 = (java.util.Date) rs.get( 0, 3 ); + String realizada1 = ""; + String realizada2 = ""; + if( rs.columnLength() >= 2 ) + { + dataConsulta1 = ( java.util.Date ) rs.get( 1, 1 ); + estado1 = ( Integer ) rs.get( 1, 2 ); +// dataRelatorio1 = (java.util.Date) rs.get( 1, 3 ); + } + else + { + dataConsulta1 = dataConsulta2; + estado1 = estado2; +// dataRelatorio1 = dataRelatorio2; + } + if( ESTADO_REALIZADO.equals( estado2 ) || today.after( dataConsulta2 ) ) + { + hmFuncionario.put( "ultima_consulta", dataConsulta2 ); + if( estado2.equals( ESTADO_REALIZADO ) ) + { + realizada2 = "sim"; + } + else + { + realizada2 = "não"; + } + hmFuncionario.put( "realizada", realizada2 ); + hmFuncionario.put( "proxima_consulta", null ); + } + else + { + try + { + for( int c = 1; c < rs.columnLength(); c++ ) + { + java.util.Date dataTemp = ( java.util.Date ) rs.get( c, 1 ); + dataConsulta1 = dataTemp; + estado1 = ( Integer ) rs.get( c, 2 ); + if( dataTemp.after( today ) ) + { + dataConsulta2 = dataTemp; + } + else + { + break; + } + } + } + catch( Exception ex ) + { + ex.printStackTrace(); + } + hmFuncionario.put( "proxima_consulta", dataConsulta2 ); + if( !dataConsulta2.equals( dataConsulta1 ) ) + { + if( estado1.equals( ESTADO_REALIZADO ) ) + { + realizada1 = "sim"; + } + else + { + realizada1 = "não"; + } + hmFuncionario.put( "realizada", realizada1 ); + hmFuncionario.put( "ultima_consulta", dataConsulta1 ); + } + else + { + hmFuncionario.put( "ultima_consulta", null ); + hmFuncionario.put( "realizada", null ); + } + } + } + else + { + hmFuncionario.put( "ultima_consulta", null ); + hmFuncionario.put( "realizada", null ); + hmFuncionario.put( "proxima_consulta", null ); + } + stmt.close(); + } + + sBuffer = new StringBuffer(); + sBuffer.append(""+super.nomeEmpresa(con,empresaId)+"

" + +super.nomeEstabelecimento(con, estabelecimentoId)+"" ); + + HashMap hmValues = new HashMap(); + hmValues.put( "empresa_nome", session.getAttribute( sessionCompanyName ) ); + hmValues.put( "empresa_id", session.getAttribute( sessionEmpresaId ) ); + hmValues.put( "estabelecimento_nome", super.nomeEstabelecimento( con, estabelecimentoId ) ); + + /*Dados para marcacao de consulta/exame*/ + session.setAttribute( "session_estabelecimento_nome", hmValues.get( "estabelecimento_nome" ) ); + session.setAttribute( "session_funcionario_nome", hmFuncionario.get( "nome" ) ); + session.setAttribute( "session_funcionario_numero", hmFuncionario.get( "numero" ) ); + + hmValues.put( "estabelecimento_id", estabelecimentoId ); + hmValues.put( "userRole", userRole ); + hmValues.put( "userName", session.getAttribute( sessionUser ) ); + hmValues.put( msgTemplate , sBuffer.toString() ) ; + hmValues.put( templateUserRole, userRole); + hmValues.put( templateQuery, super.queryStringTrabalhador ); + hmValues.put( "funcionario", hmFuncionario ); + //hmValues.put( templateVector1,names); + //hmValues.put( templateVector2,values); + //hmValues.put( templateVector3,null); + out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate)); + + // out.println( mergeTemplate( sBuffer.toString(), userRole, super.queryStringTrabalhador, names, values, null, super.authenticatedUserTemplate) ); + + } + else + { + out.println( mergeTemplate( super.msgLinkFormatError , userRole, super.errorTemplate) ); + } + con.close(); + } + catch ( SQLException e ) + { + e.printStackTrace(); + out.println( mergeTemplate( super.msgErroBd , super.errorTemplate) ); + } + catch ( Exception e ) + { + e.printStackTrace(); + out.println( mergeTemplate( super.msgGenericError , super.errorTemplate) ); + } + + } + +} diff --git a/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doPostLogin.java b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doPostLogin.java new file mode 100644 index 00000000..e9c41eec --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/doPostLogin.java @@ -0,0 +1,122 @@ +package siprp.pagina; + +import com.evolute.utils.arrays.*; +import com.evolute.utils.strings.*; +import java.io.*; +import java.util.*; +import java.sql.*; +import java.lang.reflect.Array; +import javax.servlet.*; +import javax.servlet.http.*; +import org.apache.velocity.*; +import org.apache.velocity.app.*; + +public class doPostLogin extends siprpServlet +{ + + /** Creates a new instance of doPostLogin */ + public doPostLogin(HttpServletRequest req, HttpServletResponse res) throws IOException + { +System.out.println( "doPostLogin()" ); + ServletOutputStream out = res.getOutputStream(); + StringBuffer dbQuery; + ResultSet2DArray rs; + Connection con = null ; + Statement stmt = null ; + String user, userRole, password; + + try + { + user = req.getParameter("user"); + password = req.getParameter("password"); + + if (user.equals("")) + { + out.println( mergeTemplate( msgErroNoUser, errorTemplate) ); + } + else + { + Class.forName(bdDriver); + con = DriverManager.getConnection( bdUrl, bdUsername, bdPassword ); + dbQuery = new StringBuffer(); + dbQuery.append( "SELECT password FROM users WHERE username = '"+user+"'"); + + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( dbQuery.toString()) ); + + + if ( rs.columnLength() > 0 && password.equals((String)rs.get(0,0))) + { + // Obter Role + + dbQuery = new StringBuffer(); + dbQuery.append( "SELECT role FROM roles WHERE username = '"+user+"'"); + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + + rs = new ResultSet2DArray( stmt.executeQuery( dbQuery.toString()) ); + userRole = (String)rs.get(0,0); + + // UPDATE HTTP SESSION + HttpSession session = req.getSession(true); + session.setMaxInactiveInterval(sessionTimeout); + + session.setAttribute(sessionUser, user); + session.setAttribute(sessionUserRole, userRole); + session.setAttribute(sessionPassword, password); + + HashMap hmValues = new HashMap(); + session.setAttribute( sessionEmpresaId, userRole ); + if( userRole.equals( "manager" ) ) + { + // session.setAttribute( sessionCompanyName, nomeEmpresa( con, "" + session.getAttribute( sessionEmpresaId ) ) ); + session.setAttribute( sessionCompanyName, null ); + session.setAttribute( sessionEstabelecimentoId, null ); + //hmValues.put( templateQuery, super.queryStringEmpresas ); + new doGetListaEmpresas( req, res ); + } + else + { + session.setAttribute( sessionCompanyName, + nomeEmpresa( DriverManager.getConnection( bdLocalUrl, bdLocalUsername, bdLocalPassword ), + userRole ) ); + session.setAttribute( sessionEstabelecimentoId, "-1" ); + //hmValues.put( templateQuery, super.queryStringEstabelecimentos ); + new doGetListaEstabelecimentos( req, res ); + } + stmt.close(); + con.close(); + + hmValues.put( "empresa_nome", session.getAttribute( sessionCompanyName ) ); + hmValues.put( "empresa_id", session.getAttribute( sessionEmpresaId ) ); + hmValues.put( "estabelecimento_id", session.getAttribute( sessionEstabelecimentoId ) ); + hmValues.put( "userRole", userRole ); + hmValues.put( "userName", user ); + //out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate)); + + //out.println( mergeTemplate( user, userRole, super.authenticatedUserTemplate)); + } + else + { + out.println( mergeTemplate( msgErroAuthFail, super.errorTemplate) ); + } + } + + } + catch ( SQLException e ) + { + e.printStackTrace(); + out.println( mergeTemplate( msgErroBd , super.errorTemplate) ); + } + catch ( IllegalStateException e ) // session timeout + { + e.printStackTrace(); + out.println( mergeTemplate(msgSessionTimeout, super.errorTemplate) ); + } + catch ( Exception e ) + { + e.printStackTrace(); + out.println( mergeTemplate( msgGenericError , super.errorTemplate) ); + } + } + +} diff --git a/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/siprpServlet.java b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/siprpServlet.java new file mode 100644 index 00000000..088c3f3b --- /dev/null +++ b/tags/Site antigo e SIPRPSoft/web/src/siprp/pagina/siprpServlet.java @@ -0,0 +1,667 @@ +package siprp.pagina; + +import java.io.IOException; +import java.io.StringWriter; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Properties; +import java.util.StringTokenizer; +import java.util.Vector; + +import javax.servlet.ServletContext; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.velocity.VelocityContext; +import org.apache.velocity.app.Velocity; + +import com.evolute.utils.Singleton; +import com.evolute.utils.arrays.ResultSet2DArray; +import com.evolute.utils.arrays.Virtual2DArray; +import com.evolute.utils.db.DBManager; +import com.evolute.utils.db.Executer; +import com.evolute.utils.db.JDBCManager; +import com.evolute.utils.sql.Select; +import com.evolute.utils.strings.UnicodeChecker; + +public class siprpServlet extends HttpServlet + implements GlobalConstants +{ + // MSG + public static final String msgErroNoUser = "Tem+de+especificar+um+utilizador."; + public static final String msgErroAuthFail = "Utilizador+inexistente+e/ou+Password+errada."; + public static final String msgErroBd = "Erro+na+ligaç&atiolde;o+à+base+de+dados."; + public static final String msgGenericError = "Erro"; + public static final String msgListaEmpresas = "Empresas"; + public static final String msgAcessoNegado = "Acesso+Negado."; + public static final String msgLinkFormatError ="URL+inválido."; + public static final String msgLogin = "Login"; + public static final String msgNovaPasswordErrada="Erro+ao+criar+a+nova+password,+nova+password+inválida."; + public static final String msgButtonNotSuported = "funcionalidade+ainda+não+suportada."; + public static final String msgSessionTimeout = "Por+razões+de+segurança+o+tempo+da+sua+sessão+expirou
" + + "Por+favor+efectue+novamente+o+seu+login.
"; + + // Templates - Nomes e valores + //public static final String loginTemplate = "login.html"; + + public static final String indexTemplate = "index.html"; + public static final String authenticatedUserTemplate = "user.html"; + public static final String authenticatedUserPrintTemplate = "user_print.html"; + public static final String errorTemplate = "frame_erro.html"; + public static final String innerErrorTemplate = "erro.html"; + + public static final String mainTemplate = "main.html"; + //public static final String criticalErrorTemplate = "critical.html"; + public static final String templateVector1 ="v1"; + public static final String templateVector2 ="v2"; + public static final String templateVector3 ="v3"; + public static final String templateUserRole ="userRole"; + public static final String msgTemplate ="msg"; + public static final String templateQuery ="query"; + public static final String buttonPressedTemplate ="buttonPressed"; + + // Query Strings , usadas para na template do velocity saber o que mostar + public static final String queryStringErro = "erro"; + public static final String queryStringEmpresas = "empresas"; + public static final String queryStringEstabelecimentos="estabelecimentos"; + public static final String queryStringTrabalhadores ="trabalhadores"; + public static final String queryStringTrabalhador ="trabalhador"; + + //Botoes, saber qual o botao escholido, campo value dos forms + public static final String botaoLogin = "Entrar"; + public static final String botaoMarcarProximoExame = "Marcar Exame"; + + // Var da Session + public static final String sessionUser="user"; + public static final String sessionUserRole="userRole"; + public static final String sessionPassword="password"; + public static final String sessionEmpresaId="empresaId"; + public static final String sessionEstabelecimentoId="estabelecimentoId"; + public static final String sessionTrabalhadorId="trabalhadorId"; + public static final String sessionCompanyName = "sessionCompanyName"; + public static final String sessionCompanyEmail = "sessionCompanyEmail"; + public static final int sessionTimeout = 3600; // segundos + + public static final String servletName="siprpWeb"; + public static final String superUserRole="manager"; + +// // BD +// public static final String bdHost = "127.0.0.1"; +// public static final String bdPort = "5436"; +// public static final String bdUsername = "siprp"; +// public static final String bdPassword = ""; +// public static final String bdDriver = "org.postgresql.Driver"; +// public static final String bdUrl = "jdbc:postgresql://" + bdHost + ":" + bdPort + "/siprp"; + + public static final String bdEmpresaIdRef = "id"; // campo que contem id da empresa + public static final String bdEmpresaNomeRef = "designacao_social"; // campo que contem nome da empresa + public static final String bdEstIdRef = "id"; // campo que contem nome do estabelecimento + public static final String bdEstNomeRef = "nome"; // campo que contem nome do estabelecimento + public static final String bdTrabIdRef = "id"; // campo que contem id do trabalhador + public static final String bdTrabNomeRef = "nome"; // campo que contem nome do trabalhador + public static final String bdNullString = ""; // String a mostrar quando o campo lido da BD e' null + public static final String bdEmailEmpresa = "email"; // campo que contem email da empresa + + protected static ServletContext CONTEXT; + + // Arrays + public static final String[][] trabalhadorDescFields = new String [][] + { // nome que o user ve, nome do campo na tabela + {"Nome", "nome"}, + {"N\u00ba", "numero_mecanografico",}, + {"\u00DAltimo Exame", "ultimo_exame"}, + {"Realizado", "realizado"}, + {"Pr\u00F3ximo Exame", "proximo_exame"}, + {"\u00DAltima Consulta", "ultima_consulta"}, + {"Realizada", "realizada"}, + {"Pr\u00F3xima Consulta", "proxima_consulta"} + }; + + public void init() + { + + try { + CONTEXT = this.getServletContext(); + String TEMPLATE_DIR = this.getServletContext().getRealPath( "/" ) + "html/"; +System.out.println( "DIR: " + TEMPLATE_DIR ); + Properties props = new Properties(); + props.setProperty( "file.resource.loader.path", TEMPLATE_DIR ); + Velocity.init( props ); + Class.forName(bdDriver); + } + catch( Exception e ) + { + e.printStackTrace(); + } + } + + public void doGet( HttpServletRequest req, HttpServletResponse res ) + throws IOException + { + String queryString = req.getQueryString(); + String backUri = req.getRequestURI(); + ServletOutputStream out = res.getOutputStream(); + res.setContentType( "text/html" ); + try + { +System.out.println( "query: " + queryString ); + HttpSession session = req.getSession(true); + session.setMaxInactiveInterval(sessionTimeout); + + if ( queryString == null ) // Reload, 1a vez, etc ... + { + session.invalidate(); + out.println( mergeTemplate ( msgLogin, indexTemplate ) ) ; + } + else if ( session.isNew() && !( queryString.indexOf(queryStringErro) == 0 ) ) // session timeout + { + session.invalidate(); + out.println( mergeTemplate( msgGenericError , errorTemplate ) ); +// doErro(queryString, out); + } + else if ( queryString.equals(queryStringEmpresas) ) // Listar Empresas + { + new doGetListaEmpresas(req,res); + } + else if ( queryString.indexOf(queryStringErro) == 0 ) // Listar Empresas + { +// System.out.println( "entrou" ); + doErro(queryString, out); + } + else // interpretar query string + { + String empresa = null, estabelecimento=null, trabalhador=null; + String query = null; + int checkInt; + + StringTokenizer sToken = new StringTokenizer(queryString,"/") ; + empresa = sToken.nextToken(); // empresa ID + checkInt = Integer.parseInt(empresa); // check int, NumberFormatException + + if (sToken.hasMoreElements()) + { + estabelecimento = sToken.nextToken(); // estabelecimento ID + checkInt = Integer.parseInt(estabelecimento); // check int, NumberFormatException + if (sToken.hasMoreElements()) + { + trabalhador = sToken.nextToken(); // trabalhador ID + try + { + checkInt = Integer.parseInt(trabalhador); // check int, NumberFormatException + } + catch( NumberFormatException nfex ) + { + query = trabalhador; + if( query.indexOf( "trabalhadores_tudo" ) != 0 && query.indexOf( "trabalhadores_pendentes" ) != 0 && + query.indexOf( "_print" ) == -1 ) + { + throw nfex; + } + } + } + } + + if ( estabelecimento == null ) // empresa query + { + session.setAttribute(sessionEmpresaId, empresa); // update HTTP Session + + new doGetListaEstabelecimentos(req,res); + + //out.println( mergeTemplate ( empresa, loginTemplate ) ) ; + } + else if ( trabalhador == null || query != null ) // estabelecimento query + { + session.setAttribute(sessionEmpresaId, empresa); // update HTTP Session + session.setAttribute(sessionEstabelecimentoId, estabelecimento); + + new doGetListaTrabalhadores(req,res, query); + + //out.println( mergeTemplate ( " chama oGetListaTrabalhadores", loginTemplate ) ) ; + } + else // trabalhador query + { + session.setAttribute(sessionEmpresaId, empresa); // update HTTP Session + session.setAttribute(sessionEstabelecimentoId, estabelecimento); + session.setAttribute(sessionTrabalhadorId, trabalhador); + + new doGetTrabalhador(req,res); + + //out.println( mergeTemplate ( trabalhador, loginTemplate ) ) ; + } + } + } + catch ( NumberFormatException e ) // argumentos invalidos + { + e.printStackTrace(); + out.println( mergeTemplate( msgLinkFormatError, backUri, errorTemplate) ); + } + catch ( IllegalStateException e ) // session timeout + { + e.printStackTrace(); + out.println( mergeTemplate(msgSessionTimeout, errorTemplate) ); + } + catch ( Exception e ) + { + e.printStackTrace(); +// out.println( mergeTemplate( msgGenericError , backUri, errorTemplate ) ); + out.println( mergeTemplate( msgGenericError , errorTemplate ) ); + } +// System.out.println( "fim - " + queryString + " bu " + backUri ); + } + + public void doPost(HttpServletRequest req, HttpServletResponse res) + throws IOException + { + ServletOutputStream out = res.getOutputStream(); + //StringBuffer dbQuery; + //ResultSet2DArray rs; + //Connection con = null ; + //Statement stmt = null ; + //String user, userRole, password; + String buttonPressed = req.getParameter("form"); + res.setContentType( "text/html" ); + try + { + if ( buttonPressed.equals(botaoLogin)) + { + new doPostLogin(req,res); + } + else + { + out.println( mergeTemplate( msgButtonNotSuported, errorTemplate) ); + } + } + /*catch ( SQLException e ) + { + e.printStackTrace(); + out.println( mergeTemplate( msgErroBd , criticalErrorTemplate) ); + }*/ + catch ( IllegalStateException e ) // session timeout + { + e.printStackTrace(); + out.println( mergeTemplate(msgSessionTimeout, errorTemplate) ); + } + catch ( Exception e ) + { + e.printStackTrace(); + out.println( mergeTemplate( msgGenericError , errorTemplate) ); + } + } + + + public String mergeTemplate( HashMap values, String template ) + { + VelocityContext context = new VelocityContext(); + StringWriter output = new StringWriter(); + + try + { + for( Iterator i = values.keySet().iterator(); i.hasNext(); ) + { + String key = ( String ) i.next(); + context.put ( key, values.get( key ) ) ; +//fpalma +// Object value = values.get( key ); +// context.put ( key, value != null ? +// UnicodeChecker.parseToUnicode( "&#x", 2, ";", value.toString(), true ) +// : null ); + } + + Velocity.mergeTemplate(template, Velocity.ENCODING_DEFAULT, context, output ); + return output.toString(); + } + catch( Exception e ) + { + e.printStackTrace(); + } + return null; + } + + + + public String mergeTemplate (String msg, String template ) // #1 + { + VelocityContext context = new VelocityContext(); + StringWriter output = new StringWriter(); + + try + { + context.put ( msgTemplate , msg ) ; + Velocity.mergeTemplate(template, Velocity.ENCODING_DEFAULT, context, output ); + return output.toString(); + } + catch( Exception e ) + { + e.printStackTrace(); + } + return null; + } + + public String mergeTemplate (String msg, String userRole, String template ) // #1 + { + + VelocityContext context = new VelocityContext(); + StringWriter output = new StringWriter(); + + try + { + context.put ( msgTemplate , msg ) ; + context.put ( templateUserRole, userRole); + Velocity.mergeTemplate(template, Velocity.ENCODING_DEFAULT, context, output ); + return output.toString(); + } + catch( Exception e ) + { + e.printStackTrace(); + } + return null; + } + + public String mergeTemplate ( String msg, String userRole, String querySelected, Vector vector1, Vector vector2, Vector vector3, String template ) // #2 + { + + VelocityContext context = new VelocityContext(); + StringWriter output = new StringWriter(); + + try + { + context.put ( msgTemplate , msg ) ; + context.put ( templateUserRole, userRole); + context.put ( templateQuery, querySelected ); + context.put ( templateVector1,vector1); + context.put ( templateVector2,vector2); + context.put ( templateVector3,vector3); + Velocity.mergeTemplate(template, Velocity.ENCODING_DEFAULT, context, output ); + return output.toString(); + } + catch( Exception e ) + { + e.printStackTrace(); + } + return null; + } + + public void destroy() + { + } + + public void handleSessionTimeout(HttpServletResponse res, String template) + throws IOException + { + ServletOutputStream out = res.getOutputStream(); + try + { + out.println( mergeTemplate( msgSessionTimeout, template) ); + } + catch ( Exception e ) + { + e.printStackTrace(); + + } + } + + public boolean verificaEstabelecimento(Connection con, java.lang.String empresaId, java.lang.String estabelecimentoId) + // verifica se o establecimento pertence 'a empresa + { + //Connection con = null ; + Statement stmt = null ; + Virtual2DArray rs; + String query; + try + { + //con = DriverManager.getConnection( bdUrl, bdUsername, bdPassword ); + query = "SELECT empresa_id FROM estabelecimentos where id='"+estabelecimentoId+"'"; + if( con != null ) + { + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( query ) ); + } + else + { + rs = getExecuter().executeQuery( new Select( query ) ); + } + String temp=""+rs.get(0,0); // converter de int para String + if( con != null ) + { + stmt.close(); + } + if ( empresaId.equals(temp) ) // estabelecimento pertence 'a empresa + { + return true; + } + else + { + return false; + } + } + catch ( Exception e ) + { + e.printStackTrace(); + } + return false; + } + + public boolean verificaTrabalhador(Connection con, java.lang.String estabelecimentoId, java.lang.String trabalhadorId) + // verifica se o trabalhador pertence ao estabelecimento + { + //Connection con = null ; + Statement stmt = null ; + ResultSet2DArray rs; + StringBuffer dbQuery; + try + { + //con = DriverManager.getConnection( bdUrl, bdUsername, bdPassword ); + dbQuery = new StringBuffer(); + dbQuery.append( "SELECT estabelecimento_id FROM trabalhadores where id='"+trabalhadorId+"'"); + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( dbQuery.toString()) ); + String temp=""+rs.get(0,0); // converter de int para String + stmt.close(); + if ( estabelecimentoId.equals(temp) ) // estabelecimento pertence 'a empresa + { + return true; + } + else + { + return false; + } + } + catch ( Exception e ) + { + e.printStackTrace(); + } + return false; + } + + public void closeSqlCon(Connection con) + { + try + { + if (con != null ) con.close(); + } + catch ( Exception e ) + { + e.printStackTrace(); + } + + } + + public String emailEmpresa(Connection con, String empresaId) + { + Statement stmt = null ; + ResultSet2DArray rs; + StringBuffer dbQuery; + String returnString; + + try + { + dbQuery = new StringBuffer(); + dbQuery.append( "SELECT email FROM empresas, contactos " + + "WHERE empresas.id ='"+empresaId+"' AND empresas.contacto_1 = contactos.id"); + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( dbQuery.toString()) ); + if( rs.columnLength() > 0 ) + { + returnString = (String)rs.get(0,0); + stmt.close(); + return returnString; + } + else + { + return null; + } + } + catch ( Exception e ) + { + e.printStackTrace(); + } + return null; + } + + public String nomeEmpresa(Connection con, String empresaId) + { + Statement stmt = null ; + Virtual2DArray rs; + String returnString; + + try + { + String query = "SELECT designacao_social FROM empresas WHERE id ='"+empresaId+"'"; + if( con != null ) + { + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( query ) ); + } + else + { + rs = getExecuter().executeQuery( new Select( query ) ); + } + if( rs.columnLength() > 0 ) + { + returnString = (String)rs.get(0,0); + if( con != null ) + { + stmt.close(); + } + return returnString; + } + else + { + return null; + } + } + catch ( Exception e ) + { + e.printStackTrace(); + } + return null; + } + + public String nomeEstabelecimento(Connection con, java.lang.String estabelecimentoId) + { + Statement stmt = null ; + Virtual2DArray rs; + StringBuffer dbQuery; + String returnString; + + try + { + String query = "SELECT nome FROM estabelecimentos WHERE id ='"+estabelecimentoId+"'"; + if( con != null ) + { + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( query ) ); + } + else + { + rs = getExecuter().executeQuery( new Select( query ) ); + } + if( rs.columnLength() > 0 ) + { + returnString = (String)rs.get(0,0); + if( con != null ) + { + stmt.close(); + } + return returnString; + } + else + { + return null; + } + } + catch ( Exception e ) + { + e.printStackTrace(); + } + return null; + } + + public String nomeTrabalhador(Connection con, java.lang.String trabalhadorId) + { + Statement stmt = null ; + ResultSet2DArray rs; + StringBuffer dbQuery; + String returnString; + + try + { + dbQuery = new StringBuffer(); + dbQuery.append( "SELECT nome FROM trabalhadores where id='"+trabalhadorId+"'"); + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = new ResultSet2DArray( stmt.executeQuery( dbQuery.toString()) ); + if( rs.columnLength() > 0 ) + { + returnString = (String)rs.get(0,0); + stmt.close(); + return returnString; + } + else + { + return null; + } + } + catch ( Exception e ) + { + e.printStackTrace(); + } + return null; + } + + public void doErro( String queryString, ServletOutputStream out ) + throws Exception + { + String split[] = queryString.split( "=" ); + String err; + if( split.length > 1 ) + { + err = split[ 1 ]; + } + else + { + err = "Erro"; + } + err = err.replace( '+', ' ' ); + out.println( mergeTemplate( err, innerErrorTemplate) ); + } + + protected Executer getExecuter() + throws Exception + { + ServletContext context = CONTEXT; + DBManager dbm = ( DBManager ) context.getAttribute( Singleton.DEFAULT_DBMANAGER ); + if( dbm == null ) + { + dbm = new JDBCManager( bdLocalUrl, bdLocalUsername, bdLocalPassword , 500, 499, 1, null ); + context.setAttribute( Singleton.DEFAULT_DBMANAGER, dbm ); + } + return dbm.getSharedExecuter(); + } +} +