forked from Coded/SIPRP
git-svn-id: https://svn.coded.pt/svn/SIPRP@1255 bb69d46d-e84e-40c8-a05a-06db0d633741
parent
dcf5ef8ba9
commit
89a1455ae6
@ -0,0 +1,40 @@
|
||||
<project name="evo-app-build-common" >
|
||||
|
||||
<import file="evo-app-compile-common.xml" />
|
||||
|
||||
<target name="app-build" description="Compiles all application classes" depends="app-prepare,app-pre-build">
|
||||
<mkdir dir="${app.build.dir}" />
|
||||
<depend srcdir="${app.src.dir}" destdir="${app.build.dir}" cache="${app.dependencies.chache.dir}">
|
||||
<include name="**/*.java" />
|
||||
</depend>
|
||||
<javac srcdir="${app.src.dir}" destdir="${app.build.dir}" classpathref="app.build.classpath" debug="on" deprecation="on" fork="true" memoryMaximumSize="512M" />
|
||||
<antcall target="app-post-build"/>
|
||||
</target>
|
||||
|
||||
<target name="run-codegen" description="Runs codegen for this project" depends="load-properties">
|
||||
<available file="${codegen.project.ant}" property="codegen.project.exists"/>
|
||||
<antcall target="show-codegen-project-error"/>
|
||||
<antcall target="run-codegen-if-project-exists"/>
|
||||
</target>
|
||||
|
||||
<target name="run-codegen-if-project-exists" if="codegen.project.exists">
|
||||
<available file="${codegen.properties.file}" property="codegen.properties.exists"/>
|
||||
<antcall target="show-codegen-properties-error"/>
|
||||
<antcall target="run-codegen-if-exists"/>
|
||||
</target>
|
||||
|
||||
<target name="show-codegen-project-error" unless="codegen.project.exists">
|
||||
<echo message="Codegen's build-file not found at ${codegen.project.ant}"/>
|
||||
</target>
|
||||
|
||||
<target name="run-codegen-if-exists" if="codegen.properties.exists">
|
||||
<ant inheritall="false" antfile="${codegen.project.ant}" target="app-run">
|
||||
<property name="app.run.args" value="${basedir}" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="show-codegen-properties-error" unless="codegen.properties.exists">
|
||||
<echo message="Project's codegen configuration file not found at ${codegen.properties.file}"/>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,62 @@
|
||||
<project name="evo-app-build-obfuscate-common">
|
||||
|
||||
<target name="obfuscate">
|
||||
<taskdef resource="proguard/ant/task.properties" classpath="${app.dir}/lib.tools/proguard.jar" />
|
||||
|
||||
<delete file="${app.deploy.dist.dir}/${evolute.jar.name}" failonerror="false" />
|
||||
|
||||
<proguard printmapping="${app.dir}/${app.name}.map">
|
||||
|
||||
<injar file="${app.lib.dir}/evologger.jar" />
|
||||
<outjar file="${app.deploy.dist.lib.dir}/evologger.jar" />
|
||||
|
||||
<injar file="${app.lib.dir}/evolute.jar" />
|
||||
<outjar file="${app.deploy.dist.lib.dir}/evolute.jar" />
|
||||
|
||||
<injar file="${app.deploy.dist.dir}/${app.jar.name}" />
|
||||
<outjar file="${app.deploy.dist.dir}/${app.jar.name}_guard.jar" />
|
||||
|
||||
<libraryjar file="${evolute.lib.dir}" />
|
||||
<libraryjar file="${app.lib.dir}" />
|
||||
<libraryjar file="${java.home}/lib/jce.jar" />
|
||||
<libraryjar file="${java.home}/lib/jsse.jar" />
|
||||
<libraryjar file="${java.home}/lib/rt.jar" />
|
||||
|
||||
-printseeds
|
||||
-verbose
|
||||
-dontskipnonpubliclibraryclasses
|
||||
|
||||
-keepclasseswithmembers public class * {
|
||||
public static void main(java.lang.String[]);
|
||||
}
|
||||
</proguard>
|
||||
<delete file="${app.deploy.dist.dir}/${app.jar.name}" failonerror="true" />
|
||||
<move file="${app.deploy.dist.dir}/${app.jar.name}_guard.jar" tofile="${app.deploy.dist.dir}/${app.jar.name}" />
|
||||
</target>
|
||||
|
||||
<target name="ProguardTask">
|
||||
<property file="${app.version.file}" prefix="version" />
|
||||
<echo message="${version.major}.${version.minor}.${version.build}" />
|
||||
<echo message="${version.major}.${version.minor}.${version.build}" />
|
||||
<typedef classpathref="lib.tools.classpath" resource="net/jtools/classloadertask/antlib.xml">
|
||||
<classpath>
|
||||
<path refid="lib.tools.classpath"/>
|
||||
</classpath>
|
||||
</typedef>
|
||||
<classloader loader="project">
|
||||
<classpath>
|
||||
<fileset dir="${lib.tools.dir}" includes="*.jar"/>
|
||||
<fileset dir="${app.lib.dir}" includes="*.jar"/>
|
||||
</classpath>
|
||||
</classloader>
|
||||
<taskdef name="proguardtask" classpathref="lib.tools.classpath" classname="com.evolute.ant.ProguardTask" />
|
||||
|
||||
<proguardtask filePath="${app.dir}/${app.name}.map" version="${version.major}.${version.minor}.${version.build}" fileName="${app.name}.map" projectName="${app.name}" />
|
||||
</target>
|
||||
|
||||
<target name="pre-deploy">
|
||||
<antcall target="obfuscate" />
|
||||
<antcall target="ProguardTask" />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,89 @@
|
||||
<project name="evo-app-compile-common" >
|
||||
|
||||
<import file="evo-app-load-properties.xml" />
|
||||
|
||||
<!-- BUILD -->
|
||||
|
||||
<target name="app-post-build" />
|
||||
|
||||
<target name="app-pre-build" />
|
||||
|
||||
<target name="app-build" />
|
||||
|
||||
<target name="app-prepare" depends="load-properties">
|
||||
<echo message="Dealing with package-info.java files (ant compilation problem workaround)" />
|
||||
<delete failonerror="false">
|
||||
<fileset dir="${app.build.dir}" includes="**/package-info.java"/>
|
||||
</delete>
|
||||
<!--touch>
|
||||
<fileset dir="${app.src.dir}" includes="**/package-info.java"/>
|
||||
</touch-->
|
||||
<echo message="Copying non-java files to build directory" />
|
||||
<copy verbose="true" failonerror="true" overwrite="true" todir="${app.build.dir}">
|
||||
<fileset dir="${app.src.dir}">
|
||||
<exclude name="**/*.java" />
|
||||
<exclude name="*.java" />
|
||||
</fileset>
|
||||
<fileset dir="${properties.dir}">
|
||||
<include name="app.properties" />
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="app-clean" description="Removes all generated files" depends="load-static-properties">
|
||||
<delete verbose="true" failonerror="false">
|
||||
<fileset dir="${app.build.dir}">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</delete>
|
||||
<delete dir="${app.build.dir}" verbose="true" failonerror="true" />
|
||||
<delete dir="${app.dist.dir}" verbose="true" failonerror="true" />
|
||||
<delete dir="${app.deploy.dist.dir}" verbose="true" failonerror="true" />
|
||||
</target>
|
||||
|
||||
<target name="app-run" description="Runs the application" depends="app-build">
|
||||
<java jvmversion="${app.java.version}" classname="${app.main}" maxmemory="${app.max.mem}" classpathref="app.build.classpath" fork="true" dir="${app.build.dir}">
|
||||
<jvmarg value="-XX:-UseGCOverheadLimit" />
|
||||
<arg value="${app.run.args}"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<!-- JAR -->
|
||||
<target name="app-deploy-create-jar" depends="app-clean, app-build" >
|
||||
<mkdir dir="${app.deploy.dist.dir}" />
|
||||
<jar destfile="${app.deploy.dist.dir}/${app.jar.name}" >
|
||||
<fileset dir="${app.build.dir}">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</jar>
|
||||
<copy todir="${app.deploy.dist.lib.dir}">
|
||||
<fileset dir="${app.lib.dir}">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="app-create-jar" description="Make application Jar" depends="app-clean, app-build" >
|
||||
<pathconvert property="jar.classpath.converted" refid="app.jar.classpath" pathsep=" ">
|
||||
<map from="${app.dir}/" to="" />
|
||||
<map from="${basedir}/" to="" />
|
||||
</pathconvert>
|
||||
<mkdir dir="${app.dist.dir}" />
|
||||
<jar destfile="${app.dist.dir}/${app.jar.name}">
|
||||
<fileset dir="${app.build.dir}">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="${app.main}" />
|
||||
<attribute name="Class-Path" value="${jar.classpath.converted}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<copy todir="${app.dist.lib.dir}">
|
||||
<fileset dir="${app.lib.dir}">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,130 @@
|
||||
<project name="evo-app-deploy-common" >
|
||||
|
||||
<!-- PROPERTIES -->
|
||||
<property name="properties.key.name" value="name" />
|
||||
<property name="properties.key.major" value="major" />
|
||||
<property name="properties.key.minor" value="minor" />
|
||||
<property name="properties.key.build" value="build" />
|
||||
|
||||
<!-- SETUP -->
|
||||
<target name="prepare-deploy-location">
|
||||
<sshexec trust="yes" host="${app.deploy.server}" username="${deploy.user}" command="sh ${deploy.prepare.script} ${app.name}" password="${deploy.password}" />
|
||||
</target>
|
||||
|
||||
<target name="run-jnlp-task" >
|
||||
<typedef classpathref="lib.tools.classpath" resource="net/jtools/classloadertask/antlib.xml">
|
||||
<classpath>
|
||||
<path refid="lib.tools.classpath"/>
|
||||
</classpath>
|
||||
</typedef>
|
||||
<classloader loader="project">
|
||||
<classpath>
|
||||
<fileset dir="${lib.tools.dir}" includes="*.jar"/>
|
||||
</classpath>
|
||||
</classloader>
|
||||
<taskdef name="generate-jnlp" classpathref="lib.tools.classpath" classname="com.evolute.ant.JNLPGeneratorTask" />
|
||||
<generate-jnlp propertiesDir="${properties.dir}" basedir="${app.dir}" />
|
||||
</target>
|
||||
|
||||
<!-- DEPLOY -->
|
||||
|
||||
<target name="load-properties" />
|
||||
|
||||
<target name="pre-deploy" />
|
||||
|
||||
<target name="app-deploy-version" if="deploy.version" >
|
||||
<antcall target="app-deploy-create-jar"/>
|
||||
<antcall target="pre-deploy" />
|
||||
<antcall target="run-jnlp-task" />
|
||||
<input defaultvalue="${basedir}" addproperty="deploy.jars">
|
||||
<handler classpathref="lib.tools.classpath" classname="com.evolute.ant.JarInputHandler" />
|
||||
</input>
|
||||
<condition property="do.abort">
|
||||
<equals arg1="${deploy.jars}" arg2="null"/>
|
||||
</condition>
|
||||
<fail if="do.abort">Deploy cancelled</fail>
|
||||
<antcall target="app-deploy-version-jars"/>
|
||||
</target>
|
||||
|
||||
<target name="app-version-increase-test">
|
||||
<property name="TESTDEPLOY" value="yes"/>
|
||||
<antcall target="app-version-increase-build"/>
|
||||
</target>
|
||||
|
||||
<target name="app-version-increase-major">
|
||||
<propertyfile file="${app.version.file}" comment="${app.version.comment}" >
|
||||
<entry key="${properties.key.name}" value="${app.name}"/>
|
||||
<entry key="${properties.key.major}" type="int" operation="+" value="1"/>
|
||||
<entry key="${properties.key.minor}" type="int" operation="=" value="0"/>
|
||||
<entry key="${properties.key.build}" type="int" operation="=" value="0"/>
|
||||
</propertyfile>
|
||||
<antcall target="app-deploy-version"/>
|
||||
</target>
|
||||
|
||||
<target name="app-version-increase-minor">
|
||||
<propertyfile file="${app.version.file}" comment="${app.version.comment}" >
|
||||
<entry key="${properties.key.name}" value="${app.name}"/>
|
||||
<entry key="${properties.key.major}" type="int" operation="+" value="0"/>
|
||||
<entry key="${properties.key.minor}" type="int" operation="+" value="1"/>
|
||||
<entry key="${properties.key.build}" type="int" operation="=" value="0"/>
|
||||
</propertyfile>
|
||||
<antcall target="app-deploy-version"/>
|
||||
</target>
|
||||
|
||||
<target name="app-version-increase-build">
|
||||
<propertyfile file="${app.version.file}" comment="${app.version.comment}" >
|
||||
<entry key="${properties.key.name}" value="${app.name}"/>
|
||||
<entry key="${properties.key.major}" type="int" operation="+" value="0"/>
|
||||
<entry key="${properties.key.minor}" type="int" operation="+" value="0"/>
|
||||
<entry key="${properties.key.build}" type="int" operation="+" value="1"/>
|
||||
</propertyfile>
|
||||
<antcall target="app-deploy-version"/>
|
||||
</target>
|
||||
|
||||
<target name="deploy-test" if="TESTDEPLOY">
|
||||
<sshexec trust="yes" host="${app.deploy.server}" username="${deploy.user}" command="sh ${app.deploy.test.script} ${app.name}" password="${deploy.password}" />
|
||||
</target>
|
||||
|
||||
<target name="deploy-production" unless="TESTDEPLOY">
|
||||
<sshexec trust="yes" host="${app.deploy.server}" username="${deploy.user}" command="sh ${app.deploy.production.script} ${app.name}" password="${deploy.password}" />
|
||||
</target>
|
||||
|
||||
<target name="app-deploy-version-jars-user-pass" if="deploy.password">
|
||||
<antcall target="prepare-deploy-location" />
|
||||
<echo message="Uploading files: ${deploy.jars}"/>
|
||||
<scp verbose="yes" todir="${deploy.user}@${app.deploy.server}:${app.deploy.path}" password="${deploy.password}" sftp="true" trust="true" >
|
||||
<fileset dir="${app.deploy.dist.dir}" includes="${deploy.jars}"/>
|
||||
</scp>
|
||||
<scp verbose="yes" todir="${deploy.user}@${app.deploy.server}:${app.deploy.jnlp.path}" password="${deploy.password}" sftp="true" trust="true" >
|
||||
<fileset dir="${jnlp.dir}" includes="**/*.jnlp"/>
|
||||
</scp>
|
||||
<antcall target="deploy-test"/>
|
||||
<antcall target="deploy-production"/>
|
||||
</target>
|
||||
|
||||
<target name="app-deploy-version-jars-user" if="deploy.user">
|
||||
<input message="password:>" addproperty="deploy.password">
|
||||
<handler classpathref="lib.tools.classpath" classname="com.evolute.ant.PasswordInputHandler" />
|
||||
</input>
|
||||
<antcall target="app-deploy-version-jars-user-pass"/>
|
||||
</target>
|
||||
|
||||
<target name="app-deploy-version-jars" if="deploy.jars" >
|
||||
<input message="" addproperty="deploy.user">
|
||||
<handler classpathref="lib.tools.classpath" classname="com.evolute.ant.UserInputHandler" />
|
||||
</input>
|
||||
<antcall target="app-deploy-version-jars-user" />
|
||||
</target>
|
||||
|
||||
<target name="app-deploy-choose-version" if="deploy.version" >
|
||||
<antcall target="app-version-increase-${deploy.version}" />
|
||||
</target>
|
||||
|
||||
<target name="app-deploy" description="Deploys application" depends="load-properties">
|
||||
<input defaultvalue="" addproperty="deploy.version">
|
||||
<handler classpathref="lib.tools.classpath" classname="com.evolute.ant.VersionInputHandler" />
|
||||
</input>
|
||||
<antcall target="app-deploy-choose-version"/>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,71 @@
|
||||
<project name="evo-app-load-properties" >
|
||||
|
||||
<property name="properties.base.dir" value="${basedir}/properties" />
|
||||
<property name="lib.tools.dir" value="${basedir}/lib.tools" />
|
||||
|
||||
<target name="load-static-properties" >
|
||||
<property name="app.dir" value="${basedir}" />
|
||||
<property name="evolute.dir" value="${basedir}/../evolute" />
|
||||
<property name="evolute.lib.dir" value="${evolute.dir}/lib" />
|
||||
<property name="evolute.lib.tools.dir" value="${evolute.dir}/lib.tools" />
|
||||
<property name="evolute.ant.dir" value="${evolute.dir}/ant" />
|
||||
<property name="evolute.jar.name" value="evolute.jar" />
|
||||
<property name="app.src.dir" value="${app.dir}/src" />
|
||||
<property name="app.lib.dir" value="${app.dir}/lib" />
|
||||
<property name="app.dist.dir" value="${app.dir}/dist" />
|
||||
<property name="app.dist.lib.dir" value="${app.dist.dir}/lib" />
|
||||
<property name="app.deploy.dist.dir" value="${app.dir}/deploy" />
|
||||
<property name="app.deploy.dist.lib.dir" value="${app.deploy.dist.dir}/lib" />
|
||||
<property name="app.build.dir" value="${app.dir}/build" />
|
||||
<property name="app.dependencies.chache.dir" value="${app.dir}/dependenciesCache" />
|
||||
<property name="app.max.mem" value="512M" />
|
||||
<property name="codegen.project.ant" value="${basedir}/../codegen/build.xml"/>
|
||||
<property name="codegen.properties.file" value="${basedir}/properties/codegen.xml"/>
|
||||
|
||||
<path id="app.jar.classpath">
|
||||
<fileset dir="${app.lib.dir}" />
|
||||
</path>
|
||||
|
||||
<path id="app.build.classpath">
|
||||
<pathelement location="${app.build.dir}" />
|
||||
<path refid="app.jar.classpath" />
|
||||
</path>
|
||||
|
||||
<path id="lib.tools.classpath">
|
||||
<fileset dir="${lib.tools.dir}" />
|
||||
</path>
|
||||
|
||||
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="lib.tools.classpath" />
|
||||
|
||||
</target>
|
||||
|
||||
<target name="load-properties-file" >
|
||||
<property name="properties.dir" value="${properties.base.dir}" />
|
||||
<property file="${properties.dir}/app.properties" />
|
||||
<property file="${properties.dir}/project.properties" />
|
||||
<antcall target="load-static-properties"/>
|
||||
</target>
|
||||
|
||||
<target name="load-properties" depends="load-properties-file,load-static-properties">
|
||||
|
||||
<property name="app.name" value="${app.appName}" />
|
||||
<property name="app.main" value="${app.main-class}" />
|
||||
|
||||
<property name="app.jar.name" value="${app.name}.jar" />
|
||||
<property name="jnlp.dir" value="${app.dir}/jnlp" />
|
||||
<property name="jnlp.extensions.dir" value="${jnlp.dir}/extensions" />
|
||||
<property name="app.java.version" value="${java.version}" />
|
||||
<property name="app.deploy.server" value="www.evolute.pt" />
|
||||
<property name="app.deploy.path" value="/home/software/src_${app.name}" />
|
||||
<property name="app.deploy.jnlp.path" value="${app.deploy.path}/jnlp" />
|
||||
<property name="app.deploy.production.script" value="/home/software/auto_deploy.sh ${app.name}" />
|
||||
<property name="app.deploy.test.script" value="/home/software/auto_test_deploy.sh ${app.name}" />
|
||||
<property name="deploy.prepare.script" value="/home/software/auto_prepare_deploy.sh ${app.name}" />
|
||||
<property name="app.version.file" value="${properties.base.dir}/version.properties" />
|
||||
<property name="app.version.comment" value="${app.name} versioning file" />
|
||||
<property name="app.run.args" value="" />
|
||||
<property name="app.ws.wsdl.url" value="${app.ws.wsdl.url.protocol}://${app.ws.wsdl.url.host}:${app.ws.wsdl.url.port}${app.ws.wsdl.url.path}" />
|
||||
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,19 @@
|
||||
<project name="evo-app-multiple-client-common" >
|
||||
|
||||
<target name="load-properties-file" >
|
||||
<input defaultvalue="${properties.base.dir}" addproperty="properties.dir">
|
||||
<handler classpathref="lib.tools.classpath" classname="com.evolute.ant.ProjectClientInputHandler" />
|
||||
</input>
|
||||
<property file="${properties.dir}/app.properties" />
|
||||
<property file="${properties.dir}/project.properties" />
|
||||
<property file="${properties.base.dir}/app.properties" />
|
||||
<property file="${properties.base.dir}/project.properties" />
|
||||
<copy verbose="true" failonerror="true" overwrite="true" todir="${basedir}/build">
|
||||
<fileset dir="${properties.dir}">
|
||||
<include name="*" />
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,113 @@
|
||||
<project name="evo-app-build-5" >
|
||||
|
||||
<import file="common/evo-app-load-properties.xml" />
|
||||
<import file="common/evo-app-deploy-common.xml" />
|
||||
|
||||
<!-- CLASSPATH -->
|
||||
<path id="app.jar.classpath">
|
||||
<fileset dir="${app.lib.dir}" />
|
||||
</path>
|
||||
|
||||
<path id="app.build.classpath">
|
||||
<path refid="app.jar.classpath" />
|
||||
<pathelement location="${app.build.dir}" />
|
||||
</path>
|
||||
|
||||
<path id="svn.classpath">
|
||||
<fileset dir="${evolute.lib.tools.dir}" />
|
||||
</path>
|
||||
|
||||
<path id="jsch.classpath">
|
||||
<fileset dir="${evolute.lib.tools.dir}" />
|
||||
</path>
|
||||
|
||||
<path id="lib.tools.classpath">
|
||||
<fileset dir="${lib.tools.dir}" />
|
||||
</path>
|
||||
|
||||
<!-- BUILD -->
|
||||
<target name="app-prepare" depends="load-properties">
|
||||
<echo message="Copying non-java files to build directory" />
|
||||
<copy todir="${app.build.dir}">
|
||||
<fileset dir="${app.src.dir}">
|
||||
<exclude name="**/*.java" />
|
||||
<exclude name="*.java" />
|
||||
</fileset>
|
||||
<fileset dir="${properties.dir}">
|
||||
<include name="*" />
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="app-build" description="Compiles all application classes" depends="app-prepare">
|
||||
<mkdir dir="${app.build.dir}" />
|
||||
<depend srcdir="${app.src.dir}" destdir="${app.build.dir}" cache="${app.dependencies.chache.dir}">
|
||||
<include name="**/*.java" />
|
||||
</depend>
|
||||
<javac srcdir="${app.src.dir}" destdir="${app.build.dir}" classpathref="app.build.classpath" debug="on" deprecation="on" fork="true" memoryMaximumSize="512M" source="1.5" target="1.5" />
|
||||
<antcall target="app-datanucleus"/>
|
||||
</target>
|
||||
|
||||
<target name="app-datanucleus">
|
||||
<path id="jpox.enhancer.classpath">
|
||||
<fileset dir="${lib.tools.dir}" />
|
||||
<path refid="app.build.classpath" />
|
||||
</path>
|
||||
<taskdef name="jpoxEnhancer" description="JPOX Enhancer" classpathref="jpox.enhancer.classpath" classname="org.datanucleus.enhancer.tools.EnhancerTask" />
|
||||
<jpoxEnhancer maxmemory="256M" classpathref="jpox.enhancer.classpath" dir="${app.build.dir}" verbose="true"/>
|
||||
</target>
|
||||
|
||||
<target name="app-clean" description="Removes all generated files">
|
||||
<delete failonerror="false">
|
||||
<fileset dir="${app.build.dir}">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</delete>
|
||||
<delete dir="${app.build.dir}" failonerror="false" />
|
||||
<delete dir="${app.dist.dir}" failonerror="false" />
|
||||
<delete dir="${app.deploy.dist.dir}" failonerror="false" />
|
||||
</target>
|
||||
|
||||
<target name="app-run" description="Runs the application" depends="app-build">
|
||||
<java classname="${app.main}" classpathref="app.build.classpath" fork="true" dir="${app.build.dir}" />
|
||||
</target>
|
||||
|
||||
<!-- JAR -->
|
||||
<target name="app-deploy-create-jar" depends="app-clean, app-build" >
|
||||
<mkdir dir="${app.deploy.dist.dir}" />
|
||||
<jar destfile="${app.deploy.dist.dir}/${app.jar.name}" >
|
||||
<fileset dir="${app.build.dir}">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</jar>
|
||||
<copy todir="${app.deploy.dist.lib.dir}">
|
||||
<fileset dir="${app.lib.dir}">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="app-create-jar" description="Make application Jar" depends="app-clean, app-build" >
|
||||
<pathconvert property="jar.classpath.converted" refid="app.jar.classpath" pathsep=" ">
|
||||
<map from="${app.dir}/" to="" />
|
||||
<map from="${basedir}/" to="" />
|
||||
</pathconvert>
|
||||
<mkdir dir="${app.dist.dir}" />
|
||||
<jar destfile="${app.dist.dir}/${app.jar.name}">
|
||||
<fileset dir="${app.build.dir}">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="${app.main}" />
|
||||
<attribute name="Class-Path" value="${jar.classpath.converted}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<copy todir="${app.dist.lib.dir}">
|
||||
<fileset dir="${app.lib.dir}">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,25 @@
|
||||
<project name="evo-app-build-jdo" >
|
||||
|
||||
<import file="common/evo-app-compile-common.xml" />
|
||||
<import file="common/evo-app-deploy-common.xml" />
|
||||
|
||||
<target name="app-build" description="Compiles all application classes" depends="app-prepare,app-pre-build">
|
||||
<mkdir dir="${app.build.dir}" />
|
||||
<depend srcdir="${app.src.dir}" destdir="${app.build.dir}" cache="${app.dependencies.chache.dir}">
|
||||
<include name="**/*.java" />
|
||||
</depend>
|
||||
<javac srcdir="${app.src.dir}" destdir="${app.build.dir}" classpathref="app.build.classpath" debug="on" deprecation="on" fork="true" memoryMaximumSize="512M" />
|
||||
<antcall target="app-datanucleus"/>
|
||||
<antcall target="app-post-build"/>
|
||||
</target>
|
||||
|
||||
<target name="app-datanucleus">
|
||||
<path id="jpox.enhancer.classpath">
|
||||
<fileset dir="${lib.tools.dir}" />
|
||||
<path refid="app.build.classpath" />
|
||||
</path>
|
||||
<taskdef name="jpoxEnhancer" description="JPOX Enhancer" classpathref="jpox.enhancer.classpath" classname="org.datanucleus.enhancer.tools.EnhancerTask" />
|
||||
<jpoxEnhancer maxmemory="256M" classpathref="jpox.enhancer.classpath" dir="${app.build.dir}" verbose="true"/>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,6 @@
|
||||
<project name="evo-app-build-obfuscate-jdo">
|
||||
|
||||
<import file="common/evo-app-compile-common.xml" />
|
||||
<import file="common/evo-app-deploy-common.xml" />
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,7 @@
|
||||
<project name="evo-app-build-obfuscate">
|
||||
|
||||
<import file="common/evo-app-build-common.xml" />
|
||||
<import file="common/evo-app-build-obfuscate-common.xml" />
|
||||
<import file="common/evo-app-deploy-common.xml" />
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,6 @@
|
||||
<project name="evo-app-build" >
|
||||
|
||||
<import file="common/evo-app-build-common.xml" />
|
||||
<import file="common/evo-app-deploy-common.xml" />
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,7 @@
|
||||
<project name="evo-app-multiple-client-build" >
|
||||
|
||||
<import file="common/evo-app-multiple-client-common.xml" />
|
||||
<import file="common/evo-app-build-common.xml" />
|
||||
<import file="common/evo-app-deploy-common.xml" />
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,6 @@
|
||||
<project name="evo-app-multiple-client-build" >
|
||||
|
||||
<import file="common/evo-app-multiple-client-common.xml" />
|
||||
<import file="evo-app-build-obfuscate.xml" />
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,30 @@
|
||||
<project name="evo-app-ws-client-build" >
|
||||
|
||||
<import file="common/evo-app-build-common.xml" />
|
||||
|
||||
<path id="jaxws.classpath">
|
||||
<path refid="lib.tools.classpath"/>
|
||||
<pathelement location="${java.home}/../lib/tools.jar" />
|
||||
</path>
|
||||
|
||||
<target name="receitas-gen-client" depends="app-build" description="generates client">
|
||||
<taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
|
||||
<classpath refid="lib.tools.classpath" />
|
||||
</taskdef>
|
||||
<java fork="false" classname="com.evolute.ssl.InstallCert" classpathref="app.build.classpath">
|
||||
<arg value="${app.ws.wsdl.url.host}"/>
|
||||
<arg value="${app.ws.wsdl.url.port}"/>
|
||||
<arg value="${app.ssl.truststore.file}"/>
|
||||
<arg value="${app.ssl.truststore.pass}"/>
|
||||
<arg value="true"/>
|
||||
<arg value="true"/>
|
||||
</java>
|
||||
<wsimport fork="false" debug="true" verbose="true" keep="true" sourcedestdir="${app.src.dir}" package="${app.ws.dest.package}" wsdl="${app.ws.wsdl.url}">
|
||||
<jvmarg value="-Djavax.net.ssl.trustStore=${basedir}/jssecacerts" />
|
||||
<jvmarg value="-Djavax.net.ssl.trustStorePassword=changeit" />
|
||||
<jvmarg value="-Djavax.net.ssl.keyStore=${basedir}/jssecacerts" />
|
||||
<jvmarg value="-Djavax.net.ssl.keyStorePassword=changeit" />
|
||||
</wsimport>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,21 @@
|
||||
<project name="evo-library-build" default="library-deploy">
|
||||
|
||||
<import file="common/evo-app-build-common.xml" />
|
||||
|
||||
<target name="deploy-default-project" depends="app-create-jar">
|
||||
<mkdir dir="${deploy.project.dir}/lib"/>
|
||||
<copy failonerror="false" verbose="true" file="${app.dist.dir}/${app.jar.name}" toDir="${deploy.project.dir}/lib" />
|
||||
</target>
|
||||
|
||||
<target name="deploy-project" if="deploy.project.dir">
|
||||
<antcall target="deploy-default-project" />
|
||||
</target>
|
||||
|
||||
<target name="library-deploy" description="Deploys current version of evolute utilities" depends="load-static-properties">
|
||||
<input defaultvalue="${basedir}" addproperty="deploy.project.dir">
|
||||
<handler classpathref="lib.tools.classpath" classname="com.evolute.ant.ProjectInputHandler" />
|
||||
</input>
|
||||
<antcall target="deploy-project" />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,5 @@
|
||||
<project name="SIPRPSoft" basedir="." default="app-run">
|
||||
|
||||
<import file="ant/evo-app-build.xml" />
|
||||
|
||||
</project>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,63 @@
|
||||
#APP level
|
||||
app.appName = SIPRPSoft
|
||||
app.main-class = siprp.Main
|
||||
app.main = siprp.Main
|
||||
#app.max.mem=512M
|
||||
#app.run.args=test 1 2 3
|
||||
|
||||
#app.resources.j2se.version = 1.0+
|
||||
#app.resources.j2se.initial-heap-size = 4m
|
||||
#app.resources.j2se.max-heap-size = 8m
|
||||
|
||||
#app.ws.dest.package=com.evolute.test-project.stubs
|
||||
#app.ws.wsdl.url=https://www.evolute.pt/test-project/test-endpoint?wsdl
|
||||
#app.ws.wsdl.url.protocol=https
|
||||
#app.ws.wsdl.url.host=www.evolute.pt
|
||||
#app.ws.wsdl.url.port=443
|
||||
#app.ws.wsdl.url.path=/test-project/test-endpoint?wsdl
|
||||
|
||||
#app.ssl.truststore.file=jssecacerts
|
||||
#app.ssl.truststore.pass=changeit
|
||||
|
||||
#JNLP level
|
||||
#jnlp.app.appName = test-project
|
||||
#jnlp.information.title = jnlp-Test Project
|
||||
#jnlp.resources.j2se.version = 1.1+
|
||||
#jnlp.test.url=http://www.evolute.pt/~software/test-project
|
||||
|
||||
|
||||
#JNLP + PRODUCTION level
|
||||
#jnlp.production.app.main-class = !com.evolute.test-project.TestProject2
|
||||
#jnlp.production.app.appName = test-project
|
||||
#jnlp.production.url=http://www.evolute.pt/~software/test-project
|
||||
|
||||
#jnlp.production.information.title = prod-Test Project
|
||||
#jnlp.production.information.vendor = prod-Evolute Lda
|
||||
#jnlp.production.information.description = prod-Tester Project for JNLP Generator
|
||||
#jnlp.production.information.description.short = prod-JNLP Tester
|
||||
#jnlp.production.information.icon = prod-logo.png
|
||||
|
||||
#jnlp.production.resources.j2se.version = 1.6.0+
|
||||
#jnlp.production.resources.j2se.initial-heap-size = 64m
|
||||
#jnlp.production.resources.j2se.max-heap-size = 512m
|
||||
|
||||
#jnlp.production.resources.property.jnlp.packEnabled = true
|
||||
#jnlp.production.resources.property.apple.laf.useScreenMenuBar = true
|
||||
#jnlp.production.resources.property.swing.defaultlaf = org.jvnet.substance.skin.SubstanceRavenGraphiteGlassLookAndFeel
|
||||
#jnlp.production.resources.property.evolute.ui.overridePaint = false
|
||||
|
||||
|
||||
#JNLP + TEST level
|
||||
#jnlp.test.app.main-class = com.evolute.test-project.TestProject3
|
||||
#jnlp.test.app.appName = project-test
|
||||
#jnlp.test.url=http://www.evolute.pt/~software/versoes_teste/test-project
|
||||
|
||||
#jnlp.test.information.title = test-Test Project
|
||||
#jnlp.test.information.vendor = test-Evolute Lda
|
||||
#jnlp.test.information.description = test-Tester Project for JNLP Generator
|
||||
#jnlp.test.information.description.short = test-JNLP Tester
|
||||
#jnlp.test.information.icon = test-logo.png
|
||||
|
||||
#jnlp.test.resources.j2se.version = 1.6.0+
|
||||
#jnlp.test.resources.j2se.initial-heap-size = 64m
|
||||
#jnlp.test.resources.j2se.max-heap-size = 512m
|
||||
@ -0,0 +1,399 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<entity-gen-configuration>
|
||||
<connection>
|
||||
<url>jdbc:postgresql://www.evolute.pt:5436/siprp_local_3</url>
|
||||
<user>postgres</user>
|
||||
<password>Typein</password>
|
||||
</connection>
|
||||
<base-path>/home/tsimao/workspace/SIPRPSoft/src</base-path>
|
||||
<inner-package>siprp.data.inner</inner-package>
|
||||
<outer-package>siprp.data.outer</outer-package>
|
||||
<super-class>siprp.data.BaseObject</super-class>
|
||||
<package-file-name>package.xml</package-file-name>
|
||||
<table>
|
||||
<name>actualizacao</name>
|
||||
<class-name>Actualizacao</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>avisos</name>
|
||||
<class-name>Avisos</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>contactos</name>
|
||||
<class-name>Contactos</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>ecd_oficial</name>
|
||||
<class-name>EcdOficial</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>email_plano_de_actuacao</name>
|
||||
<class-name>EmailPlanoDeActuacao</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>empresas</name>
|
||||
<class-name>Empresas</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>errors</name>
|
||||
<class-name>Errors</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>estabelecimentos</name>
|
||||
<class-name>Estabelecimentos</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>etiquetas</name>
|
||||
<class-name>Etiquetas</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>exames</name>
|
||||
<class-name>Exames</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>exames_perfis</name>
|
||||
<class-name>ExamesPerfis</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>exames_portaria</name>
|
||||
<class-name>ExamesPortaria</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>historico_estabelecimento</name>
|
||||
<class-name>HistoricoEstabelecimento</class-name>
|
||||
<super-class-name>siprp.data.Historico</super-class-name>
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_area</name>
|
||||
<class-name>HsArea</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_email</name>
|
||||
<class-name>HsEmail</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_email_empresa</name>
|
||||
<class-name>HsEmailEmpresa</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_email_estabelecimento</name>
|
||||
<class-name>HsEmailEstabelecimento</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_equipamento</name>
|
||||
<class-name>HsEquipamento</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_legislacao</name>
|
||||
<class-name>HsLegislacao</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_legislacao_categoria</name>
|
||||
<class-name>HsLegislacaoCategoria</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_legislacao_empresa</name>
|
||||
<class-name>HsLegislacaoEmpresa</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_legislacao_estabelecimento</name>
|
||||
<class-name>HsLegislacaoEstabelecimento</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_medida</name>
|
||||
<class-name>HsMedida</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_normalizacao</name>
|
||||
<class-name>HsNormalizacao</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_normalizacao_empresa</name>
|
||||
<class-name>HsNormalizacaoEmpresa</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_normalizacao_estabelecimento</name>
|
||||
<class-name>HsNormalizacaoEstabelecimento</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_posto</name>
|
||||
<class-name>HsPosto</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_posto_estabelecimento</name>
|
||||
<class-name>HsPostoEstabelecimento</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_posto_medida</name>
|
||||
<class-name>HsPostoMedida</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_posto_risco</name>
|
||||
<class-name>HsPostoRisco</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_relatorio</name>
|
||||
<class-name>HsRelatorio</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_relatorio_area</name>
|
||||
<class-name>HsRelatorioArea</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_relatorio_equipamento</name>
|
||||
<class-name>HsRelatorioEquipamento</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_relatorio_legislacao</name>
|
||||
<class-name>HsRelatorioLegislacao</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_relatorio_medida</name>
|
||||
<class-name>HsRelatorioMedida</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_relatorio_normalizacao</name>
|
||||
<class-name>HsRelatorioNormalizacao</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_relatorio_posto</name>
|
||||
<class-name>HsRelatorioPosto</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_relatorio_posto_medida</name>
|
||||
<class-name>HsRelatorioPostoMedida</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_relatorio_posto_risco</name>
|
||||
<class-name>HsRelatorioPostoRisco</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_relatorio_risco</name>
|
||||
<class-name>HsRelatorioRisco</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_relatorio_risco_valor_qualitativo</name>
|
||||
<class-name>HsRelatorioRiscoValorQualitativo</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_risco</name>
|
||||
<class-name>HsRisco</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_risco_empresa</name>
|
||||
<class-name>HsRiscoEmpresa</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_risco_medida</name>
|
||||
<class-name>HsRiscoMedida</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>hs_risco_tema</name>
|
||||
<class-name>HsRiscoTema</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>ids</name>
|
||||
<class-name>Ids</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>image</name>
|
||||
<class-name>Image</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>lembretes</name>
|
||||
<class-name>Lembretes</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>lembretes_tipos</name>
|
||||
<class-name>LembretesTipos</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>marcacoes_empresa</name>
|
||||
<class-name>MarcacoesEmpresa</class-name>
|
||||
<super-class-name>siprp.data.Marcacao</super-class-name>
|
||||
</table>
|
||||
<table>
|
||||
<name>marcacoes_estabelecimento</name>
|
||||
<class-name>MarcacoesEstabelecimento</class-name>
|
||||
<super-class-name>siprp.data.Marcacao</super-class-name>
|
||||
</table>
|
||||
<table>
|
||||
<name>marcacoes_grupos_realizados</name>
|
||||
<class-name>MarcacoesGruposRealizados</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>marcacoes_tecnicos_hst</name>
|
||||
<class-name>MarcacoesTecnicosHst</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>marcacoes_trabalhador</name>
|
||||
<class-name>MarcacoesTrabalhador</class-name>
|
||||
<super-class-name>siprp.data.Marcacao</super-class-name>
|
||||
</table>
|
||||
<table>
|
||||
<name>marcacoes_trabalhador_estados</name>
|
||||
<class-name>MarcacoesTrabalhadorEstados</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>medicos</name>
|
||||
<class-name>Medicos</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>prestadores</name>
|
||||
<class-name>Prestadores</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>prestadores_grupos_protocolo</name>
|
||||
<class-name>PrestadoresGruposProtocolo</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>prt_elementos_protocolo</name>
|
||||
<class-name>PrtElementosProtocolo</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>prt_grupos_protocolo</name>
|
||||
<class-name>PrtGruposProtocolo</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>prt_tipos_elementos_protocolo</name>
|
||||
<class-name>PrtTiposElementosProtocolo</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>tipos_exames_comp</name>
|
||||
<class-name>TiposExamesComp</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>trabalhadores</name>
|
||||
<class-name>Trabalhadores</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>trabalhadores_consultas</name>
|
||||
<class-name>TrabalhadoresConsultas</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>trabalhadores_consultas_datas</name>
|
||||
<class-name>TrabalhadoresConsultasDatas</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>trabalhadores_consultas_datas_emails</name>
|
||||
<class-name>TrabalhadoresConsultasDatasEmails</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>trabalhadores_consultas_datas_observacoes</name>
|
||||
<class-name>TrabalhadoresConsultasDatasObservacoes</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>trabalhadores_ecd</name>
|
||||
<class-name>TrabalhadoresEcd</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>trabalhadores_ecds</name>
|
||||
<class-name>TrabalhadoresEcds</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>trabalhadores_ecds_analise</name>
|
||||
<class-name>TrabalhadoresEcdsAnalise</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>trabalhadores_ecds_datas</name>
|
||||
<class-name>TrabalhadoresEcdsDatas</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>trabalhadores_ecds_datas_emails</name>
|
||||
<class-name>TrabalhadoresEcdsDatasEmails</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>trabalhadores_ecds_datas_observacoes</name>
|
||||
<class-name>TrabalhadoresEcdsDatasObservacoes</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>trabalhadores_fichas_aptidao</name>
|
||||
<class-name>TrabalhadoresFichasAptidao</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>trabalhadores_processo</name>
|
||||
<class-name>TrabalhadoresProcesso</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>versao</name>
|
||||
<class-name>Versao</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
<table>
|
||||
<name>version</name>
|
||||
<class-name>Version</class-name>
|
||||
<super-class-name />
|
||||
</table>
|
||||
</entity-gen-configuration>
|
||||
|
||||
@ -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
|
||||
@ -1,342 +0,0 @@
|
||||
package com.evolute.adt;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
public class OrderedMap<KeyClass extends Object> implements Iterable<KeyClass>
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Vector<KeyClass> order = new Vector<KeyClass>();
|
||||
|
||||
private HashMap<KeyClass, List<Object>> map = new HashMap<KeyClass, List<Object>>();
|
||||
|
||||
public OrderedMap()
|
||||
{
|
||||
}
|
||||
|
||||
public OrderedMap(Collection<KeyClass> allPrestadores)
|
||||
{
|
||||
Iterator<KeyClass> iterator = allPrestadores.iterator();
|
||||
while( iterator.hasNext() )
|
||||
{
|
||||
KeyClass value = iterator.next();
|
||||
this.putLast( value, value );
|
||||
}
|
||||
}
|
||||
|
||||
public List<Object> getRow( int row )
|
||||
{
|
||||
return map.get( order.get( row ) );
|
||||
}
|
||||
|
||||
public List<Object> getValues( KeyClass key )
|
||||
{
|
||||
return map.get( key );
|
||||
}
|
||||
|
||||
public int rows()
|
||||
{
|
||||
return order.size();
|
||||
}
|
||||
|
||||
public KeyClass getKeyForValue( Object value )
|
||||
{
|
||||
for( KeyClass key : map.keySet() )
|
||||
{
|
||||
List<Object> values = map.get( key );
|
||||
if( value.equals( values ) )
|
||||
{
|
||||
return key;
|
||||
}
|
||||
else
|
||||
{
|
||||
for( Object currentValue : values )
|
||||
{
|
||||
if( currentValue.equals( value ) )
|
||||
{
|
||||
return key;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the length of the biggest line
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int columns()
|
||||
{
|
||||
int result = 0;
|
||||
for( KeyClass key : order )
|
||||
{
|
||||
result = map.get( key ).size() > result ? map.get( key ).size() : result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<Object> getColumn( int i )
|
||||
{
|
||||
List<Object> result = new ArrayList<Object>();
|
||||
if( order != null && order.size() > 0 )
|
||||
{
|
||||
for( KeyClass key : order )
|
||||
{
|
||||
List<Object> row = map.get( key );
|
||||
if( row != null && row.size() > 0 )
|
||||
{
|
||||
result.add( row.get( 0 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
row.add( null );
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public KeyClass getFirst()
|
||||
{
|
||||
return order.isEmpty() ? null : order.get( 0 );
|
||||
}
|
||||
|
||||
public Iterator<KeyClass> iterator()
|
||||
{
|
||||
return order.iterator();
|
||||
}
|
||||
|
||||
public boolean containsKey( KeyClass key )
|
||||
{
|
||||
return map.containsKey( key );
|
||||
}
|
||||
|
||||
public Object getValueAt( int row, int column )
|
||||
{
|
||||
Object result = null;
|
||||
if( row < order.size() )
|
||||
{
|
||||
List<Object> line = map.get( order.get( row ) );
|
||||
if( column < line.size() )
|
||||
{
|
||||
result = line.get( column );
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds arguments to the end of the row (on given order)
|
||||
*
|
||||
* @param key
|
||||
* @param values
|
||||
*/
|
||||
public void putLast( KeyClass key, Object... values )
|
||||
{
|
||||
if( values != null )
|
||||
{
|
||||
for( Object currentValue : values )
|
||||
{
|
||||
putLast( key, currentValue );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds argument to the end of the row
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
public void putLast( KeyClass key, Object value )
|
||||
{
|
||||
List<Object> list;
|
||||
if( map.containsKey( key ) )
|
||||
{
|
||||
list = map.get( key );
|
||||
}
|
||||
else
|
||||
{
|
||||
list = new ArrayList<Object>();
|
||||
order.add( key );
|
||||
}
|
||||
list.add( value );
|
||||
map.put( key, list );
|
||||
}
|
||||
|
||||
public List<Object> remove( Object key )
|
||||
{
|
||||
order.remove( key );
|
||||
return map.remove( key );
|
||||
}
|
||||
|
||||
/**
|
||||
* Orders by first column (rows compared as strings)
|
||||
*/
|
||||
public void order()
|
||||
{
|
||||
order( 0 );
|
||||
}
|
||||
|
||||
public void order( int columnNumber )
|
||||
{
|
||||
order( new int[] {
|
||||
columnNumber
|
||||
}, 0, 0, order.size() - 1, order );
|
||||
}
|
||||
|
||||
public void order( int[] colNumbers )
|
||||
{
|
||||
order( colNumbers, 0, 0, order.size() - 1, order );
|
||||
}
|
||||
|
||||
private void order( int[] colNumbers, int currentColumnIndex, int fromLineNumber, int toLineNumber, List<KeyClass> order )
|
||||
{
|
||||
if( colNumbers != null && currentColumnIndex >= 0 && fromLineNumber < toLineNumber && toLineNumber < order.size() && currentColumnIndex < colNumbers.length )
|
||||
{
|
||||
int columnNumber = colNumbers[currentColumnIndex];
|
||||
if( order != null && order.size() > 0 )
|
||||
{
|
||||
List<Pair<String, KeyClass>> sortedList = new ArrayList<Pair<String, KeyClass>>();
|
||||
for( int i = fromLineNumber; i < order.size() && i < (toLineNumber + 1); ++i )
|
||||
{
|
||||
KeyClass key = order.get( i );
|
||||
List<Object> row = map.get( key );
|
||||
String value = "";
|
||||
if( row != null && row.size() > columnNumber && row.get( columnNumber ) != null )
|
||||
{
|
||||
value = row.get( columnNumber ).toString();
|
||||
}
|
||||
sortedList.add( new Pair<String, KeyClass>( value, key ) );
|
||||
}
|
||||
Collections.sort( sortedList );
|
||||
List<Pair<String, KeyClass>> equalEntries = new ArrayList<Pair<String, KeyClass>>();
|
||||
for( int i = 0; i < sortedList.size(); ++i )
|
||||
{
|
||||
Pair<String, KeyClass> entry = sortedList.get( i );
|
||||
if( equalEntries.isEmpty() && i < (sortedList.size() - 1) )
|
||||
{
|
||||
equalEntries.add( entry );
|
||||
}
|
||||
else
|
||||
{
|
||||
Pair<String, KeyClass> previousEntry = equalEntries.get( 0 );
|
||||
if( previousEntry.getLeft().equals( entry.getLeft() ) )
|
||||
{
|
||||
if( i < (sortedList.size() - 1) )
|
||||
{
|
||||
equalEntries.add( entry );
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
equalEntries.add( entry );
|
||||
++i;
|
||||
}
|
||||
}
|
||||
if( equalEntries.size() > 1 )
|
||||
{
|
||||
List<KeyClass> toSubOrder = new Vector<KeyClass>();
|
||||
List<String> DEBUGLIST = new Vector<String>();
|
||||
for( Pair<String, KeyClass> pair : equalEntries )
|
||||
{
|
||||
toSubOrder.add( pair.getRight() );
|
||||
DEBUGLIST.add( pair.getLeft() );
|
||||
}
|
||||
order( colNumbers, currentColumnIndex + 1, 0, toSubOrder.size() - 1, toSubOrder );
|
||||
for( int j = 0; j < toSubOrder.size(); ++j )
|
||||
{
|
||||
sortedList.set( i - toSubOrder.size() + j, new Pair<String, KeyClass>( "", toSubOrder.get( j ) ) );
|
||||
}
|
||||
}
|
||||
equalEntries.clear();
|
||||
if( i < (sortedList.size() - 1) )
|
||||
{
|
||||
equalEntries.add( entry );
|
||||
}
|
||||
}
|
||||
}
|
||||
for( int i = 0; i < sortedList.size(); ++i )
|
||||
{
|
||||
Pair<String, KeyClass> value = sortedList.get( i );
|
||||
order.set( i, value.getRight() );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void addRow( KeyClass key, List<Object> grupo )
|
||||
{
|
||||
if( key != null && grupo != null )
|
||||
{
|
||||
order.add( key );
|
||||
map.put( key, grupo );
|
||||
}
|
||||
}
|
||||
|
||||
public void clear()
|
||||
{
|
||||
order.clear();
|
||||
map.clear();
|
||||
}
|
||||
|
||||
public void deleteRow( int row )
|
||||
{
|
||||
if( row < order.size() )
|
||||
{
|
||||
KeyClass key = order.get( row );
|
||||
order.remove( row );
|
||||
map.remove( key );
|
||||
}
|
||||
}
|
||||
|
||||
public KeyClass getKeyForRow( int row )
|
||||
{
|
||||
KeyClass result = null;
|
||||
if( row < order.size() )
|
||||
{
|
||||
result = order.get( row );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setValueAt( int row, int col, Object obj )
|
||||
{
|
||||
if( row < order.size() )
|
||||
{
|
||||
List<Object> line = map.get( order.get( row ) );
|
||||
if( col < line.size() )
|
||||
{
|
||||
line.add( col, obj );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Object getFirstValue( KeyClass key )
|
||||
{
|
||||
return getValue( key, 0 );
|
||||
}
|
||||
|
||||
public Object getValue( KeyClass key, int i )
|
||||
{
|
||||
Object result = null;
|
||||
if( key != null && order.contains( key ) )
|
||||
{
|
||||
List<Object> row = map.get( key );
|
||||
if( row != null && row.size() > i )
|
||||
{
|
||||
result = row.get( i );
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,100 +0,0 @@
|
||||
package com.evolute.adt;
|
||||
|
||||
public class Pair<CARCLASS extends Object, CDRCLASS extends Object> implements Comparable<Pair<? extends CARCLASS,? extends CDRCLASS>>
|
||||
{
|
||||
|
||||
private final CARCLASS left;
|
||||
|
||||
private final CDRCLASS right;
|
||||
|
||||
public Pair( CARCLASS leftValue, CDRCLASS rightValue )
|
||||
{
|
||||
this.left = leftValue;
|
||||
this.right = rightValue;
|
||||
}
|
||||
|
||||
public CARCLASS getLeft()
|
||||
{
|
||||
return left;
|
||||
}
|
||||
|
||||
public CDRCLASS getRight()
|
||||
{
|
||||
return right;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
boolean result = obj != null;
|
||||
if( result )
|
||||
{
|
||||
if( obj instanceof Pair )
|
||||
{
|
||||
result = ( left == null ? (((Pair) obj).left == null ) : (left.equals(((Pair) obj).left)) );
|
||||
result &= ( right == null ? (((Pair) obj).right == null ) : (right.equals(((Pair) obj).right)) );
|
||||
}
|
||||
else
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Pair<? extends CARCLASS, ? extends CDRCLASS> pair)
|
||||
{
|
||||
int result = compare( left, pair == null ? null : pair.left );
|
||||
if( result == 0 )
|
||||
{
|
||||
result = compare( right, pair == null ? null : pair.right );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private int compare( Object a, Object b )
|
||||
{
|
||||
int result = a == null ? (b == null ? 0 : -1 ) : ( b == null ? 1 : 0 );
|
||||
if( a != null && b != null )
|
||||
{
|
||||
if( a.getClass().equals( b.getClass() ) && (a instanceof Comparable) )
|
||||
{
|
||||
((Comparable)a).compareTo(b);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = compare(a.toString(),b.toString());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
int result = super.hashCode();
|
||||
if( left != null )
|
||||
{
|
||||
result = left.hashCode();
|
||||
if( right != null )
|
||||
{
|
||||
result ^= right.hashCode();
|
||||
}
|
||||
}
|
||||
else if( right != null )
|
||||
{
|
||||
result = right.hashCode();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "<"+left+","+right+">";
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,55 +0,0 @@
|
||||
package com.evolute.adt;
|
||||
|
||||
public class Range
|
||||
{
|
||||
|
||||
private final int start;
|
||||
|
||||
private final int end;
|
||||
|
||||
private final int length;
|
||||
|
||||
public Range( int start, int end )
|
||||
{
|
||||
super();
|
||||
this.start = start;
|
||||
this.end = end;
|
||||
this.length = 1 + ( Math.max( Math.abs( start ), Math.abs( end ) ) - Math.min( Math.abs( start ), Math.abs( end ) ) );
|
||||
}
|
||||
|
||||
public int getStart()
|
||||
{
|
||||
return start;
|
||||
}
|
||||
|
||||
public int getEnd()
|
||||
{
|
||||
return end;
|
||||
}
|
||||
|
||||
/**
|
||||
* The lenght of the range
|
||||
* Examples:
|
||||
* start:end > length
|
||||
* 0:3 > 4
|
||||
* -1:-1 > 1
|
||||
* @return
|
||||
*/
|
||||
public int getLength()
|
||||
{
|
||||
return length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals( Object obj )
|
||||
{
|
||||
return (obj instanceof Range) && ((Range)obj).start == start && ((Range)obj).end == end;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return new Integer( start ).hashCode() ^ new Integer( end ).hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,263 +0,0 @@
|
||||
package com.evolute.adt;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.JTree;
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import javax.swing.tree.DefaultTreeModel;
|
||||
import javax.swing.tree.TreePath;
|
||||
|
||||
import leaf.ui.LeafTree;
|
||||
|
||||
import com.evolute.utils.strings.StringPlainer;
|
||||
|
||||
public class TreeTools
|
||||
{
|
||||
|
||||
private static final Comparator<DefaultMutableTreeNode> comparator = new Comparator<DefaultMutableTreeNode>()
|
||||
{
|
||||
|
||||
private int compareObjects( Object o1, Object o2 )
|
||||
{
|
||||
if( o1 == null )
|
||||
{
|
||||
return o2 == null ? 0 : -1;
|
||||
}
|
||||
else if( (o1 instanceof Comparable ) && (o2 instanceof Comparable))
|
||||
{
|
||||
return ((Comparable)o1).compareTo( (Comparable) o2 );
|
||||
}
|
||||
else
|
||||
{
|
||||
return o2 == null ? 1 : StringPlainer.convertString( o1.toString() ).compareTo( StringPlainer.convertString( o2.toString() ) );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compare( DefaultMutableTreeNode o1, DefaultMutableTreeNode o2 )
|
||||
{
|
||||
if( o1 == null )
|
||||
{
|
||||
return o2 == null ? 0 : -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return o2 == null ? 1 : compareObjects( o1.getUserObject(), o2.getUserObject() );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public static void refreshTree( JTree tree, DefaultMutableTreeNode node, boolean expand )
|
||||
{
|
||||
if( tree instanceof LeafTree )
|
||||
{
|
||||
((LeafTree)tree).saveExpansionState();
|
||||
}
|
||||
((DefaultTreeModel) tree.getModel()).nodeStructureChanged( node );
|
||||
if( expand )
|
||||
{
|
||||
for( int i = 0; i < tree.getRowCount(); ++i)
|
||||
{
|
||||
tree.expandPath( tree.getPathForRow( i ) );
|
||||
}
|
||||
}
|
||||
if( tree instanceof LeafTree )
|
||||
{
|
||||
((LeafTree)tree).loadExpansionState();
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean userObjectExistsOn( Object object, DefaultMutableTreeNode on )
|
||||
{
|
||||
boolean result = false;
|
||||
if( object != null && on != null )
|
||||
{
|
||||
result = object.equals( on.getUserObject() );
|
||||
for( int i = 0; i < on.getChildCount() && !result; ++i )
|
||||
{
|
||||
result |= userObjectExistsOn( object, (DefaultMutableTreeNode) on.getChildAt( i ) );
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static DefaultMutableTreeNode findNodeWithUserObject( Object object, DefaultMutableTreeNode on )
|
||||
{
|
||||
DefaultMutableTreeNode result = null;
|
||||
if( object != null && on != null )
|
||||
{
|
||||
result = object.equals( on.getUserObject() ) ? on : null;
|
||||
for( int i = 0; i < on.getChildCount() && result == null; ++i )
|
||||
{
|
||||
result = object.equals(((DefaultMutableTreeNode) on.getChildAt( i )).getUserObject()) ? (DefaultMutableTreeNode) on.getChildAt( i ) : findNodeWithUserObject( object, (DefaultMutableTreeNode) on.getChildAt( i ) );
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static DefaultMutableTreeNode cloneFullNode( DefaultMutableTreeNode node )
|
||||
{
|
||||
DefaultMutableTreeNode result = (DefaultMutableTreeNode) node.clone();
|
||||
for( int i = 0; i < node.getChildCount(); ++i )
|
||||
{
|
||||
DefaultMutableTreeNode child = (DefaultMutableTreeNode) node.getChildAt( i );
|
||||
result.add( cloneFullNode(child) );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void merge( DefaultMutableTreeNode with, DefaultMutableTreeNode what )
|
||||
{
|
||||
if( what != null )
|
||||
{
|
||||
for( int i = 0; i < what.getChildCount(); ++i )
|
||||
{
|
||||
DefaultMutableTreeNode child = (DefaultMutableTreeNode) what.getChildAt( i );
|
||||
DefaultMutableTreeNode exists = TreeTools.findNodeWithUserObject( child.getUserObject(), with );
|
||||
if( exists == null )
|
||||
{
|
||||
with.add( TreeTools.cloneFullNode( child ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
merge( exists, child );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void removeAll( DefaultMutableTreeNode from, DefaultMutableTreeNode what )
|
||||
{
|
||||
for( int i = 0; i < what.getChildCount(); ++i )
|
||||
{
|
||||
DefaultMutableTreeNode child = (DefaultMutableTreeNode) what.getChildAt( i );
|
||||
removeAll( from, child );
|
||||
}
|
||||
DefaultMutableTreeNode exists = TreeTools.findNodeWithUserObject( what.getUserObject(), from );
|
||||
if( exists != null )
|
||||
{
|
||||
exists.removeFromParent();
|
||||
}
|
||||
}
|
||||
|
||||
public static void remove( DefaultMutableTreeNode from, DefaultMutableTreeNode what )
|
||||
{
|
||||
for( int i = 0; i < what.getChildCount(); ++i )
|
||||
{
|
||||
DefaultMutableTreeNode child = (DefaultMutableTreeNode) what.getChildAt( i );
|
||||
DefaultMutableTreeNode exists = TreeTools.findNodeWithUserObject( child.getUserObject(), from );
|
||||
if( exists != null )
|
||||
{
|
||||
exists.removeFromParent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void removeAllLeafs( DefaultMutableTreeNode from, DefaultMutableTreeNode what )
|
||||
{
|
||||
for( int i = 0; i < what.getChildCount(); ++i )
|
||||
{
|
||||
DefaultMutableTreeNode child = (DefaultMutableTreeNode) what.getChildAt( i );
|
||||
removeAllLeafs( from, child );
|
||||
}
|
||||
DefaultMutableTreeNode exists = TreeTools.findNodeWithUserObject( what.getUserObject(), from );
|
||||
if( exists != null && exists.getChildCount() == 0 )
|
||||
{
|
||||
exists.removeFromParent();
|
||||
}
|
||||
}
|
||||
|
||||
public static void sort( DefaultMutableTreeNode result, boolean useDefaultComparator )
|
||||
{
|
||||
if( result != null )
|
||||
{
|
||||
List<DefaultMutableTreeNode> children = new ArrayList<DefaultMutableTreeNode>(result.getChildCount());
|
||||
for( int i = 0; i < result.getChildCount(); ++i )
|
||||
{
|
||||
children.add( (DefaultMutableTreeNode) result.getChildAt( i ) );
|
||||
}
|
||||
result.removeAllChildren();
|
||||
if( useDefaultComparator )
|
||||
{
|
||||
Collections.sort( children, comparator );
|
||||
}
|
||||
for( DefaultMutableTreeNode child : children )
|
||||
{
|
||||
sort( child );
|
||||
result.add( child );
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void sort( DefaultMutableTreeNode result )
|
||||
{
|
||||
sort( result, true );
|
||||
}
|
||||
|
||||
public static void sort( DefaultMutableTreeNode result, Comparator<DefaultMutableTreeNode> comparator )
|
||||
{
|
||||
if( result != null )
|
||||
{
|
||||
List<DefaultMutableTreeNode> children = new ArrayList<DefaultMutableTreeNode>(result.getChildCount());
|
||||
for( int i = 0; i < result.getChildCount(); ++i )
|
||||
{
|
||||
children.add( (DefaultMutableTreeNode) result.getChildAt( i ) );
|
||||
}
|
||||
result.removeAllChildren();
|
||||
Collections.sort( children, comparator );
|
||||
for( DefaultMutableTreeNode child : children )
|
||||
{
|
||||
sort( child );
|
||||
result.add( child );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static TreePath getPathFor( DefaultMutableTreeNode node )
|
||||
{
|
||||
List<Object> path = getObjectPathFor( node );
|
||||
return new TreePath( path.toArray( new Object[path.size()] ) );
|
||||
}
|
||||
|
||||
private static List<Object> getObjectPathFor( DefaultMutableTreeNode node )
|
||||
{
|
||||
LinkedList<Object> path = new LinkedList<Object>();
|
||||
if( node != null )
|
||||
{
|
||||
if( node.getParent() != null )
|
||||
{
|
||||
path.addAll( getObjectPathFor( (DefaultMutableTreeNode) node.getParent() ) );
|
||||
}
|
||||
path.add( node );
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
private static DefaultMutableTreeNode getRoot( JTree tree )
|
||||
{
|
||||
return (DefaultMutableTreeNode) tree.getModel().getRoot();
|
||||
}
|
||||
|
||||
public static void expandNodeForObject(Object userObject, JTree tree )
|
||||
{
|
||||
Object root = getRoot( tree );
|
||||
if( tree != null && userObject != null && ( root instanceof DefaultMutableTreeNode ) )
|
||||
{
|
||||
DefaultMutableTreeNode found = findNodeWithUserObject(userObject, (DefaultMutableTreeNode) root);
|
||||
if( found != null )
|
||||
{
|
||||
TreePath path = getPathFor( found );
|
||||
if( path != null )
|
||||
{
|
||||
tree.expandPath( path );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
package com.evolute.adt;
|
||||
|
||||
public interface Validator<OBJECT_CLASS extends Object>
|
||||
{
|
||||
|
||||
/**
|
||||
* Tests if given object is valid
|
||||
* @param object
|
||||
* @return
|
||||
*/
|
||||
public boolean isValid(OBJECT_CLASS object);
|
||||
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
package siprp;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Properties;
|
||||
|
||||
import com.evolute.utils.Singleton;
|
||||
import com.evolute.utils.jdo.JDOProvider;
|
||||
|
||||
public class JDOInitializer
|
||||
{
|
||||
|
||||
public void initializeJDO(String url, String user, String password)
|
||||
{
|
||||
Date d = new Date();
|
||||
System.out.println( "INIT: " + d );
|
||||
|
||||
|
||||
Properties jpoxProps;
|
||||
jpoxProps = System.getProperties();//new Properties();
|
||||
// Set the PersistenceManagerFactoryClass to the TJDO class.
|
||||
jpoxProps.setProperty( "javax.jdo.PersistenceManagerFactoryClass",
|
||||
"org.jpox.PersistenceManagerFactoryImpl" );
|
||||
// Set the JDBC driver name.
|
||||
jpoxProps.setProperty( "javax.jdo.option.ConnectionDriverName", (String) Singleton.getInstance( SingletonConstants.LOCAL_DRIVER_NAME ) );
|
||||
jpoxProps.setProperty( "org.jpox.identifier.fullyQualifiedNames", "false" );
|
||||
// props.setProperty("com.triactive.jdo.transactionIsolation",
|
||||
// "read-uncommitted" );
|
||||
|
||||
// Set the connection URL
|
||||
// jpoxProps.setProperty( "javax.jdo.option.ConnectionURL", "jdbc:informix-sqli://192.168.0.3:6666"
|
||||
// + "/apdp_db:informixserver=server" );
|
||||
jpoxProps.setProperty( "javax.jdo.option.ConnectionURL", url );
|
||||
jpoxProps.setProperty( "javax.jdo.option.ConnectionUserName", user );
|
||||
jpoxProps.setProperty( "javax.jdo.option.ConnectionPassword", password );
|
||||
// jpoxProps.setProperty( "javax.jdo.option.IgnoreCache", "true" );
|
||||
// jpoxProps.setProperty( "javax.jdo.option.NonTransactionalRead", "true" );
|
||||
jpoxProps.setProperty( "javax.jdo.option.RetainValues", "true" );
|
||||
|
||||
jpoxProps.setProperty( "org.jpox.autoCreateTables", "false" );
|
||||
jpoxProps.setProperty( "org.jpox.autoCreateSchema", "false" );
|
||||
jpoxProps.setProperty( "org.jpox.autoCreateConstraints", "false" );
|
||||
jpoxProps.setProperty( "org.jpox.validateTables", "false" );
|
||||
jpoxProps.setProperty( "org.jpox.validateConstraints", "false" );
|
||||
jpoxProps.setProperty( "org.jpox.autoStartMechanismMode", "Ignored" );
|
||||
jpoxProps.setProperty( "org.jpox.autoStartMechanism", "None" );
|
||||
|
||||
// jpoxProps.setProperty( "javax.jdo.option.RetainValues", "true" );
|
||||
// jpoxProps.setProperty( "javax.jdo.option.Optimistic", "true" );
|
||||
|
||||
// jpoxProps.setProperty( "org.jpox.identifier.defaultSchemaName", "informix" );
|
||||
jpoxProps.setProperty( "org.jpox.rdbms.CheckExistTablesOrViews", "false" );
|
||||
|
||||
System.setProperty( "org.jpox.catalogName", (String)Singleton.getInstance( SingletonConstants.LOCAL_DB_NAME ) );
|
||||
System.setProperty( "org.jpox.schemaName", "" );
|
||||
|
||||
// PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory( jpoxProps );
|
||||
//// pmf.setOptimistic( true );
|
||||
//System.out.print( "Loading PM: " + new Date() );
|
||||
// // ( ( PersistenceManagerFactoryImpl )pmf ).setTransactionIsolation( Connection.TRANSACTION_READ_UNCOMMITTED );
|
||||
// // Retrieve a PersistenceManager from the PersistenceManagerFactory.
|
||||
// PersistenceManager pm = pmf.getPersistenceManager();
|
||||
// JDOObject.setPersistentManager( pm );
|
||||
// Singleton.setInstance( Singleton.DEFAULT_PERSISTENCE_MANAGER_FACTORY, pmf );
|
||||
// Singleton.setInstance( SingletonConstants.PERSISTENCE_MANAGER, pm );
|
||||
JDOProvider jdoProvider = new JDOProvider( jpoxProps );
|
||||
Singleton.setInstance( Singleton.DEFAULT_JDO_PROVIDER, jdoProvider );
|
||||
System.out.println( "PM done " + new Date() + "JDO: " + jdoProvider );
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,82 @@
|
||||
package siprp;
|
||||
|
||||
import com.evolute.entity.ProviderInterface;
|
||||
import com.evolute.entity.ProviderRegistry;
|
||||
import com.evolute.entity.evo.EvoDataProviderFactory;
|
||||
import com.evolute.entity.utils.ConnectionIdentity;
|
||||
import com.evolute.utils.Singleton;
|
||||
import com.evolute.utils.db.keyretrievers.PostgresqlAutoKeyRetriever;
|
||||
import com.evolute.utils.sql.Insert;
|
||||
|
||||
public class ORMInitializer
|
||||
{
|
||||
|
||||
public void initializeORM(String url, String user, String password)
|
||||
{
|
||||
// Date d = new Date();
|
||||
// System.out.println( "INIT: " + d );
|
||||
//
|
||||
//
|
||||
// Properties jpoxProps;
|
||||
// jpoxProps = System.getProperties();//new Properties();
|
||||
// Set the PersistenceManagerFactoryClass to the TJDO class.
|
||||
// jpoxProps.setProperty( "javax.jdo.PersistenceManagerFactoryClass",
|
||||
// "org.jpox.PersistenceManagerFactoryImpl" );
|
||||
// Set the JDBC driver name.
|
||||
// jpoxProps.setProperty( "javax.jdo.option.ConnectionDriverName", (String) Singleton.getInstance( SingletonConstants.LOCAL_DRIVER_NAME ) );
|
||||
// jpoxProps.setProperty( "org.jpox.identifier.fullyQualifiedNames", "false" );
|
||||
// props.setProperty("com.triactive.jdo.transactionIsolation",
|
||||
// "read-uncommitted" );
|
||||
|
||||
// Set the connection URL
|
||||
// jpoxProps.setProperty( "javax.jdo.option.ConnectionURL", "jdbc:informix-sqli://192.168.0.3:6666"
|
||||
// + "/apdp_db:informixserver=server" );
|
||||
// jpoxProps.setProperty( "javax.jdo.option.ConnectionURL", url );
|
||||
// jpoxProps.setProperty( "javax.jdo.option.ConnectionUserName", user );
|
||||
// jpoxProps.setProperty( "javax.jdo.option.ConnectionPassword", password );
|
||||
// jpoxProps.setProperty( "javax.jdo.option.IgnoreCache", "true" );
|
||||
// jpoxProps.setProperty( "javax.jdo.option.NonTransactionalRead", "true" );
|
||||
// jpoxProps.setProperty( "javax.jdo.option.RetainValues", "true" );
|
||||
//
|
||||
// jpoxProps.setProperty( "org.jpox.autoCreateTables", "false" );
|
||||
// jpoxProps.setProperty( "org.jpox.autoCreateSchema", "false" );
|
||||
// jpoxProps.setProperty( "org.jpox.autoCreateConstraints", "false" );
|
||||
// jpoxProps.setProperty( "org.jpox.validateTables", "false" );
|
||||
// jpoxProps.setProperty( "org.jpox.validateConstraints", "false" );
|
||||
// jpoxProps.setProperty( "org.jpox.autoStartMechanismMode", "Ignored" );
|
||||
// jpoxProps.setProperty( "org.jpox.autoStartMechanism", "None" );
|
||||
|
||||
// jpoxProps.setProperty( "javax.jdo.option.RetainValues", "true" );
|
||||
// jpoxProps.setProperty( "javax.jdo.option.Optimistic", "true" );
|
||||
|
||||
// jpoxProps.setProperty( "org.jpox.identifier.defaultSchemaName", "informix" );
|
||||
// jpoxProps.setProperty( "org.jpox.rdbms.CheckExistTablesOrViews", "false" );
|
||||
//
|
||||
// System.setProperty( "org.jpox.catalogName", (String)Singleton.getInstance( SingletonConstants.LOCAL_DB_NAME ) );
|
||||
// System.setProperty( "org.jpox.schemaName", "" );
|
||||
|
||||
// PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory( jpoxProps );
|
||||
//// pmf.setOptimistic( true );
|
||||
//System.out.print( "Loading PM: " + new Date() );
|
||||
// // ( ( PersistenceManagerFactoryImpl )pmf ).setTransactionIsolation( Connection.TRANSACTION_READ_UNCOMMITTED );
|
||||
// // Retrieve a PersistenceManager from the PersistenceManagerFactory.
|
||||
// PersistenceManager pm = pmf.getPersistenceManager();
|
||||
// JDOObject.setPersistentManager( pm );
|
||||
// Singleton.setInstance( Singleton.DEFAULT_PERSISTENCE_MANAGER_FACTORY, pmf );
|
||||
// Singleton.setInstance( SingletonConstants.PERSISTENCE_MANAGER, pm );
|
||||
// JDOProvider jdoProvider = new JDOProvider( jpoxProps );
|
||||
// Singleton.setInstance( Singleton.DEFAULT_JDO_PROVIDER, jdoProvider );
|
||||
//System.out.println( "PM done " + new Date() + "JDO: " + jdoProvider );
|
||||
|
||||
Insert.setDefaultKeyRetriever( PostgresqlAutoKeyRetriever.RETRIEVER );
|
||||
ProviderRegistry.registerDefaultProviderFactory( new EvoDataProviderFactory() );
|
||||
ConnectionIdentity conn = new ConnectionIdentity( url, user );
|
||||
conn.setPassword( password );
|
||||
ProviderRegistry.registerDefaultConnection( conn );
|
||||
ProviderInterface provider = ProviderRegistry.getDefaultProvider( conn );
|
||||
Singleton.setInstance( Singleton.DEFAULT_OBJECT_PROVIDER, provider );
|
||||
Singleton.setInstance( Singleton.DEFAULT_JDO_PROVIDER, provider );
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,52 +0,0 @@
|
||||
/*
|
||||
* StampSaveHandler.java
|
||||
*
|
||||
* Created on 15 de Marco de 2005, 15:00
|
||||
*/
|
||||
|
||||
package siprp.data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.evolute.utils.jdo.JDOObject;
|
||||
import com.evolute.utils.jdo.JDOOperationHandlerInterface;
|
||||
/**
|
||||
*
|
||||
* @author fpalma
|
||||
*/
|
||||
public class ActualizacaoSaveHandler implements JDOOperationHandlerInterface
|
||||
{
|
||||
public static final ActualizacaoSaveHandler INSTANCE = new ActualizacaoSaveHandler();
|
||||
|
||||
/** Creates a new instance of StampSaveHandler */
|
||||
public ActualizacaoSaveHandler()
|
||||
{
|
||||
}
|
||||
|
||||
public boolean handle(JDOObject object, int operation, int moment) throws Exception
|
||||
{
|
||||
if( !( object instanceof ActualizacaoSaveable ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
switch( operation )
|
||||
{
|
||||
case OP_SAVE:
|
||||
return save( object, moment );
|
||||
|
||||
case OP_DELETE:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean save( JDOObject object, int moment )
|
||||
{
|
||||
if( moment != MOMENT_BEFORE )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
object.set( ActualizacaoSaveable.ACTUALIZACAO, new Date() );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
/*
|
||||
* ActualizacaoSaveable.java
|
||||
*
|
||||
* Created on 15 de Marco de 2005, 15:32
|
||||
*/
|
||||
|
||||
package siprp.data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fpalma
|
||||
*/
|
||||
public interface ActualizacaoSaveable
|
||||
{
|
||||
public static final String ACTUALIZACAO = "actualizacao";
|
||||
}
|
||||
@ -1,187 +0,0 @@
|
||||
/*
|
||||
* Aviso.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 13/Out/2004
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.evolute.utils.jdo.JDOInnerObject;
|
||||
|
||||
public final class Aviso implements JDOInnerObject
|
||||
{
|
||||
private Integer id;
|
||||
private Integer tipo;
|
||||
private Empresa empresa;
|
||||
private Estabelecimento estabelecimento;
|
||||
private Trabalhador trabalhador;
|
||||
private Integer evento_id;
|
||||
private Date data_aviso;
|
||||
private Date data_evento;
|
||||
private String descricao;
|
||||
|
||||
public Aviso()
|
||||
{
|
||||
}
|
||||
|
||||
public Object getField( String fieldName )
|
||||
{
|
||||
if( fieldName == AvisoData.ID )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName == AvisoData.TIPO )
|
||||
{
|
||||
return tipo;
|
||||
}
|
||||
else if( fieldName == AvisoData.EMPRESA )
|
||||
{
|
||||
return empresa;
|
||||
}
|
||||
else if( fieldName == AvisoData.ESTABELECIMENTO )
|
||||
{
|
||||
return estabelecimento;
|
||||
}
|
||||
else if( fieldName == AvisoData.TRABALHADOR )
|
||||
{
|
||||
return trabalhador;
|
||||
}
|
||||
else if( fieldName == AvisoData.EVENTO_ID )
|
||||
{
|
||||
return evento_id;
|
||||
}
|
||||
else if( fieldName == AvisoData.DATA_AVISO )
|
||||
{
|
||||
return data_aviso;
|
||||
}
|
||||
else if( fieldName == AvisoData.DATA_EVENTO )
|
||||
{
|
||||
return data_evento;
|
||||
}
|
||||
else if( fieldName == AvisoData.DESCRICAO )
|
||||
{
|
||||
return descricao;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.ID ) )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.TIPO ) )
|
||||
{
|
||||
return tipo;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.EMPRESA ) )
|
||||
{
|
||||
return empresa;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.ESTABELECIMENTO ) )
|
||||
{
|
||||
return estabelecimento;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.TRABALHADOR ) )
|
||||
{
|
||||
return trabalhador;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.EVENTO_ID ) )
|
||||
{
|
||||
return evento_id;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.DATA_AVISO ) )
|
||||
{
|
||||
return data_aviso;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.DATA_EVENTO ) )
|
||||
{
|
||||
return data_evento;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.DESCRICAO ) )
|
||||
{
|
||||
return descricao;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setField( String fieldName, Object value )
|
||||
{
|
||||
if( fieldName == AvisoData.ID )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == AvisoData.TIPO )
|
||||
{
|
||||
tipo = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == AvisoData.EMPRESA )
|
||||
{
|
||||
empresa = ( Empresa ) value;
|
||||
}
|
||||
else if( fieldName == AvisoData.ESTABELECIMENTO )
|
||||
{
|
||||
estabelecimento = ( Estabelecimento ) value;
|
||||
}
|
||||
else if( fieldName == AvisoData.TRABALHADOR )
|
||||
{
|
||||
trabalhador = ( Trabalhador ) value;
|
||||
}
|
||||
else if( fieldName == AvisoData.EVENTO_ID )
|
||||
{
|
||||
evento_id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == AvisoData.DATA_AVISO )
|
||||
{
|
||||
data_aviso = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == AvisoData.DATA_EVENTO )
|
||||
{
|
||||
data_evento = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == AvisoData.DESCRICAO )
|
||||
{
|
||||
descricao = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.ID ) )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.TIPO ) )
|
||||
{
|
||||
tipo = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.EMPRESA ) )
|
||||
{
|
||||
empresa = ( Empresa ) value;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.ESTABELECIMENTO ) )
|
||||
{
|
||||
estabelecimento = ( Estabelecimento ) value;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.TRABALHADOR ) )
|
||||
{
|
||||
trabalhador = ( Trabalhador ) value;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.EVENTO_ID ) )
|
||||
{
|
||||
evento_id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.DATA_AVISO ) )
|
||||
{
|
||||
data_aviso = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.DATA_EVENTO ) )
|
||||
{
|
||||
data_evento = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( AvisoData.DESCRICAO ) )
|
||||
{
|
||||
descricao = ( String ) value;
|
||||
}
|
||||
}
|
||||
|
||||
public Class getOuterClass()
|
||||
{
|
||||
return AvisoData.class;
|
||||
}
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
/*
|
||||
* AvisoData.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 13/Out/2004
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.evolute.utils.jdo.JDOObject;
|
||||
|
||||
public final class AvisoData extends JDOObject
|
||||
implements AvisoConstants
|
||||
{
|
||||
public static final String ID = "id";
|
||||
public static final String TIPO = "tipo";
|
||||
public static final String EMPRESA = "empresa";
|
||||
public static final String ESTABELECIMENTO = "estabelecimento";
|
||||
public static final String TRABALHADOR = "trabalhador";
|
||||
public static final String EVENTO_ID = "evento_id";
|
||||
public static final String DATA_AVISO = "data_aviso";
|
||||
public static final String DATA_EVENTO = "data_evento";
|
||||
public static final String DESCRICAO = "descricao";
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
TIPO, EMPRESA, ESTABELECIMENTO, TRABALHADOR, EVENTO_ID, DATA_AVISO, DATA_EVENTO,
|
||||
DESCRICAO, };
|
||||
|
||||
|
||||
protected static final String ALL_FIELD_NAMES[] = new String[]{
|
||||
ID, TIPO, EMPRESA, ESTABELECIMENTO, TRABALHADOR, EVENTO_ID, DATA_AVISO, DATA_EVENTO,
|
||||
DESCRICAO, };
|
||||
|
||||
private HashMap dataHash;
|
||||
|
||||
public AvisoData()
|
||||
{
|
||||
dataHash = new HashMap();
|
||||
}
|
||||
|
||||
protected Object innerGet( String fieldName )
|
||||
throws Exception
|
||||
{
|
||||
return dataHash.get( fieldName );
|
||||
}
|
||||
|
||||
protected void innerSet( String fieldName, Object value )
|
||||
throws Exception
|
||||
{
|
||||
dataHash.put( fieldName, value );
|
||||
}
|
||||
|
||||
public String []getFieldNames()
|
||||
{
|
||||
return FIELD_NAMES;
|
||||
}
|
||||
|
||||
protected String []getAllFieldNames()
|
||||
{
|
||||
return ALL_FIELD_NAMES;
|
||||
}
|
||||
|
||||
public Class getInnerClass()
|
||||
{
|
||||
return Aviso.class;
|
||||
}
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
/*
|
||||
* AvisoID.java
|
||||
*
|
||||
* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 13/Out/2004
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import com.evolute.utils.jdo.jpox.IntegerID;
|
||||
|
||||
public final class AvisoID extends IntegerID
|
||||
{
|
||||
public AvisoID()
|
||||
{
|
||||
}
|
||||
|
||||
public AvisoID( String str )
|
||||
{
|
||||
super( str );
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package siprp.data;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import siprp.database.cayenne.providers.MainDAO;
|
||||
|
||||
import com.evolute.entity.evo.EvoDataException;
|
||||
import com.evolute.entity.evo.EvoDataObject;
|
||||
import com.evolute.utils.strings.UnicodeChecker;
|
||||
|
||||
public abstract class BaseObject extends EvoDataObject
|
||||
{
|
||||
|
||||
static
|
||||
{
|
||||
UnicodeChecker.setUseDoubleSlash( true );
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
protected static MainDAO dao = new MainDAO();
|
||||
|
||||
public static final DateFormat DATE_FORMAT = DateFormat.getDateInstance( DateFormat.SHORT, new Locale( "pt", "PT" ) );
|
||||
|
||||
protected static final String isNewMessage = " ";
|
||||
|
||||
@Override
|
||||
protected List fromReference(Class clazz, Integer id, String referingProperty, String... order) throws EvoDataException
|
||||
{
|
||||
List result = new LinkedList();
|
||||
for( Object o : super.fromReference(clazz, id, referingProperty, order) )
|
||||
{
|
||||
Object value = ((EvoDataObject)o).get("deleted_date");
|
||||
if( value == null )
|
||||
{
|
||||
result.add( o );
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,151 +0,0 @@
|
||||
/*
|
||||
* Contacto.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 13/Out/2004
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import com.evolute.utils.jdo.JDOInnerObject;
|
||||
|
||||
public final class Contacto implements JDOInnerObject
|
||||
{
|
||||
private Integer id;
|
||||
private String nome;
|
||||
private String cargo;
|
||||
private String telefone;
|
||||
private String telemovel;
|
||||
private String fax;
|
||||
private String email;
|
||||
|
||||
public Contacto()
|
||||
{
|
||||
}
|
||||
|
||||
public Object getField( String fieldName )
|
||||
{
|
||||
if( fieldName == ContactoData.ID )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName == ContactoData.NOME )
|
||||
{
|
||||
return nome;
|
||||
}
|
||||
else if( fieldName == ContactoData.CARGO )
|
||||
{
|
||||
return cargo;
|
||||
}
|
||||
else if( fieldName == ContactoData.TELEFONE )
|
||||
{
|
||||
return telefone;
|
||||
}
|
||||
else if( fieldName == ContactoData.TELEMOVEL )
|
||||
{
|
||||
return telemovel;
|
||||
}
|
||||
else if( fieldName == ContactoData.FAX )
|
||||
{
|
||||
return fax;
|
||||
}
|
||||
else if( fieldName == ContactoData.EMAIL )
|
||||
{
|
||||
return email;
|
||||
}
|
||||
else if( fieldName.equals( ContactoData.ID ) )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName.equals( ContactoData.NOME ) )
|
||||
{
|
||||
return nome;
|
||||
}
|
||||
else if( fieldName.equals( ContactoData.CARGO ) )
|
||||
{
|
||||
return cargo;
|
||||
}
|
||||
else if( fieldName.equals( ContactoData.TELEFONE ) )
|
||||
{
|
||||
return telefone;
|
||||
}
|
||||
else if( fieldName.equals( ContactoData.TELEMOVEL ) )
|
||||
{
|
||||
return telemovel;
|
||||
}
|
||||
else if( fieldName.equals( ContactoData.FAX ) )
|
||||
{
|
||||
return fax;
|
||||
}
|
||||
else if( fieldName.equals( ContactoData.EMAIL ) )
|
||||
{
|
||||
return email;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setField( String fieldName, Object value )
|
||||
{
|
||||
if( fieldName == ContactoData.ID )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == ContactoData.NOME )
|
||||
{
|
||||
nome = ( String ) value;
|
||||
}
|
||||
else if( fieldName == ContactoData.CARGO )
|
||||
{
|
||||
cargo = ( String ) value;
|
||||
}
|
||||
else if( fieldName == ContactoData.TELEFONE )
|
||||
{
|
||||
telefone = ( String ) value;
|
||||
}
|
||||
else if( fieldName == ContactoData.TELEMOVEL )
|
||||
{
|
||||
telemovel = ( String ) value;
|
||||
}
|
||||
else if( fieldName == ContactoData.FAX )
|
||||
{
|
||||
fax = ( String ) value;
|
||||
}
|
||||
else if( fieldName == ContactoData.EMAIL )
|
||||
{
|
||||
email = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( ContactoData.ID ) )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( ContactoData.NOME ) )
|
||||
{
|
||||
nome = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( ContactoData.CARGO ) )
|
||||
{
|
||||
cargo = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( ContactoData.TELEFONE ) )
|
||||
{
|
||||
telefone = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( ContactoData.TELEMOVEL ) )
|
||||
{
|
||||
telemovel = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( ContactoData.FAX ) )
|
||||
{
|
||||
fax = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( ContactoData.EMAIL ) )
|
||||
{
|
||||
email = ( String ) value;
|
||||
}
|
||||
}
|
||||
|
||||
public Class getOuterClass()
|
||||
{
|
||||
return ContactoData.class;
|
||||
}
|
||||
}
|
||||
@ -1,64 +0,0 @@
|
||||
/*
|
||||
* ContactoData.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 13/Out/2004
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.evolute.utils.jdo.JDOObject;
|
||||
|
||||
public final class ContactoData extends JDOObject
|
||||
{
|
||||
public static final String ID = "id";
|
||||
public static final String NOME = "nome";
|
||||
public static final String CARGO = "cargo";
|
||||
public static final String TELEFONE = "telefone";
|
||||
public static final String TELEMOVEL = "telemovel";
|
||||
public static final String FAX = "fax";
|
||||
public static final String EMAIL = "email";
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
NOME, CARGO, TELEFONE, TELEMOVEL, FAX, EMAIL, };
|
||||
|
||||
|
||||
protected static final String ALL_FIELD_NAMES[] = new String[]{
|
||||
ID, NOME, CARGO, TELEFONE, TELEMOVEL, FAX, EMAIL, };
|
||||
|
||||
private HashMap dataHash;
|
||||
|
||||
public ContactoData()
|
||||
{
|
||||
dataHash = new HashMap();
|
||||
}
|
||||
|
||||
protected Object innerGet( String fieldName )
|
||||
throws Exception
|
||||
{
|
||||
return dataHash.get( fieldName );
|
||||
}
|
||||
|
||||
protected void innerSet( String fieldName, Object value )
|
||||
throws Exception
|
||||
{
|
||||
dataHash.put( fieldName, value );
|
||||
}
|
||||
|
||||
public String []getFieldNames()
|
||||
{
|
||||
return FIELD_NAMES;
|
||||
}
|
||||
|
||||
protected String []getAllFieldNames()
|
||||
{
|
||||
return ALL_FIELD_NAMES;
|
||||
}
|
||||
|
||||
public Class getInnerClass()
|
||||
{
|
||||
return Contacto.class;
|
||||
}
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
/*
|
||||
* ContactoID.java
|
||||
*
|
||||
* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 13/Out/2004
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import com.evolute.utils.jdo.jpox.IntegerID;
|
||||
|
||||
public final class ContactoID extends IntegerID
|
||||
{
|
||||
public ContactoID()
|
||||
{
|
||||
}
|
||||
|
||||
public ContactoID( String str )
|
||||
{
|
||||
super( str );
|
||||
}
|
||||
}
|
||||
@ -1,71 +0,0 @@
|
||||
/*
|
||||
* DeleteHandler.java
|
||||
*
|
||||
* Created on 11 de Outubro de 2004, 16:04
|
||||
*/
|
||||
|
||||
package siprp.data;
|
||||
|
||||
import com.evolute.utils.jdo.JDOObject;
|
||||
import com.evolute.utils.jdo.JDOOperationHandlerInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fpalma
|
||||
*/
|
||||
public class DisableDeleteHandler implements JDOOperationHandlerInterface
|
||||
{
|
||||
public static final DisableDeleteHandler INSTANCE = new DisableDeleteHandler();
|
||||
|
||||
/** Creates a new instance of DeleteHandler */
|
||||
public DisableDeleteHandler()
|
||||
{
|
||||
}
|
||||
|
||||
public boolean handle( JDOObject object, int operation, int moment )
|
||||
throws Exception
|
||||
{
|
||||
if( !( object instanceof DisableDeleteable ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
switch( operation )
|
||||
{
|
||||
case OP_SAVE:
|
||||
return save( object, moment );
|
||||
|
||||
case OP_DELETE:
|
||||
return delete( object, moment );
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean save( JDOObject object, int moment )
|
||||
throws Exception
|
||||
{
|
||||
if( moment != MOMENT_BEFORE )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
String old = (String) object.get( DisableDeleteable.INACTIVO );
|
||||
if( old == null )
|
||||
{
|
||||
object.set( DisableDeleteable.INACTIVO, "n" );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean delete( JDOObject object, int moment )
|
||||
throws Exception
|
||||
{
|
||||
if( moment != MOMENT_INSTEAD )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
object.set( DisableDeleteable.INACTIVO, "y" );
|
||||
object.save();
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
/*
|
||||
* DisableDeleteable.java
|
||||
*
|
||||
* Created on 11 de Outubro de 2004, 16:09
|
||||
*/
|
||||
|
||||
package siprp.data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fpalma
|
||||
*/
|
||||
public interface DisableDeleteable
|
||||
{
|
||||
public static final String INACTIVO = "inactivo";
|
||||
}
|
||||
@ -1,748 +0,0 @@
|
||||
/*
|
||||
* Empresa.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 17/Mai/2006
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.evolute.utils.jdo.JDOInnerObject;
|
||||
|
||||
public final class Empresa implements JDOInnerObject
|
||||
{
|
||||
private Integer id;
|
||||
private String designacao_social;
|
||||
private String designacao_social_plain;
|
||||
private Integer servico_saude_tipo;
|
||||
private String servico_saude_designacao;
|
||||
private Integer servico_higiene_tipo;
|
||||
private String servico_higiene_designacao;
|
||||
private String morada;
|
||||
private String codigo_postal;
|
||||
private String localidade;
|
||||
private String distrito;
|
||||
private String concelho;
|
||||
private Date data_proposta;
|
||||
private Date data_aceitacao;
|
||||
private Date inicio_contrato;
|
||||
private Integer duracao;
|
||||
private Date data_cancelamento;
|
||||
private String perfil_1;
|
||||
private String perfil_2;
|
||||
private Date data_envio_contrato;
|
||||
private Date data_recepcao_contrato;
|
||||
private Date data_envio_idict;
|
||||
private Date data_relatorio_anual;
|
||||
private String codigo_1;
|
||||
private String codigo_2;
|
||||
private String codigo_3;
|
||||
private String cae;
|
||||
private String actividade;
|
||||
private String contribuinte;
|
||||
private String seguranca_social;
|
||||
private Double preco_higiene;
|
||||
private Double preco_medicina;
|
||||
private String periodicidade;
|
||||
private Contacto contacto_1;
|
||||
private Contacto contacto_2;
|
||||
private Integer servicos;
|
||||
private String inactivo;
|
||||
private Date actualizacao;
|
||||
private String a_consultas;
|
||||
private String a_exames;
|
||||
private String b_consultas;
|
||||
private String b_exames;
|
||||
|
||||
public Empresa()
|
||||
{
|
||||
}
|
||||
|
||||
public Object getField( String fieldName )
|
||||
{
|
||||
if( fieldName == EmpresaData.ID )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DESIGNACAO_SOCIAL )
|
||||
{
|
||||
return designacao_social;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DESIGNACAO_SOCIAL_PLAIN )
|
||||
{
|
||||
return designacao_social_plain;
|
||||
}
|
||||
else if( fieldName == EmpresaData.SERVICO_SAUDE_TIPO )
|
||||
{
|
||||
return servico_saude_tipo;
|
||||
}
|
||||
else if( fieldName == EmpresaData.SERVICO_SAUDE_DESIGNACAO )
|
||||
{
|
||||
return servico_saude_designacao;
|
||||
}
|
||||
else if( fieldName == EmpresaData.SERVICO_HIGIENE_TIPO )
|
||||
{
|
||||
return servico_higiene_tipo;
|
||||
}
|
||||
else if( fieldName == EmpresaData.SERVICO_HIGIENE_DESIGNACAO )
|
||||
{
|
||||
return servico_higiene_designacao;
|
||||
}
|
||||
else if( fieldName == EmpresaData.MORADA )
|
||||
{
|
||||
return morada;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CODIGO_POSTAL )
|
||||
{
|
||||
return codigo_postal;
|
||||
}
|
||||
else if( fieldName == EmpresaData.LOCALIDADE )
|
||||
{
|
||||
return localidade;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DISTRITO )
|
||||
{
|
||||
return distrito;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CONCELHO )
|
||||
{
|
||||
return concelho;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DATA_PROPOSTA )
|
||||
{
|
||||
return data_proposta;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DATA_ACEITACAO )
|
||||
{
|
||||
return data_aceitacao;
|
||||
}
|
||||
else if( fieldName == EmpresaData.INICIO_CONTRATO )
|
||||
{
|
||||
return inicio_contrato;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DURACAO )
|
||||
{
|
||||
return duracao;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DATA_CANCELAMENTO )
|
||||
{
|
||||
return data_cancelamento;
|
||||
}
|
||||
else if( fieldName == EmpresaData.PERFIL_1 )
|
||||
{
|
||||
return perfil_1;
|
||||
}
|
||||
else if( fieldName == EmpresaData.PERFIL_2 )
|
||||
{
|
||||
return perfil_2;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DATA_ENVIO_CONTRATO )
|
||||
{
|
||||
return data_envio_contrato;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DATA_RECEPCAO_CONTRATO )
|
||||
{
|
||||
return data_recepcao_contrato;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DATA_ENVIO_IDICT )
|
||||
{
|
||||
return data_envio_idict;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DATA_RELATORIO_ANUAL )
|
||||
{
|
||||
return data_relatorio_anual;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CODIGO_1 )
|
||||
{
|
||||
return codigo_1;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CODIGO_2 )
|
||||
{
|
||||
return codigo_2;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CODIGO_3 )
|
||||
{
|
||||
return codigo_3;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CAE )
|
||||
{
|
||||
return cae;
|
||||
}
|
||||
else if( fieldName == EmpresaData.ACTIVIDADE )
|
||||
{
|
||||
return actividade;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CONTRIBUINTE )
|
||||
{
|
||||
return contribuinte;
|
||||
}
|
||||
else if( fieldName == EmpresaData.SEGURANCA_SOCIAL )
|
||||
{
|
||||
return seguranca_social;
|
||||
}
|
||||
else if( fieldName == EmpresaData.PRECO_HIGIENE )
|
||||
{
|
||||
return preco_higiene;
|
||||
}
|
||||
else if( fieldName == EmpresaData.PRECO_MEDICINA )
|
||||
{
|
||||
return preco_medicina;
|
||||
}
|
||||
else if( fieldName == EmpresaData.PERIODICIDADE )
|
||||
{
|
||||
return periodicidade;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CONTACTO_1 )
|
||||
{
|
||||
return contacto_1;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CONTACTO_2 )
|
||||
{
|
||||
return contacto_2;
|
||||
}
|
||||
else if( fieldName == EmpresaData.SERVICOS )
|
||||
{
|
||||
return servicos;
|
||||
}
|
||||
else if( fieldName == EmpresaData.INACTIVO )
|
||||
{
|
||||
return inactivo;
|
||||
}
|
||||
else if( fieldName == EmpresaData.ACTUALIZACAO )
|
||||
{
|
||||
return actualizacao;
|
||||
}
|
||||
else if( fieldName == EmpresaData.A_CONSULTAS )
|
||||
{
|
||||
return a_consultas;
|
||||
}
|
||||
else if( fieldName == EmpresaData.A_EXAMES )
|
||||
{
|
||||
return a_exames;
|
||||
}
|
||||
else if( fieldName == EmpresaData.B_CONSULTAS )
|
||||
{
|
||||
return b_consultas;
|
||||
}
|
||||
else if( fieldName == EmpresaData.B_EXAMES )
|
||||
{
|
||||
return b_exames;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.ID ) )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DESIGNACAO_SOCIAL ) )
|
||||
{
|
||||
return designacao_social;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DESIGNACAO_SOCIAL_PLAIN ) )
|
||||
{
|
||||
return designacao_social_plain;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.SERVICO_SAUDE_TIPO ) )
|
||||
{
|
||||
return servico_saude_tipo;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.SERVICO_SAUDE_DESIGNACAO ) )
|
||||
{
|
||||
return servico_saude_designacao;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.SERVICO_HIGIENE_TIPO ) )
|
||||
{
|
||||
return servico_higiene_tipo;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.SERVICO_HIGIENE_DESIGNACAO ) )
|
||||
{
|
||||
return servico_higiene_designacao;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.MORADA ) )
|
||||
{
|
||||
return morada;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CODIGO_POSTAL ) )
|
||||
{
|
||||
return codigo_postal;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.LOCALIDADE ) )
|
||||
{
|
||||
return localidade;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DISTRITO ) )
|
||||
{
|
||||
return distrito;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CONCELHO ) )
|
||||
{
|
||||
return concelho;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DATA_PROPOSTA ) )
|
||||
{
|
||||
return data_proposta;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DATA_ACEITACAO ) )
|
||||
{
|
||||
return data_aceitacao;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.INICIO_CONTRATO ) )
|
||||
{
|
||||
return inicio_contrato;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DURACAO ) )
|
||||
{
|
||||
return duracao;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DATA_CANCELAMENTO ) )
|
||||
{
|
||||
return data_cancelamento;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.PERFIL_1 ) )
|
||||
{
|
||||
return perfil_1;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.PERFIL_2 ) )
|
||||
{
|
||||
return perfil_2;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DATA_ENVIO_CONTRATO ) )
|
||||
{
|
||||
return data_envio_contrato;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DATA_RECEPCAO_CONTRATO ) )
|
||||
{
|
||||
return data_recepcao_contrato;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DATA_ENVIO_IDICT ) )
|
||||
{
|
||||
return data_envio_idict;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DATA_RELATORIO_ANUAL ) )
|
||||
{
|
||||
return data_relatorio_anual;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CODIGO_1 ) )
|
||||
{
|
||||
return codigo_1;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CODIGO_2 ) )
|
||||
{
|
||||
return codigo_2;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CODIGO_3 ) )
|
||||
{
|
||||
return codigo_3;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CAE ) )
|
||||
{
|
||||
return cae;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.ACTIVIDADE ) )
|
||||
{
|
||||
return actividade;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CONTRIBUINTE ) )
|
||||
{
|
||||
return contribuinte;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.SEGURANCA_SOCIAL ) )
|
||||
{
|
||||
return seguranca_social;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.PRECO_HIGIENE ) )
|
||||
{
|
||||
return preco_higiene;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.PRECO_MEDICINA ) )
|
||||
{
|
||||
return preco_medicina;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.PERIODICIDADE ) )
|
||||
{
|
||||
return periodicidade;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CONTACTO_1 ) )
|
||||
{
|
||||
return contacto_1;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CONTACTO_2 ) )
|
||||
{
|
||||
return contacto_2;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.SERVICOS ) )
|
||||
{
|
||||
return servicos;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.INACTIVO ) )
|
||||
{
|
||||
return inactivo;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.ACTUALIZACAO ) )
|
||||
{
|
||||
return actualizacao;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.A_CONSULTAS ) )
|
||||
{
|
||||
return a_consultas;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.A_EXAMES ) )
|
||||
{
|
||||
return a_exames;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.B_CONSULTAS ) )
|
||||
{
|
||||
return b_consultas;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.B_EXAMES ) )
|
||||
{
|
||||
return b_exames;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setField( String fieldName, Object value )
|
||||
{
|
||||
if( fieldName == EmpresaData.ID )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DESIGNACAO_SOCIAL )
|
||||
{
|
||||
designacao_social = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DESIGNACAO_SOCIAL_PLAIN )
|
||||
{
|
||||
designacao_social_plain = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.SERVICO_SAUDE_TIPO )
|
||||
{
|
||||
servico_saude_tipo = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.SERVICO_SAUDE_DESIGNACAO )
|
||||
{
|
||||
servico_saude_designacao = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.SERVICO_HIGIENE_TIPO )
|
||||
{
|
||||
servico_higiene_tipo = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.SERVICO_HIGIENE_DESIGNACAO )
|
||||
{
|
||||
servico_higiene_designacao = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.MORADA )
|
||||
{
|
||||
morada = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CODIGO_POSTAL )
|
||||
{
|
||||
codigo_postal = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.LOCALIDADE )
|
||||
{
|
||||
localidade = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DISTRITO )
|
||||
{
|
||||
distrito = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CONCELHO )
|
||||
{
|
||||
concelho = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DATA_PROPOSTA )
|
||||
{
|
||||
data_proposta = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DATA_ACEITACAO )
|
||||
{
|
||||
data_aceitacao = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.INICIO_CONTRATO )
|
||||
{
|
||||
inicio_contrato = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DURACAO )
|
||||
{
|
||||
duracao = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DATA_CANCELAMENTO )
|
||||
{
|
||||
data_cancelamento = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.PERFIL_1 )
|
||||
{
|
||||
perfil_1 = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.PERFIL_2 )
|
||||
{
|
||||
perfil_2 = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DATA_ENVIO_CONTRATO )
|
||||
{
|
||||
data_envio_contrato = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DATA_RECEPCAO_CONTRATO )
|
||||
{
|
||||
data_recepcao_contrato = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DATA_ENVIO_IDICT )
|
||||
{
|
||||
data_envio_idict = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.DATA_RELATORIO_ANUAL )
|
||||
{
|
||||
data_relatorio_anual = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CODIGO_1 )
|
||||
{
|
||||
codigo_1 = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CODIGO_2 )
|
||||
{
|
||||
codigo_2 = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CODIGO_3 )
|
||||
{
|
||||
codigo_3 = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CAE )
|
||||
{
|
||||
cae = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.ACTIVIDADE )
|
||||
{
|
||||
actividade = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CONTRIBUINTE )
|
||||
{
|
||||
contribuinte = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.SEGURANCA_SOCIAL )
|
||||
{
|
||||
seguranca_social = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.PRECO_HIGIENE )
|
||||
{
|
||||
preco_higiene = ( Double ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.PRECO_MEDICINA )
|
||||
{
|
||||
preco_medicina = ( Double ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.PERIODICIDADE )
|
||||
{
|
||||
periodicidade = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CONTACTO_1 )
|
||||
{
|
||||
contacto_1 = ( Contacto ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.CONTACTO_2 )
|
||||
{
|
||||
contacto_2 = ( Contacto ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.SERVICOS )
|
||||
{
|
||||
servicos = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.INACTIVO )
|
||||
{
|
||||
inactivo = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.ACTUALIZACAO )
|
||||
{
|
||||
actualizacao = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.A_CONSULTAS )
|
||||
{
|
||||
a_consultas = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.A_EXAMES )
|
||||
{
|
||||
a_exames = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.B_CONSULTAS )
|
||||
{
|
||||
b_consultas = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EmpresaData.B_EXAMES )
|
||||
{
|
||||
b_exames = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.ID ) )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DESIGNACAO_SOCIAL ) )
|
||||
{
|
||||
designacao_social = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DESIGNACAO_SOCIAL_PLAIN ) )
|
||||
{
|
||||
designacao_social_plain = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.SERVICO_SAUDE_TIPO ) )
|
||||
{
|
||||
servico_saude_tipo = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.SERVICO_SAUDE_DESIGNACAO ) )
|
||||
{
|
||||
servico_saude_designacao = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.SERVICO_HIGIENE_TIPO ) )
|
||||
{
|
||||
servico_higiene_tipo = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.SERVICO_HIGIENE_DESIGNACAO ) )
|
||||
{
|
||||
servico_higiene_designacao = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.MORADA ) )
|
||||
{
|
||||
morada = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CODIGO_POSTAL ) )
|
||||
{
|
||||
codigo_postal = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.LOCALIDADE ) )
|
||||
{
|
||||
localidade = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DISTRITO ) )
|
||||
{
|
||||
distrito = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CONCELHO ) )
|
||||
{
|
||||
concelho = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DATA_PROPOSTA ) )
|
||||
{
|
||||
data_proposta = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DATA_ACEITACAO ) )
|
||||
{
|
||||
data_aceitacao = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.INICIO_CONTRATO ) )
|
||||
{
|
||||
inicio_contrato = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DURACAO ) )
|
||||
{
|
||||
duracao = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DATA_CANCELAMENTO ) )
|
||||
{
|
||||
data_cancelamento = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.PERFIL_1 ) )
|
||||
{
|
||||
perfil_1 = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.PERFIL_2 ) )
|
||||
{
|
||||
perfil_2 = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DATA_ENVIO_CONTRATO ) )
|
||||
{
|
||||
data_envio_contrato = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DATA_RECEPCAO_CONTRATO ) )
|
||||
{
|
||||
data_recepcao_contrato = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DATA_ENVIO_IDICT ) )
|
||||
{
|
||||
data_envio_idict = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.DATA_RELATORIO_ANUAL ) )
|
||||
{
|
||||
data_relatorio_anual = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CODIGO_1 ) )
|
||||
{
|
||||
codigo_1 = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CODIGO_2 ) )
|
||||
{
|
||||
codigo_2 = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CODIGO_3 ) )
|
||||
{
|
||||
codigo_3 = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CAE ) )
|
||||
{
|
||||
cae = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.ACTIVIDADE ) )
|
||||
{
|
||||
actividade = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CONTRIBUINTE ) )
|
||||
{
|
||||
contribuinte = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.SEGURANCA_SOCIAL ) )
|
||||
{
|
||||
seguranca_social = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.PRECO_HIGIENE ) )
|
||||
{
|
||||
preco_higiene = ( Double ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.PRECO_MEDICINA ) )
|
||||
{
|
||||
preco_medicina = ( Double ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.PERIODICIDADE ) )
|
||||
{
|
||||
periodicidade = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CONTACTO_1 ) )
|
||||
{
|
||||
contacto_1 = ( Contacto ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.CONTACTO_2 ) )
|
||||
{
|
||||
contacto_2 = ( Contacto ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.SERVICOS ) )
|
||||
{
|
||||
servicos = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.INACTIVO ) )
|
||||
{
|
||||
inactivo = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.ACTUALIZACAO ) )
|
||||
{
|
||||
actualizacao = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.A_CONSULTAS ) )
|
||||
{
|
||||
a_consultas = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.A_EXAMES ) )
|
||||
{
|
||||
a_exames = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.B_CONSULTAS ) )
|
||||
{
|
||||
b_consultas = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EmpresaData.B_EXAMES ) )
|
||||
{
|
||||
b_exames = ( String ) value;
|
||||
}
|
||||
}
|
||||
|
||||
public Class getOuterClass()
|
||||
{
|
||||
return EmpresaData.class;
|
||||
}
|
||||
}
|
||||
@ -1,115 +0,0 @@
|
||||
/*
|
||||
* EmpresaData.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 17/Mai/2006
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.evolute.utils.jdo.JDOObject;
|
||||
|
||||
public final class EmpresaData extends JDOObject
|
||||
implements DisableDeleteable, ActualizacaoSaveable
|
||||
{
|
||||
public static final String ID = "id";
|
||||
public static final String DESIGNACAO_SOCIAL = "designacao_social";
|
||||
public static final String DESIGNACAO_SOCIAL_PLAIN = "designacao_social_plain";
|
||||
public static final String SERVICO_SAUDE_TIPO = "servico_saude_tipo";
|
||||
public static final String SERVICO_SAUDE_DESIGNACAO = "servico_saude_designacao";
|
||||
public static final String SERVICO_HIGIENE_TIPO = "servico_higiene_tipo";
|
||||
public static final String SERVICO_HIGIENE_DESIGNACAO = "servico_higiene_designacao";
|
||||
public static final String MORADA = "morada";
|
||||
public static final String CODIGO_POSTAL = "codigo_postal";
|
||||
public static final String LOCALIDADE = "localidade";
|
||||
public static final String DISTRITO = "distrito";
|
||||
public static final String CONCELHO = "concelho";
|
||||
public static final String DATA_PROPOSTA = "data_proposta";
|
||||
public static final String DATA_ACEITACAO = "data_aceitacao";
|
||||
public static final String INICIO_CONTRATO = "inicio_contrato";
|
||||
public static final String DURACAO = "duracao";
|
||||
public static final String DATA_CANCELAMENTO = "data_cancelamento";
|
||||
public static final String PERFIL_1 = "perfil_1";
|
||||
public static final String PERFIL_2 = "perfil_2";
|
||||
public static final String DATA_ENVIO_CONTRATO = "data_envio_contrato";
|
||||
public static final String DATA_RECEPCAO_CONTRATO = "data_recepcao_contrato";
|
||||
public static final String DATA_ENVIO_IDICT = "data_envio_idict";
|
||||
public static final String DATA_RELATORIO_ANUAL = "data_relatorio_anual";
|
||||
public static final String CODIGO_1 = "codigo_1";
|
||||
public static final String CODIGO_2 = "codigo_2";
|
||||
public static final String CODIGO_3 = "codigo_3";
|
||||
public static final String CAE = "cae";
|
||||
public static final String ACTIVIDADE = "actividade";
|
||||
public static final String CONTRIBUINTE = "contribuinte";
|
||||
public static final String SEGURANCA_SOCIAL = "seguranca_social";
|
||||
public static final String PRECO_HIGIENE = "preco_higiene";
|
||||
public static final String PRECO_MEDICINA = "preco_medicina";
|
||||
public static final String PERIODICIDADE = "periodicidade";
|
||||
public static final String CONTACTO_1 = "contacto_1";
|
||||
public static final String CONTACTO_2 = "contacto_2";
|
||||
public static final String SERVICOS = "servicos";
|
||||
public static final String INACTIVO = "inactivo";
|
||||
public static final String ACTUALIZACAO = "actualizacao";
|
||||
public static final String A_CONSULTAS = "a_consultas";
|
||||
public static final String A_EXAMES = "a_exames";
|
||||
public static final String B_CONSULTAS = "b_consultas";
|
||||
public static final String B_EXAMES = "b_exames";
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
DESIGNACAO_SOCIAL, DESIGNACAO_SOCIAL_PLAIN, SERVICO_SAUDE_TIPO,
|
||||
SERVICO_SAUDE_DESIGNACAO, SERVICO_HIGIENE_TIPO, SERVICO_HIGIENE_DESIGNACAO,
|
||||
MORADA, CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, DATA_PROPOSTA,
|
||||
DATA_ACEITACAO, INICIO_CONTRATO, DURACAO, DATA_CANCELAMENTO, PERFIL_1, PERFIL_2,
|
||||
DATA_ENVIO_CONTRATO, DATA_RECEPCAO_CONTRATO, DATA_ENVIO_IDICT,
|
||||
DATA_RELATORIO_ANUAL, CODIGO_1, CODIGO_2, CODIGO_3, CAE, ACTIVIDADE, CONTRIBUINTE,
|
||||
SEGURANCA_SOCIAL, PRECO_HIGIENE, PRECO_MEDICINA, PERIODICIDADE, CONTACTO_1,
|
||||
CONTACTO_2, SERVICOS, A_CONSULTAS, A_EXAMES, B_CONSULTAS, B_EXAMES, };
|
||||
|
||||
|
||||
protected static final String ALL_FIELD_NAMES[] = new String[]{
|
||||
ID, DESIGNACAO_SOCIAL, DESIGNACAO_SOCIAL_PLAIN, SERVICO_SAUDE_TIPO,
|
||||
SERVICO_SAUDE_DESIGNACAO, SERVICO_HIGIENE_TIPO, SERVICO_HIGIENE_DESIGNACAO,
|
||||
MORADA, CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, DATA_PROPOSTA,
|
||||
DATA_ACEITACAO, INICIO_CONTRATO, DURACAO, DATA_CANCELAMENTO, PERFIL_1, PERFIL_2,
|
||||
DATA_ENVIO_CONTRATO, DATA_RECEPCAO_CONTRATO, DATA_ENVIO_IDICT,
|
||||
DATA_RELATORIO_ANUAL, CODIGO_1, CODIGO_2, CODIGO_3, CAE, ACTIVIDADE, CONTRIBUINTE,
|
||||
SEGURANCA_SOCIAL, PRECO_HIGIENE, PRECO_MEDICINA, PERIODICIDADE, CONTACTO_1,
|
||||
CONTACTO_2, SERVICOS, INACTIVO, ACTUALIZACAO, A_CONSULTAS, A_EXAMES, B_CONSULTAS,
|
||||
B_EXAMES, };
|
||||
|
||||
private HashMap dataHash;
|
||||
|
||||
public EmpresaData()
|
||||
{
|
||||
dataHash = new HashMap();
|
||||
}
|
||||
|
||||
protected Object innerGet( String fieldName )
|
||||
throws Exception
|
||||
{
|
||||
return dataHash.get( fieldName );
|
||||
}
|
||||
|
||||
protected void innerSet( String fieldName, Object value )
|
||||
throws Exception
|
||||
{
|
||||
dataHash.put( fieldName, value );
|
||||
}
|
||||
|
||||
public String []getFieldNames()
|
||||
{
|
||||
return FIELD_NAMES;
|
||||
}
|
||||
|
||||
protected String []getAllFieldNames()
|
||||
{
|
||||
return ALL_FIELD_NAMES;
|
||||
}
|
||||
|
||||
public Class getInnerClass()
|
||||
{
|
||||
return Empresa.class;
|
||||
}
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
/*
|
||||
* EmpresaID.java
|
||||
*
|
||||
* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 17/Mai/2006
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.evolute.utils.jdo.jpox.IntegerID;
|
||||
|
||||
public final class EmpresaID extends IntegerID
|
||||
implements Serializable
|
||||
{
|
||||
public EmpresaID()
|
||||
{
|
||||
}
|
||||
|
||||
public EmpresaID( String str )
|
||||
{
|
||||
super( str );
|
||||
}
|
||||
}
|
||||
@ -1,255 +0,0 @@
|
||||
/*
|
||||
* Estabelecimento.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 24/Nov/2005
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.evolute.utils.jdo.JDOInnerObject;
|
||||
|
||||
public final class Estabelecimento implements JDOInnerObject
|
||||
{
|
||||
private Integer id;
|
||||
private String nome;
|
||||
private String nome_plain;
|
||||
private String morada;
|
||||
private String codigo_postal;
|
||||
private String localidade;
|
||||
private String historico;
|
||||
private Empresa empresa;
|
||||
private Contacto contacto;
|
||||
private String inactivo;
|
||||
private Date actualizacao;
|
||||
private Integer prestador_consulta_id;
|
||||
private Integer prestador_ecds_id;
|
||||
|
||||
public Estabelecimento()
|
||||
{
|
||||
}
|
||||
|
||||
public Object getField( String fieldName )
|
||||
{
|
||||
if( fieldName == EstabelecimentoData.ID )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.NOME )
|
||||
{
|
||||
return nome;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.NOME_PLAIN )
|
||||
{
|
||||
return nome_plain;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.MORADA )
|
||||
{
|
||||
return morada;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.CODIGO_POSTAL )
|
||||
{
|
||||
return codigo_postal;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.LOCALIDADE )
|
||||
{
|
||||
return localidade;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.HISTORICO )
|
||||
{
|
||||
return historico;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.EMPRESA )
|
||||
{
|
||||
return empresa;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.CONTACTO )
|
||||
{
|
||||
return contacto;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.INACTIVO )
|
||||
{
|
||||
return inactivo;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.ACTUALIZACAO )
|
||||
{
|
||||
return actualizacao;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.PRESTADOR_CONSULTA_ID )
|
||||
{
|
||||
return prestador_consulta_id;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.PRESTADOR_ECDS_ID )
|
||||
{
|
||||
return prestador_ecds_id;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.ID ) )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.NOME ) )
|
||||
{
|
||||
return nome;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.NOME_PLAIN ) )
|
||||
{
|
||||
return nome_plain;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.MORADA ) )
|
||||
{
|
||||
return morada;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.CODIGO_POSTAL ) )
|
||||
{
|
||||
return codigo_postal;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.LOCALIDADE ) )
|
||||
{
|
||||
return localidade;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.HISTORICO ) )
|
||||
{
|
||||
return historico;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.EMPRESA ) )
|
||||
{
|
||||
return empresa;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.CONTACTO ) )
|
||||
{
|
||||
return contacto;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.INACTIVO ) )
|
||||
{
|
||||
return inactivo;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.ACTUALIZACAO ) )
|
||||
{
|
||||
return actualizacao;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.PRESTADOR_CONSULTA_ID ) )
|
||||
{
|
||||
return prestador_consulta_id;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.PRESTADOR_ECDS_ID ) )
|
||||
{
|
||||
return prestador_ecds_id;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setField( String fieldName, Object value )
|
||||
{
|
||||
if( fieldName == EstabelecimentoData.ID )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.NOME )
|
||||
{
|
||||
nome = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.NOME_PLAIN )
|
||||
{
|
||||
nome_plain = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.MORADA )
|
||||
{
|
||||
morada = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.CODIGO_POSTAL )
|
||||
{
|
||||
codigo_postal = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.LOCALIDADE )
|
||||
{
|
||||
localidade = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.HISTORICO )
|
||||
{
|
||||
historico = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.EMPRESA )
|
||||
{
|
||||
empresa = ( Empresa ) value;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.CONTACTO )
|
||||
{
|
||||
contacto = ( Contacto ) value;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.INACTIVO )
|
||||
{
|
||||
inactivo = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.ACTUALIZACAO )
|
||||
{
|
||||
actualizacao = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.PRESTADOR_CONSULTA_ID )
|
||||
{
|
||||
prestador_consulta_id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == EstabelecimentoData.PRESTADOR_ECDS_ID )
|
||||
{
|
||||
prestador_ecds_id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.ID ) )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.NOME ) )
|
||||
{
|
||||
nome = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.NOME_PLAIN ) )
|
||||
{
|
||||
nome_plain = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.MORADA ) )
|
||||
{
|
||||
morada = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.CODIGO_POSTAL ) )
|
||||
{
|
||||
codigo_postal = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.LOCALIDADE ) )
|
||||
{
|
||||
localidade = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.HISTORICO ) )
|
||||
{
|
||||
historico = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.EMPRESA ) )
|
||||
{
|
||||
empresa = ( Empresa ) value;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.CONTACTO ) )
|
||||
{
|
||||
contacto = ( Contacto ) value;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.INACTIVO ) )
|
||||
{
|
||||
inactivo = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.ACTUALIZACAO ) )
|
||||
{
|
||||
actualizacao = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.PRESTADOR_CONSULTA_ID ) )
|
||||
{
|
||||
prestador_consulta_id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( EstabelecimentoData.PRESTADOR_ECDS_ID ) )
|
||||
{
|
||||
prestador_ecds_id = ( Integer ) value;
|
||||
}
|
||||
}
|
||||
|
||||
public Class getOuterClass()
|
||||
{
|
||||
return EstabelecimentoData.class;
|
||||
}
|
||||
}
|
||||
@ -1,72 +0,0 @@
|
||||
/*
|
||||
* EstabelecimentoData.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 24/Nov/2005
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.evolute.utils.jdo.JDOObject;
|
||||
|
||||
public final class EstabelecimentoData extends JDOObject
|
||||
implements DisableDeleteable, ActualizacaoSaveable
|
||||
{
|
||||
public static final String ID = "id";
|
||||
public static final String NOME = "nome";
|
||||
public static final String NOME_PLAIN = "nome_plain";
|
||||
public static final String MORADA = "morada";
|
||||
public static final String CODIGO_POSTAL = "codigo_postal";
|
||||
public static final String LOCALIDADE = "localidade";
|
||||
public static final String HISTORICO = "historico";
|
||||
public static final String EMPRESA = "empresa";
|
||||
public static final String CONTACTO = "contacto";
|
||||
public static final String INACTIVO = "inactivo";
|
||||
public static final String ACTUALIZACAO = "actualizacao";
|
||||
public static final String PRESTADOR_CONSULTA_ID = "prestador_consulta_id";
|
||||
public static final String PRESTADOR_ECDS_ID = "prestador_ecds_id";
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
NOME, NOME_PLAIN, MORADA, CODIGO_POSTAL, LOCALIDADE, HISTORICO, EMPRESA, CONTACTO, PRESTADOR_CONSULTA_ID, PRESTADOR_ECDS_ID };
|
||||
|
||||
|
||||
protected static final String ALL_FIELD_NAMES[] = new String[]{
|
||||
ID, NOME, NOME_PLAIN, MORADA, CODIGO_POSTAL, LOCALIDADE, HISTORICO, EMPRESA, CONTACTO,
|
||||
PRESTADOR_CONSULTA_ID, PRESTADOR_ECDS_ID, INACTIVO, ACTUALIZACAO, };
|
||||
|
||||
private HashMap dataHash;
|
||||
|
||||
public EstabelecimentoData()
|
||||
{
|
||||
dataHash = new HashMap();
|
||||
}
|
||||
|
||||
protected Object innerGet( String fieldName )
|
||||
throws Exception
|
||||
{
|
||||
return dataHash.get( fieldName );
|
||||
}
|
||||
|
||||
protected void innerSet( String fieldName, Object value )
|
||||
throws Exception
|
||||
{
|
||||
dataHash.put( fieldName, value );
|
||||
}
|
||||
|
||||
public String []getFieldNames()
|
||||
{
|
||||
return FIELD_NAMES;
|
||||
}
|
||||
|
||||
protected String []getAllFieldNames()
|
||||
{
|
||||
return ALL_FIELD_NAMES;
|
||||
}
|
||||
|
||||
public Class getInnerClass()
|
||||
{
|
||||
return Estabelecimento.class;
|
||||
}
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
/*
|
||||
* EstabelecimentoID.java
|
||||
*
|
||||
* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 24/Nov/2005
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.evolute.utils.jdo.jpox.IntegerID;
|
||||
|
||||
public final class EstabelecimentoID extends IntegerID
|
||||
implements Serializable
|
||||
{
|
||||
public EstabelecimentoID()
|
||||
{
|
||||
}
|
||||
|
||||
public EstabelecimentoID( String str )
|
||||
{
|
||||
super( str );
|
||||
}
|
||||
}
|
||||
@ -1,270 +0,0 @@
|
||||
/*
|
||||
* Etiqueta.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 27/Fev/2006
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import com.evolute.utils.jdo.JDOInnerObject;
|
||||
|
||||
public final class Etiqueta implements JDOInnerObject
|
||||
{
|
||||
private Integer id;
|
||||
private String descricao;
|
||||
private String descricao_plain;
|
||||
private Double altura;
|
||||
private Double largura;
|
||||
private Double margem_esquerda;
|
||||
private Double margem_cima;
|
||||
private Integer colunas;
|
||||
private Integer linhas;
|
||||
private String continua;
|
||||
private Double altura_folha;
|
||||
private Double largura_folha;
|
||||
private Double margem_vertical_folha;
|
||||
private Double margem_horizontal_folha;
|
||||
|
||||
public Etiqueta()
|
||||
{
|
||||
}
|
||||
|
||||
public Object getField( String fieldName )
|
||||
{
|
||||
if( fieldName == EtiquetaData.ID )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.DESCRICAO )
|
||||
{
|
||||
return descricao;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.DESCRICAO_PLAIN )
|
||||
{
|
||||
return descricao_plain;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.ALTURA )
|
||||
{
|
||||
return altura;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.LARGURA )
|
||||
{
|
||||
return largura;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.MARGEM_ESQUERDA )
|
||||
{
|
||||
return margem_esquerda;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.MARGEM_CIMA )
|
||||
{
|
||||
return margem_cima;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.COLUNAS )
|
||||
{
|
||||
return colunas;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.LINHAS )
|
||||
{
|
||||
return linhas;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.CONTINUA )
|
||||
{
|
||||
return continua;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.ALTURA_FOLHA )
|
||||
{
|
||||
return altura_folha;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.LARGURA_FOLHA )
|
||||
{
|
||||
return largura_folha;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.MARGEM_VERTICAL_FOLHA )
|
||||
{
|
||||
return margem_vertical_folha;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.MARGEM_HORIZONTAL_FOLHA )
|
||||
{
|
||||
return margem_horizontal_folha;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.ID ) )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.DESCRICAO ) )
|
||||
{
|
||||
return descricao;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.DESCRICAO_PLAIN ) )
|
||||
{
|
||||
return descricao_plain;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.ALTURA ) )
|
||||
{
|
||||
return altura;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.LARGURA ) )
|
||||
{
|
||||
return largura;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.MARGEM_ESQUERDA ) )
|
||||
{
|
||||
return margem_esquerda;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.MARGEM_CIMA ) )
|
||||
{
|
||||
return margem_cima;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.COLUNAS ) )
|
||||
{
|
||||
return colunas;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.LINHAS ) )
|
||||
{
|
||||
return linhas;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.CONTINUA ) )
|
||||
{
|
||||
return continua;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.ALTURA_FOLHA ) )
|
||||
{
|
||||
return altura_folha;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.LARGURA_FOLHA ) )
|
||||
{
|
||||
return largura_folha;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.MARGEM_VERTICAL_FOLHA ) )
|
||||
{
|
||||
return margem_vertical_folha;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.MARGEM_HORIZONTAL_FOLHA ) )
|
||||
{
|
||||
return margem_horizontal_folha;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setField( String fieldName, Object value )
|
||||
{
|
||||
if( fieldName == EtiquetaData.ID )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.DESCRICAO )
|
||||
{
|
||||
descricao = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.DESCRICAO_PLAIN )
|
||||
{
|
||||
descricao_plain = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.ALTURA )
|
||||
{
|
||||
altura = ( Double ) value;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.LARGURA )
|
||||
{
|
||||
largura = ( Double ) value;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.MARGEM_ESQUERDA )
|
||||
{
|
||||
margem_esquerda = ( Double ) value;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.MARGEM_CIMA )
|
||||
{
|
||||
margem_cima = ( Double ) value;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.COLUNAS )
|
||||
{
|
||||
colunas = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.LINHAS )
|
||||
{
|
||||
linhas = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.CONTINUA )
|
||||
{
|
||||
continua = ( String ) value;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.ALTURA_FOLHA )
|
||||
{
|
||||
altura_folha = ( Double ) value;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.LARGURA_FOLHA )
|
||||
{
|
||||
largura_folha = ( Double ) value;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.MARGEM_VERTICAL_FOLHA )
|
||||
{
|
||||
margem_vertical_folha = ( Double ) value;
|
||||
}
|
||||
else if( fieldName == EtiquetaData.MARGEM_HORIZONTAL_FOLHA )
|
||||
{
|
||||
margem_horizontal_folha = ( Double ) value;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.ID ) )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.DESCRICAO ) )
|
||||
{
|
||||
descricao = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.DESCRICAO_PLAIN ) )
|
||||
{
|
||||
descricao_plain = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.ALTURA ) )
|
||||
{
|
||||
altura = ( Double ) value;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.LARGURA ) )
|
||||
{
|
||||
largura = ( Double ) value;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.MARGEM_ESQUERDA ) )
|
||||
{
|
||||
margem_esquerda = ( Double ) value;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.MARGEM_CIMA ) )
|
||||
{
|
||||
margem_cima = ( Double ) value;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.COLUNAS ) )
|
||||
{
|
||||
colunas = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.LINHAS ) )
|
||||
{
|
||||
linhas = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.CONTINUA ) )
|
||||
{
|
||||
continua = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.ALTURA_FOLHA ) )
|
||||
{
|
||||
altura_folha = ( Double ) value;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.LARGURA_FOLHA ) )
|
||||
{
|
||||
largura_folha = ( Double ) value;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.MARGEM_VERTICAL_FOLHA ) )
|
||||
{
|
||||
margem_vertical_folha = ( Double ) value;
|
||||
}
|
||||
else if( fieldName.equals( EtiquetaData.MARGEM_HORIZONTAL_FOLHA ) )
|
||||
{
|
||||
margem_horizontal_folha = ( Double ) value;
|
||||
}
|
||||
}
|
||||
|
||||
public Class getOuterClass()
|
||||
{
|
||||
return EtiquetaData.class;
|
||||
}
|
||||
}
|
||||
@ -1,75 +0,0 @@
|
||||
/*
|
||||
* EtiquetaData.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 27/Fev/2006
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.evolute.utils.jdo.JDOObject;
|
||||
|
||||
public final class EtiquetaData extends JDOObject
|
||||
{
|
||||
public static final String ID = "id";
|
||||
public static final String DESCRICAO = "descricao";
|
||||
public static final String DESCRICAO_PLAIN = "descricao_plain";
|
||||
public static final String ALTURA = "altura";
|
||||
public static final String LARGURA = "largura";
|
||||
public static final String MARGEM_ESQUERDA = "margem_esquerda";
|
||||
public static final String MARGEM_CIMA = "margem_cima";
|
||||
public static final String COLUNAS = "colunas";
|
||||
public static final String LINHAS = "linhas";
|
||||
public static final String CONTINUA = "continua";
|
||||
public static final String ALTURA_FOLHA = "altura_folha";
|
||||
public static final String LARGURA_FOLHA = "largura_folha";
|
||||
public static final String MARGEM_VERTICAL_FOLHA = "margem_vertical_folha";
|
||||
public static final String MARGEM_HORIZONTAL_FOLHA = "margem_horizontal_folha";
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
DESCRICAO, DESCRICAO_PLAIN, ALTURA, LARGURA, MARGEM_ESQUERDA, MARGEM_CIMA, COLUNAS,
|
||||
LINHAS, CONTINUA, ALTURA_FOLHA, LARGURA_FOLHA, MARGEM_VERTICAL_FOLHA,
|
||||
MARGEM_HORIZONTAL_FOLHA, };
|
||||
|
||||
|
||||
protected static final String ALL_FIELD_NAMES[] = new String[]{
|
||||
ID, DESCRICAO, DESCRICAO_PLAIN, ALTURA, LARGURA, MARGEM_ESQUERDA, MARGEM_CIMA,
|
||||
COLUNAS, LINHAS, CONTINUA, ALTURA_FOLHA, LARGURA_FOLHA, MARGEM_VERTICAL_FOLHA,
|
||||
MARGEM_HORIZONTAL_FOLHA, };
|
||||
|
||||
private HashMap dataHash;
|
||||
|
||||
public EtiquetaData()
|
||||
{
|
||||
dataHash = new HashMap();
|
||||
}
|
||||
|
||||
protected Object innerGet( String fieldName )
|
||||
throws Exception
|
||||
{
|
||||
return dataHash.get( fieldName );
|
||||
}
|
||||
|
||||
protected void innerSet( String fieldName, Object value )
|
||||
throws Exception
|
||||
{
|
||||
dataHash.put( fieldName, value );
|
||||
}
|
||||
|
||||
public String []getFieldNames()
|
||||
{
|
||||
return FIELD_NAMES;
|
||||
}
|
||||
|
||||
protected String []getAllFieldNames()
|
||||
{
|
||||
return ALL_FIELD_NAMES;
|
||||
}
|
||||
|
||||
public Class getInnerClass()
|
||||
{
|
||||
return Etiqueta.class;
|
||||
}
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
/*
|
||||
* EtiquetaID.java
|
||||
*
|
||||
* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 27/Fev/2006
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.evolute.utils.jdo.jpox.IntegerID;
|
||||
|
||||
public final class EtiquetaID extends IntegerID
|
||||
implements Serializable
|
||||
{
|
||||
public EtiquetaID()
|
||||
{
|
||||
}
|
||||
|
||||
public EtiquetaID( String str )
|
||||
{
|
||||
super( str );
|
||||
}
|
||||
}
|
||||
@ -1,323 +0,0 @@
|
||||
/*
|
||||
* Exame.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 28/Jan/2005
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.evolute.utils.jdo.JDOInnerObject;
|
||||
|
||||
public final class Exame implements JDOInnerObject
|
||||
{
|
||||
private Integer id;
|
||||
private Date data;
|
||||
private Integer tipo;
|
||||
private Integer ocasional;
|
||||
private String outro_tipo;
|
||||
private Integer resultado;
|
||||
private String outra_funcao_1;
|
||||
private String outra_funcao_2;
|
||||
private String outra_funcao_3;
|
||||
private String outra_funcao_4;
|
||||
private Date proximo_exame;
|
||||
private String outras_recomendacoes;
|
||||
private Trabalhador trabalhador;
|
||||
private Medico medico;
|
||||
private byte[] pdf;
|
||||
private byte[] fo;
|
||||
private String inactivo;
|
||||
|
||||
public Exame()
|
||||
{
|
||||
}
|
||||
|
||||
public Object getField( String fieldName )
|
||||
{
|
||||
if( fieldName == ExameData.ID )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName == ExameData.DATA )
|
||||
{
|
||||
return data;
|
||||
}
|
||||
else if( fieldName == ExameData.TIPO )
|
||||
{
|
||||
return tipo;
|
||||
}
|
||||
else if( fieldName == ExameData.OCASIONAL )
|
||||
{
|
||||
return ocasional;
|
||||
}
|
||||
else if( fieldName == ExameData.OUTRO_TIPO )
|
||||
{
|
||||
return outro_tipo;
|
||||
}
|
||||
else if( fieldName == ExameData.RESULTADO )
|
||||
{
|
||||
return resultado;
|
||||
}
|
||||
else if( fieldName == ExameData.OUTRA_FUNCAO_1 )
|
||||
{
|
||||
return outra_funcao_1;
|
||||
}
|
||||
else if( fieldName == ExameData.OUTRA_FUNCAO_2 )
|
||||
{
|
||||
return outra_funcao_2;
|
||||
}
|
||||
else if( fieldName == ExameData.OUTRA_FUNCAO_3 )
|
||||
{
|
||||
return outra_funcao_3;
|
||||
}
|
||||
else if( fieldName == ExameData.OUTRA_FUNCAO_4 )
|
||||
{
|
||||
return outra_funcao_4;
|
||||
}
|
||||
else if( fieldName == ExameData.PROXIMO_EXAME )
|
||||
{
|
||||
return proximo_exame;
|
||||
}
|
||||
else if( fieldName == ExameData.OUTRAS_RECOMENDACOES )
|
||||
{
|
||||
return outras_recomendacoes;
|
||||
}
|
||||
else if( fieldName == ExameData.TRABALHADOR )
|
||||
{
|
||||
return trabalhador;
|
||||
}
|
||||
else if( fieldName == ExameData.MEDICO )
|
||||
{
|
||||
return medico;
|
||||
}
|
||||
else if( fieldName == ExameData.PDF )
|
||||
{
|
||||
return pdf;
|
||||
}
|
||||
else if( fieldName == ExameData.FO )
|
||||
{
|
||||
return fo;
|
||||
}
|
||||
else if( fieldName == ExameData.INACTIVO )
|
||||
{
|
||||
return inactivo;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.ID ) )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.DATA ) )
|
||||
{
|
||||
return data;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.TIPO ) )
|
||||
{
|
||||
return tipo;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.OCASIONAL ) )
|
||||
{
|
||||
return ocasional;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.OUTRO_TIPO ) )
|
||||
{
|
||||
return outro_tipo;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.RESULTADO ) )
|
||||
{
|
||||
return resultado;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.OUTRA_FUNCAO_1 ) )
|
||||
{
|
||||
return outra_funcao_1;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.OUTRA_FUNCAO_2 ) )
|
||||
{
|
||||
return outra_funcao_2;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.OUTRA_FUNCAO_3 ) )
|
||||
{
|
||||
return outra_funcao_3;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.OUTRA_FUNCAO_4 ) )
|
||||
{
|
||||
return outra_funcao_4;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.PROXIMO_EXAME ) )
|
||||
{
|
||||
return proximo_exame;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.OUTRAS_RECOMENDACOES ) )
|
||||
{
|
||||
return outras_recomendacoes;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.TRABALHADOR ) )
|
||||
{
|
||||
return trabalhador;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.MEDICO ) )
|
||||
{
|
||||
return medico;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.PDF ) )
|
||||
{
|
||||
return pdf;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.FO ) )
|
||||
{
|
||||
return fo;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.INACTIVO ) )
|
||||
{
|
||||
return inactivo;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setField( String fieldName, Object value )
|
||||
{
|
||||
if( fieldName == ExameData.ID )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == ExameData.DATA )
|
||||
{
|
||||
data = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == ExameData.TIPO )
|
||||
{
|
||||
tipo = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == ExameData.OCASIONAL )
|
||||
{
|
||||
ocasional = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == ExameData.OUTRO_TIPO )
|
||||
{
|
||||
outro_tipo = ( String ) value;
|
||||
}
|
||||
else if( fieldName == ExameData.RESULTADO )
|
||||
{
|
||||
resultado = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == ExameData.OUTRA_FUNCAO_1 )
|
||||
{
|
||||
outra_funcao_1 = ( String ) value;
|
||||
}
|
||||
else if( fieldName == ExameData.OUTRA_FUNCAO_2 )
|
||||
{
|
||||
outra_funcao_2 = ( String ) value;
|
||||
}
|
||||
else if( fieldName == ExameData.OUTRA_FUNCAO_3 )
|
||||
{
|
||||
outra_funcao_3 = ( String ) value;
|
||||
}
|
||||
else if( fieldName == ExameData.OUTRA_FUNCAO_4 )
|
||||
{
|
||||
outra_funcao_4 = ( String ) value;
|
||||
}
|
||||
else if( fieldName == ExameData.PROXIMO_EXAME )
|
||||
{
|
||||
proximo_exame = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == ExameData.OUTRAS_RECOMENDACOES )
|
||||
{
|
||||
outras_recomendacoes = ( String ) value;
|
||||
}
|
||||
else if( fieldName == ExameData.TRABALHADOR )
|
||||
{
|
||||
trabalhador = ( Trabalhador ) value;
|
||||
}
|
||||
else if( fieldName == ExameData.MEDICO )
|
||||
{
|
||||
medico = ( Medico ) value;
|
||||
}
|
||||
else if( fieldName == ExameData.PDF )
|
||||
{
|
||||
pdf = ( byte[] ) value;
|
||||
}
|
||||
else if( fieldName == ExameData.FO )
|
||||
{
|
||||
fo = ( byte[] ) value;
|
||||
}
|
||||
else if( fieldName == ExameData.INACTIVO )
|
||||
{
|
||||
inactivo = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.ID ) )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.DATA ) )
|
||||
{
|
||||
data = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.TIPO ) )
|
||||
{
|
||||
tipo = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.OCASIONAL ) )
|
||||
{
|
||||
ocasional = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.OUTRO_TIPO ) )
|
||||
{
|
||||
outro_tipo = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.RESULTADO ) )
|
||||
{
|
||||
resultado = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.OUTRA_FUNCAO_1 ) )
|
||||
{
|
||||
outra_funcao_1 = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.OUTRA_FUNCAO_2 ) )
|
||||
{
|
||||
outra_funcao_2 = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.OUTRA_FUNCAO_3 ) )
|
||||
{
|
||||
outra_funcao_3 = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.OUTRA_FUNCAO_4 ) )
|
||||
{
|
||||
outra_funcao_4 = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.PROXIMO_EXAME ) )
|
||||
{
|
||||
proximo_exame = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.OUTRAS_RECOMENDACOES ) )
|
||||
{
|
||||
outras_recomendacoes = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.TRABALHADOR ) )
|
||||
{
|
||||
trabalhador = ( Trabalhador ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.MEDICO ) )
|
||||
{
|
||||
medico = ( Medico ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.PDF ) )
|
||||
{
|
||||
pdf = ( byte[] ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.FO ) )
|
||||
{
|
||||
fo = ( byte[] ) value;
|
||||
}
|
||||
else if( fieldName.equals( ExameData.INACTIVO ) )
|
||||
{
|
||||
inactivo = ( String ) value;
|
||||
}
|
||||
}
|
||||
|
||||
public Class getOuterClass()
|
||||
{
|
||||
return ExameData.class;
|
||||
}
|
||||
}
|
||||
@ -1,79 +0,0 @@
|
||||
/*
|
||||
* ExameData.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 28/Jan/2005
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.evolute.utils.jdo.JDOObject;
|
||||
|
||||
public final class ExameData extends JDOObject
|
||||
implements DisableDeleteable
|
||||
{
|
||||
public static final String ID = "id";
|
||||
public static final String DATA = "data";
|
||||
public static final String TIPO = "tipo";
|
||||
public static final String OCASIONAL = "ocasional";
|
||||
public static final String OUTRO_TIPO = "outro_tipo";
|
||||
public static final String RESULTADO = "resultado";
|
||||
public static final String OUTRA_FUNCAO_1 = "outra_funcao_1";
|
||||
public static final String OUTRA_FUNCAO_2 = "outra_funcao_2";
|
||||
public static final String OUTRA_FUNCAO_3 = "outra_funcao_3";
|
||||
public static final String OUTRA_FUNCAO_4 = "outra_funcao_4";
|
||||
public static final String PROXIMO_EXAME = "proximo_exame";
|
||||
public static final String OUTRAS_RECOMENDACOES = "outras_recomendacoes";
|
||||
public static final String TRABALHADOR = "trabalhador";
|
||||
public static final String MEDICO = "medico";
|
||||
public static final String PDF = "pdf";
|
||||
public static final String FO = "fo";
|
||||
public static final String INACTIVO = "inactivo";
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
DATA, TIPO, OCASIONAL, OUTRO_TIPO, RESULTADO, OUTRA_FUNCAO_1, OUTRA_FUNCAO_2,
|
||||
OUTRA_FUNCAO_3, OUTRA_FUNCAO_4, PROXIMO_EXAME, OUTRAS_RECOMENDACOES,
|
||||
TRABALHADOR, MEDICO, PDF, FO, };
|
||||
|
||||
|
||||
protected static final String ALL_FIELD_NAMES[] = new String[]{
|
||||
ID, DATA, TIPO, OCASIONAL, OUTRO_TIPO, RESULTADO, OUTRA_FUNCAO_1, OUTRA_FUNCAO_2,
|
||||
OUTRA_FUNCAO_3, OUTRA_FUNCAO_4, PROXIMO_EXAME, OUTRAS_RECOMENDACOES,
|
||||
TRABALHADOR, MEDICO, PDF, FO, INACTIVO, };
|
||||
|
||||
private HashMap dataHash;
|
||||
|
||||
public ExameData()
|
||||
{
|
||||
dataHash = new HashMap();
|
||||
}
|
||||
|
||||
protected Object innerGet( String fieldName )
|
||||
throws Exception
|
||||
{
|
||||
return dataHash.get( fieldName );
|
||||
}
|
||||
|
||||
protected void innerSet( String fieldName, Object value )
|
||||
throws Exception
|
||||
{
|
||||
dataHash.put( fieldName, value );
|
||||
}
|
||||
|
||||
public String []getFieldNames()
|
||||
{
|
||||
return FIELD_NAMES;
|
||||
}
|
||||
|
||||
protected String []getAllFieldNames()
|
||||
{
|
||||
return ALL_FIELD_NAMES;
|
||||
}
|
||||
|
||||
public Class getInnerClass()
|
||||
{
|
||||
return Exame.class;
|
||||
}
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
/*
|
||||
* ExameID.java
|
||||
*
|
||||
* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 28/Jan/2005
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import com.evolute.utils.jdo.jpox.IntegerID;
|
||||
|
||||
public final class ExameID extends IntegerID
|
||||
{
|
||||
public ExameID()
|
||||
{
|
||||
}
|
||||
|
||||
public ExameID( String str )
|
||||
{
|
||||
super( str );
|
||||
}
|
||||
}
|
||||
@ -1,102 +0,0 @@
|
||||
/*
|
||||
* HistoricoEstabelecimento.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 7/Dez/2004
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.evolute.utils.jdo.JDOInnerObject;
|
||||
|
||||
public final class HistoricoEstabelecimento implements JDOInnerObject
|
||||
{
|
||||
private Integer id;
|
||||
private Date data;
|
||||
private String texto;
|
||||
private Estabelecimento estabelecimento;
|
||||
|
||||
public HistoricoEstabelecimento()
|
||||
{
|
||||
}
|
||||
|
||||
public Object getField( String fieldName )
|
||||
{
|
||||
if( fieldName == HistoricoEstabelecimentoData.ID )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName == HistoricoEstabelecimentoData.DATA )
|
||||
{
|
||||
return data;
|
||||
}
|
||||
else if( fieldName == HistoricoEstabelecimentoData.TEXTO )
|
||||
{
|
||||
return texto;
|
||||
}
|
||||
else if( fieldName == HistoricoEstabelecimentoData.ESTABELECIMENTO )
|
||||
{
|
||||
return estabelecimento;
|
||||
}
|
||||
else if( fieldName.equals( HistoricoEstabelecimentoData.ID ) )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName.equals( HistoricoEstabelecimentoData.DATA ) )
|
||||
{
|
||||
return data;
|
||||
}
|
||||
else if( fieldName.equals( HistoricoEstabelecimentoData.TEXTO ) )
|
||||
{
|
||||
return texto;
|
||||
}
|
||||
else if( fieldName.equals( HistoricoEstabelecimentoData.ESTABELECIMENTO ) )
|
||||
{
|
||||
return estabelecimento;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setField( String fieldName, Object value )
|
||||
{
|
||||
if( fieldName == HistoricoEstabelecimentoData.ID )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == HistoricoEstabelecimentoData.DATA )
|
||||
{
|
||||
data = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == HistoricoEstabelecimentoData.TEXTO )
|
||||
{
|
||||
texto = ( String ) value;
|
||||
}
|
||||
else if( fieldName == HistoricoEstabelecimentoData.ESTABELECIMENTO )
|
||||
{
|
||||
estabelecimento = ( Estabelecimento ) value;
|
||||
}
|
||||
else if( fieldName.equals( HistoricoEstabelecimentoData.ID ) )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( HistoricoEstabelecimentoData.DATA ) )
|
||||
{
|
||||
data = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( HistoricoEstabelecimentoData.TEXTO ) )
|
||||
{
|
||||
texto = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( HistoricoEstabelecimentoData.ESTABELECIMENTO ) )
|
||||
{
|
||||
estabelecimento = ( Estabelecimento ) value;
|
||||
}
|
||||
}
|
||||
|
||||
public Class getOuterClass()
|
||||
{
|
||||
return HistoricoEstabelecimentoData.class;
|
||||
}
|
||||
}
|
||||
@ -1,59 +0,0 @@
|
||||
/*
|
||||
* HistoricoEstabelecimentoData.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 7/Dez/2004
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public final class HistoricoEstabelecimentoData extends Historico
|
||||
{
|
||||
public static final String ID = "id";
|
||||
public static final String DATA = "data";
|
||||
public static final String TEXTO = "texto";
|
||||
public static final String ESTABELECIMENTO = "estabelecimento";
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
DATA, TEXTO, ESTABELECIMENTO, };
|
||||
|
||||
|
||||
protected static final String ALL_FIELD_NAMES[] = new String[]{
|
||||
ID, DATA, TEXTO, ESTABELECIMENTO, };
|
||||
|
||||
private HashMap dataHash;
|
||||
|
||||
public HistoricoEstabelecimentoData()
|
||||
{
|
||||
dataHash = new HashMap();
|
||||
}
|
||||
|
||||
protected Object innerGet( String fieldName )
|
||||
throws Exception
|
||||
{
|
||||
return dataHash.get( fieldName );
|
||||
}
|
||||
|
||||
protected void innerSet( String fieldName, Object value )
|
||||
throws Exception
|
||||
{
|
||||
dataHash.put( fieldName, value );
|
||||
}
|
||||
|
||||
public String []getFieldNames()
|
||||
{
|
||||
return FIELD_NAMES;
|
||||
}
|
||||
|
||||
protected String []getAllFieldNames()
|
||||
{
|
||||
return ALL_FIELD_NAMES;
|
||||
}
|
||||
|
||||
public Class getInnerClass()
|
||||
{
|
||||
return HistoricoEstabelecimento.class;
|
||||
}
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
/*
|
||||
* HistoricoEstabelecimentoID.java
|
||||
*
|
||||
* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 7/Dez/2004
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import com.evolute.utils.jdo.jpox.IntegerID;
|
||||
|
||||
public final class HistoricoEstabelecimentoID extends IntegerID
|
||||
{
|
||||
public HistoricoEstabelecimentoID()
|
||||
{
|
||||
}
|
||||
|
||||
public HistoricoEstabelecimentoID( String str )
|
||||
{
|
||||
super( str );
|
||||
}
|
||||
}
|
||||
@ -1,119 +0,0 @@
|
||||
/*
|
||||
* MarcacaoEmpresa.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 7/Dez/2004
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.evolute.utils.jdo.JDOInnerObject;
|
||||
|
||||
public final class MarcacaoEmpresa implements JDOInnerObject
|
||||
{
|
||||
private Integer id;
|
||||
private Date data;
|
||||
private String texto;
|
||||
private String realizada;
|
||||
private Empresa empresa;
|
||||
|
||||
public MarcacaoEmpresa()
|
||||
{
|
||||
}
|
||||
|
||||
public Object getField( String fieldName )
|
||||
{
|
||||
if( fieldName == MarcacaoEmpresaData.ID )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName == MarcacaoEmpresaData.DATA )
|
||||
{
|
||||
return data;
|
||||
}
|
||||
else if( fieldName == MarcacaoEmpresaData.TEXTO )
|
||||
{
|
||||
return texto;
|
||||
}
|
||||
else if( fieldName == MarcacaoEmpresaData.REALIZADA )
|
||||
{
|
||||
return realizada;
|
||||
}
|
||||
else if( fieldName == MarcacaoEmpresaData.EMPRESA )
|
||||
{
|
||||
return empresa;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEmpresaData.ID ) )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEmpresaData.DATA ) )
|
||||
{
|
||||
return data;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEmpresaData.TEXTO ) )
|
||||
{
|
||||
return texto;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEmpresaData.REALIZADA ) )
|
||||
{
|
||||
return realizada;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEmpresaData.EMPRESA ) )
|
||||
{
|
||||
return empresa;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setField( String fieldName, Object value )
|
||||
{
|
||||
if( fieldName == MarcacaoEmpresaData.ID )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoEmpresaData.DATA )
|
||||
{
|
||||
data = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoEmpresaData.TEXTO )
|
||||
{
|
||||
texto = ( String ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoEmpresaData.REALIZADA )
|
||||
{
|
||||
realizada = ( String ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoEmpresaData.EMPRESA )
|
||||
{
|
||||
empresa = ( Empresa ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEmpresaData.ID ) )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEmpresaData.DATA ) )
|
||||
{
|
||||
data = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEmpresaData.TEXTO ) )
|
||||
{
|
||||
texto = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEmpresaData.REALIZADA ) )
|
||||
{
|
||||
realizada = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEmpresaData.EMPRESA ) )
|
||||
{
|
||||
empresa = ( Empresa ) value;
|
||||
}
|
||||
}
|
||||
|
||||
public Class getOuterClass()
|
||||
{
|
||||
return MarcacaoEmpresaData.class;
|
||||
}
|
||||
}
|
||||
@ -1,60 +0,0 @@
|
||||
/*
|
||||
* MarcacaoEmpresaData.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 7/Dez/2004
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public final class MarcacaoEmpresaData extends Marcacao
|
||||
{
|
||||
public static final String ID = "id";
|
||||
public static final String DATA = "data";
|
||||
public static final String TEXTO = "texto";
|
||||
public static final String REALIZADA = "realizada";
|
||||
public static final String EMPRESA = "empresa";
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
DATA, TEXTO, REALIZADA, EMPRESA, };
|
||||
|
||||
|
||||
protected static final String ALL_FIELD_NAMES[] = new String[]{
|
||||
ID, DATA, TEXTO, REALIZADA, EMPRESA, };
|
||||
|
||||
private HashMap dataHash;
|
||||
|
||||
public MarcacaoEmpresaData()
|
||||
{
|
||||
dataHash = new HashMap();
|
||||
}
|
||||
|
||||
protected Object innerGet( String fieldName )
|
||||
throws Exception
|
||||
{
|
||||
return dataHash.get( fieldName );
|
||||
}
|
||||
|
||||
protected void innerSet( String fieldName, Object value )
|
||||
throws Exception
|
||||
{
|
||||
dataHash.put( fieldName, value );
|
||||
}
|
||||
|
||||
public String []getFieldNames()
|
||||
{
|
||||
return FIELD_NAMES;
|
||||
}
|
||||
|
||||
protected String []getAllFieldNames()
|
||||
{
|
||||
return ALL_FIELD_NAMES;
|
||||
}
|
||||
|
||||
public Class getInnerClass()
|
||||
{
|
||||
return MarcacaoEmpresa.class;
|
||||
}
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
/*
|
||||
* MarcacaoEmpresaID.java
|
||||
*
|
||||
* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 7/Dez/2004
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import com.evolute.utils.jdo.jpox.IntegerID;
|
||||
|
||||
public final class MarcacaoEmpresaID extends IntegerID
|
||||
{
|
||||
public MarcacaoEmpresaID()
|
||||
{
|
||||
}
|
||||
|
||||
public MarcacaoEmpresaID( String str )
|
||||
{
|
||||
super( str );
|
||||
}
|
||||
}
|
||||
@ -1,204 +0,0 @@
|
||||
/*
|
||||
* MarcacaoEstabelecimento.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on Feb 1, 2006
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.evolute.utils.jdo.JDOInnerObject;
|
||||
|
||||
public final class MarcacaoEstabelecimento implements JDOInnerObject
|
||||
{
|
||||
private Integer id;
|
||||
private Date data;
|
||||
private String realizada;
|
||||
private Integer estado;
|
||||
private Integer tecnico_hst;
|
||||
private Integer tecnico_superior_hst;
|
||||
private Date data_email;
|
||||
private Date data_relatorio;
|
||||
private Estabelecimento estabelecimento;
|
||||
private String observacoes;
|
||||
|
||||
public MarcacaoEstabelecimento()
|
||||
{
|
||||
}
|
||||
|
||||
public Object getField( String fieldName )
|
||||
{
|
||||
if( fieldName == MarcacaoEstabelecimentoData.ID )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.DATA )
|
||||
{
|
||||
return data;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.REALIZADA )
|
||||
{
|
||||
return realizada;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.ESTADO )
|
||||
{
|
||||
return estado;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.TECNICO_HST )
|
||||
{
|
||||
return tecnico_hst;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.DATA_EMAIL )
|
||||
{
|
||||
return data_email;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.DATA_RELATORIO )
|
||||
{
|
||||
return data_relatorio;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.ESTABELECIMENTO )
|
||||
{
|
||||
return estabelecimento;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.OBSERVACOES )
|
||||
{
|
||||
return observacoes;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.TECNICO_SUPERIOR_HST )
|
||||
{
|
||||
return tecnico_superior_hst;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.ID ) )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.DATA ) )
|
||||
{
|
||||
return data;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.REALIZADA ) )
|
||||
{
|
||||
return realizada;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.ESTADO ) )
|
||||
{
|
||||
return estado;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.TECNICO_HST ) )
|
||||
{
|
||||
return tecnico_hst;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.DATA_EMAIL ) )
|
||||
{
|
||||
return data_email;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.DATA_RELATORIO ) )
|
||||
{
|
||||
return data_relatorio;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.ESTABELECIMENTO ) )
|
||||
{
|
||||
return estabelecimento;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.OBSERVACOES ) )
|
||||
{
|
||||
return observacoes;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.TECNICO_SUPERIOR_HST ) )
|
||||
{
|
||||
return tecnico_superior_hst;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setField( String fieldName, Object value )
|
||||
{
|
||||
if( fieldName == MarcacaoEstabelecimentoData.ID )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.DATA )
|
||||
{
|
||||
data = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.REALIZADA )
|
||||
{
|
||||
realizada = ( String ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.ESTADO )
|
||||
{
|
||||
estado = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.TECNICO_HST )
|
||||
{
|
||||
tecnico_hst = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.TECNICO_SUPERIOR_HST )
|
||||
{
|
||||
tecnico_superior_hst = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.DATA_EMAIL )
|
||||
{
|
||||
data_email = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.DATA_RELATORIO )
|
||||
{
|
||||
data_relatorio = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.ESTABELECIMENTO )
|
||||
{
|
||||
estabelecimento = ( Estabelecimento ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoEstabelecimentoData.OBSERVACOES )
|
||||
{
|
||||
observacoes = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.ID ) )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.DATA ) )
|
||||
{
|
||||
data = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.REALIZADA ) )
|
||||
{
|
||||
realizada = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.ESTADO ) )
|
||||
{
|
||||
estado = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.TECNICO_HST ) )
|
||||
{
|
||||
tecnico_hst = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.TECNICO_SUPERIOR_HST ) )
|
||||
{
|
||||
tecnico_superior_hst = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.DATA_EMAIL ) )
|
||||
{
|
||||
data_email = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.DATA_RELATORIO ) )
|
||||
{
|
||||
data_relatorio = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.ESTABELECIMENTO ) )
|
||||
{
|
||||
estabelecimento = ( Estabelecimento ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoEstabelecimentoData.OBSERVACOES ) )
|
||||
{
|
||||
observacoes = ( String ) value;
|
||||
}
|
||||
}
|
||||
|
||||
public Class getOuterClass()
|
||||
{
|
||||
return MarcacaoEstabelecimentoData.class;
|
||||
}
|
||||
}
|
||||
@ -1,67 +0,0 @@
|
||||
/*
|
||||
* MarcacaoEstabelecimentoData.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on Feb 1, 2006
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public final class MarcacaoEstabelecimentoData extends Marcacao
|
||||
{
|
||||
public static final String ID = "id";
|
||||
public static final String DATA = "data";
|
||||
public static final String REALIZADA = "realizada";
|
||||
public static final String ESTADO = "estado";
|
||||
public static final String TECNICO_HST = "tecnico_hst";
|
||||
public static final String TECNICO_SUPERIOR_HST = "tecnico_superior_hst";
|
||||
public static final String DATA_EMAIL = "data_email";
|
||||
public static final String DATA_RELATORIO = "data_relatorio";
|
||||
public static final String ESTABELECIMENTO = "estabelecimento";
|
||||
public static final String OBSERVACOES = "observacoes";
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
DATA, REALIZADA, ESTADO, TECNICO_HST, TECNICO_SUPERIOR_HST, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO,
|
||||
OBSERVACOES, };
|
||||
|
||||
|
||||
protected static final String ALL_FIELD_NAMES[] = new String[]{
|
||||
ID, DATA, REALIZADA, ESTADO, TECNICO_HST, TECNICO_SUPERIOR_HST, DATA_EMAIL, DATA_RELATORIO,
|
||||
ESTABELECIMENTO, OBSERVACOES, };
|
||||
|
||||
private HashMap dataHash;
|
||||
|
||||
public MarcacaoEstabelecimentoData()
|
||||
{
|
||||
dataHash = new HashMap();
|
||||
}
|
||||
|
||||
protected Object innerGet( String fieldName )
|
||||
throws Exception
|
||||
{
|
||||
return dataHash.get( fieldName );
|
||||
}
|
||||
|
||||
protected void innerSet( String fieldName, Object value )
|
||||
throws Exception
|
||||
{
|
||||
dataHash.put( fieldName, value );
|
||||
}
|
||||
|
||||
public String []getFieldNames()
|
||||
{
|
||||
return FIELD_NAMES;
|
||||
}
|
||||
|
||||
protected String []getAllFieldNames()
|
||||
{
|
||||
return ALL_FIELD_NAMES;
|
||||
}
|
||||
|
||||
public Class getInnerClass()
|
||||
{
|
||||
return MarcacaoEstabelecimento.class;
|
||||
}
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
/*
|
||||
* MarcacaoEstabelecimentoID.java
|
||||
*
|
||||
* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Feb 1, 2006
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.evolute.utils.jdo.jpox.IntegerID;
|
||||
|
||||
public final class MarcacaoEstabelecimentoID extends IntegerID
|
||||
implements Serializable
|
||||
{
|
||||
public MarcacaoEstabelecimentoID()
|
||||
{
|
||||
}
|
||||
|
||||
public MarcacaoEstabelecimentoID( String str )
|
||||
{
|
||||
super( str );
|
||||
}
|
||||
}
|
||||
@ -1,261 +0,0 @@
|
||||
/*
|
||||
* MarcacaoSaveAndDeleteHandler.java
|
||||
*
|
||||
* Created on 13 de Outubro de 2004, 18:31
|
||||
*/
|
||||
|
||||
package siprp.data;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import siprp.medicina.MedicinaDataProvider;
|
||||
|
||||
import com.evolute.utils.Singleton;
|
||||
import com.evolute.utils.jdo.JDOObject;
|
||||
import com.evolute.utils.jdo.JDOOperationHandlerInterface;
|
||||
import com.evolute.utils.jdo.JDOProvider;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fpalma
|
||||
*/
|
||||
public class MarcacaoSaveAndDeleteHandler
|
||||
implements JDOOperationHandlerInterface
|
||||
{
|
||||
public static final MarcacaoSaveAndDeleteHandler INSTANCE = new MarcacaoSaveAndDeleteHandler();
|
||||
|
||||
public JDOProvider JDO;
|
||||
protected MedicinaDataProvider medicinaProvider;
|
||||
|
||||
/** Creates a new instance of MarcacaoSaveAndDeleteHandler */
|
||||
public MarcacaoSaveAndDeleteHandler()
|
||||
{
|
||||
JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER );
|
||||
}
|
||||
|
||||
public boolean handle( JDOObject object, int operation, int moment )
|
||||
throws Exception
|
||||
{
|
||||
if( JDO == null )
|
||||
{
|
||||
JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER );
|
||||
}
|
||||
switch( operation )
|
||||
{
|
||||
case JDOOperationHandlerInterface.OP_SAVE:
|
||||
switch( moment )
|
||||
{
|
||||
case JDOOperationHandlerInterface.MOMENT_BEFORE:
|
||||
return preSave( (Marcacao) object );
|
||||
|
||||
case JDOOperationHandlerInterface.MOMENT_AFTER:
|
||||
return postSave( (Marcacao) object );
|
||||
}
|
||||
return false;
|
||||
|
||||
case JDOOperationHandlerInterface.OP_DELETE:
|
||||
switch( moment )
|
||||
{
|
||||
case JDOOperationHandlerInterface.MOMENT_BEFORE:
|
||||
return preDelete( (Marcacao) object );
|
||||
|
||||
case JDOOperationHandlerInterface.MOMENT_AFTER:
|
||||
return postDelete( (Marcacao) object );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean preSave( Marcacao object )
|
||||
throws Exception
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean postSave( Marcacao object )
|
||||
throws Exception
|
||||
{
|
||||
if( object instanceof MarcacaoEmpresaData )
|
||||
{
|
||||
AvisoData aviso = (AvisoData) JDO.load( AvisoData.class,
|
||||
new Object[]{ object.get( MarcacaoEmpresaData.ID ), new Integer( AvisoData.TIPO_EMPRESA ) },
|
||||
new String[]{ AvisoData.EVENTO_ID, AvisoData.TIPO } );
|
||||
if( aviso == null )
|
||||
{
|
||||
aviso = new AvisoData();
|
||||
}
|
||||
aviso.set( AvisoData.TIPO, new Integer( AvisoData.TIPO_EMPRESA ) );
|
||||
EmpresaData empresa = ( EmpresaData ) object.get( MarcacaoEmpresaData.EMPRESA );
|
||||
aviso.set( AvisoData.EMPRESA, empresa );
|
||||
aviso.set( AvisoData.EVENTO_ID, object.get( MarcacaoEmpresaData.ID ) );
|
||||
Date dataEvento = (Date) object.get( Marcacao.DATA );
|
||||
aviso.set( AvisoData.DATA_EVENTO, dataEvento );
|
||||
aviso.set( AvisoData.DATA_AVISO, dataEvento );
|
||||
String descricao = "Tarefa ";
|
||||
aviso.set( AvisoData.DESCRICAO, descricao );
|
||||
aviso.save();
|
||||
|
||||
empresa.save();
|
||||
}
|
||||
else if( object instanceof MarcacaoEstabelecimentoData )
|
||||
{
|
||||
AvisoData aviso = (AvisoData) JDO.load( AvisoData.class,
|
||||
new Object[]{ object.get( MarcacaoEstabelecimentoData.ID ), new Integer( AvisoData.TIPO_ESTABELECIMENTO ) },
|
||||
new String[]{ AvisoData.EVENTO_ID, AvisoData.TIPO } );
|
||||
if( aviso == null )
|
||||
{
|
||||
aviso = new AvisoData();
|
||||
}
|
||||
aviso.set( AvisoData.TIPO, new Integer( AvisoData.TIPO_ESTABELECIMENTO ) );
|
||||
EstabelecimentoData estabelecimento = ( EstabelecimentoData ) object.get( MarcacaoEstabelecimentoData.ESTABELECIMENTO );
|
||||
aviso.set( AvisoData.ESTABELECIMENTO, estabelecimento );
|
||||
EmpresaData empresa = ( EmpresaData )estabelecimento.get( EstabelecimentoData.EMPRESA );
|
||||
aviso.set( AvisoData.EMPRESA, empresa );
|
||||
aviso.set( AvisoData.EVENTO_ID, object.get( MarcacaoEstabelecimentoData.ID ) );
|
||||
Date dataEvento = (Date) object.get( Marcacao.DATA );
|
||||
Date dataAviso = new Date( dataEvento.getTime() );
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime( dataAviso );
|
||||
cal.add( Calendar.DAY_OF_MONTH, -14 );
|
||||
dataAviso = cal.getTime();
|
||||
aviso.set( AvisoData.DATA_AVISO, dataAviso );
|
||||
aviso.set( AvisoData.DATA_EVENTO, dataEvento );
|
||||
String descricao = "Visita ";
|
||||
aviso.set( AvisoData.DESCRICAO, descricao );
|
||||
cal = Calendar.getInstance();
|
||||
cal.setTime( dataEvento );
|
||||
cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 0, 0, 0 );
|
||||
cal.set( Calendar.MILLISECOND, 0 );
|
||||
dataEvento = cal.getTime();
|
||||
|
||||
cal = Calendar.getInstance();
|
||||
cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 10, 0, 0 );
|
||||
cal.set( Calendar.MILLISECOND, 0 );
|
||||
Date hoje = cal.getTime();
|
||||
if( hoje.before( dataEvento ) )
|
||||
{
|
||||
aviso.save();
|
||||
}
|
||||
|
||||
estabelecimento.save();
|
||||
}
|
||||
if( object instanceof MarcacaoTrabalhadorData )
|
||||
{
|
||||
AvisoData aviso = (AvisoData) JDO.load( AvisoData.class,
|
||||
new Object[]{ object.get( MarcacaoTrabalhadorData.ID ), new Integer( AvisoData.TIPO_TRABALHADOR ) },
|
||||
new String[]{ AvisoData.EVENTO_ID, AvisoData.TIPO } );
|
||||
System.out.println( "AVISO LOADED: " + aviso + " id: " + ( aviso != null ? aviso.get( AvisoData.ID ) : "n/a" )
|
||||
+ " MT.ID: " + object.get( MarcacaoTrabalhadorData.ID )
|
||||
+ " AD.TIPO: " + new Integer( AvisoData.TIPO_TRABALHADOR ) );
|
||||
if( aviso == null )
|
||||
{
|
||||
System.out.println( "novo aviso" );
|
||||
aviso = new AvisoData();
|
||||
}
|
||||
aviso.set( AvisoData.TIPO, new Integer( AvisoData.TIPO_TRABALHADOR ) );
|
||||
TrabalhadorData trab = ( TrabalhadorData ) object.get( MarcacaoTrabalhadorData.TRABALHADOR );
|
||||
aviso.set( AvisoData.TRABALHADOR, trab );
|
||||
EstabelecimentoData estabelecimento = ( EstabelecimentoData ) trab.get( TrabalhadorData.ESTABELECIMENTO );
|
||||
aviso.set( AvisoData.ESTABELECIMENTO, estabelecimento );
|
||||
EmpresaData empresa = ( EmpresaData ) estabelecimento.get( EstabelecimentoData.EMPRESA );
|
||||
aviso.set( AvisoData.EMPRESA, empresa );
|
||||
aviso.set( AvisoData.EVENTO_ID, object.get( MarcacaoTrabalhadorData.ID ) );
|
||||
Date dataEvento = (Date) object.get( Marcacao.DATA );
|
||||
Date dataAviso = new Date( dataEvento.getTime() );
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime( dataAviso );
|
||||
cal.add( Calendar.DAY_OF_MONTH, -14 );
|
||||
dataAviso = cal.getTime();
|
||||
aviso.set( AvisoData.DATA_AVISO, dataAviso );
|
||||
aviso.set( AvisoData.DATA_EVENTO, dataEvento.clone() );
|
||||
String descricao = "";
|
||||
switch( ( ( Integer ) object.get( MarcacaoTrabalhadorData.TIPO ) ).intValue() )
|
||||
{
|
||||
case MarcacaoTrabalhadorData.TIPO_EXAMES:
|
||||
descricao = "Exames";
|
||||
break;
|
||||
|
||||
case MarcacaoTrabalhadorData.TIPO_CONSULTA:
|
||||
Integer motivo = ( ( Integer ) object.get( MarcacaoTrabalhadorData.MOTIVO ) );
|
||||
descricao = "Consulta " + ( motivo == null ? "" : ("(" + MedicinaDataProvider.TIPOS_CONSULTAS[ motivo.intValue() ] + ")" ) );
|
||||
break;
|
||||
}
|
||||
aviso.set( AvisoData.DESCRICAO, descricao );
|
||||
cal = Calendar.getInstance();
|
||||
cal.setTime( dataEvento );
|
||||
cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 0, 0, 0 );
|
||||
cal.set( Calendar.MILLISECOND, 0 );
|
||||
dataEvento = cal.getTime();
|
||||
|
||||
cal = Calendar.getInstance();
|
||||
cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 10, 0, 0 );
|
||||
cal.set( Calendar.MILLISECOND, 0 );
|
||||
Date hoje = cal.getTime();
|
||||
if( hoje.before( dataEvento ) )
|
||||
{
|
||||
if( !hoje.before( dataAviso ) )
|
||||
{
|
||||
aviso.set( AvisoData.DATA_AVISO, dataEvento.clone() );
|
||||
}
|
||||
aviso.save();
|
||||
}
|
||||
|
||||
trab.save();
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean preDelete( Marcacao object )
|
||||
throws Exception
|
||||
{
|
||||
if( object instanceof MarcacaoTrabalhadorData &&
|
||||
( ( Integer ) object.get( MarcacaoTrabalhadorData.TIPO ) ).intValue() == MarcacaoTrabalhadorData.TIPO_EXAMES )
|
||||
{
|
||||
if( medicinaProvider == null )
|
||||
{
|
||||
medicinaProvider = (MedicinaDataProvider)MedicinaDataProvider.getProvider();
|
||||
}
|
||||
medicinaProvider.deleteDetalhesRealizadosForMarcacao( ( Integer ) object.get( MarcacaoTrabalhadorData.ID ) );
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean postDelete( Marcacao object )
|
||||
throws Exception
|
||||
{
|
||||
System.out.println( "!delete!" );
|
||||
Integer tipo;
|
||||
if( object instanceof MarcacaoEmpresaData )
|
||||
{
|
||||
tipo = new Integer( AvisoData.TIPO_EMPRESA );
|
||||
}
|
||||
else if( object instanceof MarcacaoEstabelecimentoData )
|
||||
{
|
||||
tipo = new Integer( AvisoData.TIPO_ESTABELECIMENTO );
|
||||
}
|
||||
if( object instanceof MarcacaoTrabalhadorData )
|
||||
{
|
||||
tipo = new Integer( AvisoData.TIPO_TRABALHADOR );
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AvisoData aviso = (AvisoData) JDO.load( AvisoData.class,
|
||||
new Object[]{ object.get( "id" ), tipo },
|
||||
new String[]{ AvisoData.EVENTO_ID, AvisoData.TIPO } );
|
||||
if( aviso != null )
|
||||
{
|
||||
aviso.delete();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -1,204 +0,0 @@
|
||||
/*
|
||||
* MarcacaoTrabalhador.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 28, 2006
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.evolute.utils.jdo.JDOInnerObject;
|
||||
|
||||
public final class MarcacaoTrabalhador implements JDOInnerObject
|
||||
{
|
||||
private Integer id;
|
||||
private Date data;
|
||||
private String realizada;
|
||||
private Integer estado;
|
||||
private Integer motivo;
|
||||
private Date data_email;
|
||||
private Date data_relatorio;
|
||||
private Integer tipo;
|
||||
private Trabalhador trabalhador;
|
||||
private String observacoes;
|
||||
|
||||
public MarcacaoTrabalhador()
|
||||
{
|
||||
}
|
||||
|
||||
public Object getField( String fieldName )
|
||||
{
|
||||
if( fieldName == MarcacaoTrabalhadorData.ID )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.DATA )
|
||||
{
|
||||
return data;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.REALIZADA )
|
||||
{
|
||||
return realizada;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.ESTADO )
|
||||
{
|
||||
return estado;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.MOTIVO )
|
||||
{
|
||||
return motivo;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.DATA_EMAIL )
|
||||
{
|
||||
return data_email;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.DATA_RELATORIO )
|
||||
{
|
||||
return data_relatorio;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.TIPO )
|
||||
{
|
||||
return tipo;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.TRABALHADOR )
|
||||
{
|
||||
return trabalhador;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.OBSERVACOES )
|
||||
{
|
||||
return observacoes;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.ID ) )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.DATA ) )
|
||||
{
|
||||
return data;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.REALIZADA ) )
|
||||
{
|
||||
return realizada;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.ESTADO ) )
|
||||
{
|
||||
return estado;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.MOTIVO ) )
|
||||
{
|
||||
return motivo;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.DATA_EMAIL ) )
|
||||
{
|
||||
return data_email;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.DATA_RELATORIO ) )
|
||||
{
|
||||
return data_relatorio;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.TIPO ) )
|
||||
{
|
||||
return tipo;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.TRABALHADOR ) )
|
||||
{
|
||||
return trabalhador;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.OBSERVACOES ) )
|
||||
{
|
||||
return observacoes;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setField( String fieldName, Object value )
|
||||
{
|
||||
if( fieldName == MarcacaoTrabalhadorData.ID )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.DATA )
|
||||
{
|
||||
data = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.REALIZADA )
|
||||
{
|
||||
realizada = ( String ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.ESTADO )
|
||||
{
|
||||
estado = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.MOTIVO )
|
||||
{
|
||||
motivo = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.DATA_EMAIL )
|
||||
{
|
||||
data_email = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.DATA_RELATORIO )
|
||||
{
|
||||
data_relatorio = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.TIPO )
|
||||
{
|
||||
tipo = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.TRABALHADOR )
|
||||
{
|
||||
trabalhador = ( Trabalhador ) value;
|
||||
}
|
||||
else if( fieldName == MarcacaoTrabalhadorData.OBSERVACOES )
|
||||
{
|
||||
observacoes = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.ID ) )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.DATA ) )
|
||||
{
|
||||
data = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.REALIZADA ) )
|
||||
{
|
||||
realizada = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.ESTADO ) )
|
||||
{
|
||||
estado = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.MOTIVO ) )
|
||||
{
|
||||
motivo = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.DATA_EMAIL ) )
|
||||
{
|
||||
data_email = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.DATA_RELATORIO ) )
|
||||
{
|
||||
data_relatorio = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.TIPO ) )
|
||||
{
|
||||
tipo = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.TRABALHADOR ) )
|
||||
{
|
||||
trabalhador = ( Trabalhador ) value;
|
||||
}
|
||||
else if( fieldName.equals( MarcacaoTrabalhadorData.OBSERVACOES ) )
|
||||
{
|
||||
observacoes = ( String ) value;
|
||||
}
|
||||
}
|
||||
|
||||
public Class getOuterClass()
|
||||
{
|
||||
return MarcacaoTrabalhadorData.class;
|
||||
}
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
/*
|
||||
* MarcacaoTrabalhadorData.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 28, 2006
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public final class MarcacaoTrabalhadorData extends Marcacao
|
||||
implements MarcacaoTrabalhadorConstants
|
||||
{
|
||||
public static final String ID = "id";
|
||||
public static final String DATA = "data";
|
||||
public static final String REALIZADA = "realizada";
|
||||
public static final String ESTADO = "estado";
|
||||
public static final String MOTIVO = "motivo";
|
||||
public static final String DATA_EMAIL = "data_email";
|
||||
public static final String DATA_RELATORIO = "data_relatorio";
|
||||
public static final String TIPO = "tipo";
|
||||
public static final String TRABALHADOR = "trabalhador";
|
||||
public static final String OBSERVACOES = "observacoes";
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
DATA, REALIZADA, ESTADO, MOTIVO, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR,
|
||||
OBSERVACOES, };
|
||||
|
||||
|
||||
protected static final String ALL_FIELD_NAMES[] = new String[]{
|
||||
ID, DATA, REALIZADA, ESTADO, MOTIVO, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR,
|
||||
OBSERVACOES, };
|
||||
|
||||
private HashMap dataHash;
|
||||
|
||||
public MarcacaoTrabalhadorData()
|
||||
{
|
||||
dataHash = new HashMap();
|
||||
}
|
||||
|
||||
protected Object innerGet( String fieldName )
|
||||
throws Exception
|
||||
{
|
||||
return dataHash.get( fieldName );
|
||||
}
|
||||
|
||||
protected void innerSet( String fieldName, Object value )
|
||||
throws Exception
|
||||
{
|
||||
dataHash.put( fieldName, value );
|
||||
}
|
||||
|
||||
public String []getFieldNames()
|
||||
{
|
||||
return FIELD_NAMES;
|
||||
}
|
||||
|
||||
protected String []getAllFieldNames()
|
||||
{
|
||||
return ALL_FIELD_NAMES;
|
||||
}
|
||||
|
||||
public Class getInnerClass()
|
||||
{
|
||||
return MarcacaoTrabalhador.class;
|
||||
}
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
/*
|
||||
* MarcacaoTrabalhadorID.java
|
||||
*
|
||||
* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Jan 28, 2006
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.evolute.utils.jdo.jpox.IntegerID;
|
||||
|
||||
public final class MarcacaoTrabalhadorID extends IntegerID
|
||||
implements Serializable
|
||||
{
|
||||
public MarcacaoTrabalhadorID()
|
||||
{
|
||||
}
|
||||
|
||||
public MarcacaoTrabalhadorID( String str )
|
||||
{
|
||||
super( str );
|
||||
}
|
||||
}
|
||||
@ -1,100 +0,0 @@
|
||||
/*
|
||||
* Medico.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 27/Jan/2005
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import com.evolute.utils.jdo.JDOInnerObject;
|
||||
|
||||
public final class Medico implements JDOInnerObject
|
||||
{
|
||||
private Integer id;
|
||||
private String nome;
|
||||
private String numero_cedula;
|
||||
private String inactivo;
|
||||
|
||||
public Medico()
|
||||
{
|
||||
}
|
||||
|
||||
public Object getField( String fieldName )
|
||||
{
|
||||
if( fieldName == MedicoData.ID )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName == MedicoData.NOME )
|
||||
{
|
||||
return nome;
|
||||
}
|
||||
else if( fieldName == MedicoData.NUMERO_CEDULA )
|
||||
{
|
||||
return numero_cedula;
|
||||
}
|
||||
else if( fieldName == MedicoData.INACTIVO )
|
||||
{
|
||||
return inactivo;
|
||||
}
|
||||
else if( fieldName.equals( MedicoData.ID ) )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName.equals( MedicoData.NOME ) )
|
||||
{
|
||||
return nome;
|
||||
}
|
||||
else if( fieldName.equals( MedicoData.NUMERO_CEDULA ) )
|
||||
{
|
||||
return numero_cedula;
|
||||
}
|
||||
else if( fieldName.equals( MedicoData.INACTIVO ) )
|
||||
{
|
||||
return inactivo;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setField( String fieldName, Object value )
|
||||
{
|
||||
if( fieldName == MedicoData.ID )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == MedicoData.NOME )
|
||||
{
|
||||
nome = ( String ) value;
|
||||
}
|
||||
else if( fieldName == MedicoData.NUMERO_CEDULA )
|
||||
{
|
||||
numero_cedula = ( String ) value;
|
||||
}
|
||||
else if( fieldName == MedicoData.INACTIVO )
|
||||
{
|
||||
inactivo = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( MedicoData.ID ) )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( MedicoData.NOME ) )
|
||||
{
|
||||
nome = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( MedicoData.NUMERO_CEDULA ) )
|
||||
{
|
||||
numero_cedula = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( MedicoData.INACTIVO ) )
|
||||
{
|
||||
inactivo = ( String ) value;
|
||||
}
|
||||
}
|
||||
|
||||
public Class getOuterClass()
|
||||
{
|
||||
return MedicoData.class;
|
||||
}
|
||||
}
|
||||
@ -1,62 +0,0 @@
|
||||
/*
|
||||
* MedicoData.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on 27/Jan/2005
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.data;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.evolute.utils.jdo.JDOObject;
|
||||
|
||||
public final class MedicoData extends JDOObject
|
||||
implements DisableDeleteable
|
||||
{
|
||||
public static final String ID = "id";
|
||||
public static final String NOME = "nome";
|
||||
public static final String NUMERO_CEDULA = "numero_cedula";
|
||||
public static final String INACTIVO = "inactivo";
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
NOME, NUMERO_CEDULA, };
|
||||
|
||||
|
||||
protected static final String ALL_FIELD_NAMES[] = new String[]{
|
||||
ID, NOME, NUMERO_CEDULA, INACTIVO, };
|
||||
|
||||
private HashMap dataHash;
|
||||
|
||||
public MedicoData()
|
||||
{
|
||||
dataHash = new HashMap();
|
||||
}
|
||||
|
||||
protected Object innerGet( String fieldName )
|
||||
throws Exception
|
||||
{
|
||||
return dataHash.get( fieldName );
|
||||
}
|
||||
|
||||
protected void innerSet( String fieldName, Object value )
|
||||
throws Exception
|
||||
{
|
||||
dataHash.put( fieldName, value );
|
||||
}
|
||||
|
||||
public String []getFieldNames()
|
||||
{
|
||||
return FIELD_NAMES;
|
||||
}
|
||||
|
||||
protected String []getAllFieldNames()
|
||||
{
|
||||
return ALL_FIELD_NAMES;
|
||||
}
|
||||
|
||||
public Class getInnerClass()
|
||||
{
|
||||
return Medico.class;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue