Ignore:
Timestamp:
Jan 2, 2011, 8:51:21 PM (13 years ago)
Author:
fmguler
Message:

Refs #3 - Ven.save() is transferred to the new package. Save use case is completed. Convert.toDB() converts camel case object names to database names with underscores. Unchecked VenException is thrown by Ven methods. Liquibase changelog (test-db-changelog.xml) is changed to include only a simple object to test save operation. It creates a sample database table and inserts a sample row. On rollback it removes sample data. Using liquibase, Sample.java builds database, tests save operation and rolls back.

QueryGenerator generates insert and update queries for save and generates sequence query to assign ids to new objects. Ven calls query generator and runs the query using spring jdbc template.

Old codebase updated to run at Java 1.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/fmgVen/nbproject/build-impl.xml

    r19 r26  
    8080    </target> 
    8181    <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init"> 
     82        <j2seproject1:property name="platform.home" value="platforms.${platform.active}.home"/> 
     83        <j2seproject1:property name="platform.bootcp" value="platforms.${platform.active}.bootclasspath"/> 
     84        <j2seproject1:property name="platform.compiler" value="platforms.${platform.active}.compile"/> 
     85        <j2seproject1:property name="platform.javac.tmp" value="platforms.${platform.active}.javac"/> 
     86        <condition property="platform.javac" value="${platform.home}/bin/javac"> 
     87            <equals arg1="${platform.javac.tmp}" arg2="$${platforms.${platform.active}.javac}"/> 
     88        </condition> 
     89        <property name="platform.javac" value="${platform.javac.tmp}"/> 
     90        <j2seproject1:property name="platform.java.tmp" value="platforms.${platform.active}.java"/> 
     91        <condition property="platform.java" value="${platform.home}/bin/java"> 
     92            <equals arg1="${platform.java.tmp}" arg2="$${platforms.${platform.active}.java}"/> 
     93        </condition> 
     94        <property name="platform.java" value="${platform.java.tmp}"/> 
     95        <j2seproject1:property name="platform.javadoc.tmp" value="platforms.${platform.active}.javadoc"/> 
     96        <condition property="platform.javadoc" value="${platform.home}/bin/javadoc"> 
     97            <equals arg1="${platform.javadoc.tmp}" arg2="$${platforms.${platform.active}.javadoc}"/> 
     98        </condition> 
     99        <property name="platform.javadoc" value="${platform.javadoc.tmp}"/> 
     100        <condition property="platform.invalid" value="true"> 
     101            <or> 
     102                <contains string="${platform.javac}" substring="$${platforms."/> 
     103                <contains string="${platform.java}" substring="$${platforms."/> 
     104                <contains string="${platform.javadoc}" substring="$${platforms."/> 
     105            </or> 
     106        </condition> 
     107        <fail unless="platform.home">Must set platform.home</fail> 
     108        <fail unless="platform.bootcp">Must set platform.bootcp</fail> 
     109        <fail unless="platform.java">Must set platform.java</fail> 
     110        <fail unless="platform.javac">Must set platform.javac</fail> 
     111        <fail if="platform.invalid"> 
     112 The J2SE Platform is not correctly set up. 
     113 Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files.  
     114 Either open the project in the IDE and setup the Platform with the same name or add it manually. 
     115 For example like this: 
     116     ant -Duser.properties.file=&lt;path_to_property_file&gt; jar (where you put the property "platforms.${platform.active}.home" in a .properties file) 
     117  or ant -Dplatforms.${platform.active}.home=&lt;path_to_JDK_home&gt; jar (where no properties file is used)  
     118  </fail> 
    82119        <available file="${manifest.file}" property="manifest.available"/> 
    83120        <available file="${application.splash}" property="splashscreen.available"/> 
     
    199236            <length length="0" string="${endorsed.classpath}" when="greater"/> 
    200237        </condition> 
    201         <property name="javac.fork" value="false"/> 
    202238        <property name="jar.index" value="false"/> 
    203239        <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> 
     
    245281                <mkdir dir="${empty.dir}"/> 
    246282                <mkdir dir="@{apgeneratedsrcdir}"/> 
    247                 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> 
     283                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> 
    248284                    <src> 
    249285                        <dirset dir="@{gensrcdir}" erroronmissingdir="false"> 
     
    284320                <property location="${build.dir}/empty" name="empty.dir"/> 
    285321                <mkdir dir="${empty.dir}"/> 
    286                 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> 
     322                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> 
    287323                    <src> 
    288324                        <dirset dir="@{gensrcdir}" erroronmissingdir="false"> 
     
    335371            <attribute default="**" name="testincludes"/> 
    336372            <sequential> 
    337                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}"> 
     373                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}"> 
    338374                    <batchtest todir="${build.test.results.dir}"> 
    339375                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> 
     
    366402                        <path path="@{classpath}"/> 
    367403                    </classpath> 
     404                    <bootclasspath> 
     405                        <path path="${platform.bootcp}"/> 
     406                    </bootclasspath> 
    368407                </nbjpdastart> 
    369408            </sequential> 
     
    381420    </target> 
    382421    <target name="-init-debug-args"> 
    383         <property name="version-output" value="java version &quot;${ant.java.version}"/> 
     422        <exec executable="${platform.java}" outputproperty="version-output"> 
     423            <arg value="-version"/> 
     424        </exec> 
    384425        <condition property="have-jdk-older-than-1.4"> 
    385426            <or> 
     
    406447            <element name="customize" optional="true"/> 
    407448            <sequential> 
    408                 <java classname="@{classname}" dir="${work.dir}" fork="true"> 
     449                <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}"> 
    409450                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 
    410451                    <jvmarg line="${debug-args-line}"/> 
     
    431472            <element name="customize" optional="true"/> 
    432473            <sequential> 
    433                 <java classname="@{classname}" dir="${work.dir}" fork="true"> 
     474                <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}"> 
    434475                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 
    435476                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> 
     
    613654            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> 
    614655        </pathconvert> 
    615         <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> 
     656        <echo>${platform.java} -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> 
    616657    </target> 
    617658    <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available" name="-do-jar-with-libraries-and-splashscreen"> 
     
    627668        <echo>To run this application from the command line without Ant, try:</echo> 
    628669        <property location="${dist.jar}" name="dist.jar.resolved"/> 
    629         <echo>java -jar "${dist.jar.resolved}"</echo> 
     670        <echo>${platform.java} -jar "${dist.jar.resolved}"</echo> 
    630671    </target> 
    631672    <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries" unless="splashscreen.available"> 
     
    637678        <echo>To run this application from the command line without Ant, try:</echo> 
    638679        <property location="${dist.jar}" name="dist.jar.resolved"/> 
    639         <echo>java -jar "${dist.jar.resolved}"</echo> 
     680        <echo>${platform.java} -jar "${dist.jar.resolved}"</echo> 
    640681    </target> 
    641682    <target name="-post-jar"> 
     
    715756    <target depends="init" if="have.sources" name="-javadoc-build"> 
    716757        <mkdir dir="${dist.javadoc.dir}"/> 
    717         <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> 
     758        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" executable="${platform.javadoc}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> 
    718759            <classpath> 
    719760                <path path="${javac.classpath}"/> 
Note: See TracChangeset for help on using the changeset viewer.